« first day (2362 days earlier)      last day (1418 days later) » 

12:04 AM
@giuliolunati @rgchris I've placed some strategic traps in and that now prevents shttpd from crashing with an error
 
 
1 hour later…
1:10 AM
@giuliolunati @rgchris so on testing I now find that mods to Andreas's webserver work fine. I can't crash it with rapid browsing refreshing.
However, although I can't crash @rgchris's web server, it just stops responding
So, my mods are only enough to make it apparently not crash .. but it won't accept new connections. So, rather than I spending more time on this perhaps @rgchris can see if it can be fixed. And in the meantime revert back to Andreas' version
https://github.com/revault/rebol-wiki/wiki/TCP-Port-Details#Write_Action

Check the IO-request for valid connection flag. This is not a socket check, it is a request state flag check. A lost connection at the socket level is detected by recv() or by a send() error.
So I think that means we can't detect a socket close by client until we write to it. And since it's closed we get an error. So, that's what the traps are for. If we get an error on write, we need to close the port.
I would think that a browser refresh is open/request/close repeatedly
 
1:29 AM
@rebolbot alive?
or dead
 
 
5 hours later…
6:23 AM
@giuliolunati had a chance to test?
 
 
2 hours later…
8:12 AM
@GrahamChiu I confirm -- httpd no more chashes on repeated refresh, but stop responding.
I'm pretty busy this week, but wish to try updated Andreas's shttpd -- I recall it failed serving big files
 
@giuliolunati well, I didn't try any files :)
I just tried to see if I could get it to break
well, just the downloads index.html
 
8:31 AM
@GrahamChiu hmmm, in mini-shttpd.reb where you write if err: trap... maybe it should be if error? err: trap...
 
@giuliolunati trap replace error
@giuliolunati I don't recall what I wrote .. but we don't need the error value
so it can just be if trap? [write something][ close port]
 
@giuliolunati TRAP was a choice to rename TRY. I thought TRY/EXCEPT was less clear than TRAP/WITH
 
@GrahamChiu Don't know, but with error? works, w/out only got NOT FOUND
 
Ren-C has tried to clarify the mechanics of THROW/CATCH and FAIL/TRAP.
 
@giuliolunati eh?
 
8:41 AM
Please, if there's a bug, file a reproducible case...!
 
>> if err: trap [ 1 / 0][probe err]
make error! [
    [self: code type id message near where __FILE__ __LINE__]
    [
        code: 4000
        type: Math
        id: zero-divide
        message: "attempt to divide by zero"
        near: [1 / 0 ??]
        where: [/ trap]
        __FILE__: %../src/core/t-integer.c
        __LINE__: 461
    ]
]
but if you don't need to know what the error is, and we don't now since we now it's caused by the closing of the port, we can just use trap?
 
@GrahamChiu with your version I cannot get any file showed in browser -- with error?" inserted, it works
 
@giuliolunati oh?
@giuliolunati that is my fault
 
@GrahamChiu Without error?, every time close port is executed
However, tried with big file -> repeated refresh -> hangs :-/
 
@giuliolunati I fixed that issue
just updated it
@giuliolunati how big a file are you talking about?
I can try
 
8:49 AM
@GrahamChiu 544429 bytes ~ 512k
 
@giuliolunati ok
@giuliolunati Hmm. I tried 10Mb file and no problems
let me fire up the java thingy
 
@GrahamChiu Well, I tried it on phone.
 
I'm not seeing any errors with a 522Kb file .. ie. r3a.exe
@giuliolunati what are you using to test? Another phone or a PC browser?
 
@GrahamChiu the same phone, with a text file
 
9:07 AM
@giuliolunati and does it work with a standard web server?
I could check tomorrow but I doubt I have the latest sl4abox
@GiuseppeChillemi Hi. As I mentioned in email, ask some rebol questions and we'll vote you up to 20 points
and then you can talk ( after 30 mins when the reputation propagates through the SO universe)
 
