World: r4wp
[#Red] Red language group
older newer | first last |
Nicolas 11-Oct-2012 [2632x2] | print [4.0 // 2.0] |
I've been looking at the compiler source for about an hour | |
Pekr 11-Oct-2012 [2634x2] | by commit list, do you mean eg. https://github.com/dockimbel/Red/commits/v0.3.0 |
? | |
DocKimbel 11-Oct-2012 [2636] | Pekr: yes |
Kaj 11-Oct-2012 [2637] | Yes |
Nicolas 11-Oct-2012 [2638x2] | I tried changing the modulus types to any-number! -- runtime error |
but I don't know what I'm doing | |
DocKimbel 11-Oct-2012 [2640x3] | Nicolas: it is very possible that we have forgot to add unit tests for that feature. Obsviously, it's a bug, so please report it to github tracker so we can fix it asap. |
number! is a virtual type used only internally by Red/System compiler. | |
It looks like a minor type checking bug, so it should be quickly fixed. | |
Nicolas 11-Oct-2012 [2643] | cool. I'll do that now |
PeterWood 11-Oct-2012 [2644x4] | We don't have any tests for // for float. I'll look into it. |
Red [] 4.0 // 2.0 compiles and runs. | |
Sorry - Red/System[] 4.0 // 2.0 compiles and runs. | |
Red/System[] f: 4.0 // 2.0 gives the type mismatch compile error. | |
DocKimbel 11-Oct-2012 [2648] | Nicolas: issue fixed. |
Nicolas 11-Oct-2012 [2649] | thanks man |
DocKimbel 12-Oct-2012 [2650x2] | Just as a reminder, once we fix the current ARM bugs, we would need to add Red to the following page: http://elinux.org/RPi_Programming |
(Red/System could already be added though) | |
Kaj 12-Oct-2012 [2652] | I've dropped the C library dependency from all bindings that don't strictly need it, to minimise the code base. However, the only binding I could get to work somewhat inlined in Red is SQLite, because it's little more than the imports |
Kaj 13-Oct-2012 [2653] | I've implemented floating point support in the SDL binding. This is used for audio conversions |
DocKimbel 13-Oct-2012 [2654] | I'm fixing the Unicode string printing issues on Linux/ARM...will post the fixes tonight. BTW, I've now an ARMHF image installed, so I'll work very soon on supporting ARMHF ABI. |
Kaj 13-Oct-2012 [2655] | Great |
Pekr 13-Oct-2012 [2656x2] | what is this ABI about? Is that about supporting advantage of having HW floating point unit available? |
I expect it being unrelated to Thumb support? | |
Kaj 13-Oct-2012 [2658] | It's basically unrelated to Thumb. It's not necessarily about hardware floating point, either, but it's a different way of supporting it |
DocKimbel 13-Oct-2012 [2659x2] | It's about dealing with different Linux kernel incompatible ABI for float support on ARM platforms. Red/System uses the FPU unit (named VFP in ARM family) directly, but when having to pass/receive float arguments from libc or 3rd-party libs, Red/System needs to do it respecting the installed system ABI, which might be `softfp` or `hardfp` (there's a third one, but it's for not a concern for us). Currently, Red/System floats are passed using the `softfp` convention, so it works only on ARMEL platforms (while ARMHF platforms require `hardfp` convention). `hardfp` is a much more performant, while `softfp` is for legacy systems or systems with no FPU unit). |
BTW, Red or Red/System apps that do not use floats seems to work well with both ABI. | |
Pekr 13-Oct-2012 [2661x2] | So - lots of work to support ARMHF? |
And also - do I need to know, which platform I need to support, or support can be in one exe, for both worlds? | |
DocKimbel 13-Oct-2012 [2663x3] | You can't mix different ABI in one binary. |
ARMHF: a little, it's the same work as the one done in IA-32 faster-float old branch. In a nutshell, it consists in passing float arguments in FPU registers directly instead of using the stack. | |
We'll provide compilation options and various additional targets to deal with those different ABI. | |
Kaj 13-Oct-2012 [2666] | Are there different Android platforms as well? |
DocKimbel 13-Oct-2012 [2667] | AFAIK, Android libs uses softfp convention. |
Arnold 13-Oct-2012 [2668x2] | Same here, a little tour would be nice. (That is why I picked up a documentation check to start with). e.g. In actions.reds most of funtions are only present as 'name* and some are present as both 'name and 'name* |
That was a reply to a post from Pekr from thursday 1.49 PM | |
DocKimbel 13-Oct-2012 [2670] | Arnold: I certainly won't document nor make "little tour" for internal code that is in alpha stage. That would be just a waste of time. For the '* suffix for function names, it indicates that the function takes arguments from Red stack. But that might be changed in the future, like all the rest of the code...until we reach beta stage (or even until 1.0 release). |
Arnold 13-Oct-2012 [2671] | Yeah youre right. I will concentrate on other tasks preparing for propagating Red. |
Kaj 13-Oct-2012 [2672x2] | Fixed the math library in the C library binding; should now also work on OS X and Android |
I simplified many of the bindings by using the new get-word functionality in Red/System 0.2.6 for getting the address of variables | |
DocKimbel 14-Oct-2012 [2674x2] | I'm looking into the ARM callbacks issues you've reported. |
Kaj: do you have a simple callback case that's failing on ARM and not using floats at all? | |
Gerard 14-Oct-2012 [2676] | Hi Doc, did you plan to integrate some Open CL programming acces to Red in any future ? Here is a summary of kernel programming with OpenCL - and to me this seems accessible to Red, some day : http://www.manning.com/scarpino2/ch04sample.pdf for a larger picture summary of the beast here is the link to the book I referred to : http://www.manning.com/scarpino2/(this is the Manning's publiaher deal of the day ,,, that's why I talk abotu this now). May be just a new binding and some extensions are required - but I would like to know more about the actual modifs required - when a small time is affordable for you to answer ? |
DocKimbel 14-Oct-2012 [2677] | OpenCL: yes, I have that in mind too, but it's most probably for a later version of Red (> v1.0). Also I have other plans to give Red access to GPGPU, by directly having a GPU machine code assembler and a dialect on top of it. It would be mainly for compiler internal use, but such dialect could be exposed for user code if some are willing to implement some fast GPU-powered routines. If you're doubting about such approach, read this article: http://www.geeks3d.com/20110317/low-level-gpu-programming-the-future-of-game-development-on-pc/ |
Gerard 14-Oct-2012 [2678x4] | Nice Doc, Thanks for taking time to answer. I'll "follow the guide" as we say here ! Have a nice day. Now I'll go reading your link. |
bOK Doc I agree for the speed factor But then you would do the multi-targets road again this time for multiple GPUs , isn't it ? | |
have to do ... | |
In between, here is the PyOpenCL lib link for those interested to see how the OpenCL API is accessed by other languages - and this could pave the way for some Red binding ... http://mathema.tician.de/software/pyopencl | |
older newer | first last |