« first day (2361 days earlier)      last day (1419 days later) » 

2:52 AM
@HostileFork Two things first: one, only those things that can accept newlines need to be considered (so quotes are out), and two, this can (and IMO should) be done by a higher-level parser in Rebol, not C. My lexer.reb could be a starting point, and this is one of the things I intended it to be good for.
 
@MarkI Unfortunately, adoption of a new model for a lexer probably fits in the "things that will only happen if you do it" category.
Most of us do feel that something more formalized, table-driven/rule-driven is necessary. And ideally whatever engine makes the tables wouldn't be some GNU automake yacc etc. but a bit of Rebol code that generated the necessary C implementation.
 
3:14 AM
All right, but can you then at least point me to why RELAX was added to LOAD? It's not an Alpha thing ...
 
@MarkI It was called /error.
e.g. transcode/error, /relax seemed a better name for what it does
 
Thx.
 
3:48 AM
@Brett Since I see you are syncing w/master, I'm curious if you want to put in any priority requests for features. @GrahamChiu is asking for user-focused features and I kind of want to keep on top of what people using the system want. Right now we're looking at encapping, for instance.
Interesting, Rebol style guide promotes the Plan -4 ][, ]( and if condition [ styles. I never noticed that had an official endorsement, but good, because I don't like ] [ when on a line by itself.
> The tab character (ASCII 9) does not indent four spaces in many viewers, browsers, or shells, so use an editor or REBOL to detab a script before publishing it to the net. The following function detabs a file with standard four-space tabs:
^-- also a Ren-C position
> For ease of reading and portability among editors and email readers, limit lines to 80 characters. Long lines that get wrapped in the wrong places by email clients are difficult to read and have problems loading.
^-- also a Ren-C position
 
 
3 hours later…
6:26 AM
@HostileFork I'm always undecided how to indent long parse rules, switch, case statements etc.
 
6:45 AM
@HostileFork do you know the purpose of the WRITE event? I don't think it's used in network events. So, perhaps something else?
 
7:20 AM
There was a WRITE event to specify something was written and WROTE was when it completed. But it probably relates to r3s internal chunking which is not used.
 
 
6 hours later…
1:32 PM
@GrahamChiu Not sure what the purpose of WRITE is, but I don't see it is used anywhere in the source, so I don't think the script would ever see such an event
 
There was once some article or mention of Carl towards WRITE, but I don't remember anymore ....
 
1:47 PM
@pekr the webpage was talking about the WRITE action, not the event
 
OK, so you think there was initially only a WROTE event type?
 
There is a EVT_WRITE event declared in the source, but it is not referenced/used anywhere
 
Is the Device model still used, or was it replaced in Ren-C?
Ditto for Extension mechanism?
 
It is still being used in Ren-C
The extension mechanism was reworked
 
 
6 hours later…
7:58 PM
@pekr The general concept of R3-Alpha was to try and isolate out the parts of the system that needed to do "system call stuff" from the "core"...where the "core" was basically supposed to have the only dependency of the C language standard. But some parts of the C language standard, including--say, "printf"--were avoided. Instead a table of functions that Rebol expected to be there was established, and each host was responsible for filling in those functions.
These functions had an interface that did not use "Rebol types". e.g. those functions did not know what a BLOCK! was, or its REBVAL* or REBSER* equivalents.
So in a way, it was an attempt to list a number of platform services, that were agnostic to whether they were supplying those services to a Rebol-like thing or not.
Basically, it was an OS abstraction layer, which could provide those abstractions to any kind of program, Rebol or not.
My opinion was that this was a misguided effort. It effectively created a new, imaginary OS to support... more poorly defined than any of the existing OSes it was designed to wrap.
@ShixinZeng can perhaps back me up on this. :-)
What we are (slowly) moving to in Ren-C is the idea that we do not try and invent such a hypothetical OS, using C-based interfaces limited to standard C types like "char*" etc., but instead have an extension/port model that speaks in terms of Rebol types.
So we are not afraid to pass REBVAL* to these services, in fact we encourage it, and assume whoever is implementing the device/interface/whatever has an API to extract meaning from these REBVAL*
@pekr That's the kind of philosophical shift that is happening, but it's not the kind of thing that happens overnight. If you look at the codec change, it's an example of this philosophy being moved on... "more Rebol, less C that is artificially forced to be Rebol-agnostic"...
While it might seem less efficient, in practice it is not--so much time was spent generalizing data to avoid speaking in Rebol types, and then going over the wire, and then turning it back into Rebol types--that not only was it error prone, it added overhead in the general case. We don't really need anything other than Rebol => metal => Rebol. This other concept of Rebol => some invented C thing that avoids Rebol => metal => some invented C thing that avoids Rebol => Rebol is pointless.
In particular because there was nothing good about some invented C thing, it represented no standard anyone else uses, and was full of design mistakes.
 
8:19 PM
Thanks for the explanations!
 
@pekr Well, it's not quite a blog, but, chat can be like a blog :-)
Host Kit was, in part, a victim of Rebol's closed-sourcedness, e.g. the considerations driving it that forced it to "some invented C thing" were based on an assumption about the need to limit everyone's awareness of how Rebol worked.
It is not super likely that host kit would have ever been proposed or modeled as it was with an open source Rebol.
 
8:31 PM
@pekr Our current concept is not to fear the REBVAL*, and to have two APIs for dealing with them. One is what you might think of as "libRed"-like, it doesn't really know how to pick apart the value into its component bits, but it does know how to compose them roughly at a DO level. The other is what we've been basically calling "Ren-C", which I guess would correspond to whatever Red calls its internal API that can pick apart and build cells at a flag-and-byte level.
The libRed-style API, like libRed, operates on what it sees as "void*"...with GC concerns managed at a higher level. Currently the name for this is unchanged from hostkit, calling it RL_XXX (the "(R)eb (L)ib" API), but I think we should line it up with libRed as closely as possible.
Just better, because we have more tricks up our sleeve. :-) I don't really even mind calling it redDo(...) etc, but we could just call it rebDo and then have a #define redDo rebDo or whatever.
 
