« first day (833 days earlier)      last day (2947 days later) » 

1:03 AM
@BrianH while you're at it, could you get rid of those superfluous casts?
 
@HostileFork Sure, but some might not be so superfluous once things are fixed.
 
1:31 AM
 
 
3 hours later…
4:42 AM
@earl could you also test this: github.com/BrianHawley/r3-bh/tree/fix-1763-set-assumes-any before I send a pull request?
 
 
2 hours later…
6:49 AM
@earl The set fix assumes that your unwinds fixes will be implemented.
 
7:01 AM
@BrianH Workin' on the weekend... :-)
 
@HostileFork your fix is my next project :)
 
@BrianH Another bug bites the dust...
 
The quick fix could go through quickly, but I think that I need to review the signedness of everything related to words, to make sure they're consistent.
 
Going over KKs subtitles on the Red talk. It's interesting to listen to what he thought was being said sometimes, and then try to "listen without prejuduce" and think "hmm, well it did sound like that, and could make sense." I think having the Red presentation subtitled is a good idea, it's interesting and might make it on HackerNews or something...
 
@HostileFork How did he go with your video? he only asked me a couple of questions on that
 
7:07 AM
@GrahamChiu Pretty good. The biggest technical issue is that some of the subtitles are too long so they cover too much of the screen and need to be split into chunks.
The website doesn't make it so easy to do that. But it does support multi-lingual translations.
I'll put a link to this room in the video description.
 
@HostileFork did you use too long words?
 
@GrahamChiu No single word is the problem. It's when they go together in a slice. :-) The captioning software has you dice it up into frames, and there's a balance to be struck, you don't want every word in its own frame over the time of it being said because they'd blip by. But you don't want a whole paragraph sitting there for a minute covering up the screen either.
 
 
1 hour later…
8:13 AM
There was a Car 2 Go demo where they had the cars out today, and were giving away free tacos if you talked to them about it. I had a taco and looked at how they work. Pretty interesting.
I told the guy "well, I'm waiting for packet based transportation where the car picks you up and you don't have to drive it" and I mentioned something someone in the automated driving projects had told me.
He said: "The day will come when they will take a bunch of little computer driven cars out to the desert and have them swarm and scurry around like a school of fish, not hitting each other."
"Then they'll give you a big padded car, give you the wheel and say: okay... now go hit one of those. And you won't be able to. Now think how much longer after that insurance companies will be willing to insure a human driver."
The Car2Go guy shook his head and said "Wow. You know, when they start to think for themselves...that's the next evolution after the human race...we're going to get to a point where there's no turning back."
I said we're already there. :-/
 
8:48 AM
there are a number of cities doing this .. I just hop on the bus to get to where I want to go :)
 
KK.
@HostileFork Do you want me to break the larger lines to smaller ones?
It might take some time, but I can do it.
 
@KK. Let me save my work first...
I'm almost done...
(If we edit at the same time, it does something complex.)
 
KK.
I tried keeping whole sentences together so that translating to other languages could be easy. But I think there are lots of sentences that can be broken.
 
@KK. I think it is okay if it goes to two lines of text in the amara interface, but not more than that.
(The interface they show on the small video, I mean)
 
KK.
@HostileFork If you are working on amara, then I must tell you, when I worked on subtitles for the HaikuOS talk, I too had the same problem, but the subtitles on youtube after you submitted them are quite small in size, and without the black subtitle background too.
Thats why this time I was a lot a bit generous with the long lines.
 
8:58 AM
@KK. Well, the video could go other places too with better subtitling.
 
KK.
@HostileFork Ok. This time, I will work on it a bit slowly. Like an hour a day or so. It should be done in 4-5 days. Hope there's no hurry.
If you need it earlier, please tell.
 
@KK. No rush. But I think this is a great idea, especially if it's easy for people to translate online.
 
KK.
Yes, but a very boring idea. :-)
I got a headache day before yesterday doing it. Thats why I am thinking of limiting it to an hour a day max :-)
I meant its a very boring thing to do..
 
@KK. Well it is appreciated, we can split the work. :-)
 
KK.
@HostileFork I think one person working at a time, and at a single task is enough. More than one person at the same time will make it confusing.
 
9:09 AM
@KK. All things being equal, I'd rather you programmed in Rebol and let me do it. I don't want you to burn out...you just got here! :)
 
KK.
Let me worry about converting the talk to subtitles with timings. You worry about verify it all and upload it to youtube etc.
@HostileFork I understand. Yesterday, I completed a week of Reboling, and did not do any Reboling yesterday. (it is also one of the reasons for 1 hour a day max rule)
 
On that note, when you had to go earlier, I'd said: If a word! that the parse dialect does not know as one of its keyword appears in the rule, it assumes that is a rule stored in a variable. So if I say subrule: ["hello" | integer! | tag!] and then parse ["hello" "hello" 5 <foo> "hello" apple "kk"] [some subrule word! set name string! (print name)] what happens? :-)
 
