r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3 Schemes] Implementors guide

Graham
8-Jan-2010
[479]
and that happens in the tcp device
Steeve
8-Jan-2010
[480x3]
ok i see what is the problem.
at the start, replace: 
>> client: open tcp://127.0.0.1:8080
by
>> client: open [scheme: 'tcp host: 127.0.0.1 port-id: 8080]


You will see that the lookup event is not fired, then i'll explain 
why
or maybe you'll figure it
Graham
8-Jan-2010
[483x4]
true .. not fired
give up ...
In my own code I see two lookup events one after the other ...
so if I put an 'open in the lookup event, I open the port twice
Steeve
8-Jan-2010
[487]
brb
Graham
8-Jan-2010
[488x3]
Does parse skip spaces automatically in r3 ?
parse "OK OK" [ "OK" "OK" ] is false in R3
seems not ...

parse "a b c" [ "a" "b" "c" ] => false
Kaj
8-Jan-2010
[491]
I think that was changed from R2
Graham
8-Jan-2010
[492x2]
Looks like it ... no mention so far that I can see of this new behaviour
Looks like the learning curve is going to be steeper than I thought
Kaj
8-Jan-2010
[494x2]
It was discussed maybe half a year ago. Don't remember where; there 
are so many possible places
Or probably more recently during the parse project
Graham
8-Jan-2010
[496x3]
Ok, I wasn't paying attention ...
what's the equivalent of set-net ?
ie. where is the smtp mail server information stored and where is 
the email stored?
Kaj
8-Jan-2010
[499]
There's no SMTP, so no need for set-net yet
Graham
8-Jan-2010
[500x6]
there's no system user object
Ok, this is pretty buggy and doesn't seem to send a well formed email 
... not sure why

http://rebol.wik.is/Rebol3/Schemes/Smtp
Anyway I've posted it for discussion, and to allow the rebol optimizer 
have a look ....
There are quite a few issues with it.
As soon as I connect the server sends me a "220" I can only get that 
by sending the EHLO.
Which triggers me to send another EHLO :(
I didn't bother with the authentication as that can be pulled out 
of prot-esmtp that Gabriele wrote.
Andreas
8-Jan-2010
[506x3]
thanks for posting, graham
i think you can fix the duplicate EHLO by doing a simple "read client" 
instead of the write
that should re-schedule the port, so that it next awakes with a read 
event
Steeve
8-Jan-2010
[509]
it doesn't need it, cause the wrote event always do it
Andreas
8-Jan-2010
[510]
yeah, but there's nothing to write for the client at this point
Steeve
8-Jan-2010
[511]
you mean after it's connected, the client  should only waiting for 
data ?
Andreas
8-Jan-2010
[512]
exactly
Steeve
8-Jan-2010
[513]
i see
Graham
8-Jan-2010
[514x2]
got it working .. need to enline the header
what do I need to change??
Steeve
8-Jan-2010
[516]
but is that really a burden to send by default an EHLO ?
Andreas
8-Jan-2010
[517x3]
#                 ; need to write to the client to trigger flow of 
data  

#                 write client to-binary net-log/C rejoin ["EHLO 
" ehlo-msg CRLF]  
#                 ; now ready for the next state  
#                 client/spec/state: 'AUTH
change this to:
read client
Graham
8-Jan-2010
[520]
give it a go ...
Steeve
8-Jan-2010
[521]
seems that is doesn't bother the server :)
Andreas
8-Jan-2010
[522x2]
client/spec/state: 'INIT
no, but it bothers graham's state machine :)
Steeve
8-Jan-2010
[524]
ahah
Graham
8-Jan-2010
[525]
no .... it does bad things :)
Steeve
8-Jan-2010
[526]
Graham, you code looks clean, i like it
Graham
8-Jan-2010
[527x2]
sever sends me a bye
if you enline the message, it actually sends the complete email