« Release 0.38 (Eagle) | Main | Do you see what I C ? »

May 16, 2005

A little here, a little there

I've been doing some self-improving activities which ultimately affect the future of this project. Learned forth (went through a tutorial for an entire day), researched forth imlpementations, concluded that C is the way for me to go with the next implementation of CX and now I've made the CX parser in C. This article describes the planned death of jcx and the birth of cx.

Most people who know what I've been doing for the past year ask "why don't you just bootstrap?". Well, the java implementation isnt isn't even ideal CX. I've made some decisions that have not been put into effect in the java implementation.

The next release of CX will be the java implementation, with all the features that CX is simply supposed to have. I've decided that CX needs symbols to be used instead of strings:

(cx:) make[:x 4]
(cx:) x
4

This does two things: seperates strings from symbols (duh) and speeds up scope searching. It speeds up the scope searching for interpreted code because there would be only one official copy of any symbol in the runtime, and so equality of symbols can be tested via their address in memory. Also, in compiled code, this allows for more direct symantics in the IR's (which are not thoroughly thought out yet).

Ok, so I don't know how long it will take, but the next release of contex will be the last java release for new features by me. It will sport the symbols explained earlier, compilation, and whatever else it takes for me to be satisfied with it to leave it.

The C implementation has already been started. I've finished a CX parser made in C which is only 140 lines of code. I should be doing simple math in the C implementation in a few days, and I'll be playing with the structures I want, running sets of code without GC and without an actual image. The goal is to parse and run the code that will parse the rest of the code-- I need to parse a repl, then I can dump an image and work off that.

The C implementation will pretty much follow the steps that the java one has- repl, simple math, variables, functions, scoping, then object oriented programming. The releases will be called 'cx'.. and all of the works related to the java implementation will be called 'jcx', implying that the java code is not the core of the project. I think this will be a fun ride- the java implementation called for many 'redos' which were torturous and even depressing, but all of that was worth the struggle because it paved my path for this c implementation, which I hope will be taken much more serious.

Posted by Rex at May 16, 2005 01:10 PM

Comments

Post a comment




Remember Me?