4 ms·
Janet is another language that's just trivial to embed, but it's newer so it has less traction.
by dleslie 3y ago
Janet is another language that's just trivial to embed, but it's newer so it has less traction.
- cpeterso 3y agoLink: https://janet-lang.org/ https://janet-lang.org/
- jacknews 3y agoReally enjoying Janet, but it has some sad and seemingly unnecessary syntax differences to the rest of the lisps and lisp-likes.
- apgwoz 3y agoI have ignored it because quasiquote is `;’ and that just pisses me off. I should not have such a strong reaction, but I do.
- apgwoz 3y agoUgh. I meant `;` is unquote-splicing, which is an operator within a quasiquote. Sorry for my brain fart.
- jacknews 3y agoYes, we shouldn't, but sometimes superficial features can be quite important. I've ignored CL because it seems like the BASIC or bloated kitchen-sink of lisp/likes, but probably mainly because 'car'? 'cdr'? 'setq'? seriously?
- jhbadger 3y agoBut that's just how Lisp works. Emacs Lisp (not CL) uses those too. It's Scheme that decided to rename car and cdr (and by doing so obscure how things are implemented underneath).
- lispm 3y agoScheme renamed them? When did that happen? R5RS? R6RS? R7RS? IEEE Scheme?
- jhbadger 3y agoOkay, you're right. They are there as well. And actually the "first" and "rest" functions aren't even standard but are just there in some implementations as synonyms.
- kagevf 3y agoI know this part of the conversation is focusing on Scheme, but wanted to mention that first and rest are standard CL functions: http://clhs.lisp.se/Body/f_firstc.htm#first http://clhs.lisp.se/Body/f_firstc.htm#first http://clhs.lisp.se/Body/f_rest.htm#rest http://clhs.lisp.se/Body/f_rest.htm#rest
- lispm 3y agoso it actually is like this: Scheme kept car and cdr. Common Lisp added FIRST, REST, SECOND, THIRD, ..., TENTH and some others to the language standard in the early 80s.
- jacknews 3y agolol, as I said, 'kitchen sink'. And then there's all that business with 'caar' 'caaddr', or whatever. I mean, just no.
- lispm 3y agoLisp is old. Thus software from several decades back can run.
- jacknews 3y agoSure, but that's no reason to keep carrying past mistakes. I don't understand why languages don't have a 'version' id as the very first thing, and then you can run appropriate interpreter/compiler given the version. New versions of the language can drop historical mistakes. You could kick-start the process in any existing language by making a next release that requires a version tag (and which maybe strips out a ton of legacy cruft). It would then default to a 'legacy' interpretation if the tag isn't present.
- kazinator 3y agoIn TXR Lisp, I made ^ quasiquote. That wasn't some run-to choice or anything; there is a history behind it. Before there as a TXR Lisp, only TXR, backquote was used for interpolated strings: `@foo @bar`, so the character was not available for quasiquoting. In hindsight, ^ is nice because it stands out. I might have been influenced by ^ptr syntax from Pascal for dereferencing a pointer. Or exponentiation in some languages x^2. Hat denotes "power" and quasiquote is power! (For a while I experimented with an idea of making regular quote ' somehow intelligent so it could do quasiquoting when unquotes are present. The semantic restrictions are too severe though and cannot be fixed: e.g. you can't do the equivalent ^(foo '(bar ,unquote-here)) with '(foo '(bar ,unquote-here)) where the unquote isn't going to the quote that we want.) Because @ is significant, I had to turn ,@ into ,*. That's not too bad because * already denotes repetitions in regex: zero or more. And splicing brings in zero or more, so ... The only issue is that if you want to interpolate a special variable, you have to write , *foo* and not ,*foo, because the latter actually means , foo*. Common Lisp has the same issue with @, but @ isn't a popular symbol prefix, so it rarely comes up: [1]> (defvar @foo@ '(1 2 3)) @FOO@ [2]> `'(,@foo@) *** - SYSTEM::READ-EVAL-PRINT: variable FOO@ has no value [...] [4]> `'(, @foo@) '((1 2 3))
- apgwoz 3y agoNone of these options lift the `;` into something I have to parse as code, not documentation, so you’re all good! :)