World: r3wp
[Red] Red language group
older newer | first last |
Dockimbel 17-Feb-2012 [5114x2] | I'm looking into the 0MQ error messages... |
Kaj: found the issue with 0MQ, it's related to integer! => logic! type casting in your wrapper functions. It seems that the runtime conversion code is not emitted. | |
Kaj 17-Feb-2012 [5116x2] | Ah, another one of those. It must be a regression, that's why I've seen it before |
The WebKit I use of a few years old is 18 MB installed size, on Syllable Server. It has quite a few more dependencies, though, and on Windows that would be more because none of the dependencies are preinstalled | |
Dockimbel 17-Feb-2012 [5118] | Kaj: fix pushed for the 0MQ issue. Let me know if it works fine for you now. Also, any other regression to fix before releasing the new version? |
Kaj 17-Feb-2012 [5119x4] | Not that I found |
Now the WebKit browser starts loading the Red site, but halfway I get this: | |
*** Runtime Error 7: float divide by zero *** at: B01DE1F6h | |
0MQ works again | |
Dockimbel 17-Feb-2012 [5123x2] | Yeah, same issue than previously with the "float invalid operation" exception. Webkit seems to mask them all, while Red/System let them pop up. |
The browser runs fine here on Ubuntu 10.04. No divide by zero errors. | |
Kaj 17-Feb-2012 [5125] | This is on Syllable Server, where it worked before |
Dockimbel 17-Feb-2012 [5126] | If I disable the float "divide by zero" exception, we'll have no way to detect it until proper support for INF will be added. |
Kaj 17-Feb-2012 [5127] | Sigh, the state of computing |
Pekr 17-Feb-2012 [5128] | datatype implement should be "datatype implements" imo ... |
Dockimbel 17-Feb-2012 [5129] | Typo fixed thanks. |
Pekr 17-Feb-2012 [5130] | So now you are finally free to start working on Red? :-) |
Dockimbel 17-Feb-2012 [5131] | Almost, I need to have a look at C init routines first, probably tonight or tomorrow, then I'm free to work on Red. ;-) |
Pekr 17-Feb-2012 [5132] | what is C init routines topic about? I mean - why Red/System needs it? |
Kaj 17-Feb-2012 [5133] | What's the decision on divide-by-zero? |
Pekr 17-Feb-2012 [5134] | You should not divide by zero, it gives an error :-) |
Dockimbel 17-Feb-2012 [5135] | Kaj: I will see if I can quickly add support for `system/fpu/flags` so users can set it as they want/need. |
Kaj 17-Feb-2012 [5136] | Yes, that would be good, otherwise I don't have a browser anymore |
Dockimbel 17-Feb-2012 [5137x2] | Pekr: it is possible to divide by zero in IEEE-754, that gives you +/- INF. I have not decided yet how it should be handled in Red/System, I would be in favor of raising an error rather than introducing INFs. |
Kaj, in any case, you can just replace #{037B} by #{037F} in IA-32.r at line 20: fpu-flags: to integer! #{037B} | |
Kaj 17-Feb-2012 [5139x4] | Thanks, but I'd rather not do that |
For non-variadic C functions, Red/System's compiler will promote float32! to float! automatically. | |
Does that mean that external functions that use single precision can't be bound? | |
Have the docs been republished yet? The #enum link points to #include | |
Dockimbel 17-Feb-2012 [5143x2] | Sorry, forgot to update the docs online. |
Docs updated. | |
Kaj 17-Feb-2012 [5145] | Thanks |
Dockimbel 17-Feb-2012 [5146x2] | Kaj: you can pass single precision values to C functions, but C automatically converts them to double. C always passes single precision floats as double precision, and converts them before pushing them on stack. |
but C automatically converts them to double => "but C always expects double" | |
Kaj 17-Feb-2012 [5148x4] | That seems odd to me. What's the point of single precision, then? It would be slower than double precision |
#enum <name>! [ <label> + | <label>: + <value> ] | |
Doesn't that syntax spec preclude the mixing of value labels and non-value labels? | |
Are enumeration names pseudo-types equivalent to integer!? I guess so, but the documentation doesn't say | |
Dockimbel 17-Feb-2012 [5152x3] | See http://en.wikipedia.org/wiki/Type_conversion#Type_promotion C and C++ perform such promotion for objects of boolean, character, wide character, enumeration, and short integer types which are promoted to int, and for objects of type float, which are promoted to double. |
Single precision purpose: I guess the only advantage is smaller storage size. Some Intel FPU operations are even slower in single precision than double precision. | |
Doesn't that syntax spec preclude the mixing of value labels and non-value labels? Yes it does. I should rewrite the syntax definition to be more accurate and more readable...any suggestion? | |
Oldes 17-Feb-2012 [5155] | I think that single precision is used mostly on GPUs as you can have up to 2 single float operations per clock. |
Kaj 17-Feb-2012 [5156x3] | Interesting, thanks for the explanations |
I'm not sure what grammar syntax you use and what exactly #enum supports, but something like this? | |
#enum <name>! [ (<label> | <label>: + <value>) + ] | |
Dockimbel 17-Feb-2012 [5159] | I would like a less formal syntax description if possible. I would like to remove all the `+`. |
Kaj 19-Feb-2012 [5160] | I've added Mandelbrot drawing floating point examples to the C library binding, for Red/System and seven other languages, to compare them |
Endo 19-Feb-2012 [5161x2] | when I compile following line, I got "*** Compilation Error: redeclaration of enumerator c from colors" #enum [a b c] print-wide [a b c] |
#enum colors [a b c] | |
Kaj 19-Feb-2012 [5163] | That's a name clash |
older newer | first last |