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

World: r3wp

[Red] Red language group

Geomol
15-Jul-2011
[2771]
ok, I think, I get it now. Thanks!
Steeve
15-Jul-2011
[2772]
Do Red handles block data-type so far ?
PeterWood
15-Jul-2011
[2773]
Red/System does not have a block datatype.
Steeve
15-Jul-2011
[2774]
Will it  ?
PeterWood
15-Jul-2011
[2775]
I'm pretty sure that Red will have a block datatype, not so sure 
about Red/System
Kaj
15-Jul-2011
[2776x2]
I guess there will be a way to access Red blocks from Red/System. 
Until then, you can implement your own
I'm about to for cURL, to receive an unknown quantity of data into 
memory
Dockimbel
15-Jul-2011
[2778]
Red/System will not have high-level datatypes, but will be able to 
use the low-level methods of Red's datatypes if required (mainly 
for supporting Red). Anyway, Red/System is not meant to use those 
"boxed" datatypes, only low-level and close to the CPU types.
Gabriele
16-Jul-2011
[2779x2]
Geomol, this is an example in C:

    #include <stdlib.h>
    #include <stdio.h>
    #include <dlfcn.h>

    int main(int argc, char **argv) {
        void *handle;
        double (*cosine)(double);
        char *error;

        handle = dlopen ("/lib/libm.so.6", RTLD_LAZY);
        if (!handle) {
            fputs (dlerror(), stderr);
            exit(1);
        }

        cosine = dlsym(handle, "cos");
        if ((error = dlerror()) != NULL)  {
            fputs(error, stderr);
            exit(1);
        }

        printf ("%f\n", (*cosine)(2.0));
        dlclose(handle);
    }
who generates the appropriate assembly code for the     (*cosine)(2.0) 
   call? The C compiler.
Geomol
16-Jul-2011
[2781x2]
Yes, but we're talking doing that in a high-level interpreted language, 
like Python, Ruby, Rebol, etc.
In a situation, where you don't know the function at compile time.
Gabriele
16-Jul-2011
[2783]
R3 does not have such ability, so I'm confused by your "When looking 
at the host-kit for R3, I see functions to open, close and find functions 
in DLLs, but I don't see the calling of those functions."
Geomol
16-Jul-2011
[2784x2]
Ok, I thought, R3 had that ability and used those open/close functions 
to do it.
The code is in R2, but out of reach.
Andreas
16-Jul-2011
[2786]
R3 uses dlopen/dlsym/dlclose to load R3 extensions, which have a 
clearly defined exposed API (RX_Init, RX_Call).
Dockimbel
17-Jul-2011
[2787]
Mac OS X now fully supported: http://www.red-lang.org/2011/07/mac-os-x-port-released.html
Oldes
17-Jul-2011
[2788]
Nice, but the original "hello" demo was with red color:)
Dockimbel
17-Jul-2011
[2789x3]
Well, if someone could bring color (using ANSI codes?) to the Mac 
and Linux version, that would be nice! :-)
Ok, I have added the red color to Mac and Linux platforms...updating 
the screenshots now ;-)
Looks much better now. :-)
Oldes
17-Jul-2011
[2792]
I don't have Linux nor Mac at this moment... are you using just string 
like "^[[31mRED^[[0m" ?
Dockimbel
17-Jul-2011
[2793]
Yes, have a look at the hello.reds source code: https://github.com/dockimbel/Red/blob/master/red-system/tests/hello.reds
Kaj
17-Jul-2011
[2794]
You're too good for us :-)
Oldes
17-Jul-2011
[2795]
I like colors... I'm looking forward to see colorized console one 
day:)
Dockimbel
19-Jul-2011
[2796]
Implemented support for argc, argv and env for UNIX platforms, will 
publish it tomorrow when Windows support will be ready too.
Kaj
19-Jul-2011
[2797x2]
Cool, thanks!
That enables another large class of programs
Endo
20-Jul-2011
[2799]
great! now it's getting more useful.
Dockimbel
20-Jul-2011
[2800x2]
Command line arguments access now available: http://groups.google.com/group/red-lang/browse_thread/thread/4b8cb7a5a49308ba?hl=en
Tested ok on all OS (including Syllable).
Kaj
20-Jul-2011
[2802]
Great, I was just looking over it, and couldn't see anything wrong 
yet
Dockimbel
20-Jul-2011
[2803]
In my first release, I wrongly read ESP data instead of [ESP] for 
Syllable.
Kaj
20-Jul-2011
[2804]
Ah, the detail devil :-)
Dockimbel
20-Jul-2011
[2805]
I once offered a little glowing "code protecting" angel statue to 
one of my developers. It was supposed to keep devil out of your code 
if you kept it close to your screen. Can't find it online anymore, 
maybe that would help...:-)
Kaj
20-Jul-2011
[2806]
:-)
Dockimbel
21-Jul-2011
[2807]
New Red/System document is available: BNF language grammar description 
(by Rudolf W. Meijer)
http://static.red-lang.org/A_BNF_grammar_of_Red_System.pdf
Gregg
29-Jul-2011
[2808]
Very cool Doc (and Rudolf).
Kaj
29-Jul-2011
[2809x2]
I've cleaned up my cURL binding enough to put it in a repository:
http://red.esperconsultancy.nl/Red-cURL
Endo
31-Jul-2011
[2811]
very nice work!
Kaj
31-Jul-2011
[2812]
Thanks
Dockimbel
1-Aug-2011
[2813]
cURL link added to Contributions section: http://www.red-lang.org/p/contributions.html
Kaj
6-Aug-2011
[2814]
I'm temporarily bored with all the cURL bindings, so I've started 
working on an SDL binding
Oldes
7-Aug-2011
[2815]
good choice:)
Endo
7-Aug-2011
[2816]
that's nice!
Kaj
7-Aug-2011
[2817x4]
I thought you would like it, Oldes :-)
We'll see how far we can get with sound and graphics without floats
I can open and close a window now. Imagine VIEW [ ] :-)
I can have a window without any borders, so you could make your own 
window manager