« first day (940 days earlier)      last day (2840 days later) » 

12:02 PM
@pierre Presumably Graham meant rebolsource/r3. (But then, only Graham knows :)
 
@earl ok... I'm getting kind of lost, between all these repositories... :-s
 
Hello Pierre
 
There's rebol/r3, which is Carl's "mainline". Then there's rebolsource/r3, which is a community maintained fork the integrates reviewed pull-requests.
 
... and others around
 
@earl Is it just me, or are there more forks than merges?
 
12:04 PM
@pierre That's often quite natural with Git.
Then there's lots of personal forks, for personal work on stuff that is either experimental or eventually proposed to be merged.
 
@earl Yes. Forking is the way to go in git, I understood that.
 
And there's a third major line of code, which is Saphirion's fork.
 
Actually, why would someone fork on a github, instead of a home-disk-based git directory tree?
@earl Yes, of course. Almost forgot about this one.
 
@pierre If a Github fork is not created by accident (and they very often are, in my experience), then because someone wants to publish one's additional work.
 
@earl Hm. Yes. Publishing vs. merging.
 
12:08 PM
For example, I have currently two public "wip" (work in progress) branches on github.com/earl/r3/branches. Those are up there, so that I can collaborate with others on them.
There's also two series of fixes up there, which are not yet submitted to be merged, because we wanted to test them more widely first.
So in essence: it's all about collaboration :)
@DideC Hi Didier!
 
@earl I thought wip was the wiki engine behind rebol.com?... I positively HATE meaningless acronyms!
 
Hi Earl
 
@pierre So you hate REBOL :) ?
 
@Pierre yes it is.
 
@earl Nah, of course not! Ah... I almost forgot REBOL was actually meaningful... :-s
 
12:15 PM
The meaning is in the eye of the beholder, I guess ...
 
@earl ?
@earl in which sense is rebol3 more usable on Linux?
 
@pierre For my usage, in almost every sense.
 
Hm. I found rebol3's console quite unusable... No completion, which gets me frustrated right away, and makes me switch straight to rebol2...
 
Starts with the console, ends with I/O.
We discussed that before, yes :)
 
yes...
 
12:25 PM
I don't use completion in Rebol, nor do I need it. I only ever found it convenient for filenames, but I currently don't miss that much.
 
@earl could you please develop a bit more?
 
On the other hand, I like working home/end keys very much.
 
@earl Ah! Yes! Rebol2 console is a pain, for this!
Earl: 1 point.
 
Reading stdin is a bit of a pain in R2. It's still not optimal in R3, but works much better for me.
I/O redirection in general is more stable in R3.
 
Ok. I don't use it, I generally fetch information in files, or by copy/pasting.
 
12:28 PM
Well, I'm a long-time intensive Linux user. So I really prefer for things to integrate with my native environment nicely.
But I think I understand where you are coming from. Back when I started with Rebol, one of the big appeals was the very nice graphical console on Win32.
 
@earl Good point: I was thinking of implementing some unix utilities, such as grep, cat, etc. in Rebol, or maybe better in Red: in such cases, of course, stdin and stdout MUST be perfectly reliable.
 
And as far as I know, quite a few Rebol users still use Rebol exclusively as their "shell" environment.
 
@earl I was also appealed by VID ease of use, but on GNU/Linux.
@earl Yes, unfortunately. I was actually doing this, at home (GNU/Linux) and at work (windows, 10 years ago), and it was just magically perfectly homogeneous.
 
I found /View to be so extremely ugly and unstable on anything but Windows, that I try to avoid it on Linux.
 
Ah yes? Funny, I never came across stability problems on GNU/Linux or on Mac.
For the ugliness, I do agree, yes!... Unreadable fonts, becoming readable for unknown reasons, then unreadable a few weeks after...
 
12:32 PM
Maybe stability is too harsh a word. More like "maturity".
 