KK.
Just a sec.
subrule matches in the block, and therefore name is set to the first string that did not match. Here, it was "kk" . Since there was a match, it DO-ed the code in the parenthesis, and printed "kk"
 
9:25 AM
@KK. What's happening here is that some rule is a way of saying "match whatever rule matches at least one time, or more.
That vertical bar symbol means "or". So the subrule will match the specific string "hello", or any integer symbol, or any tag symbol.
So some subrule inside the parse dialect is equivalent to if the code was there directly, you could also write some ["hello" | integer! | tag!]
So the input is two hello strings, an integer 5, another hello string, and then the word! *apple. This means that subrule will keep on matching up until it hits *apple, which is neither the string "hello" nor an integer nor a tag. So then it will move on.
But it says [some subrule word! ... so even though the apple word! made it stop matching some subrule, the word! matches and the parse position advances. Then set name string! not only matches the string, but puts it into a variable called name. And since the match occurs, the code in parentheses is run.
You can always think that the parse has a "parse position". It starts at the beginning, and is advanced when rules match. You can also capture the position, and reposition it within the dialect. You can even tell it to reverse direction so it starts matching the other way (in Rebol 3, I don't think that was in Rebol 2)
@KK. So compare this to the "genius" of Regular Expressions :-( !
 
KK.
Interesting: In this case, parse 'parsed' a block of code.
 
@KK. Symbols, which may or may not represent code. It could be data. It could be Rebol code, it could be your own dialect. You can use parse to easily implement your own dialect ideas. Like the DO dialect itself, it is a powerful tool that is optimized inside the executable.
But of course the same could be done with strings. subrule: ["cat" | "dog" | "fish"] and then parse "cat dog fish dog dog" [some [subrule opt " "]]
What do you think opt means? :-)
 
KK.
Is it adding another option, that is a string to subrule, to make subrule: ["cat" | "dog" | "fish"] ?
(wild, wild stab in the dark)
 
@KK. Well, why would just parse "cat dog fish dog dog" [some [subrule]] return false?
 
KK.
9:44 AM
I think that would be because, the string here is "cat dog fish dog dog" , which will match none of "cat" "dog" or "fish"
 
@KK. Try as input instead "catdogfishdogdog"
 
KK.
By the same logic, I think in the previous example, opt allowed splitting the string into tokens
 
@KK. Remember, it's matching...not splitting...in this case it is a string! series, not a block! series of symbols
 
KK.
Oh, BTW I forgot, I think here is a problem between Rebol 2 and 3.
>> subrule: ["cat" | "dog" | "fish"]
== ["cat" | "dog" | "fish"]
>> parse "cat dog fish dog dog" [some [subrule]]
== true
>> parse "catdogfishdogdog" [some [subrule]]
== true
 
@KK. Oh, good point. parse/all instead of parse if you're using R2
Always use parse/all if you're in R2! When R2 parsed strings by default it would ignore whitespace in weird ways that was more confusing than anything. The /all will override it and you can handle whitespace on your own terms.
Not necessary in R3
 
KK.
9:50 AM
Ok. That is good. I am thinking of using parse for my address book project.
Thinking of storing information as xml.
So parse will help a lot while retrieving.
For now, it will be inefficient, but will make changes to integrate database when I get there with Rebol.
 
@KK. In the Rebolverse, the hope is that you never have to work with XML if you can help it...especially when designing something from scratch. I don't know if you saw Carl's Was XML Flawed from the Start?
 
KK.
Like <person><name> hostilefork </name><address> texas </address><phone>99-123-132<\phone></person>
@HostileFork Gonna read it right now.
From Carl: "Bashing experimental computer languages serves no useful purpose."
 
@KK. If you want to handle that as a parse string, Rebol can help you. But actually, in that case you can almost LOAD it...the only trouble is the parser doesn't like the number without being in a string or some other contained type. (It will see it as a bad date.) Try document: load "<person><name> hostilefork </name><address> texas </address><phone>#99-123-132<\phone></person>"
 
KK.
It converted the string to a block of code.
 
Remember that load and mold are functions for going back and forth between Rebol's symbolic structures and strings.
But it has to be "valid Rebol". So the 99-123-132 would be illegal in Rebol, so it is illegal to LOAD too.
 
KK.
10:00 AM
And hence the '#' before the 'number'.
 
Carl's point is that this can be much better if you made your format something like document: [person [name: "hostilefork" address: "texas" phone: #99-123-132]]
 
KK.
Like an object?
Actually, I had never thought of it this way. Just never.
And I think I could not have ever thought of this.
 
@KK. Like an object. But you have a lot of flexibility in how you use the parts... it doesn't have to be as rigid as a usual object in other languages--it's a symbolic structure. What might parentheses mean if they appear in a person's record? Up to you. But yes, if you make it fit an "object"-style format you can do that, and there is a runtime abstraction in Rebol called object! you can use.
fork: make object! [name: "hostilefork" address: "texas" phone: #99-123-132] then select fork 'name or select fork 'phone.
But besides the select function, Rebol also lets you run selections using paths (you've already seen path used to request optional abilities from functions, like parse/all). If the DO dialect encounters a path where the first thing is an object or block, it will run select for you. So you could also say fork/name or fork/phone
But paths are just another tinker-toy. They are a series! type, like block. You can use them in your dialects for other things if you like. length? quote a/b/c/d/e
copy/part quote a/b/c/d/e 3. You can see why the quote is necessary because otherwise the DO dialect would be trying to select e out of d out of c out of b out of a... or call function a with the /b /c /d and /e refinements if it was a function. :-)
Note that parse works on these guys too. So parse quote a/a/a/b/b [some 'a 2 'b] returns true...
@KK. Interestingly... so Red is written in Rebol at the moment, and Red/System wants to re-use the Rebol loader. But it doesn't want to be confined to only the format that Rebol is willing to LOAD. So it uses parse to modify and pre-process the string before LOADing it. You can do this also, but the idea in the Rebol world is to leverage the format as best you can without that.
 
KK.
10:19 AM
Hello @GOD
 
I didn't know @GOD programmed in JavaScript. I was hoping for Python, at the minimum. :-)
 
KK.
I am a Rebol newbie, and @HostileFork (one of the room owners) is helping me.
 
@GOD we are discussing Rebol, KK is just learning. We have a Chat FAQ
 
GOD
@host
opss. .
@HostileFork i can program in both,
 
@GOD You can edit comments for up to two minutes. If you press the up arrow, you'll get an edit window for the last one. To edit an earlier one, you have to hover over it and there's a little triangle with options.
 
GOD
10:23 AM
ohh .. let see .. yaahhh that's cool
anything new today !
 
It's a pretty good chat. It's integrated with StackOverflow. Here's an interesting thing called "oneboxing", you just paste a URL on a line by itself.
@GOD Well here's a recent thing that we discovered and have been geeking out about, trampolines...
3
Q: Why does return/redo evaluate result functions in the calling context, but block results are not evaluated?

HostileForkLast night I learned about the /redo option for when you return from a function. It lets you return another function, which is then invoked at the calling site and reinvokes the evaluator from the same position >> foo: func [a] [(print a) (return/redo (func [b] [print b + 10]))] >&g...

Basically Rebol can let you define a wrapper, say for something like return and you can make your own return construct that can do something differently and yet still return from the function that calls it!
But it's useful for lots of other things too.
@GOD So Rebol has been around since 1998 and it's pretty radical. It was closed source and proprietary up until this last December. The community is small but enthusiastic, and had been begging for that for a long time. Now we're kind of taking the helm and fixing bugs, and drawing icons and making automated build farms
The corporate rebol.com site is...well, I don't think it's gotten much of an update since 1998. :-) But the code was released Apache 2.0 license so, off we go...
 
GOD
i don't know what is "Rebol". i just entered here randomly ..
 
KK.
@GOD If you don't mind me asking, what kind of a programmer are you? (Hobbyist/Professional/Entrepreneur Windows/Mac/*nix conservative/experimentalist etc.)
@GOD Me too! 8 days before.
BTW, I am a hobbyist windows person. Mostly conservative w.r.t. most things, just stumbled upon this room. :-)
 
@GOD we're willing to talk about it here, and the people who try it get their minds blown. But it's certainly on the fringe... as people say it had been "relegated to a backwater due to its license"
We're going to fix that now. And we have another tool, a language called Red.
@KK So here is a quiz. What will this output do you think? Guess before running: parse [b b b e e e] [any 'a (print "foo") some 'b (print "bar") some 'd (print "baz") some 'e (print "mumble")]
 
KK.
It will print "bar" and "mumble"
 
10:35 AM
What's your rationale for thinking that?
 
KK.
Apparently, I was wrong. I thought there is at least one b and at least one e, therefore....
But,
>> parse [b b b e e e] [any 'a (print "foo") some 'b (print "bar") some 'd (print "baz") some 'e (print "mumble")]
foo
bar
== false
 
Parse rule says: "any number of a words", and zero counts as "any" number. So we get foo.
Then "some number of b words", and there are 3. That's some. So the ensuing paren code runs, and we get bar.
Then "some number of d words"...but there are...zero. That's not some in the parse dialect's lingo. So it drops out, we get false.
 
KK.
Ok. So it just did not reach the __some 'e ... __ part
 
@GOD Rebol has the notion of what are called "dialects". So instead of RegEx it has something... way, way, way more badass.
@KK. Yup, and it didn't reach the (print "baz") either...
@KK here's some more fun... if (parse/all "the quick brown fox" [to "q" copy adjective thru "k" to end]) [loop 5 [print adjective]]
Correct me if I forget the parse/all, I guess I should get an r2 interpreter on this machine too. :-)
 
