« first day (848 days earlier)      last day (2932 days later) » 
00:00 - 18:0018:00 - 00:00

6:00 PM
6
Q: How to write a "Hello, World" CGI with Rebol 3?

dt2Lets start with something simple: a form with a field which gets echoed.

@graph So Rebol has always the ability, like JavaScript when it's used in a browser, to run library scripts from a URL. All you say is do http://example.com/something/whatever/some-script.r
And of course you can run them locally from files on your filesystem. But Rebol 3 has a more ambitious module system, to try and get more parity with the way people are working these days. I don't know a lot about it myself but @BrianH can tell you about it.
Anyway, exactly how things are bundled or chosen as options in a bundling for your configuration of standard stuff is in flux. It's ostensibly very flexible and will make it so we don't have to be concerned about what all is included from the start. But still, decisions and documentation and work to do.
 
aight I have this tutorial that I'm going to do right now. Cya in 30 minutes :)
 
@graph Cool! Cya...
@earl Hrm. Well idiomatically I suppose I should say rejoin [#{} {some string} other stuff here] instead of rejoin [to binary! {some string} other stuff here] I guess.
 
6:29 PM
uhm
well the window version from here rebol.com/download-view.html does freezes after startup, while "trying to connect to the internet" - I tried switching off the firewall too
 
6:45 PM
@HostileFork say I cant get Rebol/view running for now, any other ideas to just start wtih something?
 
@graph That's strange. Works for most people. I'm sure there's a command line option to not load up the internet desktop thing and take you straight to the console... let me look
 
I like how Rebol does function comments like python, it's very nice and simple compared to the alternative
 
I got the console for Rebol3 but then the first thing from the R2 tutorial didnt work "alert Hello World" -> it only knows print Hello World
 
@graph read the Rebol3 tutorial not the R2 one
 
@graph Oh, that's not strange. I thought you meant you'd gotten Rebol/View. That tutorial is a good one and may interest you, it depends on what you want to do. If you want to do that tutorial you'll need to download the older version here
@BenjaminGruenbaum Hello, welcome back...
 
6:51 PM
so 2 or 3 @HostileFork?
 
@graph The better one for "headless" server operating tasks is R3, it's more advanced in terms of its parse dialect, and is being currently researched and applied most heavily in that area. Just to learn and not be inconvenienced by the rough edges, R2 is more user-friendly. It's not a huge difference in terms of the learning phase, but we're all using Rebol 3 here for the most part as it's the one we have the source to and can mess with.
There are little quirks that can bug you. Like when you have binary data and are parsing it in Rebol 2, such as parse #{FFFFDECAFBAD0000} [some #{FF} copy bytes to #{00} (probe bytes) some #{00}] you'll get #{DECAFBAD} in R3. But in R2 it doesn't work. I think PARSE on binary! is awesome.
@BenjaminGruenbaum In fact, parse on binary! is one of my favorite twists lately...immensely useful.
 
so what would be good way to run a script from within the rebol console?
 
@graph If you're in the directory of the script file you can just say do %script.r. Rebol uses percent signs as the token indicator for filename items, which are really just a subclass of string. But it was motivated by wanting to have a standardized way of doing the paths. So the slashes are always forwards...it knows that when something is specifically of type filename how to handle that on whichever platform it is...backslashes on Windows, etc.
 
7:06 PM
yea I read that :/ there's just the r3....exe in my directory, and a test.r script
 
But it also means you have a new token type you can use, if your dialect wants to use them for something. Like mydialect something [foo %1 to %2] etc.
It could indicate template placeholders or something special if you wanted.
@graph If you're in the directory it should work, otherwise you'll need a relative path.
 
I think I'm missing something obvious atm
 
@graph What do you get in the console from typing LS ... those files?
 
it can not possibly work if there is nothing with "do" present
 
And what does it say when you type do %test.r ?
 
7:09 PM
ah got it
Script: "Example script" all right
thanks
 
@graph If the script doesn't do any output, nothing will happen...but whatever it exports will be available to the calling context.
 
blocks, both code and data
nice
I'll stop for now and let it sink in and maybe proceed tomorrow
 
7:25 PM
@graph Cool, sure... also note the uniformity. The iteration interface on strings, binaries, and other series types permits the same kind of stuff. Real reusability.
 
7:45 PM
What exactly are they selling?
 
for SmartTV use, I heard
 
It's Apache, so...um... selling the name? Some part they didn't open source?
 
@HostileFork The development team
webOS remains open source under the agreement
It's not unusual for companies to buy a product just to get the team ...
and then ditch the product later on ...
 
@GrahamChiu Um, they're under contracts or something? You can't really sell a development team.
 
It's been long rumoured that LG were going to release a smart Tv with webOS
@HostileFork I guess they could all choose to leave ... or stay and continue what they were doing
 
7:53 PM
"Here, take these people who we were paying to work on an open source project. Then you'll be the one who pays them. But pay us a transaction fee..." Huh?
I'm not entirely sure why the people involved wouldn't quit and take the fee themselves. So I must be missing something here.
 
@HostileFork But I guess it means LG can develop work in private as well .. which they do not have to release, but they can't close what is already out there
I don't know what the license is ...
 
Wikipedia says Apache for OpenWebOS. I dunno. Anyway, presumably there's some work or some sort of value or leverage they have.
 
posted on February 25, 2013 by Sunanda

[Bug] R2: works as expected: >> union/skip [x x 1 2 1 3] [1 4] 2 == [x x 1 2] R3: >> union/skip [x x 1 2 1 3] [1 4] 2 == [x x 1 2 1 3]

posted on February 25, 2013 by DideC

[Comment] Like Brian, I don't like much the list of *-of words it would add to the language, for so few utility. 'now has the same refinments as a date! value + /precise and /utc. For me it's not a problem. Actually, it helps found the refinment of a date! value. So... I agree on the WORDS-Of proposal. And if "WORDS-OF a-datatype" returns the words availables for this kind of datatype, it wou

 
Puzzling error I'm getting and weirdly only affecting one function. Not sure what the deal is. Any ideas @BrianH ? The function is like this:
safe-r2-r3-string: func [str [string!] /local safe] [
	safe: charset [#"^(00)" - #"^(7F)"]
	parse/all src [any safe]
]
I define it and call it on the next line and get...
** Script error: safe: word is not bound to a context
** Where: safe-r2-r3-string do -apply- make catch either either -apply- do catch either either -apply- do
** Near: safe-r2-r3-string "huh"
Overlooking something obvious, or... ? Well besides that it should be str. I just lifted this out to a function, worked fine where it was.
 
8:09 PM
where is src defined?
parse/all str [ any safe ]
oops .. see you got it
 
safe-r2-r3-string: func [str [string!] /local safe] [
	safe: charset [#"^(00)" - #"^(7F)"]
	parse/all str [any safe]
]

something: func [str [string!] /local safe] [
	safe: "Huh?"
]

something "what"
safe-r2-r3-string "huh"
 
@HostileFork The safe that you are assigning with has a UTF-8 BOM in front of it, so it's a different word from the local var.
 
posted on February 25, 2013 by BrianH

[Comment] DideC, you can use /utc with date values too. NOW just adds /precise, but it is missing /hour, /minute and /second (we need another ticket for that).

 
Delete from the start [ of the function until the charset word, then retype the safe: word.
 
@BrianH Welp, deleting the safes and typing them in again made it work. How the heck did that happen? And if it's common enough that you just knew because it happens, could the error mention something about it... like "word does exist but in a byte order variant"? You'd only have to check for that if you were making the error so it wouldn't cost much in the general case...
 
8:21 PM
@HostileFork I only caught it because it broke Notepad++'s syntax highlighting.
 
@BrianH Well I wonder how it got in there. :-/
 
My guess is copy-paste gone wrong.
 
But as per my point if it happens once, it might happen again. If it's possible to take things like that and make it less obviously a Rebol problem and point the finger at the guilty party, that's worth doing.
If Rebol is concerned people might mix up periods and commas, and is going to support Unicode... :-)
 
We have a ticket which requested that Unicode's additional space characters be added as whitespace delimiters, but so far that request has been rejected because the parser requires that all delimiters be representable in a single byte of UTF-8 each. The BOM is (afaik) the zero-width non-breaking space, so it would fall in that category. Maybe someone else may have some luck with implementing the ticket.
 
Well this is certainly shaping up to be a unicode educational experience for me. I thought I was through with it but then it turned out after I fixed the tests within .red the fixes pointed out some problems in the tests that script the Red lexer directly as Rebol. Anyway.
 
8:31 PM
Btw, you might want to premake that charset for speed rather than remaking it with every function call. If you don't have an available local context to store a persistent word to assign the charset to, I would suggest that you use funct/with and move safe to the static local variables block.
 
@BrianH It's not called very often. How slow is it?
 
@HostileFork it has to parse the dialect (with not insignificant overhead) and create a new bitset (a pretty heavy-weight structure, especially in R2). It's usually worth premaking your charsets.
 
@BrianH in that case, check out decode-url
 
@GrahamChiu rewriting decode-url for R3 is on my list.
 
my beef being common charsets being hidden inside functions
 
8:38 PM
Mine as well, though it's broken standards support that is my main complaint in this case. We need to make sure that bitsets can be protected if we're going to move them to a module (named private seems appropriate in this case).
 
where's the funct/with documentation?
 
@GrahamChiu right now, it's in the doc strings, the source, and the CC ticket that requested the feature.
 
do you have the link to the cc ticket?
 
9:02 PM
It used to be the functor function, but that was folded into funct as a /with option instead.
Basically, you pass it an object creation spec, or a map that can be converted to an object, or a reference to an existing object. The object is created (if it isn't an object already), and the function body is bound to it. This is useful for creating what C calls static local variables, or what C++ calls friend functions.
 
9:41 PM
>> accum: funct/with [ i ][print [ sum: sum + i]][sum: 0]
>> accum 10
10
>> accum 10
20
ok, this is useful to know
 
10:24 PM
posted on February 25, 2013 by abolka

[Wish] The PARSE keywords TO and THRU also take an integer argument, which seems to effect absolute positioning. I couldn't find any documentation for these operations or their desired behaviour, hence this CC issue to keep around as a reminder. Sources I checked: - Rebol 3 Concepts: Parsing: Summary of Parse Operations http://www.rebol.com/r3/docs/concepts/parsing-summary.html#section-7 - R

posted on February 25, 2013 by Ladislav

[Comment] Frankly, I would expect to obtain [x x 1 2 1 3 1 4] as the result. That is because for me [1 2] [1 3] and [1 4] are distinct.

 
10:42 PM
posted on February 25, 2013 by Sunanda

[Comment] They would be distinct without /skip. /skip in all the set operations (DIFFERENCE, INTERSECT, UNION etc) has a specific meaning, somewhat like MAP. The first value is effectively treated as the key, and the subsequent ones are ignored for the purposes of treating records as distinct. So the line below results in an empty block in R2 -- the two input blocks are not different within

 
Where's the best place to look for the most up-to-date R3 binary for Arch Linux?
I'm just looking for the binary as I don't want to have to compile it. Call me lazy. ;-)
 
the most up to date binaries for all platforms except amiga are on rebolsource.net
 
Just curious: Why aren't the most up-to-date binaries for Amiga on rebolsource.net?
 
@Respectech Because Steven Solie hasn't provided them
He ported AGG to AmigaOS4 but I have no idea where the sources are
I don't think OS4 is open source .. perhaps @Henrik can enlighten us
 
10:53 PM
OS4 is commercial closed source
 
0
A: How to use Unicode codepoints above U+FFFF in Rebol 3 strings like in Rebol 2?

HostileForkYes, there is a trick...which is the trick you should have been using in R2 as well. Don't use a string! Use a binary! if you have to do this sort of thing: good-workaround: #{F0908080} It would've worked in R2, and it works in R3. You can save it and load it without any funny business. ...

0
Q: How to use Unicode codepoints above U+FFFF in Rebol 3 strings like in Rebol 2?

HostileForkI know you can't use caret style escaping in strings for Unicode codepoints in Rebol 2, because it doesn't know anything about UTF-8. So this doesn't generate anything good, it looks messed up: print {Q: What does a Zen master's {Cow} Say? A: "^(03BC)"!} Yet the code works in Rebol 3 and pri...

 
It found the answer before the question, when I posted them at the same time. :-)
 
@Respectech Because no one has provided an Amiga for building, yet :) Or even reported about building on Amiga. I, for example, don't even know if the open source builds successfully on Amiga.
 