R3 console is pain in the ass, really. Ugly as hell, no completion, and what bothers me most is no multiline = you can't just paste your code, when prototyping ... unless is serves us as real console = launched in defaultly opened shell and available via remote ssh session for e.g., then it is a clear step backwards ...
 
Yes. Lack of mouse wheel support, no graphics support for clipboard, etc.
@pekr Hello! Did you notice that Carl agreed on providing Rebol2 console source code?
 
@pierre But then, I also grant that properly integrating with the Linux graphics/desktop stack is a major pain and serious effort.
 
9 hours ago, by rebol
Sure, I can provide the R2 console code if someone wants to get it working for R3.
 
yes, I was here, watching ... we will see. But I also noticed, some guys here were looking into R3 console already ...
 
12:34 PM
@pekr See, on Linux that's the other way round :)
Nothing ugly about a good old no-fuss console.
 
Should I install Linux virtual machine in my Win8, to have nice console in R3 then? :-)
 
@earl yes; one big question being: which Linux? Or, more precisely: which desktop environment? For the ones using a desktop, at least...
 
Earl - so you find old MS cmd.exe not being a long time crap? :-)
I can't even freely resize the window ...
 
@pekr Sure, the crappyness of it being part of why I switched to Linux in the first place :)
 
@pekr yes, you could have a real, neat, xterm, with all the effectiveness of a modern shell... ;-)
 
12:36 PM
But then, I made you special console-mode builds for integrating with a more modern console environment for Win32.
Did you even once try them?
 
Yes, I use Console2 ... surprise surprise, that modern console does not do a tab completion ;-)
Then I also have PowerShell, and GUI for it, but I find it confusing, slow, more for .NET programs ...
 
At least, rebol3 console does not clear the terminal's previous contents! Unlike this very bad behaviour from Rebol2...
 
Console2 was the one I had in mind, yes.
 
earl - someone should teach it a file completion!
 
Learn to type! :)
But yes, hopefully someone will get around to do that sooner rather than later.
 
12:39 PM
also - how is that good for me, if R3 launches its own console? Maybe it changed, dunno, as for R3, I am using old Carl's View.exe from 2010 ;-)
 
@pekr That's why I made you special console-mode builds that don't do that.
Good to know that you simply ignored them.
 
maybe I used them, don't remember. My rebol dir is 1.5GB of various stuff
 
rebolsource.net -- the last one of the experimental builds should work nicely with Console2.
2
 
I am not using R3 lately anyway, mostly since Carl'S departure ...
OK, will try
 
No completion, no multiline, no /View. Just so that we understand each other :)
Multiline should be doable rather easily, completion just for filenames will be a slightly bigger effort, full completion including words will be more work.
 
12:44 PM
Nice, it works ... yes, I know, that's what I understand. I was the one trying to help Carl sort it out, how to have both real console, while still allowing to launch View. Carl did not succed, the fault might be with Windows not allowing something like that
 
On Windows we'll need two builds, yes.
 
Is MS crazy or what? Do other systems have similar problems? The need to have two distros? I expect it being burried in old APIs, so no will at MS to change those aspects ...
 
@pekr MS is crazy, yes :)
 
:-)
 
But it's easily understandable if you look at the history of their OS.
To this day and despite of Powershell and Windows Core, console and text-mode has always been an afterthought. It's a GUI OS first.
 
12:47 PM
@earl HUGE hairy troll detected...
 
@pierre I doubt it.
 
Windows was just a GUI on top of MS-DOS
And, as such, it was doing a fairly good job. Up to win 3.11. After, it tried to behave like a complete OS, and mix everything...
 
Up until NT.
Which is the Windows I'm talking about.
The process model of DOS-based Windows is hardly worth talking about, but that's a different history.
 
Roughly: win95 was the first one which was claiming that it was not relying upon MS-DOS
Yes. End of the troll.
Hey, Doc! Bonjour!
 
