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

World: r3wp

[Red] Red language group

BrianH
9-Mar-2011
[159]
Yup.
Henrik
9-Mar-2011
[160]
ok. that's all I need to know. :-)
Maxim
9-Mar-2011
[161]
great work doc!
Dockimbel
9-Mar-2011
[162x2]
Thanks.
Henrik: what an overwhelming enthusiasm! :-)
Henrik
9-Mar-2011
[164]
:-)
Kaj
9-Mar-2011
[165]
I went through the code and it's very impressive to me. Most people 
these days wouldn't think it would be possible
NickA
9-Mar-2011
[166]
Doc, do you have Paypal account for donations?
GrahamC
9-Mar-2011
[167x2]
he does .. see his cheyenne page for the address,
http://www.cheyenne-server.org/about.shtml
NickA
10-Mar-2011
[169]
Thanks :)
Dockimbel
10-Mar-2011
[170]
Thank you very much for your donation Nick, that is very much appreciated!
amacleod
10-Mar-2011
[171]
the helloworld.reds script exe opens a console, writes stuff and 
then closes. Is there a way to keep that wndow open so I can see 
the output?
Cyphre
10-Mar-2011
[172]
yes, run it from already opened cmd.exe
Dockimbel
10-Mar-2011
[173]
amacleod: It's mentioned in the README file:

4) The resulting binary is in red-system/builds/hello.exe, open a 
DOS console and run it.
Ashley
10-Mar-2011
[174]
Just wanted to say I really like the minimalist approach and am following 
this project with great interest.
Steeve
10-Mar-2011
[175x2]
I wonder Doc, why did you you choose to make your own compiler ?
And was OTCC behind your inspiration ?
Kaj
10-Mar-2011
[177]
There's some explanation in the comments on the Red website
Dockimbel
10-Mar-2011
[178x2]
I've looked at TCC sources for inspiration (don't know about OTCC). 
Making a compiler is at the heart of the project, Red (as Red/System) 
are compiled languages.
I've looked at TCC code emitter to be more specific, not at the compiler 
part.
Steeve
10-Mar-2011
[180]
OTCC is the ancestor of TCC
Maxim
10-Mar-2011
[181]
could LLVM also be a target for the emitter, eventually?
Dockimbel
10-Mar-2011
[182x3]
Right, looking at it right now, the one Bellard used to won the C 
obfuscated code contest.
Maxim: see http://groups.google.com/group/red-lang?hl=enfor the 
anwser to that question.
Short answer: sure, but it's not in the roadmap, I don't have a need 
for it.
Steeve
10-Mar-2011
[185]
But you know, I woud prefer a DSL like emiter, something using parse's 
rules exclusively
Dockimbel
10-Mar-2011
[186]
I needed to prototype a direct native emitter for the upcoming JIT-compiler. 
So compilation speed was a critical.
Maxim
10-Mar-2011
[187]
thanks, I was just wondering if the compiler was structured in a 
way to make it possible.


as for when/how that's obviously not a priority if you're already 
able to spit out code for the various platforms easily.
Dockimbel
10-Mar-2011
[188]
was a critical
 => was critical
Steeve
10-Mar-2011
[189x2]
Parse is fast
But I guess, you intend to recompile the emitter with Red itself, 
as soon as possible.
Dockimbel
10-Mar-2011
[191x3]
Yes, that's the idea. It's currently in a boostrapping phase, temporary 
relying on REBOL.
bootstrapping
I'm not sure I get your "DSL like emiter"? Do you mean compiling 
to an intermediate dialect, that would be compiled to native code?
Steeve
10-Mar-2011
[194x3]
No, I mean writing each target emitters/assemblers (IA32.r) with 
a dialect.
In a way to ease porting
But it's true that it's a matter of taste.
Dockimbel
10-Mar-2011
[197x2]
Such dialect would be an IR (Intermediate Representation), I wanted 
to avoid that, for several reasons: simplicity, efficiency, performances. 
The porting effort is not so big with the current approach. Also, 
once I'll start working on the optimizing compiler version (next 
year), I would  use need an IR, and it would need to be a little 
higher level than that (emitter/ASM-like level).
If you set the compilation logs to 3 (-vvv) and take only the entries 
starting with ">>" you'll get a feeling of what such IR would be. 
In fact, just recording these steps instead of reducing them directly 
to native code, would almost give you a good IR to start making optimizations 
(other than the very trivial ones that I've included in IA32.r).
Maxim
10-Mar-2011
[199]
Doc, have you ever coded in AMIGA language E ?
Dockimbel
10-Mar-2011
[200]
I remember reading E docs, but not coding...maybe I just did a HelloWorld 
app.
nve
10-Mar-2011
[201]
Hey guys ! AltME is cool, but what about using Red lang Google Groups 
to spread the world all reflexion (?) ?

And maybe having new blood, new way of thinking, new point of view 
?
What do you think ?
Maxim
10-Mar-2011
[202x3]
there might be some ideas to rip out of that compiler.    my favorite 
low-level feature was that all types where natively the same size 
in ram and where all aligned to that size.     in E all datatypes 
where 32 bits in RAM


so for example, chars actually had 4 bytes which you could dump bytes 
into, making them ideal for many purposes which strings and numbers 
are commonly used instead.  you coud compare chars with LONGS as 
though they where both integers, etc.
IIRC it would compile 10000 lines of code /second on a 7MHz cpu.
or was it 100000 ?
Dockimbel
10-Mar-2011
[205]
Max: the current supported types in Red/System are all of same size. 
Makes a lot of things easier, but I will need 8 and 16-bit sizes 
very soon, so the simplicity of implementation will probably suffer 
a little from that.
GrahamC
10-Mar-2011
[206]
yeah, I thought the news group was the intended method of communication
Dockimbel
10-Mar-2011
[207x2]
Well, I would prefer to answer deeper/longer questions on Google 
groups, but I guess people here are too used to realtime chatting 
here.
Moving Red discussions (at least the long topics) out of AltMe's 
darknet would help.