Interesting, but beyond the level of my understanding :-) Those things should be documented apart from the source code being considered a documentation itself :-)
 
@pekr It's not that complicated!
Anyway, I guess we have to think about what to do about these two different standards, and if we're going to bother naming the API differently or not.
It really should be a pretty small #include file of definitions to allow libRed programs to be built against Ren-C
I'm going to do a rebuild of Ren Garden and I guess we're going to mimic the Travis drop strategy for it.
I think we should only do Mac OS X 64, Win 64, and Linux 64...and for now, only debug.
Hello @KhaledAwad. Nothing in the tag, eh?
 
8:51 PM
@HostileFork at one stage rebol supported about 32 platforms so I presume that rt did have some type of abstraction that they used to interact with the host os.
 
@GrahamChiu Mostly that abstraction is what's called POSIX, and a sort of improvised accommodation of various compiler and linker settings, with #ifdefs for peculiarities.
For instance, Haiku is one of those "mostly POSIX" cases, where, you just find some weird bit that they did a different way, and have to special case that compilation.
It's rare to take even something as generic as Rebol and be able to compile it on an all new platform without some little exception needing to be made, even if it's just a linker switch.
 
Anyway I think you're telling me that evt_write was an unused network abstraction
 
@GrahamChiu Someone said that, and I'll back it up, nothing sending it from the C
 
So if you write more than 32kb in one go, it's still a wrote event generated for each chunk
We don't do that because there's warnings about a bug
 
@GrahamChiu Repro the bug and we'll see what we can do about fixing it.
 
9:03 PM
@HostileFork well, warnings about the bug are scattered in all the network protocols but I don't know if anyone has tried to fix it, or it has been fixed, or, even if it exists!
 
@GrahamChiu Delete warnings, write code as you want it to work, and we fix the bug.
 
@HostileFork the easiest thing to do is to see if removing the chunking in prot-http causes it to fail
or just corrupt a large http POST
 
