« first day (808 days earlier)      last day (2972 days later) » 

12:00 AM
@earl Crap. I see what you mean now!
Perhaps.
Or not. I guess we'll see!
Ach, no—don't think it'll work after all. Sorry folks!
 
 
5 hours later…
4:35 AM
Not sure if this is a) feasible, b) something someone has tried, c) appropriate for R3, but...
If you were to switch out the system/ports/output (currently console scheme) for a port that captured Rebol's output; turned on trace—you could conceivably parse the realtime trace information and separate it from the regular output flow.
And do something with it. Perhaps a view application, or just reformat it into a more comprehensible HTML document.
Don't think it'd be much fun to do, but it could be used to improve realtime tracing of internal operations...
Could even just simulate a step-through session.
 
 
1 hour later…
6:04 AM
0
Q: Difference between Rebol 2 and Rebol 3 when mixing SOME in parse with CHANGE

HostileForkImagine a simplified example of a block of blocks containing words: samples: [ [a a c a] [a a c b] [b a c a] [c a c b] [c c c c] ] Each block needs to be [c c c c]. So if a value is 'a, it is changed to 'b. If a value is 'b, it is changed to 'c. If a value is 'c, we prin...

@rgchris I think figuring out if and how Rebol can be meaningfully mapped into an existing debugging model such as the one in Eclipse would probably be a useful study, just to see what sort of hooks one could put in. Maybe draw from what the LISP people do
 
 
9 hours later…
3:00 PM
Porting everything in Red using HASH! to use MAP! has turned out to be very labor intensive and prone to errors. :-/ I think I'm going to line up those changes into a separate branch...and for starters I'll just say if you're using R3 then HASH! is defined as BLOCK!.
 
 
3 hours later…
6:19 PM
My first SO question! Perhaps I'll not get the answer I'm looking for today, but sometime in the future I hope...
0
Q: How do you write a codec for Rebol 3?

rgchrisI wrote a JSON encoder/decoder for Rebol 2. I'm rewriting it for Rebol 3 and would prefer to make it available in Rebol 3 as a codec: load %data.json save %data.json object decode 'json to-binary {["some","json"]} How should I go about this? At the time of asking, documentation on this subjec...

 
@rgchris Indeed, the documentation on pretty much anything that's new in R3 is fairly scarce...
@earl So I tried doing #666 (the devil's hue!) for the foreground, and #F4F4F4 of the background of the table headers on the download page, and I think it's a bit better...
 
Patchy at best. I still prefer searching the R3 blog for scraps than trawling the docs—there's so much more there about intent.
 
A bit lighter on the background works too, around #F8F8F8. More subtle.
@rgchris Well, it remains to be seen who will ultimately be driving the intent. No merges since December 31st. In the meantime, Red has had 36 commits...
 
6:56 PM
Argh, just spent a while debugging an AT where I should have used a SKIP. :-/
 
Pardon my ignorance, but how do you do things with Red? What is the process for getting started?
Do you have to build it before you can use it?
Do you have to compile scripts as part of the build process?
Is there a console?
 
7:28 PM
@rgchris It's a compiler, so no console. Red takes input files in the higher-level red language (.red), and Red/System takes input files in the lower-level C-like dialect (.reds).
Both Red and Red/System are currently written in Rebol. So you run a Rebol interpreter (currently only Rebol 2, though I'm trying to fix that) on which of those two compilers you want (red/compiler.r, red-system/compiler.r) for the right kind of input files.
Red/System directly generates executable binaries like ELF. The higher level Red goes through an intermediate step of producing output as .reds files for Red/System to process.
You might be interested to see the parse code in the Red lexer. While Red/System basically just uses Rebol's LOAD as STRING! to process its input, the higher-level Red actually does a binary parse to do all the Unicode processing for itself.
So when we were discussing the question of defining the Rebol parser in a more formal fashion, Red's use of Rebol parse provides a bit of an entry point to that.
 
I'll take a look, there is also the Rebol-Syntax project. My ultimate goal is to define Rebol outside of Rebol syntax : )
 
8:04 PM
Hmmm. Somewhere in that Red preprocessor parsing code, they're turning PAREN! into block in the R2 version. So let's say your input looks like:
[#L 566 if frame/heap = as series-buffer! (
#L 567 (as byte-ptr! node/value) + series/size + size? series-buffer!
#L 568
) [
#L 569 frame/heap = series
#L 570
]]
The line-rule has a job to do, which is to chew off the #L and save the line number, as well as use the rebol new-line command to re-decorate the block.
In both Rebol 2 and 3 I get that segment of code as input, but when it gets to line 567 Rebol 2 has somehow excised the outer paren:
[(as byte-ptr! node/value) + series/size + size? series-buffer!]
Whereas in Rebol 3, it's still in a paren:
((as byte-ptr! node/value) + series/size + size? series-buffer!)
So the new-line chokes, because it doesn't let you put new-lines on paren. Though it seems like it should...because as evidenced from the above probing, it does keep track of newlines for parens. :-/
Also, is there a better way to get the old into rule behavior than: b: any-block! :b into rule?
 
9:08 PM
Oh, here's a fun Rebol 2 parser bug:
>> foo: [>= [<] <= [>]]
== [>= [<] <= [>]]
>> length? foo
== 2
>> probe foo
[>= [<] <= [>]]
== [>= [<] <= [>]]
>> first foo
== >=
>> second foo
== [<] <= [>]
 
