div0 icon

← Go to page index ←

The Lizp Project

This is the information for the Lizp programming language.

About Lizp

Lizp is a LISP-like interpreted programming language (also, see this link). It can also be used as a text data format for serialization. The programming language is meant to be useful for adding scripting to C programs. It is completely homoiconic and symbolic.

Why

Lizp is a minimal scripting language that you can easily add to any C program. It is a fast way to add a scripting environment and/or a minimal data serialization system to a project. Lizp is data and Lizp is code.

Tech

It is a LISP-1 with no garbage collection, no closures, and only 2 true data types that a value can have: lists and symbols (all functions are just lists with specific values). The implementation language is the C programming language.

Working explanation

(As of the time of writing, this is my working explanation of Lizp, which is still changing and in development).

Lizp works only with lists, symbols, and the nil value. Lists are implemented as flat arrays instead of linked list cons cells. Numbers and strings are both represented by symbols. Functions and macros are either built-in or are well-formed lists which contain more lists and symbols.

An example program for hello world:
[print [quote "hello world!"]].
This uses the function print and the macro quote.

A user-defined function is a lambda, and this is an example:
[lambda [x y] [/ [* x y] [+ x y]]].
And this is how you would literally call that lambda (not using variables for now):
[[lambda [x y] [/ [* x y] [+ x y]]] 18 24].
From this, you can see that the first element in a list is always the function or macro being applied to the rest of the items in the list.

This page was last updated on 2023.11.15.

↑ Return to top ↑