• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[!REBOL3] General discussion about REBOL 3

Gregg
9-Mar-2013
[1471]
>> t: task [] [wait 2 print "Done"]
>> do t print "Go"
Begin Task
Go
>> Done
End Task
BrianH
9-Mar-2013
[1472]
Tasks sort of work. They actually do start, but there are a lot of 
unresolved problems in the internals, and some of what is supposed 
to make them work properly hasn't been done yet, and some stuff like 
the synchronization and sharing models hasn't even been designed 
yet. So it's not really recommended that you use them yet.
Sunanda
10-Mar-2013
[1473]
Is this the expected / required result of a JOIN on two TYPESET!s?

    >> join to-typeset [pair!] to-typeset [integer!]
    == "pair!integer!"
Gregg
10-Mar-2013
[1474]
I think so. Word! values turn into strings as well. You can use UNION 
to join typesets though.
Sunanda
10-Mar-2013
[1475]
Thanks....It seems odd though, given the different (and for me unexpected) 
results here:
    join  to-typeset [integer!] []
    join  [] to-typeset [integer!]
BrianH
10-Mar-2013
[1476x2]
Yeah, sorry, the fake typesets in R2 are actually blocks. The real 
typesets in R3 aren't series at all.
I faked them well enough in R2 to use them in most cases in an R3 
style, but not well enough to make them fail to do the stuff they 
are supposed to fail to do in R3. Same with closures.
Sunanda
10-Mar-2013
[1478]
As long as your are happy.....Without looking at the code, I assume 
typesets in R3 are specialised bitsets.

Still, would be nice for the behavior to be a little more consistent.
BrianH
10-Mar-2013
[1479x2]
They are specialized bitsets, so specialized that they fit within 
a value slot rather than being an external structure. But JOIN forms 
non-series, so they are consistent with bitsets in that JOIN does 
the same thing with them.
However, you can't use bitsets to fake them in R2.
MarcS
10-Mar-2013
[1481x2]
Hi all. Is this an appropraite room for discussing an R3 patch?
appropriate*
Andreas
10-Mar-2013
[1483]
Hi Marc! Yes, it certainly is.
MarcS
10-Mar-2013
[1484]
Neat. Before I get to that: is task launching working on POSIX systems?
Andreas
10-Mar-2013
[1485]
No.
MarcS
10-Mar-2013
[1486x6]
Okay, good to know.
Right, here it is: https://github.com/0branch/r3/commit/5493e97c1afaa3848bf448cb49ccf03a1632302d
Hopefully the commit message is gives a clear explanation (and explains 
the motivation).
s/ is //
Brief restatement: BROWSE isn't working on OSX -- the current implementation 
tries two system() calls: xdg-open and x-www-browser
This patch uses /usr/bin/open on OSX, maintains the previous handlers 
on other platforms. In addition, I replaced the system() calls with 
fork+exec to avoid firing up another shell; one byproduct of this 
is that exec errors no longer print to the console (though this could 
have been hackishly solved by adding some redirects to the system() 
call string in the existing codebase).
Andreas
10-Mar-2013
[1492]
Did you test this on Linux as well?
MarcS
10-Mar-2013
[1493]
Not yet, can do so now.
Andreas
10-Mar-2013
[1494]
Please do.
MarcS
10-Mar-2013
[1495]
Firing up the VM, give me 5 mins.
Andreas
10-Mar-2013
[1496]
No hurries :)
BrianH
10-Mar-2013
[1497]
Look here http://issue.cc/r3/1921before you do this. Make sure the 
security constraints mentioned there are taken into account.
MarcS
10-Mar-2013
[1498]
(Works on my Fedora instance.)
Andreas
10-Mar-2013
[1499x2]
Thanks for testing that.
Basically: looks fine, thanks a lot for working on this.
MarcS
10-Mar-2013
[1501]
BrianH: I don't think this change is an ideal solution, but it seems 
to be an improvement on prior behaviour.
Andreas
10-Mar-2013
[1502]
If you can find a way to be more specific on OSX, so that _only_ 
URLs get handled, that would be great. OTOH, xdg-open is already 
rather versatile as well (only I fear that OSX's open is even more 
featureful).
MarcS
10-Mar-2013
[1503x4]
One problem with the existing implementation is that xdg-open and 
x-www-browser are searched for in the PATH, so executables with the 
same names in a PATH directory that takes precedence will yield different 
behaviour.
Andreas: yeah, file:/// will open in Finder with this pathc.
patch*.
(So it's not constrained to the browser.)
Andreas
10-Mar-2013
[1507]
That's the same with xdg-open.
MarcS
10-Mar-2013
[1508]
Right.
BrianH
10-Mar-2013
[1509]
Yeah. It looks like it just calls open, which can be a bit of a hole. 
It's better for now but we need to come up with a better solution 
in the long run.
MarcS
10-Mar-2013
[1510x3]
Agreed.
Hmm, why does BROWSE accept NONE?
BrianH: I don't mean to present this patch as something it's not. 
To clarify: still a hacky solution, but at least it brings the current 
behaviour to OS X.
BrianH
10-Mar-2013
[1513]
No, agreed. It's still nowhere near as bad as the #1921 approach, 
or the last ticket that requested it. But we need to make sure to 
come up with something better in the long run.
MarcS
10-Mar-2013
[1514x3]
For sure.
I might patch this NONE case unless anyone has a good reason to leave 
it in place?
(At the moment, you get usage info on stderr. The current r3 just 
segfaults on Linux.)
BrianH
10-Mar-2013
[1517]
It's none propagation I guess. Because dealing with or ignoring nones 
is easier to do in Rebol than writing conditional code around everything 
to avoid triggering errors.
MarcS
10-Mar-2013
[1518]
Okay, so I guess we just need to handle the NONE rather than attempting 
to browse it
BrianH
10-Mar-2013
[1519x2]
The BROWSE code should explicitly do nothing if passed a NONE. It 
certainly shouldn't segfault.
If it doesn't explicitly do nothing, that's a bug.