KK.
Here, it worked with parse only.
It printed "quick" 5 times.
 
10:44 AM
Now another guessing game. What do you think this would do? if (parse/all "the quick brown fox" [thru "q" copy adjective thru "k" to end]) [loop 5 [print adjective]]
 
KK.
I think that is because, the block [to "q" copy adjective thru "k" to end] copied q, u, i, c and k (to end) to adjective and then printed it 5 times
I think it should do the same.
 
@KK. The "to end" at the end is just to move the parse position to the end so that parse returns true, ignoring the rest of the input.
 
KK.
But no, it does not.
 
@KK. Remember you've got to have in your head the idea of a parse position. TO and THRU are similar but different.
 
KK.
>> if (parse/all "the quick brown fox" [thru "q" copy adjective thru "k" to end]) [loop 5 [print adjective]]
uick
uick
uick
uick
uick
 
10:47 AM
TO will seek a pattern but then stop the parse position right before it. THRU will seek a pattern and leave the parse position after it.
Now another question. What do you think if (parse/all "the slow brown fox" [to "q" copy adjective thru "k" to end]) [loop 5 [print adjective]] would do?
 
KK.
It will print 'q' 5 times?
Apparently not.
It should have stopped before the 'q', as you said before.
>> if (parse/all "the slow brown fox" [to "q" copy adjective thru "k" to end]) [loop 5 [print adjective]]
== none
 
