Live data from Hacker News

A Road to Lisp: Which Lisp

scotto.me

141–150 of 180 posts

Re: A Road to Lisp: Which Lisp

#141
post #78

Earlier quoted context omitted.

Except that CPython still misses on (compile .....) part, indeed holding the industry back.

it compiles to bytecode but the bytecode engine is not that fast. i had a phase when I was using PyPi a lot for branchy "old AI" kinds of workloads and felt it was an easy win but since then it has been either numpy or PIL or pytorch doing the heavy lifting or scripty stuff like uploading files to S3 where performance doesn't matter a lot. I will grant that Common Lisp can be compiled to run amazingly quickly!

In Lisp (compile ...) produces machine code, with various optimisation flags available, depending on the implementation.

Re: A Road to Lisp: Which Lisp

#142
post #94
post #76

Earlier quoted context omitted.

I love the Clojure community, it is the only one that usually talks about the host platform in a symbiotic way, not as if they would be rewriting everything into their favourite language, like in most guest languages communities.

people don't usually think of C as a host platform, but the python community has a similarly symbiotic relationship with C extensions.

Hence why it is such a sad story with JIT compilers in Python.

Re: A Road to Lisp: Which Lisp

#143

From my experience, to be happy I would need the perf of sbcl, the syntax, litterals and data structure of clojure, the begginer-friendlyness of drracket, the type system of ocaml, and the dev experience of rust. Does that exist somewhere ? I hope jank gets there. Or maybe roc will. At this point, given the progress and expectations of using LLM, writing code is going to be purely a hobby concern, like carving wood f…

Please say more about the "dev experience of rust." As a long time Lisper and not much of a Ruster, I found the dev experience very painful. Granted, I expect had I continued using Rust that would have abated in tjme. I also disliked Clojure at first until I became comfortable with it and productive, before coming to like and appreciate it.

- a single, canonical, sanctified toolchain for "all the things that are require but don't matter"

What's the "cargo xxx" of lisp ? It depends. Maybe it's "quicklisp something". Maybe it's "ASDF something". Maybe it's a mixture of three different things and you ask a dumb question on SO that should be in the first page of the manual, and you get 10k views : https://emacs.stackexchange.com/questions/83200/given-a-bran...

I know, you enjoy the power of having options, configuring everything, and shaving your yaks to the bone with macros over macros.

But I suspect you never hear of so many questions about "retro antagonist polymorphic macros over monadic functional arrowd", because people give up at "how do I import a lib to make an http call" ?

- a single, standard and opinionated way to lay your frigging files on your effing disk. "cargo new". And, no, it should NOT require people to create a top level "common-lisp" folder to store all their projects.

- adding and loading deps. Sorry, typing quicklisp:xxxx in every repl session you open is not "cargo add".

- a baked in way to run some sort of unit test suite. Have dozens of options if you want, but what is the "cargo test" ?

Of course all those problems have been solved by various tools somewhere in 1997, so it will sound like an "entitled millennial" comment.

But, soon, the tagline to aim for will be "a lisp for the 100 years of lisp". What's that ?

Re: A Road to Lisp: Which Lisp

#145
post #6

CL also has pretty much arbitrarily extensible syntax: - https://sr.ht/~dieggsy/whisper/ - https://dieggsy.com/json-literals.html And could also be used to build languages, supporting more modern programming paradigms (though yes, I believe Racket does make this easier): - https://coalton-lang.github.io/ I also might have written the Common Lisp example using reduce as well, which is in the standard library, but that…

The LOOP solution could be written using DOLIST or DO forms too (likewise built-in):

  (defun calculate (instructions)
    (let ((result 0))
      (dolist (e instructions result)
        (destructuring-bind (operator operand) e
          (setf result
                (case operator
                  (add      (+ result operand))
                  (multiply (* result operand))
                  (subtract (- result operand))))))))
  
  (defun calculate (instructions)
    (do ((result 0))
        ((null instructions) result)
      (destructuring-bind (operator operand) (pop instructions)
        (setf result
              (case operator
                (add      (+ result operand))
                (multiply (* result operand))
                (subtract (- result operand)))))))

