lainchan / λ
Addicted to lisp
roll · 2025-06-30 05:24
I'm addicted to lisps. I can't pick up another language because I keep thinking about how much easier it would be to write the same program in a lisp. I'm addicted to easy data structures and maps and ad-hoc, free-form positioning of functions and args and defining a function wherever I feel like it.
I look at C / C++ and I can't believe anyone ever gets anything done in those languages, they have so much boilerplate and söykaf.
I understand that they're for low-level stuff, but damn does the nitty-gritty really SUCK.
I desperately need to learn a real programming language. Python feels dirty. Go I dislike. Rust... I haven't bothered with. Lua's got tables and 1-indexing. Java I won't touch. Haskell and the like are too slow and take up too much RAM. OCaml doesn't make much sense to me (yet). Erlang / Elixir I understand but have no use-case for.
Clojure and Elisp are my jam and I can't figure a way out.
Lady Jessica · 2025-06-30 05:34
On second thought, perhaps I should start learning database internals or something. I've been meaning to dive deep into PgSQL for years now.
Although, that makes think about SQLite and how it's adequate for most intermediate use-cases.
Dox · 2025-06-30 06:04
Maybe you'd like Red. Though it's a language in development so it is limited in use. I don't know how good it is now but the concept of a language so high level but as capable of low level as well seems very useful to making code as few lines as possible is intriguing.
Cypher · 2025-06-30 06:37
Lua -> fennel
Python -> Hy
Erlang -> LFE
I've been learning lisp by programming in lisp implementations of languages that I do know. I figure the reverse could also apply
Cutter · 2025-06-30 06:50
>>42487
Thanks, but I don't want to learn more memelangs.
>>42488
I wanna rip the lisp band-aid off, not dive in deeper.
Unspecified · 2025-06-30 07:33
>>42489
ruby for expressions and functions and its OOP
perl for its regex, scripting, libraries
Von Neumann · 2025-06-30 09:34
>a real programming language
I wonder where this comes from, I imagine you're aiming for a job, which is understandable, and most of these jobs all require you to use mostly pythong, docker, all those trendy things.
Perhaps you might look in other directions, where you can still use lisp without sacrificing you interest. Or maybe you can make a tool in lisp that addresses real industry concerns, idk.
Honestly, it's hard giving any advice if you don't say what your goals are, why you want to learn a different language, why you feel lisp is inadequate despite acknowledging it's the best language you know of, etc.
On the other hand, the use of the word "memelangs" makes me think you are underage and probably not actually trying to solve any problem but rather just throwing soykaf around just to see where it lands.
Miho Iwakura · 2025-06-30 10:50
Clojure is decently mainstream, and even if it wasn't, being on the JVM means that, a lot of the time, it doesn't need to be, because you can interface with Java libraries directly.
Anyway, I wish I could get into Lisp more, but I dislike it on an aesthetic level. The uniformity of sexprs, contrary to what Lisp programmers suggest, is more often a detriment to readability than it is a boon. Using the same syntax for (more or less) everything from functions to data structures to control flow makes it hard to grok what a specific block of code even is, since everything looks like a function. And said syntax really is only good at representing functions. Arithmetic in particular gets really ugly in Lisp, with a million parens scattered everywhere.
Roger Pollack · 2025-06-30 11:53
>>42492
>Arithmetic in particular gets really ugly in Lisp, with a million parens scattered everywhere.
(ql:quickload :polisher)
Special Agent Bob · 2025-06-30 12:10
>>42491
A real programming language, as defined by popular use. Not an "academic" or "has been" ("non-AI") language like lisp that decidedly won't put food on the table, yes.
I love that you criticized my use of memelangs, though. It's a relief not having to fuarrrking pay lip service to the common vernacular (sigma rizz nocap periodt (it's giving anti-delulu) (I fuarrrking hate this))
I need something that doesn't feel like it's stabbing my pride in the back and still puts food on the table. What should I learn? Python? I can do that. JS, Go, sure.
But my big issue is that it's really difficult for me to "translate" the way I understand programming from a lisp-y paradigm to something that's more imperative and mainstream. And all these "popular" languages come with their own footguns, that require even more introspection, and on some level I fear that I'll fuarrrking forget what I worked for with lisp.
>>42490
I wasn't present for those languages, I started a little over ten years ago.
>>42492
> low readability
It got better for me over time, now it doesn't bother me at all. I use rainbow delimiters (doesn't have to be rainbow-colored).
> Clojure
And yes, I admire that about Clojure, too. It really got me out of the "Everything In Java Is Bad And Shit" hole. The JVM is actually... really nice. Going by what I've read and my admittedly novice tech chops towards an analysis of that kind.
Apoc · 2025-06-30 13:53
people still code character-by-character in 2025? I've been a programmer for 10 years now, and the only time I'm actually typing stuff up character-by-character is in the terminal, IDLE, gdb or something like that.
everything else is VScode + vibes
() · 2025-06-30 15:13
>>42496
Sounds exhausting and gay
string · 2025-07-02 08:31
I feel you, OP, I am also addicted to lisp. I can't stand doing anything in a language less powerful than it. Not that I actually need it's power for the tasks I intend to do, nor is it the most appropriate language, it just so happens that I am so used to lisp and scheme that I expect to use it everywhere.
I am starting to use Ruby and tcl because they are the closest I could find to lisp in terms of the qualities I expect in a language, they are a bit of an uncomfortable compromise, becuase they are neither lisp nor the most appropriate tools for the job, but what can I do? Lisp really is addictive.
Cutter · 2025-07-02 15:31
>>42497
you're going to be replaced
Kay · 2025-07-02 15:49
>Clojure Clojure Clojure
Is ABCL not actually viable in practice for some reason?
Neuromancer · 2025-07-02 15:55
>>42482
>I look at C / C++ and I can't believe anyone ever gets anything done in those languages
And what do you get done? Show us something you built.
Lain Iwakura · 2025-07-02 16:58
>>42521
That's a very antagonistic reading. I took it to mean that the amount of work required to build something in those languages makes it even more of an accomplish to write in.
Ein · 2025-07-03 16:09
>>42495
>But my big issue is that it's really difficult for me to "translate" the way I understand programming from a lisp-y paradigm to something that's more imperative and mainstream. And all these "popular" languages come with their own footguns, that require even more introspection, and on some level I fear that I'll fuarrrking forget what I worked for with lisp.
This issue is solved by, you'll never guess, programming in other languages. Jobs, open source projects, are about providing services for others, and that requires sacrifice of one's personal preferences, which you don't seem apt to. I wish there was a magic bullet but as per your OP you stated that you desperately needed to learn a real language, and you most likely have the capabilities to do just that: it's an issue of stubbornness.
Von Neumann · 2025-07-03 16:23
>>42482
Try prototyping in Lisp something relatively complex and once you have something working well, translate it into C, do profiling and you will understand why. Do it as a boring C programmer would, don’t try bringing clever ideas.
Before you counter-argument, if you do write Lisp targeting it to go as fast as C, your “full of boilerplate” argument will start break down. Again, if you think that is a better way, do it practically too to see what I mean.
Emmanuel · 2025-07-03 16:48
>>42529
I didn't do that, but won't True Macros™ save some of the boilerplate?
Tequila · 2025-07-04 09:47
>>42529
Try Forth. Performance and power are not mutually exclusive.
Cereal Killer · 2025-07-07 12:20
>>42519
unlikely
>>42520
JVM is really great.
>>42523
Yes, This.
>>42527
Yeah I just gotta bite the bullet.
>>42529
I agree, but my original point was really that it takes so much more typing and writing and checking and manual finagling to really get common things done in other languages. Lisp just gets these done with minimal friction.
Nemissa · 2025-07-08 02:39
im addicted to ravioli
i wish LFE was good..
Meddler · 2025-07-08 08:09
>>42482
https://rentry.org/lispresources
roll · 2025-07-11 04:27
Lua is nice, don't let the 1-indexing deter you, you get used to it fast. Rust is a bitch sometimes but I like it as a replacement for C++.
Jet Black · 2025-07-11 04:42
>>42560
>i wish LFE was good..
The tutorial is well written and easy to follow.
https://cnbbooks.github.io/lfe-tutorial/
Having Erlang-styled pattern matching in a small lisp feels good too.
"Wherefore art thou LFE?" is a good introduction to the language.
https://www.youtube.com/watch?v=BvCBTpnlqs8
Hagbard Celine · 2025-07-11 12:00
try prolog! it's the ancestor of erlang and developed alongside lisp and is an entirely different paradigm that will blow ur mind
Jim Hilger · 2025-07-31 23:25
>>42482
Try smalltalk, live-coding with real OO.
Jean Dupont · 2025-08-01 05:03
>>42697
I think Smalltalk's current best chance of gaining mindshare is gtoolkit. It looks cool, but I'm not proficient in Smalltalk, so I can't use it the way it's meant to be used yet.
https://gtoolkit.com/
I remember how awkward my first encounters with Emacs were (before I knew any lisp), so I know not to judge it negatively based on my own lack of skill.
⍕ · 2025-11-06 07:30
>>42482
to me lisp langs look cool on paper but practicaly speaking i'm not convince they are any better than what i usualy use to get the job done, ie rust.
Switch · 2025-11-06 15:32
>>43460
Not everything needs to be "practical". Sometimes it's just fun to create for the sake of it. I've written a bunch of 68k assembly, and it's all been exclusively for homebrew on hardware from over 30 years ago. The fun thing about Lisp is that it's a high-level language with the flexibility of Assembly; it's probably the most open high-level language out there in terms of insane things you can get it to do.
With that said, Lisp is good for situations where you care more about what your code does than how it actually does it. I've used it pretty extensively for prototyping, for example.
nil · 2025-11-06 16:07
>>43462
What makes it better for prototyping than for example JavaScript or Python?
BloodCat · 2025-11-06 16:22
>>43464
other anon here. While it has everything that those languages have + (in case of CL) huge library, I find it easier to try out ideas quickly. Also - as those languages - it has the ability to pause computation on the fly, redefine definitions in nested repl and then resume the computation. Scheme can sorta do it (with call/cc), but it's much more fickle for prototyping, because (for example) False and empty list are not eq? to each other.
Honestly, scheme feels great for waking up with some idea in your head like,
>gee I wanna implement type system as macros that remove themselves after expansion
or
>you know what scheme needs? normal order evaluation
and just doing it in something like 100 lines of code. CL is - because of it's mature library - good for prototyping "practical" things.
John Doe · 2025-11-06 16:30
>>43465
In JS you have a whole NPM at your fingertips... And Python... isn't exactly known for small or lacking ecosystem either. I guess I can see the appeal if you want to prototype PL ideas in particular like implement your own type system or whatever.
Sabo Engle · 2025-11-06 16:42
>>43466
Mind you, I am interested in PL ideas, so I can name them easily. I could argue that CL's library is more mature than NPM's and Python, but that is again more of "langauge-pissing" match than anything. I might just show some examples,
CL side (again, this is something I am aware of):
>an actual game engine in CL that has gaymes made in it for actual money
>https://store.steampowered.com/app/1261430/Kandria/
Scheme side (this is the fun side):
>Delimited continuations in 100LoC
>https://wiki.call-cc.org/eggref/5/F-operator
>State monad in, at best 50LoC
>https://okmij.org/ftp/Scheme/monad-in-Scheme.html
Cat Mother · 2025-11-08 21:01
>>42482
Lisphead-sama, could you let me in on a trick that transforms one Lisp program into a binary tree holding strings, and then back? It should be easy in every Lisp that can quote and unquote...
Cereal Killer · 2025-11-09 03:10
>>43467
> I could argue that CL's library is more mature than NPM's and Python
It's usually worse for less popular languages and it's mostly not about language capabilities, they simply don't have extraordinary amount of resources invested into developing libraries like Tensorflow or React. Also they have way less libraries for rare needs like stuff for working with Doom WAD format, or libraries for running Minecraft with modloaders. This is some examples from Python and JS ecosystems. But CL has been around for very long and there definitely can be very high quality libraries, and I believe it's capable of very good performance for gamedev when approached properly, but it might involve writing code in completely new statically typed sublanguage with totally different resource allocation semantics to achieve that.
Arisu Mizuki · 2025-11-09 03:57
>libraries
Look up py4cl and Burgled Batteries
Agent Richard Gill · 2025-11-09 13:15
>>43475
>But CL has been around for very long and there definitely can be very high quality libraries, and I believe it's capable of very good performance for gamedev when approached properly, but it might involve writing code in completely new statically typed sublanguage with totally different resource allocation semantics to achieve that.
I was skimming along the Kandria's engine - trial [1]. If there is statistically typed sublanguage it's very well abstracted away (via CLOS). The code that does number crunching doesn't care about static typing, but instead instructs the compiler to assume that arguments will be of certain type ala this,
(declare (type (function (T T T) (or null single-float)) thunk))
(declare (type ray a))
(declare (type (unsigned-byte 32) start end))
(declare (type (simple-vector) hits)) I again repeat, didn't do a deep dive into this, but seems like it's CLOS + compiler-time macros that transform CL "types" for rendering into types GL can understand.
[1] https://codeberg.org/shirakumo/trial
Cypher · 2025-11-09 13:26
>>43483
That game is a 2d platformer, it's not very demanding. What they did is perfectly reasonable, since their level of needs is "oh well, it would be nice to care a bit about making it more efficient, but it's not a big deal in our case". What Minecraft does is way more demanding and they still were able to achieve it with Java. For games that are orders of magnitude more demanding than Minecraft, things might get tricky and you'd want to avoid GC, preallocate hard, etc.
Judge Fang · 2025-11-09 14:11
>>43484
my mind didn't even cross into AAA-style 3d game to be honest, like it is out of the question no matter how hard you optimize. Maybe something from 2010ish is possible.
Yet Another Lainon · 2025-11-09 14:44
>>43485
With CL it's definitely possible since you can basically write your own compiler of arbitrary language as a macro. But I also think a lot of 2010s games are demanding enough to want to avoid GC.
Emmanuel · 2025-11-09 15:10
With cl you have the MOP which let's you do some powerful things if you really wish. For example game devs talk a lot about ECS, if you look into what it really is, it's 2 things:
1. An optimization of allocating components in a continuous chunk of memory
2. Dynamic structure you can add onto objects that isn't tied to inheritance.
With CLOS you can do 1 without 2 easily by tuning the mop to tell it where data should live., so those kinds of optimizations can be done without the hacks you have to go through in cpp or the like.
Further static typing does not matter here, if you tell SBCL constraints it'll use it in optimization, you can even tune the safety of the compiler dynamically within blocks to avoid bounds checking if you really want.
When I worked with factor, it was easily to tell objects to be backed by foreign memory and thus avoid GC, so if you want arena allocates you can do that, can also probably automate it via the meta object thanks to the MOP.
Here is a fun library made by baggers:
https://github.com/cbaggers/cepl
There are many other things I could share but please don't assume static typing really matters for the domain of performance
Cypher · 2026-01-25 03:42
>>43464
>What makes it better for prototyping than for example JavaScript or Python?
Practically speaking, your Lisp code is way less likely to bitrot and stop working after a few years. I don't write server-side JS anymore if I can avoid it, but I have a handful of projects from years past that don't work anymore, because it's hard to get old versions of nodejs and the old versions of various JS libraries to work on current systems.
Incognito · 2026-02-26 20:04
>>42482
My problem is the polar opposite. I mainly program in C and I've tried to get into these kiddie languages to do stuff that is halfway between what I'd write a C program for and what I'd write a shell script for. Python is too quirky for my taste, and the fact that whitespace has any bearing on the flow of code is pure madness. Lua is alright, it integrates easily into C code, although indexing starting at 1 is an odd choice I understand where they are coming from (not flabbergasting the uninitiated). Rust's only usecase appears to be rewriting C programs, but my C programs already work so I don't see the point. I tried to compile Go code once and caught it attempting to connect to the Internet without asking, so I'm never trusting anything coming from Jewgle ever again. And then there is Lisp...
It doesn't matter what flavor of Lisp I'm looking at, I always feels like I'm reading some sort of torture manual on how to inflict a mathematical approximation of suffering onto CPUs. I can follow the concepts, I have studied enough Lambda Calculus to know where it is all coming from, but seriously, what in tarnation were those guys thinking? Doing computation like that feels like sending your computer to a silicon-based version of the biblical Hell.
Yu-ichi · 2026-03-01 04:09
>>43966
>although indexing starting at 1 is an odd choice I understand where they are coming from (not flabbergasting the uninitiated).
I don't understand these kinds of statements. If you actually get tripped up by such a minor matter of syntax, that just reflects badly on you. I'm sure you're not a bad programmer, but often we just talk about details that aren't really about the language architecture. Syntax gripes are valid, but are too often the only thing presented.
I've not used Lua, but I've used Matlab too much, which also has one-indexing. It's my favourite problem with the language because it's not a real problem, whereas the extremely poor performance, the library of thousands of functions with inconsistent naming, lack of namespace, inconsistent GUI objects, and a programming community of nonprogrammers who cannot debug, document code, or use more than two letters for a variable name, have contributed to my time with Matlab being more difficult than it should be. One-indexing has never cost me more than a second or two, some of these have cost me hours. Matlab is such a retarded language.
Spooky · 2026-03-09 14:01
Nice thread. I really like the idea of Lisp, but have no reason to make programs, and there's no such a thing like Lisp in hardware design.
word · 2026-03-09 15:34
>>43983
I was thinking it would be strange if there were no Lisp HDL. A quick search turns up https://github.com/domus123/vhdlisp
From what I see, it's a DSL that outputs VHDL. I'm not sure what it's worth.
Vasya Pupkin · 2026-03-10 12:14
>>42482
Interesting, I can't relate. Elisp is like a configuration hell for me. I like the reflection+interactivity, but everything else about it is dreadful.
Take bindings for example. Changing mouse 2 to open files externally in dired toke like 2 hours. I had to figure out that I needed to (setq mouse-2-click-follows-link nil). Then I had to write a wrapper around xah-open-in-external-app because mouse clicks have their own argument. like many things in emacs the mouse has to have it's own "special" way to handle bindings (don't even get me started on rebinder.el or bind-key.el)
I really wish emacs handled bindings like 4coder or dwm. I would rather write them directly and compile them in.
Unspecified · 2026-03-11 18:30
>>43972
>Matlab is such a retarded language.
That's funny, I was actually going to start learning it today. Is there an alternative you (or anyone else, really) would suggest for robotics programming?