@KK. There is no "q" in the input at all. "the slow brown fox" has no "q". So the match stops, parse returns false, and nothin' happens.
Parse will only return true if you have successfully reached the end of the input. If you want a parse to succeed on any input, you can just write parse whatever [to end] :-)
(Assuming whatever is the variable or literal you want to parse.)
 
KK.
@HostileFork Ok. I am a bit preoccupied so got distracted. :-)
 
@KK. So what would be nice to get to soon, would be for you to have questions for the Q&A portion of the site. So we should probably get you trying to write some code and getting blocked. Do you know Regular Expressions at all?
 
KK.
Yes. Some.
 
GOD
10:58 AM
@KK. hobbyist + professional, os windows + linux .
@HostileFork where it used ?
 
It would be interesting from a marketing perspective to take a page like this 8 regular expressions you should know and translate them into Rebol.
@GOD Rebol's main audience currently is small consulting companies and individuals who used to be (and some still are...!) fans of the Amiga OS, which places them mostly in Europe.
@GOD The hope is that the open sourcing is going to allow greater uptake. Firstly because everyone gets to fix their pet bugs. But secondly, there was no way to get anyone to learn a new language and put their code capital on top of a closed-source proprietary system anymore. (Nor should there have been.) The open sourcing was very late, but better late than never.
@GOD It's a "code-is-data" paradigm. So the interpreter can do things like code: [print "Hello"] and then do code to get Hello. Or even replace code "Hello" "Goodbye" followed by do code to get Goodbye. So like Lisp, but evolved further.
And minimizing all the crazy parentheses while preserving a very natural character, like a written human language...without sacrificing the core idea that made Lisp so powerful.
 
KK.
@GOD The thing I like the best about Rebol is the chance to talk to people like @HostileFork , @GrahamChiu , @Adrian , @rgchris and @dt2 etc. Intelligent, experienced and genuinely good people
@GOD Not to mention some of the language implementers you will meet lurking in this room @dockimble and @BrianH
 
GOD
@HostileFork that's really a awesome option ..
 
@KK. We aim to please! (And fix the spiralling broken out of control technical "infrastructure" that exists right now... though the odds are stacked against us...)
@GOD Also there's lots of little details that it tries to get right. Like instead of having single quoted 'string' and double quoted "string", it offers the double quoted version or you can use braces as {string}. print {"It's nice when your language has asymmetric string delimiters," said {Fork}, "...you can even use matched pairs without escaping!"}
@GOD Also, when picking the fundamental "block" character for code, the square bracket was chosen. Hence the logo [o]. Because square brackets are typed so often and you don't have to use a shift to get them on most keyboards
In fact, @KK, check this out: probe second [REB[o]L]. Hehe.
 
GOD
@KK. HostileFork sounds like a ninja.. !
 
KK.
11:12 AM
@GOD see hostilefork
 
@GOD I think of as more of a Zen master. But ninja will do. :-) I also write funny things...
11
A: Automated My Little Pony detection and classification

HostileForkCartoonists take particularly strong license in their drawings vs. an unretouched photo. Thus trying to identify Pinkie Pie by color doesn't do a lot of good in a frame where she has fallen into a vat of black paint. Or you might think you could identify Rarity by her horn, but consider the epi...

