r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Red] Red language group

Dockimbel
28-Dec-2011
[4085x2]
I've checked the dependencies via ldd, all are met.
Maybe Andreas would have a clue about this.
Kaj
28-Dec-2011
[4087x2]
I've already had to leave it out of the C library binding for Syllable. 
That's also odd, though, because it uses the GNU C library, like 
Debian, and Syllable is supposed to have atexit
It's also strange that the cURL binding would work, because it imports 
the same C library binding
Dockimbel
28-Dec-2011
[4089x6]
If I remove the atexit() dependency, I get segfaults on first calls 
to external functions (on printing the GTK version).
So the issue is not specific to atexit().
I guess that it might be causing by a bad version of one or several 
shared lib from GTK.
causing => caused
I've upgraded GTK to 2.20.1, but still getting segfaults.
I will investigate that deeper in the next days.
Andreas
28-Dec-2011
[4095x5]
atexit is often not present in libc's (it is neither in the x86-64 
libc or in the ARM EABI libc).
Some weird stuff with shared library unloading and what not. Don't 
ask me, really :)
They use __cxa_atexit on those platforms, typically.
GCC either rewrites atexit directly or redirects atexit calls to 
__cxa_atexit via libcc, I don't exactly remember.
(That should have been: "via a stub in libgcc".)
Dockimbel
28-Dec-2011
[4100x2]
CASE native implemented in Red/System (same syntax as REBOL's one).
Doc and tests will be added tomorrow.
Kaj
28-Dec-2011
[4102]
Nice!
Henrik
29-Dec-2011
[4103]
Missing double-quote in:

http://static.red-lang.org/red-system-specs.html

either a > 0 [print "TRUE"][print "FALSE]
Dockimbel
29-Dec-2011
[4104]
Henrik: thanks, I'll fix that today with the addition of CASE description.
Pekr
29-Dec-2011
[4105]
as for CASE - I could not fin it in the Docs, in the section talking 
about eventually planned features. I could find there only SWITCH 
directive :-) Maybe that section could be revisioned, to let us know, 
what is eventually planne, and what is not ....
Dockimbel
29-Dec-2011
[4106x3]
I forgot to add an entry for CASE in the "Planned features" of the 
spec document. CASE and SWITCH were announced in slide 36 of my presentation 
at SFD: http://www.red-lang.org/2011/09/red-at-software-freedom-day-2011.html
Other native functions were also announce, but their priority is 
lower. I should update the "Planned feature" section of the spec 
document.
I plan to also add SWITCH today or tomorrow.
Pekr
29-Dec-2011
[4109]
are those required to have function refinements in red/system?
Dockimbel
29-Dec-2011
[4110]
No, they are not related to refinements support. They just enable 
to write cleaner code and more readable code.
Steeve
29-Dec-2011
[4111]
for SWITCH I can see the need (computing labels in array to support 
indirect threading ) a speed issue.

But why do you need to implement CASE in red/system, it's only a 
sequence of if/else statements ?
Dockimbel
29-Dec-2011
[4112x2]
(answered just above :-))
CASE helps "flatten" the nested IF or EITHER constructions.
Steeve
29-Dec-2011
[4114x2]
except than the if-else statement (the c one) is usually mis-used.
It doesn't need to be nested to work.
if .... else if .... else if .... else if .... else
FLAAAAT :-)
BrianH
29-Dec-2011
[4116x2]
In REBOL we tend to use CASE instead of EITHER because CASE is faster 
when there are more than 2 tests. Flat is just a side benefit. Of 
course, an optimizing compiler could change the resulting code from 
one to another when it's appropriate, just like most modern C/C++ 
compilers do.
I hope you have a CASE/all option. We used the CASE/all style in 
the R3 module system code to great benefit, mostly in maintainability 
but also in speed, when compared to the nested IF and EITHER code 
it replaced. It enabled us to add features and simplify code at the 
same time.
Steeve
29-Dec-2011
[4118x3]
I wasn"t against CASE implementation in Red.

I was asking if it was the right place to have it in Red/system as 
a core function instead of as a latter compiled mezz.
but maybe a mixed the things between Red/system and the other layers
To be clear about that. Doc can you confirm that the mezz constructed 
with Red will be also compiled ?
BrianH
29-Dec-2011
[4121]
IF, UNLESS, EITHER, CASE and SWITCH all make sense to compile in 
a compiled language because they all translate to branches and/or 
index lookups in the generated code, and optimizing that would need 
some decent compiler support. If anything, CASE is the most general 
(the others can all be implemented with CASE), and would benefit 
the most from optimization.
Pekr
29-Dec-2011
[4122]
what is make-float-auto-test.r? Do we have floats supported or so? 
:-)
Kaj
29-Dec-2011
[4123]
Nice catch :-)
Pekr
29-Dec-2011
[4124x2]
I think we don't, so maybe just a preparation for what is about to 
come one day :-) IIRC Doc was investigating, what would it take to 
get floats supported by RED/System :-)
re Documentation - Content is missing 13.3.7 CASE
Kaj
29-Dec-2011
[4126]
See above
Pekr
29-Dec-2011
[4127]
Kaj - I mean - CASE is described, but it is not part of the basic 
points ...
Dockimbel
29-Dec-2011
[4128x2]
Pekr: the ... just indicates that the <condition> [<body>] pattern 
can be repeated.
make-float-auto-test.r: just some preliminary tests from Peter, nothing 
has been implemented yet wrt float.
Kaj
29-Dec-2011
[4130]
Isn't the TOC autogenerated by MakeDoc?
Dockimbel
29-Dec-2011
[4131x4]
It is.
I don't see missing content in online doc??
Mezz in Red: yes, they will be compiled.
CASE in Red/System and CASE in Red are two different functions. The 
Red version may or may not rely on the Red/System one.