Do the Amiga emulators just run 3.1 ?
 
Afaik, latest Amiga version is here.
@GrahamChiu Yes, Amiga emulators are 680x0, so it can run OS up to 3.1 (3.9). For 4.0+ you need PPC machine.
 
11:03 PM
Did someone donate a PPC Amiga to Carl to use for that build? Perhaps he can donate it ...
 
If you can get into contact with Carl...
 
file a bug report for roku?
 
:)
 
"Finally Carl Sassenrath announced that Rebol 3 had been ported to OS 4.1 since he has been donated a SAM440 machine. "
 
11:18 PM
posted on February 25, 2013 by abolka

[Bug] PARSE's `TO integer` rule positions "AT" the given index: >> parse "abcd" [to 2 p: (probe p) "bcd" == false Dual to how TO/THRU behaves otherwise, `THRU integer` should move to the position "NEXT" to the given index: >> parse "abcd" [thru 2 p: (probe p) "cd" == false In R3, `THRU integer` currently does exactly the same thing as `TO integer`. In R2, `THRU integer` behaves as expected

 
why do we need

To integer and THRU integer

when we have SKIP ?
 
@SomeKittens check my self-answered question above for some R2/R3 distinction issues...gotta run to the store and remember to pick up batteries, my wireless keyboard keeps wanting to hang up from the computer...bbl
 
