July 13th, 2024

Bio – experimental Lisp dialect, written in Zig

Bio is an experimental Lisp dialect on GitHub, featuring macros, garbage collection, and lambda expressions. Documentation is ongoing, with examples in `std.lisp` and `test.lisp`. Explore for more details.

Read original articleLink Icon
Bio – experimental Lisp dialect, written in Zig

The GitHub URL provided contains information about Bio, an experimental Lisp dialect similar to Scheme. Bio includes features like macros, garbage collection, error handling, modules, and a standard library. The core of Bio is based on lambda expressions, with syntax like `type` and `fun` built from them. The documentation for Bio is still in progress, and for the latest examples, it is suggested to refer to `std.lisp`, `test.lisp`, and files in the `examples` directory. The content offers a detailed table of contents covering topics such as building and running, language reference, standard library functions, and modules. For more specific details, the content at the GitHub URL can be explored further.

Link Icon 7 comments
By @1hackaday - 3 months
Very interesting. Would be useful to know how this compares to other Lisps and what could be some use cases.
By @hayley-patton - 3 months
What's the experiment?
By @tmtvl - 3 months
Putting closing parentheses on their own lines is extremely cursed.

I used to like Lisp-1s when I used Scheme, but having used Common Lisp for a while I've come to appreciate Lisp-2s, if only for silly things like...

  (defun foo (list)
    (declare (type List list))
    (assert (> (length list) 1))
    (list (second list)
          (first list)))
Everything else aside it seems like a nice finger exercise for learning Zig.
By @revskill - 3 months
Need a dialect without using bracket.
By @gleenn - 3 months
I see they use they use the actual lambda character "λ" to create functions which is both cool and also probably makes grepping for functions a PITA. It does look pretty but I would have to search the web or write down the random keystroke to generate that symbol.

An example usage:

(filter (quicksort '(5 40 1 -3 2) <) (λ (x) (>= x 0)))