7
A: What good is the NERFIN loop operation in LOLCODE?

HostileForkThere was design discussion from 2007 on this exact topic. Consensus at the time seemed to suggest adding a FROM as a solution the working group wanted fast-tracked into 1.2: http://forum.lolcode.com/viewtopic.php?pid=2484 The issue was tabled and didn't make it in to the 1.2 spec. However, i...

@KK. Okay, there's something you could do. A LOLCODE implementation in Rebol!
@GOD Note that you can give yourself a square avatar...
 
KK.
@HostileFork Will look into it. Gotta go. ttyl :-)
 
Anyway, I've got to run... @KK. don't sweat the subtitle break out too much. Instead undertake something that will generate Q&A on the site.
Jinx! Anyway, 'nite @God feel free to return if Rebol has piqued your curiosity. Or browse around in the tag: The questions here aren't necessarily the best way to learn the language...but you might find something interesting that way.
 
GOD
@HostileFork sure
 
11:33 AM
@GOD Also, Red is interesting. KK has subtitled the 2013 presentation...
 
GOD
@HostileFork i'm already watching that :D .. thanks .
 
@GOD DocKimbel is French so it's easier to understand with the closed captions on. :-)
 
GOD
@HostileFork :P
 
 
7 hours later…
6:31 PM
@GOD welcome back. Watched the Red video? Any questions?
 
GOD
@HostileFork, thanks, yes , what about cgi ? can i do cgi in red ?
 
@GOD They want to build it in as part of the plan. I do not know if this has been done. Just grepping through the sources in the current state I don't see anything "cgi" related.
@GOD I don't know if you grasped the total plan, but it's to use this uniform source format for all the levels of abstraction. It would be like if your assembler and your C compiler and your JavaScript interpreter made all the common things common.
So not using different styles for writing an if statement, for instance. They all do that the same way. The only differences are where things need to be different. And if you want to write automated code to scan and rewrite your code you do with a common method...just like Rebol.
@God I've spec'd out a logo for Red, to be like the Towers of Hanoi and represent a "full stack" language. The icon will look like the third here, but redrawn by a good 3-D artist.
 
6:58 PM
Try Topaz re-conceived: reb4.me/tt — Bootstrap-based. I'll maybe take another swing at it at some point, has some rough edges. Behaves a little more like a console.
 
@rgchris I'm typing and not getting anything (in Chrome)
 
Seems to work here in Chrome. Had a devil of a time getting the keypress/keyup working.
 
@rgchris I'll take a look in a sec to see what's going on.
 
Tried it on iPad too—also working.
And Firefox (Mac).
And Chrome Windows. Sadly not on IE7.
 
7:37 PM
@rgchris Ok, a bit of tidying done on the various FAQ. I will look and see what we've got. This is Chrome on a mac...
@rgchris Oh, wait I was confused, as I was doing something else I just kind of idly loaded it up and typed. I expected to be able to type at the prompt at the top. But things were appearing in the little line at the bottom.
 
Yes, it's supposed to focus.
@HostileFork I'll take a look if I have another go...
 
Anyhow, should be a little easier to evaluate Topaz.
That's a shell server by the looks of it—this is all client-side (once the components have loaded).
 
>> parse [a a b b b] [2 'a (print "Hello") 3 'b]
== none
 
Yep, Topaz has many, many pieces missing.
 
7:47 PM
@rgchris I'd imagine the best idea would be to compile Red to JavaScript.
But Topaz was probably a good experiment for looking at the tradeoffs.
 
@HostileFork Indeed, it demonstrates what can be done, and perhaps ways to render to JS.
It does assignment and objects:
a: 1
b: 2
a + b
But not much math.
>> a * b
*** Script error: Word has no value: *
*** Stack: * b
Sadly as it stands—it's nice for what it is, but it's not enough to teach with. Only perhaps some minor wordplay.
 
Maybe time to restart an R3-based "Try Rebol" site ...
 
@rgchris In a way, it's good to have a lot of different projects and ideas out there. But it also confuses. I'd like to see everyone unify under a couple of flags, with good logos and a coherent marketing message. Rebol and Red seem like the two we need. So in my mind, the sooner Topaz and Orca and Boron and whatever vanish...not in terms of their code but in terms of their brand...the better.
So Topaz just becomes "Red JS backend experiments"
 
More like JS backend experiements.
 
Mistyped.
 
8:01 PM
I can see that, but how long before we have a JS-based Red?
 
@rgchris Topaz has been extremely useful as a language design experiment. The spec docs are more useful than the implementation, because the implementation is just "do something Rebol-like in JavaScript", which is the least interesting part. The really interesting stuff is the function call syntax and the parse extensions.
 
In any case, Topaz has hardly a brand to speak of. It is very interesting to seasoned Rebolers, because it expresses Gabriele's views of a "better Rebol". But beyond that, I don't think anyone should or does care.
 