Re: A Road to Lisp: Which Lisp

#146
post #6

CL also has pretty much arbitrarily extensible syntax: - https://sr.ht/~dieggsy/whisper/ - https://dieggsy.com/json-literals.html And could also be used to build languages, supporting more modern programming paradigms (though yes, I believe Racket does make this easier): - https://coalton-lang.github.io/ I also might have written the Common Lisp example using reduce as well, which is in the standard library, but that…

[deleted]

Re: A Road to Lisp: Which Lisp

#147

Really should include Emacs lisp, as it's a something many in academia happen upon for LaTeX or some other side use. While Emacs Lisp is confined to the editor, it also shows that the Editor is not that, and much has been said of it as an OS, an Application Platform, and so on. Since about 1992, I've used it as platform for many things as well as a general purpose text editor I couldn't initially figure out how to qu…

It does, calling it Elisp

Re: A Road to Lisp: Which Lisp

#148

Earlier quoted context omitted.

Please say more about the "dev experience of rust." As a long time Lisper and not much of a Ruster, I found the dev experience very painful. Granted, I expect had I continued using Rust that would have abated in tjme. I also disliked Clojure at first until I became comfortable with it and productive, before coming to like and appreciate it.

- a single, canonical, sanctified toolchain for "all the things that are require but don't matter" What's the "cargo xxx" of lisp ? It depends. Maybe it's "quicklisp something". Maybe it's "ASDF something". Maybe it's a mixture of three different things and you ask a dumb question on SO that should be in the first page of the manual, and you get 10k views : https://emacs.stackexchange.com/questions/83200/given-a-bran…

> because people give up at "how do I import a lib to make an http call" ?

Ironically, this is where I gave up on trying to learn Rust. I just wanted to make a HTTP request and the simplest solution was to… download a library with hundreds of dependencies taking up half a gigabyte?

Re: A Road to Lisp: Which Lisp

#149
post #122
post #38

Since this is the largest gathering of LISP users I have seen, I have a question. Why prefer lisp-1 over lisp-2 or vice-versa?

The usual argument I've seen in favour of Lisp-2 (I personally don't care as much about the function namespace as I do about the type namespace, which I find much more important) is that you can name an argument a conflicting name with a function without the conflict interfering with the code you would write: (defun merge-sort (list before?) (declare (type List list) (type Function before?)) (flet ((merge-2 (a b) (de…

Isn’t this only a problem if the language is case-insensitive?

Re: A Road to Lisp: Which Lisp

#150

Earlier quoted context omitted.

Please say more about the "dev experience of rust." As a long time Lisper and not much of a Ruster, I found the dev experience very painful. Granted, I expect had I continued using Rust that would have abated in tjme. I also disliked Clojure at first until I became comfortable with it and productive, before coming to like and appreciate it.

- a single, canonical, sanctified toolchain for "all the things that are require but don't matter" What's the "cargo xxx" of lisp ? It depends. Maybe it's "quicklisp something". Maybe it's "ASDF something". Maybe it's a mixture of three different things and you ask a dumb question on SO that should be in the first page of the manual, and you get 10k views : https://emacs.stackexchange.com/questions/83200/given-a-bran…

I think OCICL will meet your expectations more readily than Quicklisp. QL does things more the CPAN way (think Gems if you're more into Ruby than Perl).

> a baked in way to run some sort of unit test suite. Have dozens of options if you want, but what is the "cargo test"?

That actually is ASDF, to be more specific:

  (asdf:test-system system &rest keys &key force force-not verbose version &allow-other-keys)
Although if we're honest, the real way to run a test suite in CL is to open the REPL, load your system, and just type something like (run-test-suite).
Post reply on HN