@GiuseppeChillemi Ciao! Italiano, suppongo :-)
 
9:42 AM
alternate way is to use error? like you did
if error? err: trap [ write port][ probe err | close port ]
 
10:10 AM
@GrahamChiu good news -- the error I mentioned was only apparent. After little time another refresh worked fine.
 
 
3 hours later…
1:18 PM
@GrahamChiu Looks good. But "EVENTs are only passed to the awake function after the port is added to the list of active ports (system/ports/wait-list) by using WAIT" is not correct, in R3, system/ports/wait-list is not used, EVENTs will always be passed to the ports unless /ONLY (in which case, only the ports in the WAIT will receive EVENTs during this WAIT) is used when WAIT.
and "That value is returned by the awake function. If the value is true, then the port is then removed from the list of active ports, and no more events can be processed. To restart processing new events, you have to WAIT again on the port, which is still connected, and that WAIT is done outside the awake handler." is not correct, the return value from awake is checked by WAIT, if it returns NON-FALSE/NON-BLANK, WAIT will return the port immediately.
 
 
6 hours later…
7:41 PM
@GrahamChiu I'm working on mini-shttpd.reb. Seems that problems arise when browser is low of memory and can't receive an entire chunk at one time. Workaround is to reduce chunk size.
 
 
2 hours later…
9:17 PM
Did I miss CureCode going walkies? Anyone?
 
9:47 PM
@GrahamChiu -- @GiuseppeChillemi has raised a SO question
 
@HostileFork Thx.
 
@ShixinZeng can you give me a link to the C source where this all happens?
 
@HostileFork But the curecode->github transfer was not completely successful.
 
@giuliolunati Pity the question is not really in a format suitable for SO
@MarkI Hasn't been used for a long time.
 
9:59 PM
@GrahamChiu As mentioned above, it still contains (or contained) information available nowhere else (or nowhere at all).
 
@MarkI And the issue is, the tickets that were ported across aren't used either
 
@GrahamChiu You are punny.
 
@HostileFork Why??
 
@GrahamChiu Because issues which apply equally to Ren-C or R3-Alpha, more generally what we would call "Rebol3" issues, belong there.
 
10:02 PM
@HostileFork and if they also belong to Red?
 
@GrahamChiu What's Red?
 
@HostileFork something off topic! 255.0.0
@HostileFork but anyway that's a new ticket. I was talking about existing tickets.
 
10:25 PM
@GrahamChiu another better question from @GiuseppeChillemi
 
@giuliolunati It is a good guideline if you are asking your first question, to include code. If you don't have code, it's more like a Google search or something you should ask in a chat.
 
@giuliolunati ok, he has his 20 points now.
 
@GiuseppeChillemi benvenuto nelle chat di StackOverflow!
 
@ShixinZeng Do you have any serial devices?
I guess we don't really know quite what the status of the serial support is.
 
@HostileFork Didn't @kealist port Carl's serial device from the ReCode conference?
 
10:34 PM
@HostileFork You're right, obviously. But I recall when you guys upvoted my 1st question to let me chat here... ;-)
 
10:48 PM
I did get most parts of it constructed from details in his video presentation, but then Bo got the code from Carl directly. I added a windows device, and then @ShixinZeng extended it & made it Async.
It should be working with the PR/commit in the issue and I did rebuild it like two weeks ago, but life keeps happening
 
@ShixinZeng Can you clarify this. Once a port has been opened and an event generated it will be sent to the port associated with that event ( as a queue or a single event )? What happens when there is no awake handler?
@kealist Did Carl also provide the insteon stuff?
 
@GrahamChiu No
I ended up using rebol 2 + uniserve with the serial stuff I really needed to do because of GUI requirements
and rebol 2 just crashes all the time
 
@kealist uniserve crashes all the time?
 
It stops responding a lot when using some of the C lib /Command stuff
Just like when running Red tests in Windows
 

« first day (2362 days earlier)      last day (1418 days later) »