@GrahamChiu TO/THRU integer do absolute positioning, SKIP does relative, forward-only positioning.
>> parse "abcd" ["ab" to 1 (comment {Resets parse position to the beginning}) "abcd"]
== true
@GrahamChiu That only answers what it does differently, not whether we really need it. This also works in R2, and it seems no one likely to discover it has discovered it before (Ladislav, Maxim, Gregg, BrianH, Bolek, and I didn't).
 
11:33 PM
@earl Ah .. yes, sounds very useful then. But can't we have skip do all of this?
ie. we now have 2 words that do positioning based on integer values
 
posted on February 25, 2013 by BrianH

[Comment] I agree with Ladislav. See #428 for a suggestion of a /compare option (like SORT/compare) to make it only pay attention to certain record positions rather than the whole record. It's worth noting that SORT/compare might also not work correctly in R3, and SORT itself definitely doesn't. So, it's probably a better idea to discuss what we should be doing rather than trying to be compati

posted on February 25, 2013 by abolka

[Comment] I would rather expect [x x 1 2 1 3 1 4] as well, but then UNIQUE/skip also implements the "key" behaviour Sunanda describes. I see both behaviours as useful. For reference, here's the (relevant) R3 functions coming with a /skip refinement: - difference - exclude - find - intersect - maximum-of - minimum-of - move - select - sort - union - unique It's probably worth looking over the

 
@GrahamChiu skip doesn't position based on integer values, it just skips one item. It can be used for skipping multiple items because of normal PARSE rule repetition methods: 10 skip, skips 10 items.
@GrahamChiu Even if we would retrofit that somehow onto skip, skip would still position relatively, whereas to/thru position absolutely. I.e. "skip 4 items forward" or "skip 2 items backward" vs "go to position 42".
 
@earl ah.. keep getting do and parse dialect skip mixed up
 
@GrahamChiu Parse dialect's to integer is like do dialect's AT, btw :) (Nothing like the sweet smoke of confusion at night ... :)
 
Pity we can't ensure greater consistency
so, we can't do negative repetitions so a negative skip does not work
 
11:49 PM
Yep, exactly
 
@GrahamChiu there really isn't anything in the DO dialect that is anything like the PARSE dialect's to, or most of the PARSE dialect's operations for that matter. The semantic models are too different. It might be a pity, but it's not a bad thing.
 
How about a 'reverse which changes the direction of the parser?
 
@GrahamChiu See the parse proposals - that's one of them: rebol.net/wiki/Parse_Project#REVERSE
 
parse/reverse could start at the tail of the series
[ reverse would move right to left ]
[ forward would move left to right ]
 
I prefer the REVERSE rule variant, since the other model is basically a mode.
 
11:59 PM
ok, parse/last then
 
@GrahamChiu REVERSE rule would work like this: parse data [to end reverse rule]
 
00:00 - 18:0018:00 - 00:00

« first day (848 days earlier)      last day (2932 days later) »