World: r3wp
[Red] Red language group
older newer | first last |
Dockimbel 5-Jun-2011 [1898x3] | Red is compiled to native code, REBOL is interpreted. |
There is a bit longer description here: http://freshmeat.net/projects/red-language | |
And more details here: http://www.red-lang.org/p/about.html | |
GiuseppeC 5-Jun-2011 [1901] | Read ! I have understood the differences and why your are leaveing the REBOL world for the RED world. |
BrianH 5-Jun-2011 [1902] | Well, "leaving" might be a little strong. Red is based on REBOL, can coexist with REBOL very well (in theory), and most of the people working on it are part of the REBOL community in one way or another. They're complementary projects. |
PeterWood 5-Jun-2011 [1903] | and REBOL 4 will be written in Red :-) |
Kaj 5-Jun-2011 [1904x2] | Implemented a separate binding for the floating point math library |
However, it can't work yet, because floats are 64 bits in most implementations, and Red can't pass those by value | |
Kaj 6-Jun-2011 [1906x4] | Ah, I see Doc will need to implement float support to back up his n-body boast :-) |
Implemented remaining string parsing and file functions | |
The C and math library binding is now pretty much complete, at the level of the original ANSI standard. I've left out some stuff that is too implementation dependent and not strictly needed | |
A few features are waiting for extra support in Red/System | |
Mchean 6-Jun-2011 [1910] | Doc, love the painting you used for the 'What is the state of Rebol World?' I've forgotten who the artist is do you know? |
Kaj 6-Jun-2011 [1911x4] | I know it from Asterix :-) |
The examples in 10.1 and 10.2 use hex numbers in lowercase | |
Am I right when I assume that #include does not prevent against double inclusion of the same file? | |
Is NOT evaluated left to right? It seems to have lower priority | |
PeterWood 6-Jun-2011 [1915] | #include was changed to only include a file once a little while ago. There was a comment to that effect in the commit notes. |
Kaj 6-Jun-2011 [1916] | Cool, thanks |
BrianH 6-Jun-2011 [1917] | If Red follows REBOL's evaluation levels, NOT would have lower priority than all operators. Two levels: Operators, and everything else. |
Kaj 6-Jun-2011 [1918x2] | It would actually make my current code case nicer, but I need to be sure it's intended |
Does it mean NOT is handled as a function? It's listed as an operator | |
BrianH 6-Jun-2011 [1920] | Operators are infix. Prefix is functions. But it might be implemented as a special case builtin, which would make it what other languages call prefix operators. |
Kaj 6-Jun-2011 [1921x2] | Operators in Red are both infix and prefix |
The REBOL manual also fails to note the fundamental difference between NOT and the other logical functions/operators | |
Dockimbel 7-Jun-2011 [1923x5] | Mchean: the second painting I have used is "The Raft of the Medusa" from the french painter Theodore Gericault: http://en.wikipedia.org/wiki/The_Raft_of_the_Medusa |
Hex lowercased: thanks for reporting, fixing that for next spec release. | |
#include keeps an internal list of already included files. | |
NOT is evaluated the same as other functions. As BrianH says, only two levels of evaluation, same rules as in REBOL. In the specification, it is listed under the "Infix Operators" category, I should either move it out or add some notes. | |
Operators in Red are both infix and prefix : right, same as in REBOL, so, same limitation for using an operator in prefix mode. | |
Kaj 7-Jun-2011 [1928] | It would be good to make that clear in the documentation. NOT now seems to be an operator like in other languages, where inversion usually associates strongly |
jocko 9-Jun-2011 [1929] | I observe a strange behaviour at the compilation of this code #import [ "user32.dll" stdcall [ OemToChar: "OemToCharA" [ in [c-string!] out [c-string!] return: [integer!] ] ]] error message : Compiling tests/readConsole.reds ... ** User Error: Invalid hex literal: Char: "OemToCharA" [ in [c-string! ** Near: make error! reform ["Invalid hex literal:" copy/part s 40] It seems to be linked to the names used here. Is it a parsing problem ? |
Dockimbel 9-Jun-2011 [1930] | Yes, it is a preprocessor issue, I will fix it asap. |
jocko 9-Jun-2011 [1931] | thanks, Doc |
Dockimbel 9-Jun-2011 [1932] | Jocko: - ticket opened for your issue: https://github.com/dockimbel/Red/issues/89 - fix has been pushed in commit: https://github.com/dockimbel/Red/commit/5f5e7d6e1c7f03e1f2dbcae61a05044550f0bed1 |
jocko 9-Jun-2011 [1933] | thanks, works fine |
Kaj 9-Jun-2011 [1934x2] | If I have an #import function returning an integer! but I define it as logic! will that work properly, doing an implicit as-logic on the return value? |
That would make some convenience wrappers unnecessary | |
jocko 10-Jun-2011 [1936] | Same error with CharToOem ... |
Dockimbel 10-Jun-2011 [1937x3] | Jocko: sorry to hear that, I will improve the fix I did yesterday right now. |
Kaj: you can do an explicit casting, if is allowed by this matrix: http://static.red-lang.org/red-system-specs.html#section-4.7 | |
Jocko: fixed by last commit: https://github.com/dockimbel/Red/commit/7b069cfefdf869cedfac9d2e1685c222320aaafd | |
Kaj 10-Jun-2011 [1940] | I'm currently doing explicit castings, but that requires a wrapper function, which takes up space in the source and in every binary. So I was wondering if it would be a good idea to obsolete some of those wrappers |
Dockimbel 10-Jun-2011 [1941x3] | So you are asking to make the type system even weaker, I thought you were a proponent of strong typing ;-) |
Could you solve is with defines? Something like: #define foo [as logic! _foo] | |
is => it | |
Kaj 10-Jun-2011 [1944x3] | I don't think it would make typing weaker, because it is about the definition of external functions, that you have to believe on the blue eyes of the #import spec writer, anyway |
C functions don't have a logic! type, so I would argue that defining one in a return type if you know the C function returns a compatible value actually makes typing stronger | |
A define would still generate code, so it wouldn't lead to reduction of source or binary size | |
Dockimbel 10-Jun-2011 [1947] | The integer! -> logic! is not free, it implies generating extra code for converting properly (see the type matrix). So the define won't generate any more overhead than needed. |
older newer | first last |