Hello! Let us have another Friday social topic.
What type of problems do you solve using Lisp? Please share these details while answering:
- Which dialect of Lisp do you use?
- What problems do you solve?
- Why do you choose Lisp to solve these problems?
I have a feeling that this thread might get inundated with too many Emacs Lisp posts about solving personal productivity problems. That’s fine. But I suggest posting stuff about other dialects of Lisp too. The more dialects of Lisp (CL, Clojure, Racket, etc.) are discussed here, the better! We want to have a good variety of answers on this thread.
(EDIT: this got to be a wall of text, so I wrote a proper blog post about it, but I’ll take any comments on it here, or on this Lemmy post linking to my blog.)
I have known about Common Lisp and Scheme for years, but only recently started using them.
I use Emacs and Emacs Lisp to manage my tens of thousands of text files, I write Emacs Lisp scripts to automate simple tasks like searching for pieces of information, formatting it, and outputting it to a report that I might publish on my blog or send in an e-mail. I also use Emacs to help with data cleaning before running machine learning processes. Emacs helps with navigating CSV and JSON files, it also is a really good batch file renamer.
I have recently started using Guile Scheme to do some personal projects. I went with Guile over the myriad other Scheme dialects because it is the implementation used for the Guix package manager and operating system. Also, there the G-Golf foreign interface layer allows Guile to automatically use an C library that implements the GObject Introspection interface. So through Guile, like with Python, you can use any C code library used to create of all native apps in the Gnome, MATE, Cinnamon, or Xfce desktop environments. This makes Guile a viable alternative to Python scripting across all of those Linux desktop environments.
Of all the Lisp dialects, Scheme is my favorite, for a few reasons:
syntax-case
loop
macro of Common Lisp. Scheme also provides me the ease-of-mind that comes with knowing the optimizing Scheme compiler will ensure recursive loops will never overflow the stack.That said, I am also starting experimenting with Embedded Common Lisp (ECL) because it is a lightweight standards compliant Common Lisp implementation that compile your program into C++ code, and this is useful to my professional work.
In modern software engineering, especially in the realm of big data and machine learning, all of the most commonly used frameworks are written in C++ for performance, and scripted in Python. But Python does not scale well at all to larger applications, where Common Lisp does (for various reasons, but mostly due to how Lisp does strong dynamic typing and the meta-object protocol). So I see Common Lisp, and the ECL compiler, as a viable alternative to the sub-optimal status quo of Python/C++ in my professional work. Mostly, ECL would allow me to write a program in Common Lisp instead of Python, but deliver to my clients the C++ code that ECL generates to be used in their machine learning projects. (I have not actually done this yet, I am still investigating whether this would be a viable solution to any of my projects).
ECL makes it easy to use C++ libraries through Lisp instead of Python. And there are so many good, performant C++ libraries out there: Qt, OpenCV, OpenCL, Tensorflow, PyTorch, OpenSceneGraph, FreeCAD, Godot, Blender. And it compiles easily on Linux/Unix (GCC), Windows (MSVC), and MacOS (via Clang++), so good for cross-platform development.
@Ramin_HAL9001 @cadar if you are doing numeric things, you may wish also to try clasp https://www.youtube.com/watch?v=mbdXeRBbgDM&pp=ygUKY2xhc3AgbGlzcA%3D%3D
Oh wow, I had seen this presentation back when it first came out in 2018 and had forgotten about it! Thanks for reminding me!
@Ramin_HAL9001 I feel like they have made less presentations of late, but the repo commits say that they are still working on it