@rgchris I don't know. But I do know that it will take longer if instead of learning how to write one, we wind up with consoles and an independent branch. And when people type in "red lang javascript" it would be nice to get some hits.
 
@BrianH Implementation perhaps not interesting, but still potentially practical.
@HostileFork I'd hope that it wouldn't reference javascript at all: Red/Rebol in the browser.
 
We can do those parse extensions in R3 and Red, and the function call syntax can inspire new dialect patterns. Those are useful. Compiling to JS might be practical, but only if the language is compatible with R3 and/or Red, otherwise it's just another language.
 
8:06 PM
All the ORCA pages should quickly redirect and say "ORCA stood for Opensource Rebol Can be Achieved. Which turned out to be true, it has! Just not with this code, which is kept here for archival purposes only. Go here to read about the current state..."
 
@earl I find the idea of browser-based Rebol compelling. It is a platform where new coders are cutting their teeth and it offers much by way of instant gratification.
 
@rgchris Yes, so do I. (Very much, in fact.)
 
@rgchris That won't work, because the browser plugin is dying as a concept. Beyond a few (but not most) entrenched existing plugins, browsers are rejecting them. Soon it will only be Flash, and then not even that. The only way to get Rebol into a browser is to compile to JavaScript, or (for Chrome) compile it with Native Client.
 
@BrianH Chris is only talking about marketing. You don't have to mention JS, even though you target JS.
 
Right—just marketing.
 
8:12 PM
In fact, if anyone wants to spend an honest few days in that direction, try compiling R3 with Emscripten :)
Has been done for e.g. Lua, Python, Ruby (see e.g. repl.it).
 
@earl That's badass. Well, what's stopping us from trying?
I'd think that would be a high priority
That takes care of a lot of the concerns I had about Try Rebol online, just in terms of the hassle of the sessions and security. Looks ideal.
 
@HostileFork For me: there's only 24 hours in a day :) It's on a long list of things to try, didn't yet bubble to the top.
 
@earl You only get 24?! Jeez, you're missing out on the other 72...go read up on Time Cube. There are actually four simultaneous days in each four corner rotation.
 
8:37 PM
Okay I'm at another one of these issues where I want a common way of getting a binary! from an integer in R2 and R3. R2 converts your integer to a string, and then gives you a binary representation of that string. R3 actually gives you a binary representation of that integer.
A way that works in R2 is debase/base to-hex value 16 but this makes R3 unhappy because to-hex gives back an issue! and it doesn't want to debase an issue!
Without throwing in an "if r3" condition is there any way to cleanly get a binary out of an int that works in both?
 
is the int within 0..255?
 
debase/base next mold to-hex value 16
 
@rgchris That's the best I came up with also. :-/
@earl Nope, full range.
 
If we were to change issue! back to a string! type...
 
What was the reasoning again for that change?
 
8:43 PM
The most common usage was apparently as preprocessor words.
 
Ah, so repetition.
 
But I (will) miss as a string! type.
 
@rgchris Be aware that this will give you binary!s of differing length (R2 vs R3)
 
@earl Yep, got that bit handled.
 
Does that reflect 32 vs 64bit numbers?
 
8:47 PM
Yes.
 
Can you do bold and code?
Hmm, yes, but it's not very bold.
 
@rgchris I added a couple more notes to the FAQ, including that code as bold works better. Also we don't seem to get a lot of Lisp-aware people wandering in, so one of the up-front things that has helped us has been capturing attention with storing code in a variable, modifying it, and running it. So I put that in.
 
It's a shame it doesn't set code in a darker box as on the main SO site. That'd be an improvement.
 
@rgchris I'm sure it has been requested, but maybe there's a technical reason why it won't work. One might tinker with the CSS and go "hey, have you considered this...?" But I can't imagine someone hasn't mentioned it.
 
9:02 PM
It'd be a one-line CSS change.
 
Hmm. Nothing in meta. Well, maybe you can just suggest it. I've suggested things they've gone and done.
@rgchris If you want the attention of the developers of chat, there is a chat feedback room. If you do a little live tweaking and have a concrete suggestion, with maybe a screenshot of the results, that might propel more of a "yeah, that's better".
 
javascript:var s=document.createElement('style');s.type='text/cs‚Äå‚Äãs';s.innerHTML='code{back‌​ground:rgba(0,0,0,.1);padding:0.2em;}';document.head.app‚Äå‚ÄãendChild(s);void(0)‌​;
Ok, forget it!
javascript:var%20s=document.createElement('style');s.type='text/css';s.innerHTML='code{background:rgba(0,0,0,.1);padding:0.2em;border:1px%20solid%20rgba(0,0,0,0.2)}';document.head.appendChild(s);void(0);
(paste to url bar to test...)
 
