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

World: r3wp

[Red] Red language group

Dockimbel
15-Mar-2011
[428x2]
That would be safer, until we get a smarter one.
I thought about adding a full macros system, I think it will be useful 
until we can compose Red/System code from Red itself.
Kaj
15-Mar-2011
[430]
Right, I ran into the preprocessor zeal before, and replaced some 
other values with variables
Dockimbel
15-Mar-2011
[431x2]
Once that definition fixed in %ZeroMQ-binding.reds, I can compile 
working versions of client & server...testing...seems to work ok, 
the server is receiving a list of Hello messages from the client. 
:-)
Congrats!
Kaj
15-Mar-2011
[433x2]
Thanks :-)
Is the preprocessor necessary at all? It's usually much nicer to 
implement this functionality at a more integrated level in a language
Dockimbel
15-Mar-2011
[435]
I'm thinking about descending it one level below to process the script 
at block! level instead of string! level, after all, the compiler 
has the full power of REBOL.
Kaj
15-Mar-2011
[436]
Yes
Dockimbel
15-Mar-2011
[437]
That should avoid the nasty side-effects.
Kaj
15-Mar-2011
[438]
With the Linux backend, did the system loose its ability to cross-compile 
to Windows?
Dockimbel
15-Mar-2011
[439x2]
Nope, I just need to adjust the compiler front-end (rsc.r) to pass 
an option for the desired format (PE, ELF, ...).
Currently, a default format is applied depending on the REBOL binary 
used.
BrianH
15-Mar-2011
[441x2]
You can compose Red/System from REBOL in lieu of a preprocessor, 
until the compiler is ported to Red.
I mean in lieu of preprocessor macros
Dockimbel
15-Mar-2011
[443x2]
Do you mean replacing .reds scripts by .r scripts?
Kaj: if you want to cross-compile, you currently need to hardcode 
the target format in %compiler.r at:

    fmt: select [			;TBD: allow cross-compilation!
        3	'PE			;-- Windows
        4	'ELF			;-- Linux
        5	'Mach-o		;-- Mac OS X
    ] system/version/4
BrianH
15-Mar-2011
[445x2]
No, I mean that when you say that your long-term strategy is to compose 
Red/System code in Red, thus making preprocessor macros unnecessary 
in Red/System, you could start that strategy much earlier by composing 
the code in REBOL. What you learn from doing so and the code you 
write can be adapted to Red later once that exists.
Doc, would you mind if I started some research on generating Dalvik 
binaries? I notice it's not on your list of planned platforms.
Dockimbel
15-Mar-2011
[447x2]
Sure, no problem.
I plan to support ARM directly.
Kaj
15-Mar-2011
[449x3]
Thanks, Doc, I just found it. I wanted to take the scenic route :-)
It's amazing how much more approachable this system is compated to 
everything else out there - save for the very early teaching examples 
in computer science history
compared
Dockimbel
15-Mar-2011
[452]
I wanted to get back to the roots (80's for me) of computing, a time 
where an entire OS + programming langage could fit in a 16KB ROM 
;-).
Kaj
15-Mar-2011
[453]
Brilliant
Dockimbel
15-Mar-2011
[454]
That was the ZX Spectrum ROM to be specific.
Kaj
15-Mar-2011
[455x2]
I'd allow for 20KB, though. Atari was 8K OS + 8K BASIC + 4K decimal 
floating point :-)
Or was it 2K math? I'm really getting old. Anyway, it beats the pants 
off that Intel stuff
Dockimbel
15-Mar-2011
[457]
I think that up to 64K, it's acceptable. :-)
Henrik
15-Mar-2011
[458x2]
The Commodore Max beats that.
http://scacom.bplaced.net/Collection/max/BASIC1.gif
BrianH
15-Mar-2011
[460]
Supporting ARM directly only gets you so far on Android. Native Activities 
were only introduced in 2.3, so the vast majority of Android devices 
don't support them. This means that unless you have some way to generate 
Dalvik code, applications witll still need some Java in them in order 
to run.
Dockimbel
15-Mar-2011
[461]
Eh, you can do a lot in 510 bytes!
Kaj
15-Mar-2011
[462x2]
Like a modern boot record...
That reminds me of the Syllable demo I did where I installed the 
system in a Gentoo swap partition in order not to disturb the demo 
machine :-)
Dockimbel
15-Mar-2011
[464]
Brian: I was planning to bridge with the Java API using JNI. Having 
a generic Java app to embed the Red native app (would be contained 
in a DLL in such case).
Kaj
15-Mar-2011
[465]
Though I've long maintained that Syllable is bloated, under weird 
looks of my colleagues, so we'll do some collapsing with Red :-)
Dockimbel
15-Mar-2011
[466x2]
Similar to what you were proposing for R3 on Android.
Swap: nice trick! :)
Janko
15-Mar-2011
[468x2]
sorry for not being able to do something more creative, other than 
say - this all looks awesome so far! Red progress, red on linux, 
red + 0mq!!
BrianH: red for dalvik, I think that is really a good idea! there 
is and will be a whole bunch of android devices out there, so this 
would be great.
Dockimbel
15-Mar-2011
[470]
Janko: it's still an early phase of the project, but it's progressing 
well.
Janko
15-Mar-2011
[471]
I know it's early, I am surprised by how fast and wide it's moving 
at so early stage.
Kaj
15-Mar-2011
[472x2]
Like greased lightning :-)
Although I'm running into a bit of a wall when I try to import functions 
under cdecl. I'm getting undefined symbols (path values into the 
emitter symbol table) all over the place
Dockimbel
15-Mar-2011
[474x3]
Kaj: you should wait that I add all the type & specs checking to 
the compiler and some unit tests (this week). It will make the compiler 
more usable.
Kaj: I've fixed the cdecl bug (I guess it's the one you've hit), 
will push the sources in a few minutes.
Revision pushed.
Kaj
15-Mar-2011
[477]
Thanks. I don't even know if I need it, but you mentioned it for 
C libraries