World: r3wp
[Red] Red language group
older newer | first last |
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. | |
GrahamC 10-Mar-2011 [209] | Or, you could write a script to post these to the google groups list too :) |
Dockimbel 10-Mar-2011 [210] | Would need to make this group web-public first :-) |
Kaj 10-Mar-2011 [211] | The gravitational pull won't release us :-) |
GrahamC 10-Mar-2011 [212x2] | No, you have the messages on your drive as we all do |
the web public is just a convention | |
Kaj 10-Mar-2011 [214] | I have some AltME export code if that would help |
Dockimbel 10-Mar-2011 [215] | I don't see how the chat-oriented content here would not look like a big mess if copied to a web forum :-). |
GrahamC 10-Mar-2011 [216x2] | Just a suggestion ... to cc to mailing list. Not everyone on the mailing list is on altme |
And it would ensure a single source for discussion | |
Kaj 10-Mar-2011 [218] | The REBOL list? That was dead when I looked a while ago |
GrahamC 10-Mar-2011 [219] | No, I mean the Red googlegroups mailing list! |
Kaj 10-Mar-2011 [220] | Oh |
GrahamC 10-Mar-2011 [221] | red-ctx: [ mailinglist ] |
Dockimbel 10-Mar-2011 [222x2] | Let's start with a simple announcement: |
If you have some technical questions about Red, please use preferably the official channel at Google Groups: http://groups.google.com/group/red-lang?hl=en Thanks. | |
nve 10-Mar-2011 [224] | +1 Doc Good, I vote pros. |
GrahamC 10-Mar-2011 [225] | not a tech question about red .. but what is a code bubble? |
Kaj 10-Mar-2011 [226x2] | I wrote a Syllable build recipe for Red: |
http://syllable.cvs.sourceforge.net/viewvc/syllable/syllable/system/apps/utils/Builder/packages/Red--current/ | |
older newer | first last |