@GrahamChiu Sounds like... a... bug!
The right way to deal with them, is to fix them.
 
@GrahamChiu it shouldn't send a WROTE event unless the whole data is written: github.com/metaeducation/ren-c/blob/master/src/os/…
 
@ShixinZeng Well, my thought was a EVT_WRITE was generated for each intermediate write
I read somewhere that was to allow you to write progress meters for large uploads
 
9:10 PM
@GrahamChiu That's an interesting point
 
write

Indicates that a write operation has been started. The argument shows the number of bytes remaining to be transmitted. This is useful for updating progress bars or to maximize the buffering efficiency of your program (by keeping the output buffer full while streaming). A write operation is normally begun when an INSERT performed on the port.

write-done

Flags that a write operation has been completed and that there are no more bytes in the buffer to be transferred. Note that this does not mean that the data has been transferred to the receiver. The data may still be "in-route".
 
This event should be easy to add
 
@ShixinZeng can you check to see if this is correct? github.com/r3n/renclib/wiki/…
I wrote it last night to try and help me remember how to write a working scheme (again)
 
 
1 hour later…
10:20 PM
@GrahamChiu added webserver based on your last version of httpd -- works fine. Access it with do <webserver> (port 8888)
 
@giuliolunati my last version??
I don't think I wrote anything :)
But are you saying that with whatever changes were made, it no longer hangs?
 
@GrahamChiu Well, you fixed it
 
Or survives a multiple refreshes?
 
@giuliolunati Nice to know that was the fix. Though it should have given an error before ...
@rgchris I had 200 simulated users doing GET index.html and it didn't even break a sweat
I used JMeter as the stress tool
 
And that one change was all it took? Cool beans...
 
10:30 PM
No :-( It crashes with:
** Access error: write failed: [scheme: 'tcp] re
ason: 32
** Where: write either send-chunk switch --anonymous-- wake-up either until --anonymous-- wait do catch either either --anonymous-- do trap either --anonymous--
** Near: take/part port/locals/wire 32000 ??
 
D'oh!
 
However more stable then Andreas's shttpd
 
Progress, I guess!
 
@giuliolunati that error occurs because the port is closed while a write is in progress
so, the ERROR event is not being catered for
 
@GrahamChiu I guess that's occurring in the HTTPD scheme?
 
10:32 PM
I saw that when I closed the JMETER
@rgchris it's occurring because the ERROR event is not being handled, or, it's not being trapped when you're writing to a closed port
I think it's a simple fix .. but I didn't do it :(
 
Another thing I think we must face is the internal-chunking-bug
 
11:02 PM
@giuliolunati has anyone confirmed it still exists?
 
11:26 PM
@GrahamChiu I just tried changing chunk size to 32'000'000 -- no error :-)
 
@giuliolunati Hmm. And no corruption of the file being sent?
 
@giuliolunati I read in one of your scripts that the bug had been fixed.
So, maybe you noticed it had been fixed before??
And then forgot?
 
@GrahamChiu But then I got errors again, so not sure. Now I'll repeat testing with big chunk size, let see what happens...
 
;; Manual chunking is only necessary because of several bugs in R3's
;; networking stack (mainly cc#2098 & cc#2160; in some constellations also
;; cc#2103). Once those are fixed, we should directly use R3's internal
;; chunking instead: `write port body`.
@giuliolunati @rgchris I've put in a couple of traps to see if we can stop the webserver dying. See github.com/r3n/renclib/commit/…
So, as I see it, the port is closed while we are in the process of writing. So, we never see a CLOSE or ERROR event. Therefore we must handle the error ourselves.
Anyway, Andreas' web server now no longer crashes on a browser refresh and seems to stay open for new requests
 
11:45 PM
@GrahamChiu would you do the same with httpd?
 
Ok, give me a minute
 
@GrahamChiu yes, I'm using this one.
Night for me -- cu l8r
 

« first day (2361 days earlier)      last day (1419 days later) »