9:49 PM
0
Q: Weird behavior with SELECT with the <= operator, returns none when it shouldn't

HostileForkI'm trying to make a map of operators to their opposites in Rebol 2, for instance: op-map: [ >= [<] <= [>] ] This does not work for <=: >> select op-map to-word "<=" == none ;-- expected [>] And gives a very strange response for >=: >> select op...

If it's not one thing, it's another...
 
10:25 PM
@rgchris (...and another good case for getting a formal handle on all of this!)
 
Ah, you made a tag!
Indeed.
In my eBNF file, I have this as separate notation.
I just haven't got to the bit about whitespace handling around these 'words'.
 
11:03 PM
Good to know that people in Park City are enthusiastic about the open source Rebol release. It's all over the local gossip. Maybe the Rebol convention should be held there. :-/ (look in this comment's edits for the link, I'm not going to leave the link in the chat)
 
11:14 PM
In my (quite imperfectly formatted) document, tags are parsed before ops. reb4.me/r/rebol.html#Tag
 
Hm, because in Value AnyString comes before AnyWord?
 
Yes.
(I'd say I have everything from 'Value' down, but 'Values' needs some work)
Hmm, not everything—'Percent' should come first in 'Number'
And I don't believe file can be empty without quotes.
 
Your ruleset could be used to drive the automatic generation of random .R files that you could test against the C coded Rebol, and see if you get the same structure back that you thought you churned out.
 
Are you aiming at R3 or R2?
@rgchris Defining Rebol syntax not using PARSE was my ultimate goal with rebol-syntax as well :)
 
Started with R2, but adding percent.
 
11:25 PM
In any case, in R3, % is a valid file!.
 
@earl I figured that's where you were headed. My first goal was the RR diagrams : )
 
Which are indeed pretty nice :)
 
Unfortunately it's very hard to convey some of the nuance—which types can follow which without spaces. That's where I'm a little stuck.
 
I'm not sure we can even model the whitespace behaviour faithfully.
 
Well I think it would be very sad if Rebol and Red did not converge and agree on this. ..what's a legal word, etc. So now there's a Rebol PARSE on binary! bytes as Unicode version in Red's red/lexer.r, a raw C implementation in Rebol's u-parse.c, and these non-Rebol formalisms.
I feel like there needs to be a working group or something that says the importance of this agreement is worth going through differences of opinion and achieving a consensus.
 
11:30 PM
@earl I wonder if it can be defined by characters that cannot be part of a type.
 
I'm assuming the UTF-8 as standard is uncontroversial. The other encodings simply aren't worth it.
 
For example, an integer cannot have a word character immediately after.
 
@HostileFork I've made that case too—others are adamant that other (even non-Unicode) sets be supported.
 
@rgchris You basically need to look ahead.
 
11:33 PM
Boo.
 
You could maybe invert that condition, but I'm not sure you get by with only 1-character lookahead, so if not, things will just explode exponentially.
 
@rgchris Argh...no, why? Why?!
Incidentally, I am having a problem right now with a binding difference between R2 and R3. So I've got this word passed into a function that's sitting in a context... and in R2 it is bound, but in R3 it is not. (This has happened to me a couple of times.)
So this context (call it ctx) has a function (call it foo) that takes a word as a parameter (call it bar), and then it uses get on that word. In R2 this is fine, in R3 it says it has no value.
 
@rgchris And of course, you also need ordered choice (so even though you may use EBNF notation, you either need e.g. PEG semantics, or use CFG and be aware that it is ambiguous).
 
@earl my idea was that, for example, my integer definition would include a path at the end where if it was of char of, say [a-z], it would lead to <explode>
 
To debug this I thought, well, let me see where it was bound in R2. So inside I probe bind? bar. The answer comes back as a context...in this case, it appears to be ctx because foo is in it.
Oh, wait, hm, I just realized something I need to check.
 
11:41 PM
@rgchris Well, won't be quite so easy :) But it really depends what you want to achieve with the notation.
 
@earl With this notation, I want to express every literal type with diagrams. If possible, include all the script (values) permutations.
Whether that's the best format for actual testing, I'm not so certain.
 
If you just want to express literal types in separate, that simplifies things, but also reduces the practical use.
Makes automatically deriving a syntax checker for programs impossible, for example.
 
Did you have a target beyond the Rebol notation?
For syntax checking and the like?
 
A formal specification that can be used to (a) automatically derive a full program checker and maybe even (b) generate a parser (syntax to CST) from.
 
I remember someone suggesting Coco/R
 
11:48 PM
Also, have a basis for simplifying the syntax and getting rid of "implementation side-effects/artefacts".
 
Yes!
 
Easy to say, hard to do :)
Do you currently have all (literal) datatypes in your EBNF?
 
I had two other thoughts in my mind: providing a pathway to test the possibility of new types (e.g. handle); and a framework for developing parsers in other languages.
 
Yes. And develop proper simplified subsets to spread more widely as data exchange formats.
(Think JSON with more convenient syntax and a literal datetime.)
 
@earl All R2 types (I cross-referenced with your syntax project) and Percent. As R3 is still a moving target, I haven't really delved into other additions.
I'd considered adding Red's Hex notation too, but that's awkward and unsettled.
 
11:56 PM
I'm not sure we had all R2 types in rebol-syntax.
Ok, so basically your EBNF is already much more amenable to some basic analysis.
Well, that's good to know :)
 

« first day (808 days earlier)      last day (2972 days later) »