Is there a Lisp dialect that has Lisp semantics and low C manipulation? Something like getting an arbitrary memory address (virtual or physical memory) and doing something with it; pointer to hardware device ...
For example:
(defvar a '(1 2 3 4)) ;; I have a list (defvar b (cdr a)) ;; b is the cdr of a. But I want b to ;; actually refer to the tail of a (setf b '(4 5 6)) ;; b now has new value, but a remains unchanged
I want to use Lisp to express low-level problems. For example, how can I control individual bytes and bits when running Lisp on bare metal? In C, I can get a pointer and do pointer arithmetic to point to whatever I want in memory space (virtual or physical). The pointer can also point to devices and arbitrary addresses by the equipment designer.
Why do I need it? Well, I want to learn how to use Lisp with low-level programming. Ultimately, I want to write a simple OS for learning, but in Lisp. I will write one in C, as well as for an initial understanding, but if I can only write in C, how can I be sure and say that I understand how to implement the OS? I think I only really understand how to implement the OS, if I can write it in a language other than C to make sure.
I do not want to write something like the C kernel for the OS and Lisp for everything else.
garbage-collection lisp
Amumu
source share