(λ) - Lisp General - /g/ (#106004428)

Anonymous
7/24/2025, 2:34:57 AM No.106004428
(LISP)
(LISP)
md5: 32fdfd58757e57a2a4c103d765d459cd🔍
>Lisp is a family of programming languages with a long history and a distinctive parenthesized prefix notation. There are many dialects of Lisp, including Common Lisp, Scheme, Clojure and Elisp.

>Emacs is an extensible, customizable, self-documenting free/libre text editor and computing environment, with a Lisp interpreter at its core.

>Emacs Resources
https://gnu.org/s/emacs
https://github.com/emacs-tw/awesome-emacs
https://github.com/systemcrafters/crafted-emacs

>Learning Emacs
C-h t (Interactive Tutorial)
https://emacs.amodernist.com
https://systemcrafters.net/emacs-from-scratch
http://xahlee.info/emacs
https://emacs.tv

>Emacs Distros
https://spacemacs.org
https://doomemacs.org

>Elisp
Docs: C-h f [function] C-h v [variable] C-h k [keybinding] C-h m [mode] M-x ielm [REPL]
https://gnu.org/s/emacs/manual/eintr.html
https://gnu.org/s/emacs/manual/elisp.html
https://github.com/emacs-tw/awesome-elisp

>Common Lisp
https://lispcookbook.github.io/cl-cookbook
https://cs.cmu.edu/~dst/LispBook
https://gigamonkeys.com/book
https://lem-project.github.io
https://stumpwm.github.io
https://nyxt-browser.com
https://awesome-cl.com

>Scheme
https://scheme.org
https://try.scheme.org
https://get.scheme.org
https://books.scheme.org
https://standards.scheme.org
https://go.scheme.org/awesome
https://research.scheme.org/lambda-papers

>Clojure
https://clojure.org
https://tryclojure.org
https://clojure-doc.org
https://www.clojure-toolbox.com
https://mooc.fi/courses/2014/clojure
https://clojure.org/community/resources

>Other
https://github.com/dundalek/awesome-lisp-languages

>Guix
https://guix.gnu.org
https://nonguix.org
https://systemcrafters.net/craft-your-system-with-guix
https://futurile.net/resources/guix
https://github.com/franzos/awesome-guix

>SICP/HtDP
https://web.mit.edu/6.001/6.037/sicp.pdf
https://htdp.org

>More Lisp Resources
https://rentry.org/lispresources

(reset! prev-bread >>105917285)
Replies: >>106006512
Anonymous
7/24/2025, 2:42:01 AM No.106004502
(clojure)
(clojure)
md5: 20bee6b66b7f4f9984203423f97b0a52🔍
>>105992030
Also Clobber (Clojure)
https://youtu.be/kRd4JYIiWb0
https://github.com/phronmophobic/clobber
Replies: >>106004764
Anonymous
7/24/2025, 2:50:35 AM No.106004581
>>105992246
>https://wiki.call-cc.org/eggref/5/edward
Ed, man! !man ed
https://www.gnu.org/fun/jokes/ed-msg.html
Anonymous
7/24/2025, 3:12:57 AM No.106004764
>>106004502
How do you run clobber?
Anonymous
7/24/2025, 3:40:40 AM No.106004931
Screenshot from 2025-07-22 16-26-04
Screenshot from 2025-07-22 16-26-04
md5: 3a35d0f326bb2ad77d23cad7d05e1cef🔍
I'm going back to Clojure after fucking around with Elixir, Rust, and a bunch of other shit. I'm so done with the bullshit man.
Give me my JVM hog, I love that pig. It snorts at me as I paint it with immutable symbology.
Anyway, to get into the spirit, and to "solidify" this decision (I REALLY need to embrace one language and just build shit with it), I am going to switch from Neovim (used for over a decade) to Doom Emacs and set up REPL integration.
Thanks for reading my blog post.
BTW here is a screenshot of an experimental hash map I wrote in Rust. It outperforms Swiss Table in some cases but got BTFO by a certain key arrangement.
Replies: >>106005262 >>106008427 >>106014841
Anonymous
7/24/2025, 4:35:18 AM No.106005262
cider-logo-w640
cider-logo-w640
md5: 69f6e63a77bac798493ed83ecf21d678🔍
>>106004931
CIDER is great.
https://cider.mx
Replies: >>106005882
Anonymous
7/24/2025, 4:44:09 AM No.106005322
I'm about a hundred pages into Practical Common Lisp, and I gotta say, the equality functions and their naming conventions are shit. Really the only issue I have with the language so far.
Replies: >>106005996 >>106007252 >>106014826
Anonymous
7/24/2025, 4:49:32 AM No.106005368
Pravda
Pravda
md5: 131e26d0e0f27145627fb77edd338fff🔍
finally a new guix mirror 4 russia
https://lists.gnu.org/archive/html/guix-devel/2025-07/msg00129.html
https://mirror.yandex.ru/mirrors/guix
Replies: >>106005388 >>106005395 >>106005559 >>106005957
Anonymous
7/24/2025, 4:51:41 AM No.106005388
>>106005368
Is Guix still slow as fuck?
Replies: >>106005436
Anonymous
7/24/2025, 4:52:16 AM No.106005395
>>106005368
Good.
https://libreplanet.org/wiki/Group:Guix/Mirrors
Anonymous
7/24/2025, 4:58:24 AM No.106005436
freechad
freechad
md5: 5b54585401a871886a2bc8fed719316a🔍
>>106005388
It's OK for me (Thinkpad + SSD)
Anonymous
7/24/2025, 5:16:29 AM No.106005559
JAGDPANTHER
JAGDPANTHER
md5: 29929f9422429ccdccee3623bf18b785🔍
>>106005368
Nice.
But for me it's PantherX!
https://www.pantherx.org
Anonymous
7/24/2025, 6:00:20 AM No.106005882
>>106005262
>install Doom Emacs
>long lines do not wrap
>go to `config.el`, try to change `(setq display-line-numbers-type t)` to `(setq display-line-numbers-type 'relative)`
>put cursor over the t
>press s to substitute, like in Vim
>does nothing
>s is not bound to substitute by default
bruh, who the fuck thought it would be a good idea to rebind a very common Vim keybinding
Replies: >>106005982
Anonymous
7/24/2025, 6:11:17 AM No.106005957
>>106005368
>yandex.ru
i'm paranoid about these guys, manually checking hashes for iso files might be necessary
still this happening is a good thing, for a variety of reasons.
Anonymous
7/24/2025, 6:15:59 AM No.106005982
>>106005882
>long lines do not wrap
I recently learned about visual-wrap-prefix-mode. It'll wrap lines while also respecting indentation. It's like line wrap for programming modes.
Anonymous
7/24/2025, 6:18:17 AM No.106005996
>>106005322
Yeah it took me some time to get accustomed as well but I think this distinction is important. When you say that two things are 'same' it can actually mean completely different things depending on context.
That both objects live in the same memory region?(Eq)
That both objects have the same byte representation?(Eql)
That both numbers are same regardless of internal representation? (=)
That both lists have the same structure even if they inhibit different regions of memory? (Tree-equal)
Anonymous
7/24/2025, 6:27:37 AM No.106006042
1280px-Lua-Logo.svg
1280px-Lua-Logo.svg
md5: 19a51f787bde1fa96a85248bf6fb5fee🔍
why would i use lisp when lua and C exist?
Replies: >>106006065 >>106006084 >>106006099 >>106007875 >>106008120 >>106008802 >>106014920
Anonymous
7/24/2025, 6:32:11 AM No.106006065
>>106006042
The only thing of value from lua is luajit.
The language is pretty terrible.

C is a wonderful bootstrapper into lisp and scheme.
Anonymous
7/24/2025, 6:35:22 AM No.106006084
>>106006042
C doesn't even have namespaces. Lua doesn't even have macros.
Common Lisp has a full numeric tower, powerful macro system (that allows for endless language extension, see the Coalton project that puts Haskell 98 types into Common Lisp via the macro system), the Common Lisp Object System (that implements an object system that is a superset of even Java, an "object oriented" language, btw was initially implemented as an extension to Common Lisp), conditions (a superset of exceptions in other languages, allowing for correction of errors without unwinding of the callstack), and a first class REPL.
C and Lua are jokes to the liveness of Common Lisp.
Replies: >>106006472 >>106014866
Anonymous
7/24/2025, 6:37:36 AM No.106006099
LISPilled
LISPilled
md5: cd85caccfb35cfe08c6b18e1df53e614🔍
>>106006042
>Dennis Ritchie: I have to admire languages like Lisp
http://www.gotw.ca/publications/c_family_interview.htm
Replies: >>106006240
Anonymous
7/24/2025, 6:58:44 AM No.106006240
chads
chads
md5: f6f8851d1e864e330082f1d33717d6a8🔍
>>106006099
based dmr
Anonymous
7/24/2025, 7:33:54 AM No.106006472
>>106006084
i don't see how most of the things you list are even remotely helpful. the lack of a C repl is sad, but other than that why do i need "powerful" macros, numeric towers, OOP, and whatnot? i think a lot of modern languages (like lua) have taken all the best bits from various lisps. we're not in the 70's anymore, anon. C and lua are, in my opinion, all you really need anymore with most programming.
Replies: >>106006752
Anonymous
7/24/2025, 7:41:39 AM No.106006512
>>106004428 (OP)
NAKAD4SHITANIA SEXO AND IMPREGNATE, LITERAL NAKAD4SHI QUEEN
Anonymous
7/24/2025, 8:24:25 AM No.106006752
>>106006472
why even ask questions like these if you think you are correct? you should really sit down and ask yourself why you think that you know more than someone with over a decade of experience programming.
tl;dr: write more code
Replies: >>106007113
Anonymous
7/24/2025, 8:48:45 AM No.106006881
1343531529787
1343531529787
md5: 8581d29f464bf219bd12c48168456674🔍
Has anyone been able to build extempore on Guix? It keeps failing in my machine.
Anonymous
7/24/2025, 9:32:48 AM No.106007113
>>106006752
i'm not the one simping for (((lisp)))
Anonymous
7/24/2025, 10:09:33 AM No.106007252
>>106005322
Honestly, we should have eq and equal with the latter being a generic function. Everything else is just redundant.
Anonymous
7/24/2025, 10:37:05 AM No.106007373
https://fukamachi.hashnode.dev/
Replies: >>106007493 >>106010470
Anonymous
7/24/2025, 11:04:16 AM No.106007493
Screenshot from 2025-07-24 04-03-59
Screenshot from 2025-07-24 04-03-59
md5: ee7db07d49e22d08672c0485b99313c2🔍
>>106007373
absolute chad
Replies: >>106010470
Anonymous
7/24/2025, 11:35:11 AM No.106007643
>>106003763
>it's strange how many developers there are that are completely resistant to different looking languages
>you'd think those kinds of people would be underrepresented considering how many different things they have to learn on a regular basis if they're a half decent dev
Even among Lisp programmers, lots of people are like this. Remember, Lisp is simple and elegant, but APL is alien and unreadable.
>the ones that claim it's too many parens are the most idiotic. it's literally the same amount of parens
It's not, especially if you compare with infix notation. While foo(arg) and (foo arg) are the same, in Lisp-like languages you also use parens all the time for control structures and that's where sexps become particularly unreadable, IMHO. Compare pattern matching in Scheme or ELisp with pattern matching in Haskell or OCaml, the readability difference is massive (though you can kinda get used to parsing (match (foo bar) (() (baz)) ((a . d) (quux a d))), it's still bad).
S-expressions are verbose and very uniform, without any visual clues. I think this should be an admitted problem (and ppl should experiment with various solutions), but Lisp community mostly sweeps it under the rug and fears any kind of criticism of their beloved parentheses.
Replies: >>106007881 >>106007899 >>106008120 >>106011831
Anonymous
7/24/2025, 12:17:49 PM No.106007875
>>106006042
dwarf fortress recently added lua scripting. mods go brrrrrrrrrrrrrrrrr
Anonymous
7/24/2025, 12:19:06 PM No.106007881
>>106007643
even though it does not matter for the reader, indentation matters for the human reader. Try reading ocaml without identation too.
Anonymous
7/24/2025, 12:21:13 PM No.106007899
>>106007643
It is not sweeping anything under the rug. I simply cannot understand your difficulty and don't share it, so I cannot admit to there being any problem. I think most people who spend serious time with Lisp also learn to see "through" the parentheses. IDEs will also highlight pairs for you nowadays, making the problem largely irrelevant, and the syntax of things like Clojure is worse for having square brackets and so on.
Anonymous
7/24/2025, 12:59:58 PM No.106008120
>>106007643
lisp pattern matchers are all macros, and sufficiently developed macros all have conditional functionality based on the fact what you're giving them. Specifically, (my-match z (case-a case-b ...)) will behave differently not only based on the base type of a case (is it a symbol or a list?), but also based on the structure of a case if it's a list as well as the type and structure of its elements. This nested matching has no visual clues, and flycheck will not save you from making mistakes from sheer confusion.
>>106006042
>lua
awesomewm is unironically everything stumpwm wishes to be, except lua makes tinkering with the configuration a pain. well, i, at least, have the problem. i would have preferred to take a bunch of parentheses and infix notation that the sheer retardation of overnested curly braces with commas up my ass.
but i have to give it to lua, i didn't even need to check out the docs to use the language, and outside of list nesting it's fine.
>c
no one avoid C anyway, so your wish is fulfilled.
Anonymous
7/24/2025, 1:54:16 PM No.106008427
>>106004931
Babashka is decent for CI tasks.
Anonymous
7/24/2025, 2:50:33 PM No.106008802
>>106006042
you could use the superior lua version instead https://fennel-lang.org/
Replies: >>106017268
Anonymous
7/24/2025, 2:59:44 PM No.106008854
d0e12004e41e325b4ada8e26b3144829
d0e12004e41e325b4ada8e26b3144829
md5: 8b7f0b99bdf2ec7a803fd5f224950faa🔍
>>106004188
>Can someone explain lexical scoping? I've implemented my own lisp, but it uses dynamic scope, and I don't quite understand how lexical scope works on the level of implementation.
;; a lambda like
(lambda (x y) x)

;; is represented internally as a closure (the parameter list, body list, and current environment)
(((x y) (x)) environment)

;; which is really (at toplevel, where the environment only contains a lambda primitive)
(((x y) (x)) ((lambda . #<procedure>)))

;; let's evaluate this application
((lambda (x y) x) 1 2)

;; during apply the current environment is extended using
(cons (map cons (x y) (1 2)) environment)

;; producing a new environment (if we had another closure in the body list, this is the environment that would get captured the same way as before)
(((x . 1) (y . 2))
((lambda . #<procedure>) ...))

;; the body list (x) is then evaluated in the new environment
(last (map eval (x) (((x . 1) (y . 2)) ((lambda . #<procedure>) ...))))
Anonymous
7/24/2025, 6:24:05 PM No.106010470
samurai
samurai
md5: c1e5f68f4881033769f86c2cc92363cf🔍
>>106007373
>>106007493
The Lisper Samurai
Anonymous
7/24/2025, 6:32:04 PM No.106010519
1744287390297465
1744287390297465
md5: fd9b213bd9a857ebac7c4d463780a96e🔍
eng ver when for us dekinais
Replies: >>106010954
Anonymous
7/24/2025, 7:35:18 PM No.106010954
>>106010519
https://github.com/zick/Magical-Language-Lyrical-Lisp
Replies: >>106011490 >>106011722
Anonymous
7/24/2025, 8:00:39 PM No.106011203
2077
2077
md5: 4105242df7542d4d9e205deb3bcea7a3🔍
Babashka + HTMX
https://clojure.org/news/2025/07/20/deref
>Clojure, Babashka, and Web CGI (https://blog.nundrum.net/posts-output/2025-07-09-clojure-cgi/)
Anonymous
7/24/2025, 8:27:32 PM No.106011490
1740392178988084
1740392178988084
md5: 0765262e4e9ea89b9de0a7f09be10eb0🔍
>>106010954
It doesn't work...
Replies: >>106011645
Anonymous
7/24/2025, 8:40:01 PM No.106011645
>>106011490
Okay that error was because of the 1000x folded nippon code that only works with the JP locale, but I tried creating the nscript with both the .exe tool, compiling the c code on windows and on linux and it still doesn't work...
Anonymous
7/24/2025, 8:47:30 PM No.106011722
>>106010954
Wait a second... that repo doesn't have the translations at ALL why did you lie to me??
Anonymous
7/24/2025, 9:00:32 PM No.106011831
>>106007643
>without any visual clues
I'm glad Rich Hickey introduced [ ] and { }. That was a step in the right direction.
Replies: >>106011994 >>106014809
Anonymous
7/24/2025, 9:17:03 PM No.106011994
>>106011831
it was not, this is worse for macros and is only "good" because he did not give Clojure reader macros
it is compromise at best
Replies: >>106012631
Anonymous
7/24/2025, 10:16:52 PM No.106012631
>>106011994
He had his reasons.
https://groups.google.com/g/clojure/c/8RSLNWno0nU
Anonymous
7/25/2025, 12:28:44 AM No.106013971
Can someone spoonfeed me how to configure, whatever is autoformatting, so that it doesn't autosort the includes in C++ files?

I'm on doom emacs and I have enabled:
(format +onsave) ; automated prettiness
Replies: >>106014068
Anonymous
7/25/2025, 12:38:19 AM No.106014068
>>106013971
>I'm on doom emacs
Who knows. I don't use a massive pile of hacky lisp code in my config. I actually understand what's going on in mine because I built it myself.
Replies: >>106014250
Anonymous
7/25/2025, 1:03:12 AM No.106014250
>>106014068
yeah... thanks
Replies: >>106014860
Anonymous
7/25/2025, 2:24:52 AM No.106014809
>>106011831
>I'm glad Rich Hickey introduced [ ] and { }. That was a step in the right direction.

No.

On Common Lisp you can use whichever reader macros you like, thus, you can select which meaning will [] and {} have in the SPECIFIC file where you need to use/enable them.

Rich Hickey basically fucked up this functionality. And as a side effect, code looks even uglier.

One of the many ill decisions by Rich. I will concede, though, that centering on immutable data was a good decision.
Anonymous
7/25/2025, 2:26:56 AM No.106014826
>>106005322
>I'm about a hundred pages into Practical Common Lisp, and I gotta say, the equality functions and their naming conventions are shit.

They appear "shit" but then you realize that comparison is not so simple. There are many ways to compare two things. Thus the need for eq, eql, equal, etc.

Quite the opposite, on other languages, whenever i use something like "==", i have to go back and read the lang reference to make sure exactly how this operator would behave.
Replies: >>106014976
Anonymous
7/25/2025, 2:29:25 AM No.106014841
>>106004931
>I'm going back to Clojure after fucking around with Elixir, Rust, and a bunch of other shit. I'm so done with the bullshit man.

Try Erlang instead of Elixir.

Try OCaml instead of Rust.

>Give me my JVM hog, I love that pig. It snorts at me as I paint it with immutable symbology.

Ok, then use Scala3, in my opinion right now is the best mainstream language available for the JVM.

>BTW here is a screenshot of an experimental hash map I wrote in Rust

This is a Lisp thread. Lispers, generally, consider Rust users to be pathetic braindead losers.
Replies: >>106015228
Anonymous
7/25/2025, 2:31:53 AM No.106014860
>>106014250
snide comments aside it's hard for us to help because emacs "distros" have their own complete layer of complexity wrapped around "normal" emacs. most of us still use homegrown configs so we don't know how the hell doom works.
Replies: >>106014887
Anonymous
7/25/2025, 2:32:43 AM No.106014866
>>106006084
>C doesn't even have namespaces. Lua doesn't even have macros.
>Common Lisp has a full numeric tower, powerful macro system (that allows for endless language extension, see the Coalton project that puts Haskell 98 types into Common Lisp via the macro system), the Common Lisp Object System (that implements an object system that is a superset of even Java, an "object oriented" language, btw was initially implemented as an extension to Common Lisp), conditions (a superset of exceptions in other languages, allowing for correction of errors without unwinding of the callstack), and a first class REPL.

Not to mention CL also allows you to execute code at read time, compile time, and runtime.

>the Common Lisp Object System

The absolutely superior OOP system , even right now in 2025.

>C and Lua are jokes to the liveness of Common Lisp.

Based.
Only Smalltalk can compete in this regard, except that CL executes at lighning speed compared to Smalltalk.
Replies: >>106015874
Anonymous
7/25/2025, 2:34:52 AM No.106014887
>>106014860
I fully understand. I solved it temporarily by adding a .clang-format file with the contents:

# .clang-format
BasedOnStyle: LLVM
SortInclude: Never

it activated some other weird stuff like 2 spaces indentation, even if I included a line like
IndentWidth: 4

but whatever, I left it like this for now
Anonymous
7/25/2025, 2:38:07 AM No.106014920
>>106006042
C is good

lua is garbage only good for embedded scripting in game modifications
Replies: >>106014926 >>106014969
Anonymous
7/25/2025, 2:38:58 AM No.106014926
>>106014920
>C is good
lmfao
Anonymous
7/25/2025, 2:44:50 AM No.106014969
>>106014920
>C is good

Good for bootstrapping Lisp. And then, the best Lisp implementations contain no C code.
Replies: >>106015874
Anonymous
7/25/2025, 2:46:19 AM No.106014976
>>106014826
You're right, having more options isn't bad. I'm mostly complaining about the fact that I will have to memorize what each comparison function does and in what cases to use them instead of the naming being more intuitive.
Anonymous
7/25/2025, 2:50:40 AM No.106015006
How does one host a Guix package mirror? How much storage/bandwidth is required? I have a server with 3TB redundant NVMe storage and 10Gbps uplink I can dedicate to it if it's enough. I don't personally use Guix btw
Replies: >>106015130
Anonymous
7/25/2025, 3:09:29 AM No.106015130
>>106015006
https://www.futurile.net/2023/05/01/guix-publish-caching-substitution-server/
Replies: >>106015545
Anonymous
7/25/2025, 3:20:11 AM No.106015228
Steel_(logo)
Steel_(logo)
md5: e816ef72da147c1d8fe5780caaf1e056🔍
>>106014841
>Lispers, generally, consider Rust users to be pathetic braindead losers.
Nah. Rust actually takes a lot of good things from Lisp:
>Scheme: hygienic macros
https://doc.rust-lang.org/reference/influences.html
Also, Helix + Steel (Scheme) looks very promising.
https://github.com/mattwparas/steel
https://github.com/helix-editor/helix/pull/8675
Anonymous
7/25/2025, 3:55:09 AM No.106015545
>>106015130
Is there any additional setup necessary for hosting a public server? Other than firewall setup obviously
Anonymous
7/25/2025, 4:35:20 AM No.106015874
>>106014969
lisp vms should be implemented in assembly rather than C.
>>106014866
>The absolutely superior OOP system , even right now in 2025.
Indeed, now that the OOP hype is long behind us, the score seems to be forever settled.
Anonymous
7/25/2025, 4:59:11 AM No.106016052
good evening sirs!
what's the best way to write a gui program with lisp? I'm partial to CL but if clojure or something has better libraries I'll check it out
Replies: >>106016141 >>106016144 >>106018863
Anonymous
7/25/2025, 5:09:42 AM No.106016141
>>106016052
CL has https://github.com/rabbibotton/clog
Clojure can use Java Swing or JavaFX (never forget that Clojure can trivially use ANY Java lib)
you can always just deploy a local webserver (this has the advantage that you can throw the program onto a server and then access it remotely)
Anonymous
7/25/2025, 5:10:24 AM No.106016144
>>106016052
Clojure has bindings for JavaFX and you also have Clojuredart. Or just anything with imgui or SDL bindings.
Anonymous
7/25/2025, 8:29:01 AM No.106017268
>>106008802
>https://fennel-lang.org
Interesting
Anonymous
7/25/2025, 12:35:55 PM No.106018447
jumanji
jumanji
md5: 086c27faf97eacbc588dec63e4cd233d🔍
>tfw lisp project is getting me interviews
Anonymous
7/25/2025, 1:41:10 PM No.106018863
>>106016052
racket has basic ui capabilities out of the box sir