pierre, but earl might be right - back at the time of Win 3.1, 95, there was also 3.5NT server branch. And that was imo later base for W2K and later ...
 
12:51 PM
Win95 still was a WfW evolution.
NT was the break with a new kernel, and all that comes with it.
The process model that you have today is from NT, not from DOS.
 
Earl - cool, I now have defined r3-console.exe as a tab in Console2. That means I have it always at my disposal, when I launch the console2 ...
 
@pekr True. This was when they REALLY got a kernel inside windows.
 
@pekr So I'll hack up a quick multi-line patch and you will stop complaining loudly about the console for now :) ?
In any case, thanks for testing: good to hear! :)
 
@earl Yes. Unfortunately, they kept the same old awful "shell", MS-DOS-like, with so poor compatibility, long file names' support suddenly breaking, etc. End of troll, now...
 
No trolling on my side.
 
12:54 PM
;-)
 
Windows took a different route, and tried to be a pure GUI OS.
I don't have any quarrels with that.
In many parts, it turned out quite well. In other parts, such as the strict GUI vs console separation in the process model it makes you shake your head.
 
@earl and Mac succeeded in this way...
 
Easy to say with hindsight :)
@pierre Originally, yes (depending on how you want to define success).
 
Bonjour @Pierre
 
Only to then switch to a Unix-based foundation, in an extremely bold move.
 
12:57 PM
@earl, I didn't know either about your improvements on R3 console, will give it a try too.
 
@DocKimbel No improvements worth speaking of, unfortunately :)
Just switched off the GUI-mode flag in the binary, so that you can use it in e.g. Console2.
 
@Pierre, yeah, hard times. ;-)
 
@DocKimbel Yes... I had an interesting project, where I considered asking softinnov some work, about a database front-end for people who don't speak SQL.
...
@earl something that works. Mac OS X on my wife's old Mac Mini just works, simply.
 
@earl - I probably miss multiline more than tab completion ....
but of course, once I want to have gui, then .... :-)
 
@Pierre, we avoid such kind of customers, we had bad experiences too at the beginning. BTW, I'm no more part of Softinnov anymore since 2011.
 
1:03 PM
@pekr for completion, I usually edit in vim, and Ctl-P extremely intensively
@DocKimbel oops, I didn't know that!
What happened to softinnov? I had in mind that you created it; am I wrong or just confused?
 
pierre - it seems Doc sold his part of the company in order to move to Montenegro, in order to become fully commited to Red. Doc is cool! :-)
 
Vim completion, along with :set syntax=rebol, works very well, including words with - inside.
 
@pierre Certainly. But OSX is exactly what NT isn't: a Unix/GUI hybrid (and a well-executed one at that).
 
@earl Exactly.
@pekr ok; I thought Doc was still in France. Despite being so cool... ;-)
 
@pekr That's fortunate, because basic multi-line is easier to do, I think :)
 
1:07 PM
Now that a few more people are present, I'll re-ask a little question:
I was thinking of making magic! run in rebol3.
I tried to first run magic! on my apache 2, and, so far, no luck...
 
@Pierre, as Pekr said. Softinnov still lives though, my former partners are cool and very competent guys, if you need them, just tell me.
 
In fact, I battle with the apache 2 configuration, and I am not familiar with apache.
So my question would be: has anyone got an example of an operational magic! configuration?
I gave up trying a coupe months ago, I must re-dig my notes out.
@DocKimbel ok, bien noté
 
1:23 PM
@pekr Multi-line support is not complicated to add, you can take the code from Red console if you want. IIRC, Kaj has an improved version in his forked console.
 
@JeetShah Welcome to the Rebol and Red room. See our FAQ
 
@pierre - I naver used Magic server pages, if you mean that old rebol system. Now ppl either use Cheyenne (you need to replace Apache, so that is not always an option, if you run hosted for e.g.), or Quartermaster from Chriss Ross Gill, which is still being supported ...
@DocKimbel - how goes Android brain surgery? :-)
 
