Earlier quoted context omitted.
Janet is not a Lisp, it uses parentheses though.
and neither is scheme
Why Lisp?
251–260 of 339 posts
Re: Why Lisp?
#252> The Lisp designers do not assume what syntax, features or functions will be necessary in the future. The developers of Lisp give you the full powers that they had to develop the language. Isn't that ~ abdicating responsibility for language design?
Guy Steele was involved in the specs for C, JS, Fortran, scheme, Common Lisp, and Java (among others). He gave a must-watch talk about Java called “Growing a Language”.
He makes a great case that a language must be able to deal with future problems and ideas the original designers didn’t or couldn’t foresee. He seems to have been one of the voices pushing for stuff like generics so users could design libraries that would feel more native.
And of course, I can’t mention him here without quoting his statement about Java:
> We were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp.
A goal of Common Lisp was giving all the tools future programmers might need to create new tools. As a result, you’d be hard-pressed to come up with a language feature that hasn’t been ported to CL at some time.
Re: Why Lisp?
#253Earlier quoted context omitted.
genuinely amazing, is there a writeup on this?
Is it? HN is mostly static content. Ten years ago I wrote a simple web application using twister (python) that did well over a thousand requests per second. If we count just handling requests (and not churning out much data or doing anything fun processing) japronto for python claims to handle something like 1.2 million req/s on a single thread.
I don’t know how you could statically generate that. At most, you could memoize the parts of the page that haven’t changed yet and return them without a complete lookup, but keeping that in synch with a database is not an easy problem.
Re: Why Lisp?
#254Elixir is like a LISP with pure functions, only immutable values all the way down (which gets you a guarantee you wouldn't have otherwise in languages where this is optional), actor concurrency, pattern-matching, actual readable syntax, and of course macros (which do the same thing LISP macros do- Accept and output an AST value that happens at the compilation step- the only difference being LISP homoiconicity). It si…
Clojure does all three: 1) Native, compiled binaries with GraalVM. 2) ClojureScript (already mentioned) for the browser. 3) For ML, Clojure in the last 2-3 years has built a really great internal ecosystem but it hardly matters because libpython-clj exists so you can run NumPy, PyTorth, etc. from Clojure. Getting data in and out of Python land is just as easy as Java-interop. The reverse also works (calling out to Cl…
Do math errors still dump Java stack traces in Clojure? That and the lack of syntax once ruled it out for me.
Re: Why Lisp?
#255Earlier quoted context omitted.
One never notices the inconvenience of not having something one is unaware of. This is the biggest challenge for answering “why Lisp?” It’s different enough from the programming that most people are used to that it rises to the level of a radical novelty, with all the explanatory difficulties that entails. In fact, it’s a defining characteristic of the radical novelty that it can only be understood experientially. An…
It's possible that you have experienced an enlightenment that I have yet to, but ultimately I like lisp because parenthesis are pretty, I hate remembering syntax, keywords/symbols are nicer than immutable strings, and typing out commas makes me sad (not that you'd know it from the way I abuse them in this comment). I mean, lots of languages have REPLs now- people get that they're really useful! This isn't secret know…
Common Lisp borrowed parts of the smalltalk development strategy. You can start a process and gradually update it in very sophisticated ways as you live code against it.
You wouldn’t dream of packaging up your Python REPL and shipping it to users. You certainly wouldn’t open a Python REPL on your production server and start redefining functions and data structures on the fly.
This kind of experience is pretty much limited to Smalltalk, Forth, and Common Lisp (with Erlang having a more limited ability to do live updates).
Re: Why Lisp?
#256Appreciating what Lisp is capable of doing (think macros), and having worked through SICP some twenty years ago, and after having tried to make a deep dive in CL and Emacs Lisp two years ago, I come to the conclusion that there is no silver bullet in Lisp-land. Python is a good enough Lisp, as Peter Norvig has concluded. And it’s got all batteries included. Ain‘t nothing it can’t do. Building websites, doing maths, a…
Python compares woefully for metaprogramming & creating domain specific languages, a field that Lisp is far & away best in class in.
Re: Why Lisp?
#257> The Lisp designers do not assume what syntax, features or functions will be necessary in the future. The developers of Lisp give you the full powers that they had to develop the language. Isn't that ~ abdicating responsibility for language design?
Definitely not. Guy Steele was involved in the specs for C, JS, Fortran, scheme, Common Lisp, and Java (among others). He gave a must-watch talk about Java called “Growing a Language”. https://youtu.be/_ahvzDzKdB0 He makes a great case that a language must be able to deal with future problems and ideas the original designers didn’t or couldn’t foresee. He seems to have been one of the voices pushing for stuff like ge…
Re: Why Lisp?
#258the fact that there are repeated statements like "why X" where X = some language, points to rationalization more than reality; if the language is really so good, there won't be any need for a "why" articles on it. I haven't seen a repeated series of "Why C#" or "Why Go" or "Why Swift" articles. I also think Lisp is way overrated. Swift is based on Miranda which is based on Hope which borrows heavily from SML...There'…
Re: Why Lisp?
#259Earlier quoted context omitted.
> static strong typing Alright, here is it: https://github.com/coalton-lang/coalton/ > small efficient native binaries The numbers are: with SBCL's core-compression, a web app with dozens on dependencies will weight ±30 to 40MB. This includes the compiler, the debugger, etc. Without core compression, we reach ±150MB. > The actor runtime? the actor library : https://github.com/mdbergmann/cl-gserver > couldn't find a w…
Coalton doesn't actually work: https://github.com/coalton-lang/coalton/issues/84?s=09 This is why it's important to always look at the issues on a repo instead of just believing what's in the README. It fails to detect type errors in some of the most basic situations
Mutation is an issue with any Hindley-Milner system, because mutation is inherently impure and non-functional, violating principles that the Hindley-Milner algorithm relies on. The Coalton developers have to decide what they want to do about it. Haskell chose pervasive functional purity and monads (but still gives you many type-unsafe escape hatches). OCaml chose weak polymorphism. [3]
Being a sensitive design choice, Coalton has not committed to a strategy for dealing with this, so as it stands, it is possible to use a combination of impure features to produce a type error. However, this does not block productive development. One can:
- Avoid mutation altogether and rely on an otherwise sound type system. Use purely functional data structures built in to the language, or write your own.
- Use mutation in monomorphic scenarios where there will not be any issue.
- Mutate outside of Coalton (i.e., in Common Lisp).
- Be very careful, know that "Here Be Dragons", and carefully use mutation in a polymorphic context, understanding that one runs the risk of a type error.
Until Coalton reaches "1.0" and a language design choice is made around mutation and the type system, one of these strategies must be used. And they have been used, successfully, because idiomatic Coalton code isn't typically mutating polymorphic vectors left-and-right anyway.
With all that said, I do agree with examining a language or tool for caveats, known bugs, and limitations. I don't know how you'd make engineering trade-offs otherwise.
[1] "Using Coalton to Implement a Quantum Compiler" https://coalton-lang.github.io/20220906-quantum-compiler/
[2] "A Language-Oriented Approach to Exchange-Only Silicon Dot Qubit Software" https://youtu.be/F8TezGqCvE8
Re: Why Lisp?
#260Earlier quoted context omitted.
Clojure does all three: 1) Native, compiled binaries with GraalVM. 2) ClojureScript (already mentioned) for the browser. 3) For ML, Clojure in the last 2-3 years has built a really great internal ecosystem but it hardly matters because libpython-clj exists so you can run NumPy, PyTorth, etc. from Clojure. Getting data in and out of Python land is just as easy as Java-interop. The reverse also works (calling out to Cl…
How did they make Babashka (it’s apparently spelled that way) instantly start? Do they pre-warm a Java thread in the background? Do math errors still dump Java stack traces in Clojure? That and the lack of syntax once ruled it out for me.
I understand the frustration with Clojure errors, but am surprised that a lack of syntax would rule a programming language out.