World: r3wp
[!REBOL3 Schemes] Implementors guide
older newer | first last |
Henrik 7-Jan-2010 [405] | And one maintainer per OS platform. |
Andreas 7-Jan-2010 [406x3] | re console: i have some patches to the linux hostkit that rip out the custom R3 line reader |
this in itself is already an improvement on linux, as rlwrap is, at the moment, far superior the the line reading abilities of the r3 hostkit | |
but based on this, i have also hooked up libreadline into the r3 hostkit, in a very basic way | |
BrianH 7-Jan-2010 [409] | Gabriele, can WeTan get posted to DevBase? There is an area for community projects. You could make a folder for your MD3 stuff. |
Kaj 7-Jan-2010 [410] | Andreas, are you using LibReadLine? |
Andreas 7-Jan-2010 [411x2] | that's proper line editing as well as line history |
yes, sure | |
Kaj 7-Jan-2010 [413] | Nice |
Andreas 7-Jan-2010 [414x2] | it's still a quite rough integration as e.g. signals (esc, C-c) are not yet handled properly |
but it's already rather nice to use :) | |
Graham 7-Jan-2010 [416] | Gab said wetan was in the r3 alpha file share .. where ever that might be ... |
BrianH 7-Jan-2010 [417] | It is of limited availability. If we want the tool used for R2 or R3 source, it needs to be publically available, and that means DevBase, or failing that, some web site. In either case it needs the right licensing, but with Gabriele writing it that is unlikely to be an issue. |
Graham 7-Jan-2010 [418x2] | Ok, look under User/Gabriele/'wetan-test.r |
there's no license attached to it. | |
BrianH 7-Jan-2010 [420] | R2/Forward is MIT - it was the least restrictive license I could find short of public domain or WTFPL. The FreeBSD license is comparable - see opensource.org for details. |
Graham 7-Jan-2010 [421x2] | Since the network protocols are asynchronous, it seems that we should have a common way to supply a callback to the network resource being requested ... |
so, if we read a page, we supply a call back to the 'read so that our callback is passed the data when it is received.... | |
Maxim 7-Jan-2010 [423] | I'd guess so. that is how its done, in R2 async networking. |
Graham 7-Jan-2010 [424x3] | At present you have to supply an awake handler to the port ... |
Just thinking we need a higher level interface to the network protocols to exploit their async nature. | |
For instance in Jquery .. you just chain functions .... | |
Maxim 7-Jan-2010 [427] | well, i guess I meant that its how I implemented the handler's switch/case. it just forked off to callbacks. |
Graham 7-Jan-2010 [428x2] | Too low level I think and messy |
Just want something like read/cb http://www.rebol.com:call-back-function | |
Maxim 7-Jan-2010 [430x2] | what I mean is that, like face/feel, the handler is a low-level set of functions which should callback to application hooks based on events. |
you could not... what events does the handler really manage? | |
Graham 7-Jan-2010 [432] | could not what? |
Maxim 7-Jan-2010 [433] | maybe, if it had an event name parameter. a bit like the event action. but the scheme handler still needs to exist, its the place where logical events are determined. |
Graham 7-Jan-2010 [434] | maybe supply a block .. where the first is the one you want used on success, and the other is an error handler |
Maxim 7-Jan-2010 [435x3] | I'd rather it be just a function with error events instead. |
but the problem with this is that with a single callback, it gets hard to tailor your stuff, cause everything has to happen in a single function. I'd rather have named callbacks. | |
read/cb http://www.rebol.com'on-done :call-back-function | |
Graham 7-Jan-2010 [438x2] | well, in that case we can use refinements |
read/on-done http://www.rebol.com:callback | |
Maxim 7-Jan-2010 [440] | but each scheme will have its own callbacks. some schemes might support headers, others not... for example, in my http rss reader, I had a callback for the file size. if it was too large, I'd refuse the rest of the read and close the port... |
Graham 7-Jan-2010 [441] | the other problem is that 'read doesn't support these refinements |
Maxim 7-Jan-2010 [442x2] | yes, but if ports had a way to define callbacks, they would be passed on in some way by port using functions. for example, a codec, would just be a callback which converts the stream or returns parameters to tell the port it needs more data before it can convert a chunk of input. |
so read, would just have to pass it the codec function using /cb | |
Graham 7-Jan-2010 [444] | read is going to have to get smarter and read the refinements in the 'read defined in the action block |
Maxim 7-Jan-2010 [445] | in the above... would == could == should ;-) |
Graham 7-Jan-2010 [446] | Also for things like download meters ... |
BrianH 7-Jan-2010 [447] | There might be a /with option for READ, which supports additional options in an options block, but there won't be any other options outside of that block. READ is a low-level function, and won't have more refinements. |
Gabriele 8-Jan-2010 [448x2] | Brian: ok... let's make it easy... i just copied it here: http://www.rebol.it/giesse/wetan-test.r and http://www.rebol.it/giesse/wetan-template.html- they just need to be in the same dir. |
bsd is fine for the license, or mit, one day i'll release it properly and attach a license. :P | |
Graham 8-Jan-2010 [450] | I've been reading some more of the docs .. and it says that the lookup phase in the awake handler is called when the name is resolved with a dns lookup .. but that phase is not used when the url uses an ip address. But then I see some demo code using IP addresses ( the ping pong server ) where the open port is in the lookup event ... |
Steeve 8-Jan-2010 [451] | Did you test it ? Being in the source code example doesn't mean that the lookup event is fired. |
Graham 8-Jan-2010 [452x3] | http://www.rebol.net/wiki/TCP_Port_Open_Issue perhaps it means that the lookup event is passed to the handler once it obtains the ip address |
that's probably it ... | |
if the ip address is passed initially, then no lookup is sent to the tcp device | |
older newer | first last |