Alta Langs

Programming, for all ages and all languages.
Post Reply
Ferrarius
Member
Member
Posts: 69
Joined: Sun Oct 28, 2007 4:10 pm

Alta Langs

Post 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?
Modular Interface Kernel With a lot of bugs ;)
Selenic
Member
Member
Posts: 123
Joined: Sat Jan 23, 2010 2:56 pm

Re: Alta Langs

Post by Selenic »

Ferrarius wrote:the public domain under the GPLv2 or GPLv3
Interesting definition of 'public domain' there :wink:

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)
Last edited by Selenic on Thu Feb 11, 2010 3:45 pm, edited 1 time in total.
nedbrek
Member
Member
Posts: 44
Joined: Tue Dec 15, 2009 6:36 pm

Re: Alta Langs

Post 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?
Ferrarius
Member
Member
Posts: 69
Joined: Sun Oct 28, 2007 4:10 pm

Re: Alta Langs

Post 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.
Modular Interface Kernel With a lot of bugs ;)
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Alta Langs

Post 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.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
Ferrarius
Member
Member
Posts: 69
Joined: Sun Oct 28, 2007 4:10 pm

Re: Alta Langs

Post by Ferrarius »

Modular Interface Kernel With a lot of bugs ;)
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Alta Langs

Post 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.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
Post Reply