I’m not going to reply to anything on this thread. But this may be interesting.
Chris
89 karma · joined July 1, 2015
I’m not going to reply to anything on this thread. But this may be interesting.
Chris
Come chat at:
#ChrysaLisp-OS:matrix.org
Recommend element.io reader.
Chris
Same with (def-enum) etc.
I am going to have to write a document to clearly state where these boundaries between the Lisp, the C-Script and the VP layers. I realise it's not that obvious sometimes.
Chris
All objects used by the Lisp are instances of classes from the class library, ie that stuff in class/ folder.
These instances are ref counted objects, as they are derefed and they drop to 0 refs they get deinited and freed.
The Lisp is constructed from these, for example Lists in the Lisp are an instance of the class/vector, numbers are an instance of class/num, the environment is a chain of class/hmap etc.
So yes, you do have GC if you don't make cycles, and you do have to care about not doing that just as you would in C++.
Have a read through the docs/ASSIGNMENT.md file to see how this all fits together.
Taos articles link at the bottom, Byte, IEEE, Edge etc.
The system can build itself from source after clean, on my 2014 Macbook in under 0.4s. It's not exactly a standard benchmark though, but it's not slow considering that's a Lisp (like) interpreter doing all the compiling and assembling !. Footprint at the moment for everything is 158KB.
The snapshot.zip file contains 3 separate snapshots for the 3 ABIs supported currently.
I have a small abstraction to the host OS via the sys/pii/functions, these just use the jump table you can see in the main.c file. Any host OS should be able to compile the main.c with little or no changes, but eventually there will be a native filesystem available from VP/Lisp.
I will be doing direct bare metal hardware support, and there are things happening on that front but I can't talk about that here.
But during my experimentation stage it was very useful to have it running hosted, and I'll keep the hosted version running going forward as it provides a nice dev environment.
I do have a plan to get a version done that could boot under VMWare etc, but I've only got so much time on my hands and have to spread myself over the whole codebase as best I can. :)
I wasn't trying to create a Lisp, at least not at first. I started with a simple VP (Virtual Processor) macro set for NASM in order to look again at some issues raised by my old Taos OS back in the 90's.
More of a personal project to work out some angst to start with.
I used the macro set to create a simple task switcher and get myself to the stage of creating a simulation of a multi-cpu network like the old Transputer days. I wanted to play around with various routing and task distribution ideas. That's probably when ChrysaLisp was just called AsmKernel and the first link appeared on Hacker News, with a 'but what is it...' set of comments.
Around this time I was having issues keeping the compilation performance up due to trying to get NASM macros to do what I wanted. I contacted the NASM forums to ask if there was any chance of getting some extra features added to NASM, but that wasn't to happen. And that's when I decided to write my own assembler.
I've been having a long running debate with a friend, Darren, about Lisp for many years :) He’s crazy about it and has always been pushing me to try it. So I decided to create a Lisp interpreter and code the assembler using that Lisp interpreter. And looking through the project commits you’ll see how that work went.
Pretty soon I had a reasonable Lisp, all be it with my own brand of quirks. And I quickly managed to port over the VP assembler source to the new format. Lisp style () but apart from that pretty much just raw VP assembler. And yes, Darren, Lisp was good and the assembler was crazy powerful being written in Lisp ! So Darren won me round to Lisp.
The next stage was that I wanted to be able to have a slightly higher level to code in, for prototype assembler functions, and that’s when I used the Lisp to add higher level support for stack variables and a C like syntax for expression parsing. The idea here was not to create a full blown C/C++ compiler, but to let me hammer out assembler code without worrying about register numbers and so forth. But I was always intent on converting the time critical functions to the lower level raw VP code.
I had also been experimenting with a GUI based on a software compositer I wrote back in 1990, and so that got included in the project, and eventually I got that hooked up to the Lisp so I could create GUI apps in Lisp with no assembler. Most of the time in these apps is spent in VP coded optimised functions anyway.
Along the way I’ve coded up the VP macro set for the ARM64. Which got me up and running on the Raspberry PI. And recently I’ve pushed towards a Windows port after some nudging from one of the projects recent followers.
There is still lots to do, and many many things I’d like to clean up. But It’s been a labour of love so far as well as personal therapy :)
Regards
Chris
However I did start an experimental project a while back to do a simple Taos like kernel over BSD/Linux in x86_64, VP macros and process load balancing, point to point link network simulation and function level dynamic binding ?
https://github.com/vygr?tab=repositories
Look for the Asm-Kernel project amongst my other stuff.
Was just starting to work on a GUI, AVE MK 6 :) But then got into a new job and it's currently sat at that stage till I go back to it.
Regards to all, was great to read this and bring back such wonderful memories of the great team we had at Tao, some of the brightest tech people I have ever had the pleasure to learn from.
Chris Hinsley
Chris Hinsley
And yep, the history of Smartphones would have been very different if Moto had shipped it !
The history of Java would have been different too, because this was before all the K-Java stuff that was a response to getting Java into smaller footprints !
Chris
With hindsight Tao should have done this.
Chris
Chris Hinsley
https://en.wikipedia.org/wiki/Virtual_Processor
Chris Hinsley