Bio – Experimental Lisp dialect, written in Zig
github.com
github.com
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.I 100% agree with formatting and I've started fixing it, the leftovers were from some (misguided) experimenting.
It saves a little bit of typing in exchange for a lot of ambiguity.
Where paredit for Python?
> Where paredit for Python?
I don’t know, go make it. But what would you imagine it to do? Moving blocks of indented code around is already easy without needing language-specific treatment.
It matters, because the start and end markers of code allow for easy recognition of where something starts and ends and make the move independent from things like indentation. In Python, if you wanted to do the same, you would have to change indentation in many cases. Also the language is less expression based, which makes it even harder to, for example slurp a block/unit of code, because it is not clear how far the slurping should go.
> I don’t know, go make it. But what would you imagine it to do? Moving blocks of indented code around is already easy without needing language-specific treatment.
Well, I am not the one claiming here, that it does not matter, whether there are start and end markers for blocks of code, so the onus is not on me to make this thing, it is up to you to prove it can be done. Lets not try to reverse the obligation of proof here.
"runde Klammern" for (), "eckige Klammern" for [], and "geschweifte Klammern" for {}.
Although when you say only "Klammern" people usually understand (), because that is what is often used in texts.
This translates well:
runde Klammern --> parentheses, eckige Klammern --> brackets, geschweifte Klammern --> braces.
As such, the US English understanding of the words is clearer to me, than a non-distinguishing understanding.
An example usage:
(filter (quicksort '(5 40 1 -3 2) <) (λ (x) (>= x 0)))
Though I prefer ^ since it’s easier to type.
Replaced the example with lambda - appreciate the feedback!