@Tom Welcome to the Rebol and Red room. See our FAQ
 
Hello, @JeetShah and @Tom! Welcome to the (Red and Rebol)ers' chat room!
(I'm a human being; RebolBot is our favourite robot; he (she?) speaks in Rebol)
@pekr Yes, I understood that magic! was a bit unused nowadays; however, it was a project that we made on the French forum, to migrate it to Rebol3.
@pekr yes, I must give a serious try to Quartermaster, also
 
2:35 PM
@Pekr, brain damaging. ;)
 
But you are still fighting, right? Don't give up :-)
 
I'm going on vacation starting from tomorrow until 3rd June. Going to visit Andreas in Vienna and take a tour in Budapest with friends from France.
 
@DocKimbel Have fun!
 
Fortunately, my friends are paying the trip for me, so I can save the money for the home bills.
I'm not sure I'll have time to debug the current Red port on Android before I go.
But taking some (real) days off is really welcome, these last months have been very energy-consuming to me.
@HostileFork Will do, I'm looking forward taking a good beer with @earl and debugging some ARM code with him. ;-)
 
OK, so in the meantime I will do some more shooting in our studio plus disturb guys about R3 GUI styles :-)
hmm, beer coding session :-)
 
2:44 PM
@pekr Well, if the shooting involves the nice model we've seen once or twice, I can understand your priorities then. ;-)
 
You mean something like this one? xidys.com/pekr/jana-rose-romance.jpg :-)
 
@pekr Exactly ;-) I guess I should pay you a visit someday in Czech, looks like some Red evangelization would be worth doing there. ;-)
 
What you would see is my led screen, my cool studio, but an old house, as I put most of my money into various projects I like :-)
btw - Vienna is not so far away, just some 3 hours. From Brno, where Cyphre, Rebolek and Oldes live, it is under 2 hours I think ...
I am still curious, if there would be any devcon in September or later, in Vienna, imo EU guys could come. Prague would be good too, more centre of Europe, but from here, even further than Vienna ...
 
Well guys, if you want to come, I'll be there from 18:00 on Sunday until early morning (taking then a flight back to Montenegro)
 
0
A: How to capture words bound in outer context when creating new context?

moliadthis is good style, especially the second, which is more flexible as it allows you to mass-effect all uses of the outer print, without any ambiguity. when using direct binding, it may occur that the word outer-print is redefined or the context changes between two calls to make foo [] and in the...

 
 
3 hours later…
6:01 PM
I'm playing with R3GUI look a bit: iluminat.cz/rebol/grad-gui3.png
 
0
A: What configuration files are there for Rebol R3 and how are they loaded?

BrianHIn Rebol 3 you load code using rebol.r, which is supposed to go in the same directory as the rebol executable. It won't load rebol.r from the user's home directory because files in that directory tend to be writeable by programs running with the user's permissions, which makes it a nice place to ...

 
@rebolek Better...flatter, fonts look smoother
I don't usually associate the color green with "Halt!" though. :-)
 
@HostileFork That's just defined for the demo :) It looks strange, I agree :)
 
7:01 PM
Nothing reminds me of how important C++ is than programming in plain old C. Sigh. So... many... places... to... make... mistakes!
 
 
1 hour later…
8:04 PM
I downloaded that droidstack last night but I couldn't see how to go to chat from it. I could see Q&A
@rebolek You going to finish off the port for me? :)
 
@GrahamChiu there's a little chat bubble to the right of each Q&A - it leads to its chat area
 
@Adrian Ahh .. okay. what happens if there's more than one chat room ?
 
don't know
actually - it leads to all the chats in that Q&A
 
ok. Sounds good but a little oblique
 
not really - you get a list of the chat rooms
 
8:09 PM
Let's see if we can get Carl (aka rebol ) to use it at work during lunch!
 
