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

World: r4wp

[!REBOL3] General discussion about REBOL 3

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
[1519x3]
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.
Just return unset, I guess.
MarcS
10-Mar-2013
[1522x2]
Okay, fixing now.
not R_NONE?
BrianH
10-Mar-2013
[1524]
No, that returns none. Whatever BROWSE normally returns.
Andreas
10-Mar-2013
[1525]
It normally returns NONE.
MarcS
10-Mar-2013
[1526]
R_NONE
Andreas
10-Mar-2013
[1527]
But I think the original intent was for NONE to open an empty browser. 
Can't find any references for that.
BrianH
10-Mar-2013
[1528]
Weird. Shouldn't it return unset?