@rgchris issue! doesn't have to be a string type, or even a series, to do series-like stuff. Look at tuples: They're not series, but they can act like series to a certain extent. It's just a matter of adding support for tuple-like behavior to the actions.
 
9:17 PM
I have at least one script that uses issue series positions.
 
And why does this script not use some other series type?
That's not a snarky question, I'm assuming that there's a good reason.
 
It does, it uses tags, strings and files.
It's a representation of an XML document. Uses issue type for attributes.
 
I mean, why does it use issues that way, instead of using some other series for that?
 
For parsing. For a distinct type to represent attributes.
 
Why do you need position for attributes?
 
9:20 PM
Some attributes have namespaces.
I store namespace before the series position.
 
And your data model doesn't cover namespaces, got it.
Would it be worth changing the data model to include namespaces?
 
The idea is they are still there, but hidden. Can be revived if absolutely needed.
I'd thought of it, but this way is quite elegant.
 
Well, but it depends on issues having position, so maybe it's time for a change.
 
I know which change I'd prefer...
 
Using issues as attributes would be better with issues being a word type. Words are more efficient than strings.
 
9:25 PM
Or perhaps if tag types had a more expansive api.
It's not efficient to use tags or issues, for loading at least.
 
Right, but that still assumes that tags are XML/HTML-like. Which the current tag type doesn't, and I use that advantage a lot.
 
I'm not sure why that'd break alternate usage.
If you were to add path notation to tags that assumed XML, how would that break tags used for other purposes?
I know it's not exactly the Rebol way to add 'methods' to strings, but in tag there's this thing that has so much potential.
 
If the tag data model were changed internally to more exactly reflect HTML/XML, that would break tags that aren't HTML/XML. This has been a frequent request from people who don't realize that you can use tags for more than just HTML/XML, and we've had to shoot it down every time.
An external API that handles that data model would be great though.
 
A set of functions that treated tags that way, sure.
 
A whole module of them :)
 
9:31 PM
I'm not sure that'd help in my case though.
 
Well for one thing, your data model would need to change. Namespaces need to be supported explicitly.
 
Breaking the tag into tags and attributes allows more expressive parsing of the XML structure.
I hate namespaces—I like having them disappear.
 
Stop using XML then. It's filled with namespaces.
 
Not practical, sadly.
Although, the more Json takes off, the less XML is necessary.
 
Breaking the tag names and attribute names into namespace and the rest makes just as much sense as breaking a tag up. Have you considered paths?
 
9:34 PM
And if we could get Rebol to replace Json :) :)
 
I've been doing some stuff with web services lately, and for modern web service platforms the JSON or XML is just output with a formatter, often a pluggable one. Not that big a deal to add a Rebol formatter to such systems :)
 
It'd be nice, that's definitely a concept I hold dear...
...except: where it is done in a lazy way (example: Flickr)
Where the JSON is a verbose representation of the equivalent XML.
This is what I like though:
>> load-xml {<foo:a><bar:b foobar:c="Foo"/></foo:a>}
== [<a> [<b> [#c "Foo"]]]
I guess it's representation and pretty-print in one. I'm loathe to give it up.
 
@GOD so who is Dr. Mono? :-)
 
For me, it goes beyond convenient—having it represented that way makes it easier to visually analyse as well as using 'parse to do so mechanically.
 
That sounds like a job for a function option, to strip namespaces. It seems to me that we could use binding for namespaces, if we were being really perverse :)
 
9:44 PM
@DocKimbel ... Continued efforts to push for unity, here. See, don't they look nice together? :-)
 
@rgchris Here's something to think about:
>> next 'a/b
== b
That way you can use words for your tag names, issues for your attributes, and still support namespaces by having them in paths, but not have to see the paths because single-element paths don't display very well. I'm not sure about the overall structure (I like triples of name, attributes and contents), but this can be very similar.
>> mold/all next 'a/b
== "#[path! [a b] 2]"
 
@GOD I don't know if you've seen this but it's pretty cool. It compiles interpreters written in C into JavaScript, and then runs them in the browser: repl.it Would be nice to have Rebol in there...!
 
10:03 PM
@BrianH I have a long-standing hesitancy wrt. using words here. I'll accept there's a possibility it is irrational, or at least a perception that it'd be more complex to work with words. I'd guess I'd have to experiment to see where the hurt points are in going this route. I like the expressiveness of using tags and issues in a pseudo-dialect and how easy they are to parse (I'd originally used refinements for attributes).
It's never fun having to rethink an idea that you have a amicably working solution for, especially when it's a component you've checked off on and are trying to solve other problems.
And that the new solution will not be as elegant as the old :(
 
@rgchris Hurt points for using words: You'd have to port to R3, and quickly. R2 has some pretty hard limits on how many distinct words you can load (some number of thousands). For R3, you can have some number of millions of distinct words (don't know if anyone has ever reached the limit).
Also, the strings of words, while not duplicated between words of the same spelling, are never collected by the GC, so if you are loading a few million different XML schemas (as opposed to loading millions of instances of the same schema) you might consider using different processes.
You'd also have to get used to your data being faster to access and deal with.
 