During Carl's visit, Discourse was brought up and the possibility of setting that up as a chat to use instead of/in addition to this. Is anyone interested in trying that out. It is, as was mentioned, open source.
I just think that for new people dropping by, this is not really that great - as evidenced by Carl's experience.
 
@Adrian Have you tried it?
 
nope, but wouldn't mind playing around with it
 
8:26 PM
I'm not rewriting the bot!
 
heh
 
Looks like the chat on droidstack is just the mobile interface that I've used before .. ie. no way to reply to specific questions
 
remember that one of the improvements to the bot is to make it agnostic to the chat system
 
I'm back, and (hopefully) up to date. The major time-consuming part of the move is done for now.
Still haven't read the last 2 (3?) months of AltME though.
 
@BrianH We had a chat with Carl yesterday ... and again talked about a 3.0 release
@BrianH Missed nothing
ie. nothing relevant to R3 development which is now taking place here
 
8:38 PM
@GrahamChiu saw that, and was quite pleased to do so :)
@GrahamChiu that seemed to be the case.
 
Anyway, now that you're settled, please sign up to the trello board and we'll assign you some cards!
 
FYI, some people here may be happy to know that my new job uses git and github quite heavily, so I've been getting a crash course, even in the command line. It's a rebase shop rather than a merge shop, so that might affect my approach to future contributions :-/
 
rebase ?
 
@GrahamChiu the assigning of cards might need to wait until next week, but I'll see about getting signed up.
 
I was kidding .. you make your own cards
It's not a work allocation scheme but more of a notice board to let people know what you're doing
 
8:44 PM
@BrianH Rebase shops are good :)
(If used sensibly, yada yada yada ...)
 
So, it's not dBase shop :)
 
