Comment

Comment by sph

Great timing. It's my turn to write a Lisp, and I was just thinking about implementing reader macros this morning :-)

My goal is to create the barest-metal Lisp OS (basically Lisp REPL with full ring-0 access, the OS) with an asm reader macro to write low level assembly opcodes you can jmp into.

    (defn add1 (x)
      (declare x int64)
      #asm(
        mov rax, %x
        add rax, 1
      ))
(Just thought of this syntax on the spot, I'm a few dozen hours away from that still.)
parent sph 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton