9 ms·
Bio – Experimental Lisp dialect, written in Zig
- tmtvl 2y agoPutting 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.
- deleted 2y ago[deleted]
- cryptocod3 2y agoBio dev here, time to create a HN account I guess. Got a nod that someone posted about it here, which I would prefer to happen a few years from now given the early stage, but hey what can you do :) I 100% agree with formatting and I've started fixing it, the leftovers were from some (misguided) experimenting.
- 1hackaday 2y agoVery interesting. Would be useful to know how this compares to other Lisps and what could be some use cases.
- notadev2 2y ago[flagged]
- the__alchemist 2y agoThis is heavy handed, but I agree. An immediate effect is confounded search results. Perhaps I'm biased as I'm writing biology software today.
- frou_dh 2y agoYou know, when someone creates the millionth homegrown lisp/scheme interpreter, they're probably not particularly concerned about SEO or "product", and are just hacking for the fun of it.
- cryptocod3 2y agoCorrect
- gleenn 2y agoI 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)))
- deleted 2y ago[deleted]
- codr7 2y agoFunctions deserve their own symbol in Lisp. Though I prefer ^ since it’s easier to type. https://github.com/codr7/sharpl https://github.com/codr7/sharpl
- satvikpendem 2y agoHaskell uses \ which is nice, it's an ASCII character that looks like the right half of λ
- darby_nine 2y agoIt's pretty common to wire \ to the lambda character in your editor. I think racket already allows this (if not as a replacement for lambda, an alternative syntax for it)
- gylterud 2y agoThis is also what Agda does (though \ is synonymous).
- brudgers 2y agoYou can use a λ in many common Rackets.
- cryptocod3 2y agoThe language supports both (λ is just an alias... which I might remove) Replaced the example with lambda - appreciate the feedback!
- revskill 2y agoNeed a dialect without using bracket.
- Zambyte 2y agoThere is this: https://srfi.schemers.org/srfi-119/srfi-119.html https://srfi.schemers.org/srfi-119/srfi-119.html
- apgwoz 2y agoEveryone forgets about Dylan. (https://en.wikipedia.org/wiki/Dylan_(programming_language)?wprov=sfti1#Syntax https://en.wikipedia.org/wiki/Dylan_(programming_language)?w...)
- rscho 2y agoPeople complaining about parens/brackets in lisps have never really used structural editing. Change my mind!
- wavemode 2y agoParentheses in lisp are a lot like significant indentation (Python, Haskell, etc), in that people tend to complain about it "from afar". It is only once they start actually using the language to develop something nontrivial, that they realize that you quickly stop noticing the syntax entirely.
- frou_dh 2y agoI basically agree with you, however thought the following was an interesting idea about it perhaps not always being that simple: https://news.ycombinator.com/item?id=33166116 https://news.ycombinator.com/item?id=33166116
- cageface 2y agoAfter 20 years of using python I still think significant whitespace is a flaw. It saves a little bit of typing in exchange for a lot of ambiguity.
- hayley-patton 2y agoWhat's the experiment?
- tfhfj 2y ago[flagged]
- cryptocod3 2y agoMacros and dynamic typic works fine, but performance is terrible for now as it's an AST interpreter. My main focus is going forward will be to finish the vm/jit backend. There are at least a couple of other Lisps written in Zig, though I'm not sure about the state. One is in the Mal repository, the other was targeting WASM iirc.