I just cloned the repo. I will add HashMap impl if you are ok.
On Sat, Dec 5, 2020 at 1:28 AM Sameer Rahmani <lxsameer@xxxxxxx> wrote:
Hope you're doing great.
There is a new implementation in Golang which work as expected and we're
going to use it for the bootstrap interpreter. It landed on
master. Check it out.
After about a month I've finished up a very minimum version of the
bootstrap interpreter. It's very basic at the moment and only contains
the very basic features of a lisp including:
* Function definition and closures
* Function calls
* Tail call optimization
* Conditionals (only `if` at the moment)
* `let` and lexical scoping
* `do` and some other sforms including list operations.
* A local REPL
* and some other stuff.
We're far from the finish line of the bootstrap but the current
implementation is good enough to be merged in the master (in fact I just
did :D ). There are some notes and heads up about this new
implementation which go as follow:
* It's in Golang:
After experimenting with several different languages including: Java,
Clojure, Scheme, Rust and C++, I've came to the conclusion that none
the above suit our needs. The JVM languages are running on a platform
that is not our target (even though with the LLVM we should be able
to run Serene programs on GraalVM). We can't use a lisp here because
they are not widely available. We've tried C++, while it would be the
best choice for a bootstrap interpreter since a C/C++ is widely
available on any machine these days, but it wasn't as productive as I
wanted and with the compiler and LLVM out of the picture for the
bootstrap stage we really didn't have to go with C++. I really wanted
to go with Rust but despite my personal preference it wasn't helpful
and took so long to implement something simple. I found myself
fighting with the language rather that fighting with my
program. Finally I've decided to use Go which turns out just
fine. While I'm not a huge fan of Golang but in this case it works
* I'm going to work on the namespace loading the the runtime setup of
the interpreter so we can start writing the rest of the bootstrap in
Serene itself and also start working on the `core` namespace.
* Soon enough I'll be working on the FFI side of the interpreter to
allow serene to be able to dynamically load share libraries and use
them (In order to use the C or even C++ API of the LLVM). In order to
do so we still need some extra functionality for the interpreter
including a type system which a minimum set of requirement.
* There are many implementation details left that I need to work on it
and it would be great if you want to work on them as well. For
example: A hashmap and vector implementation, more special forms like
`cond`, making sure that we have functional data structure (based on
the paper with the same name) and so many things. If you're interested
just give me a shout there are so many stuff in so many levels.
Wow that was a long email. Have nice weekend folks and let me know what