Page 1 of 1
Alta Langs
Posted: Thu Feb 11, 2010 6:27 am
by Ferrarius
Hey everyone,
Being an Alta Lang myself I'm wondering how other Alta's write their Languages and compilers. I'm thinking of releasing my sources for the compiler into the public domain under the GPLv2 or GPLv3 once I've cleaned it up a tad bit (it probably looks a bit like a mess right now, not really something I'll have others read if only for their well being) and have put in a lot more functionality.
Are there other Alta's here who have already managed to get a compiler working well enough for OSdev?
Re: Alta Langs
Posted: Thu Feb 11, 2010 2:08 pm
by Selenic
Ferrarius wrote:the public domain under the GPLv2 or GPLv3
Interesting definition of 'public domain' there
One thing that's interesting that I saw is that, apparently, someone got LLVM running on 'bare metal' and set up Linux on it. That's right, a JITtted kernel. Pretty nice! (it's linked to somewhere on the LLVM site, but I can't remember where)
Getting back on topic, I'm currently thinking of trying to write an interpreter/compiler, which will *eventually* support my own language (for which I'm thinking: syntax is a mix of C and Python, but the main thing is largely C with a fairly thin OO layer (think somewhere between C and C++) and maybe type inference and a few other things drawn from Haskell), though it'll probably start as a Python interpreter written in Python.
(edit: made 'back on topic' bit actually on-topic)
Re: Alta Langs
Posted: Thu Feb 11, 2010 2:20 pm
by nedbrek
Not sure how much I identify with Alta Lang... at least a little.
I would like to apply the principles of Tcl (string oriented, glue code) to my OS.
I will probably end up writing most of the core in asm (Tcl is pure C, I am trying to avoid bootstrapping all of C). I am also interested in D, but I can't see a way to get all that to work together...
What is your language like?
Re: Alta Langs
Posted: Thu Feb 11, 2010 6:40 pm
by Ferrarius
It's based on C, but i wanted more flexibility in declaring assembly inline. Right now putting some inline assembly in the code is as easy as
Code: Select all
asm
{
xor bx,bx ;debugger for bochs
xor ax,ax ;too tired to be creative
};
But i have a long road ahead. I only finished the ability to declare while loops (with possibility to be nested). I however can not declare them with more than one condition which crashes the compiler (by design). Furthermore the linking process is quite possibly the lamest one anyone could come up with. On the other hand, it does work, and does generate code. When I get a decent internet connection I'll be setting up a server here and am hoping to set up some sort of public SVN. By that time I hope to have made a definite choice on what license I'm choosing.
Re: Alta Langs
Posted: Thu Feb 11, 2010 7:23 pm
by Love4Boobies
Hopefully it will be public domain, not GPL-infected. If it is, make sure your libraries are LGPL at least.
Ferrarius wrote:It's based on C, but i wanted more flexibility in declaring assembly inline. Right now putting some inline assembly in the code is as easy as
Code: Select all
asm
{
xor bx,bx ;debugger for bochs
xor ax,ax ;too tired to be creative
};
That's valid C.
Re: Alta Langs
Posted: Fri Feb 12, 2010 1:00 am
by Ferrarius
Re: Alta Langs
Posted: Sat Feb 13, 2010 4:22 pm
by Love4Boobies
It's very correct - it's just that GAS will accept AT&T syntax by default. However, that's an implementation-defined thing. For those of you wondering why I said it was correct even those he uses braces instead of paranthesis and no quotes, the C standard doesn't specify what should be used.