Introducing Solid Lisp

I designed a systems level language. I call it Solid Lisp.

Every language that is in use today feature an articulate syntax. This kind of a tradeoff between readability and modifiability is ultimately a bad choice. A language you cannot change to suit your needs won't evolve along the needs of the user.

C is a kind of a fixed-form language that is limited by it's ability to evolve. There are better ways to organize programs that C cannot provide.

I am completely tired to having to write C header files. The header files simply suck. The C-ABI is portable across languages but the header files aren't. It results in another thing I'm tired of: having to write foreign function interface wrappers to interface with C -libraries. I'm also tired on preprocessor macros that operate on strings. I'd love to leave that insanity for academics and drop it out from my production code.

Solid Lisp compiler operates on a single input file. The compiler should produce whatever is required to run the program and which stems from the structure of the program. For example, compiling dynamic library should result in the binary and the library definition file. The latter would be used by all programs that link to the library. It would be designed to be parsed even by non-native software.

The input file consist of top-level statements that are processed in the order they are encountered in the file. The compilation is divided into stages. Every statement is itself it's own predeclaration, so predeclarations are never needed.

Whenever you want to use multiple files in your project, the compiler holds a top-level statement to include them. It tracks internally which files you include and how you're doing that. You'll include them scoped within a namespace or without, however you like to construct your program. Everything is treated as a single unit though, so you can safely introduce cross-references between your files.

I've written an early alpha release of the compiler with python. It's available in github. It interacts with LLVM to produce a binary file, but aside that there's very little anything other you can do. The plans for next week is to get the basic arithmetic, conditionals, while-loop, structure declarations and calls to C working. Anyone else is allowed to put them together, but I expect to do it all myself just as usual.

I haven't yet decided on license. If I receive help or pull requests within next month, I'll pick the BSD license. Otherwise it'll be GPLv3.

Similar posts