LispE: Lisp Interpreter with Pattern Programming and Lazy Evaluation
115 points by PaulHoule 6 days ago | 23 comments
ilikestarcraft 15 hours ago
Whoa I never expected to see a lisp repository from Naver
replymchaver 14 hours ago
I knew a company, StorySense, and their main product WhatsTheNumber used Lisp (maybe Scheme?) for the main logic in the back end. One of the founders previously worked at MIT Media Lab. Interestingly enough their competitor, Whoscall, was acquired by Naver. I wonder if they also used Lisp and if LispE is related to that product at all.
replyhttps://www.cw.com.tw/article/5067306
(Article in Chinese)
That is a... Choice.
Breaking the pair operator in favour of something new.
https://www.draketo.de/software/wisp
Mind you - I usually end up concluding that Lisp syntax is actually pretty good as it is...
I just never quite manage to grasp the new syntax.
I can’t opine on whether that’s a good choice. But I will observe two things: first, singly linked lists aren’t as great on modern computing architectures as they were 50 years ago. Locality of reference matters a lot more now. And second, both Hy and Clojure abandoned the traditional focus on dotted pairs, and in both cases I found it was fine. (Disclaimer, I didn’t spend a whole lot of time with Hy.)
Guile uses vectors, for example. [0]
Chicken... Is Cheney, so your list disappears entirely, half the time.
Gambit uses vectors. [1]
[0] https://www.gnu.org/software/guile/manual/html_node/Cheaper-...
[1] https://github.com/gambit/gambit/blob/master/gsc/_back.c#L11...
Personally I have mostly sometimes used it with Emacs Lisp, but in general relying too much on plain cons cells and cadring down the cars of their cddars feels like a code smell to me and if I need a pair I can always just use cons? As the (only, I think?) infix operator in traditional lisps it has always felt extra-ordinarily useless to me (outside of Schemes use of it lambda lists), but maybe I'm just missing something.
You should be using the pairs when using make-hash, for example.
Cons also doesn't always return a pair. Its main purpose is for prepending to a list. Only when "the second argument is not empty and not itself produced by cons" does it produce a pair.
Which means '(a . b) is clearer code in intent, than (cons a b).
A simple macro would've sufficed, say:
((. sum numbers) (1 2 3))
But all that gives me a nagging feeling that maybe traditional Lisp macros don't really compose that well? So as a band-aid I had the idea to introduce special infix macros so one could for example do "(if (expr as: var) (something-something var))", or maybe "(something-something var where: var expr)" and so on. I'm not sure what the exact semantics should be though, especially with the as: form. It's probably just a result of doing too much Smalltalk lately, but out of all the "let's fix lisp's syntax" ideas I don't think I have seen exactly this one before, so that's something I guess. (As an alternative we could also of course just replace the lambda form with something less verbose so one could "(if expr [var | something-something var])" and then make the conditionals regular functions, or even generic ones specialized on booleans. Or maybe I'll just get back to hacking my init.el for now and try to cleanse my mind of these impure thoughts.)
Its enabled by default with Guile, for example.
https://srfi.schemers.org/srfi-105/