hello guys, i have a parse question. how can i match a slash word in a dialect?
>> parse [person / name: string age: number] [word! '/ some [set-word! word!]]
** Syntax Error: Invalid word-lit -- '
** Near: (line 1) parse [person / name: string age: number] [word! '/ some [set-word! word!]]
 
@GrahamChiu meaning that the changes you make in your contribution are based on the state of master at the time that you incorporate the contribution, instead of at the time that you fork your branch. Since this is not actually true, you have to rewrite history using the rebase command after you are finished with your changes, resolving any conflicts yourself. This means that only you have the responsibility to merge your code - noone else is doing the merges.
 
meanwhile
>> parse [person * name: string age: number] [word! '* some [set-word! word!]]
== true
 
I just had a major task which took 3 weeks, and I had to rebase my changes on the current state of master every day. It was annoying, but at least it was my annoyance, not someone else's.
bbl, lunch
 
8:50 PM
@RebolBot do
parse [/] [quote /]
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> parse [/] [quote /]
== true
 
@rebolbot do [person / name: string age: number] [word! quote / some [set-word! word!]]
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> [person / name: string age: number] [word! quote / some [set-word! word!]]
== [word! quote / some [set-word! word!]]
 
@earl nice, thanks
 
@rebolbot do parse [person / name: string age: number] [word! quote / some [set-word! word!]]
 
8:51 PM
; Brought to you by: tryrebol.esperconsultancy.nl
>> parse [person / name: string age: number] [word! quote / some [set-word! word!]]
== true
 
i was wondering if there is a quote functionality outside of parse too, because i just ended up doing
first [:some/path]
because it's not the same as ':some/path
 
Sure, it's called quote as well.
@RebolBot do
quote :some/path
(R3 feature.)
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> quote :some/path
== :some/path
 
hmm.. since when do we have that? i never used
ah, so it's a backported thing
im writing a datomic schema generator, btw. trying to generate shit like this:
{:db/id #db/id[:db.part/db]
:db/ident :community/name
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/fulltext true
:db/doc "A community's name"
:db.install/_attribute :db.part/db}
by simply saying:
community / name: fulltext string "A community's name"
 
@onetom Only the regular QUOTE is backported (to 2.7.7+, part of R2/Forward), QUOTE in PARSE is not backported (iirc).
 
8:55 PM
sure, i knew about the quote in parse, just forgot about it coz i never had to use
 
9:22 PM
@BrianH in a busy repo even with rebasing, isn't there a good chance there will be additional changes introduced before a pull-request is accepted by a maintainer? i.e. there could still be some merging that s/he needs to do
 
9:38 PM
@Adrian Sure. If contributor and maintainer/integrator roles are separate, the lines can quickly become blurry.
But the point with separate roles typically is not to avoid all types of merges, but rather to avoid needless mainline-to-descendent merges back-propagating into mainline history.
But even then, "merge races" are nothing unheard of :)
 
10:14 PM
Glad to see that Carl dropped by and you all had a chance to chat with him!
 
@Respectech I think he was happy to use this chat system
there's life beyond r3 chat!
 
@GrahamChiu It sounded like it.
 
Also no need for him to keep up with things which I'm sure he will like
Isn't the rebcode site supposed to be up today?
 
10:36 PM
actually on R2
>> parse [person / name: string age: number] [word! quote / some [set-word! word!]]
== false
 
As I said, PARSE's QUOTE command is a new feature in R3 which has not been backported to R2.
 
@earl indeed, sorry. okay, it's better if i sleep. so in R2 i cant do this? for now i changed the slash to star in the dialect so this works:
>> parse [person * name: string age: number] [word! '* some [set-word! word!]]
== true
 
@Adrian well, there is someone whose job is to merge pull requests, and they won't merge without passing a lot of automated and manual tests, so actual changes to master happen at a fairly regular pace. Plus, everyone else who has been doing pull requests has to rebase too, so it never gets too out of sync.
@RebolBot do/2
parse [person / name: string age: number] compose [word! (to-lit-word first [/]) some [set-word! word!]]
 
; Brought to you by: tryrebol.esperconsultancy.nl
; rebol.com/r3/docs/errors/script-expect-set.html
>> parse [person / name: string age: number] compose [word! (to-lit-word quote /) some [set-word! word!]]
*** ERROR
code: 304
type: script
id: expect-set
arg1: word!
arg2: op!
arg3: none
near: [to lit-word! :value]
where: to-lit-word
 
@rebolbot do/2 parse [person / name: string age: number] [word! word! some [set-word! word!]]
 
10:48 PM
; Brought to you by: tryrebol.esperconsultancy.nl
>> parse [person / name: string age: number] [word! word! some [set-word! word!]]
== true
 
@RebolBot do/2
parse [person / name: string age: number] compose [word! (to-lit-word first [/]) some [set-word! word!]]
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> parse [person / name: string age: number] compose [word! (to-lit-word first [/]) some [set-word! word!]]
== true
 
@GrahamChiu I was checking against a particular word, not words in general.
 
@BrianH sure
 
Unfortunately the quote function in R2 doesn't work with word! values - limitation of R2.
 
10:50 PM
@onetom any reason you're not switching to R3 ?
Just looking at Carl's clean-script. It uses load/next which is deprecated in R3. Have to use transcode/next which then means the script has to turned into binary.
Load/next => Transcode/next was a security issue?
BTW, from Carl's visit yesterday:
1. Rebol.net - he wants to hand over
2. Rebol.org is not under his control
2
 
11:05 PM
@GrahamChiu good question... i just got used to r2 too much. when i tried to do anything in r3 (in the past) nothing worked as expected so i never really looked back at it.
actually i don't even know where can i find a binary of some latest version for the mac
 
@onetom try the rebolsource.net for mac
Last binary for OSX is Feb 2013 rebolsource.net
 
@GrahamChiu not security, a matter of scale. The load function is considered higher-level and more heavy-weight in R3. The transcode function does the lower-level parsing, and is actually called by load internally. There is stuff that load does in R3 that doesn't make sense to do incrementally, so load/next doesn't make sense anymore.
 
thanks
 
Most of the users here are on R3 now
 
oh. The Man was here. William Wallace (Braveheart) he was not though :-(
 
11:11 PM
@graph Yes, hopefully we can make it a regular event
Reality bites ...
 
ok, i tried my recent script on r3-gfc51038 and of course it doesn't work. i had the same experience w r3 every time i tried it, so that's why i haven't switched still
tab doesn't work in the console
empty lines are preserved in the command history
then here is this:
>> x: read http://google.com
** Access error: protocol error: "Redirect to other host - requires custom handling"

>> x: read https://google.com
** access error: missing port scheme: https

>> x: read http://rebol.com
== #{
3C21646F63747970652068746D6C3E0A3C68746D6C3E3C686561643E0A3C6D65
the error in my script seems to be rooted in some scoping changes:
$ r3 schema.reb
** Script error: contain? word is not bound to a context
** Where: do expect do either either either -apply-
** Near: do to-word join compare "?" actual expected [[" ok -" desc*]...
 
Ok, the issue is that prot-http is not finished
 
i made this little assertion tool:
expect: func [ actual '_to_ 'compare expected ] [
print either do to-word join compare "?" actual expected
[ [ " ok -" desc* ] ]
[ [ "ERR -" desc* newline
"Expected to find:" mold expected newline
"within:" mold actual newline ] ]
]
contain?: func[a b] [found? find a b]
 
so, the redirect is not working yet
 
so i can write unit tests like:
desc "simple name (without namespace)"
expect first gen [name: string]
to contain [:db/ident :name]
 
11:30 PM
so how can i give a function as a parameter to another function if i dont want to use a get-word? in r2 it's:
compare-with: funct ['fn a b] [do fn a b]
compare-with < 1 2
 
you can pass a function using :function
 
sure, but it would look ugly
expect onetom to :be "happy"
 
in your example above 'contain needs two parameters but you're only passing one
 
wtf, isn't it? the whole point of dialecting is to get away from such nuisance
im passing in actual and expected (and the code works on rebol2, so the solution can't be that simple)
 
compare-with: func ['fn a b] [apply get fn [a b]]
In case you want a bit more security, or to support ops more seamlessly.
You might want to do some type checking, or avoid double evaluation too (your R2 code doesn't).
 
11:38 PM
like ['fn [function!] a b] ?
 
Regarding http errors, we have submitted some patches but .... not accepted yet
 
compare-with: func ['fn [any-word!] a b] [apply get fn [:a :b]]
 
ah, i see. im actually surprised how 'apply can evaluate that block in the context of the function... :/
 
It passes the block to the function as arguments. It doesn't evaluate the block in the context of the function.
The apply function does evaluate the arguments in the block using consistent rules though, and ignores the evaluation rules of the function, such as lit-word or get-word arguments. It does type-check though.
 
but the get words are bound to the context of the calling function:
>> f1: funct[fn a][fn [:a]] f2: funct[x][print mold x] f1 :f2 123
[:a]
 
11:43 PM
You forgot the apply.
 
i was just testing this:
>> f1: func[fn a][fn [:a]] f2: func[x][print x] f1 :f2 123
123
i printed the molded value just to confirm it's evaluating the value of 'a
 
Right. If you pass a block to a function, it doesn't get bound to the context of the function unless you do it explicitly.
 
okay, i guess doing ruby and javascript in the past year has just brainwashed me... :(
 
Tell me about it. I now do those at my day job.
 
you!?!? nooooo, don't do it! what will happen to rebol then? :)
you get brain ruby! it's like brain cancer just harder.
 
11:47 PM
New day job affords me more time for Rebol than the old (SQL/.NET) day job did :)
And where do you think FUNCT came from? I was explaining Rebol to a Ruby programmer.
 
you are contributing so much to rebol, i seriously thought u have already retired
:)))
 
Nope. Just took a break to switch cities. Live in the San Francisco Bay area now.
 

« first day (940 days earlier)      last day (2840 days later) »