Skip to content

Comment on Idiomatic Clojure without sacrificing performanceparent

Comments

While I write almost all my code in Nim nowadays, lisps have a special place in my heart despite not having written large amounts of lisp code.

I'm a physicist and when checking out CL in the past, it didn't feel like scientific computing was a huge thing in CL. You intrigue me with your post though. Do you have any resources for me to check out?

my background is also in physics and mathematics. in fact i think common lisp is well suited to a physicist-hacker type mindset. i could probably write a lengthy blog post about why i think this could be, but some of the key appeal factors are:

* unmatched interactive development which could be used for exploration of problems such as dynamical and complex systems

* although it is a very high level language you can perform low level optimizations in common lisp itself

* extremely powerful macro system that allows you to develop in a declarative style to reflect your problem domain. for example you can program in a syntax that is natural to general or special relativity, quantum mechanics, etc.

* fast and free implementations such as SBCL

* the language is standardized so your code will not need to be unnecessarily maintained (this is good for university professors that have repeating long-running courses)

i am not sure what type of references you are asking for but i will list few open source projects that might be interesting to you:

* CLASP - common lisp implementation build on top of LLVM. this project is headed by a computational chemist (prof. schafmeister) [0]

* PetaLisp - for HPC [1]

* MAGICL - Matrix Algebra proGrams In Common Lisp by Rigetti Computing [2]

* Quil - quantum instruction language developed on top of common lisp [3]

* CL-CUDA - use NVIDIA CUDA in Common Lisp programs [4]

* MGL - Common Lisp machine learning library [5]

* Maxima - a computer algebra system developed in common lisp [6]

i think these are plenty to show that there exists serious interest in using common lisp for scientific computing. it is possible that some of the people behind these projects are on HN and maybe they can further expand on this

[0] https://github.com/clasp-developers/clasp

[1] https://github.com/marcoheisig/Petalisp

[2] https://github.com/quil-lang/magicl

[3] https://github.com/quil-lang/quilc

[4] https://github.com/takagi/cl-cuda

[5] https://github.com/melisgl/mgl also https://github.com/melisgl/higgsml

[6] https://maxima.sourceforge.io/

Don't forget Lush: Lisp Universal SHell[1] by none other than Yann LeCun, and this was back in 2004. I played with it in 2012 or so. Lisp, SBCL, is great for science. I am playing with April, a subset of APL in Lisp. The best of both worlds!

[1] http://lush.sourceforge.net/

[2] https://github.com/phantomics/april

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.