Hey, I'm not trying to load Word documents here :)
 
And you might want to rewrite your parser for R3, because R3's parser is so much better that it's fun to write parse rules for it :)
 
Well there is that...
Is it faster to parse a block structure with words rather than tags?
 
@rgchris I can answer that. "yes"
 
10:15 PM
@rgchris If you are loading only Word documents, or only documents of every single office app type (there aren't more than several hundred different types), then the word limit that R3 may have but we haven't reached yet, won't bother you :)
 
[<a> [<nest> "of tags"]]
[a [nest "of tags"]]
 
The latter will be faster to deal with.
Parsing strings is slow compared to parsing blocks.
Especially blocks of words as opposed to blocks of strings.
Comparing words is a pointer comparison. Comparing strings requires comparing every byte.
 
This was the version of my script that did once work on R3: reb4.me/r3/altxml
How close is the XML definition of a word to Rebol's?
I picked those charset definitions w1 and w+ from the XML spec.
 
First of all, split out the namespaces because : isn't legal in a word. What are the other differences?
 
I don't think ":" is in my definition, is it?
Btw, code does look better with a rgba(0,0,0,0.1) background :)
 
10:28 PM
@rgchris Doing the feature request right now, one of the StackOverflow people asked me to write it up when I suggested it.
I'll use that.
 
So far as I can tell, XML words are a subset of R3 words.
 
@HostileFork If you take the last piece of Red logo and remove it from the tower, it would look quite similar to the R3 logo (a square with a hole in the middle). I guess this is a coincidence...or maybe not? ;-)
 
@rgchris I'd have to check their respective rules for first versus follow chars, but that seems likely.
 
@DocKimbel I like the idea of an interchangeable lowest baseplate that could be either threaded through a Rebol square or a darker, hardened Red square. :-)
But yes, I have already visualized this. :-)
0
Q: Could "code" in chat (markdown with backquotes) change the background like on the main site?

HostileForkIn chatting, I've taken to using bold to format code. This is because it does not stand out very well if the only thing that changes is a fixed-width font. For instance: But it seems that if CSS were applied to use a fixed width font and change the background color, that would be a better so...

 
11:00 PM
HostileFork has made a change to the feeds posted into this room
 
If all goes well, this now means that any questions asked on the main site tagged [rebol] will appear as chat messages...automagically.
 
2
Q: Is there a way to center gui buttons and fields in Rebol?

user2020783Spent hours trying to figure this out and still haven't got it. None of the documentation mentions anything about it. Is this something rebol just can't do without manually having to rearrange everything with origin? Perhaps I'm just expecting too much? edit: well I've discovered a hack: indent...

0
Q: rebol times out when downloading in rapid succession

user2020783I have spent hours trying to figure this out, and it seems Rebol just can't do it. Here is a program that downloads all the images from a web page. It was great seeing I could write it in much fewer lines of code, yet the performance is terrible. Rebol times out after downloading 4-5 files. Timeo...

2
Q: Setting a variable to the current script's filename

ace007How would I set a variable to the name of the currently executing script? For example in VBS, it would look something like this: name = WScript.ScriptFullName. I had tried something similar: Script: system/options/script and then I tried to print that variable to the console but it prints "Scrip...

3
Q: Why does return/redo evaluate result functions in the calling context, but block results are not evaluated?

HostileForkLast night I learned about the /redo option for when you return from a function. It lets you return another function, which is then invoked at the calling site and reinvokes the evaluator from the same position >> foo: func [a] [(print a) (return/redo (func [b] [print b + 10]))] >&g...

2
Q: What's the fastest/most efficient way to count lines in Rebol?

rgchrisGiven a string string, what is the fastest/most-efficient way to count lines therein? Will accept best answers for any flavour of Rebol. I've been working under the assumption that the parse [some [thru]] combination was the fastest way to traverse a string, but then I don't know that for certain...

 
Of course we'll have a little mini backlog at first. :-/
 
11:18 PM
I'm also experimenting with a room that has R3 Github commits and R3 CureCode changes added as feeds, JFYI.
 
@GrahamChiu I don't have time right now, but will soon. When I have time I'll check back to see if it's been answered yet.
 
@earl Cool. That will be good. But I want to re-iterate that one of my goals here is to unify the Rebol and Red communities, to think holistically about the common problems being solved. So I don't really want to break it out into "r3 dev" and "red dev".
 
11:54 PM
@HostileFork Sure. But r3-dev is a activity feed only at the moment, not for discussion.
Red already has that as well, in the IRC channel (and on it's Github project, of course).
 

« first day (833 days earlier)      last day (2947 days later) »