[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
▼ Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


>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-config-generator.fly.dev
https://systemcrafters.net/emacs-from-scratch
http://xahlee.info/emacs
https://emacs.tv

>Browse imageboards in Emacs Org-Mode
https://github.com/eNotchy/4g

>Emacs Distros
https://github.com/caisah/emacs.dz

>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://almightylisp.com
https://lispcookbook.github.io/cl-cookbook
https://cs.cmu.edu/~dst/LispBook
https://gigamonkeys.com/book
https://lisp-docs.github.io
https://awesome-cl.com

>Scheme
https://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://clojure.land
https://www.clojure-toolbox.com
https://mooc.fi/courses/2014/clojure
https://jafingerhut.github.io/cheatsheet/clojuredocs/cheatsheet-tiptip-cdocs-summary.html

>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://lisp.nexus
https://rentry.org/lispresources

(set! prev-bread (quote >>109871435))
>>
File: Symbololics-3640.jpg (222 KB, 308x608)
222 KB JPG
new autolith release
https://github.com/lambda-symbolics/autolith/releases
>>
File: eval.png (97 KB, 840x600)
97 KB PNG
eval
>>
>>109980738
lisp is so beautiful, no female comes close
>>
>>109979569
>>
opinions about streetlisp?
https://git.sr.ht/~ft/sl
>>
File: puke in a toilet.png (36 KB, 591x674)
36 KB PNG
>>109983658
Prime "how do you do fellow kids" garbage.
>>
>>109983760
Their logo looks like the boymoder.
>>
>>109983760
Looks like Lisp Alien with dysgenic tranny features, and about a quarter of the way through a Parasite Eve transformation
>>
>>109983796
>>109983847
Nigga's so nasty that I called the maid.
>>
File: street cleaned.png (310 KB, 650x995)
310 KB PNG
Update: I got a picture from the maid.
>>
>>109984189
>
>>
File: photographing_objects.png (265 KB, 735x939)
265 KB PNG
>>109984224
>>
File: feb524f.jpg (1 MB, 916x1200)
1 MB JPG
Lisp?
>>
Gerbil and Racket are the most exciting alternatives to CL right now. Especially when it comes to concurrency primitives now that Racket can utilize multicore
>>
>>109983565
Buy an ad + make your own general.
>>
>>109986432
I keep hearing good things about them, the lack of residential programming capabilities keeps me from trying them.

Tell us more about Gerbil. How does it compare to common lisp and why is it exciting to you?
>>
>>109986475
I got into gerbil from this:
https://fare.livejournal.com/188429.html

From syntax there's a lot of useful new macros but I don't see much that you couldn't already import as a library in CL.

The main attractions are:
>batteries included, it just werks standard library
>Comfy actor model and lightweight threads (you can do the whole distributes process thing just like Erlang)
>>
>>109986586
I remember he was recently plugging gerbil and its home page was down...
I still think a lot of his motivations are really just from losing paying gigs in CL and having sour grapes.
But, I applaud it for trying to appeal to practicality.
>>
>>109986432
Racket or Chez Scheme?
>>
>>109988872
Gerbil is chez but better. Both suck, though. Slow as balls without the runtime dynamism of cl.
>>
Does anyone here know if there are decent "small emacs" editors like qemacs or mg, but with an extension language? I'm looking for something that's basically emacs but with a much smaller core (and probably way fewer packages). I don't like how complex core emacs is. It takes forever to compile too and it requires quite a few dependencies. Also it's C code is very complex.
>>
>>109990407
Just use Emacs with minimal packages installed. It's not like you need to recompile Emacs every week.
>>
>>109990407
nothing that's actively maintained.
GNU Zile exists but is useless nowadays because it doesn't even have unicode support.

FemtoEmacs is probably the closest thing, but judging by the yidhub it's beem dead for years:
https://github.com/FemtoEmacs/Femto-Emacs

neovim and helix are probably your best bets for reasonably extensible text editors that aren't quite as big as emacs.

Or just make your own, with a tiny local webserver running a browser-based editing window.
>>
>>109990407
>>109990531
Doing some googling and found this: https://github.com/paveluv/e. It looks pretty cool, and it seems to be actively maintained. It's written in Chez Scheme. I'll try it tomorrow. Has anyone tried it?
>>
File: shocking twist.jpg (24 KB, 300x295)
24 KB JPG
>>109986469
>insult Hoon
>get told to buy an ad and make a general for Hoon
I wonder who could be behind this post.
>>
File: curtis yarvin on lisp.png (137 KB, 1150x460)
137 KB PNG
>>109990839
>insult Lisp, yet call your language Lisp-like
>disdain functional programming, yet call your language functional
Can we just agree that Hoon/Nock/Urbit is completely off-topic in a thread about Lisp? Go make your own thread, you have done so before. >>88843599 >>109524789 >>109321641 >>109278525
>>
>>109991236
>we
(You) the only faggot seething about Urbit here.
>>
File: 1791127656233915m.jpg (95 KB, 1024x709)
95 KB JPG
>>109990531
>just make your own, with a tiny local webserver running a browser-based editing window.
I had fun fabulating about this with a clanker:
https://bpa.st/TFUQ

The closest things to this that exist:
https://codeberg.org/sigil/slate
https://lisperator.net/ymacs/

Just imagine, Emacs but entirely implemented in webshittery. Including a dired-style filemanager with keyboard (and game controller) input support, and an eshell thingy so you can create html tables and shit from shell commands.
We have such websites to show you.
>>
>>109990839
>>109991236
What the fuck is a Urbit? Every time I investigate it all I can see is that there is a text-based image board and a load of nonsensical technical stuff. Reminds me of ATProto in that way.
>>
>>109983760
I think the logo is cool actually
gives me motocore vibes
>>
>>109986432
I thought Racket was cool until I realized that dispatching on native types (such as hash maps/vectors) requires a basic bitch cond expression.
>>
File: match.png (426 KB, 1260x3070)
426 KB PNG
>>109991971
>dispatching on native types (such as hash maps/vectors)
The match form provides pattern matching against hash tables and vectors.
>>
>Rust rewrite of Emacs consumes twice as much RAM as my BLOATMAXXED Doom config
Rust sisters?? Did zero cost abstractions mean copying everything on the heap???
>>
File: 1787047239930099.jpg (97 KB, 812x1024)
97 KB JPG
>>109983565
>>109990839
>>109991364
Reminder to all urbitniggers that your master Curtis Yarvin murdered his wife so he could have an open affair with Peter Thiel's troon groupie pictured here.
He also hates lisp, as >>109991236 pointed out. Now go fuck off and create your own thread.
>>
>>109990531
>>109991419
>Web browser based emacs
This would be pretty cool, except for the fact that browserniggers take up some common shortcuts beginning with CTRL that you can't disable (not easily at least):
https://lisperator.net/blog/ymacs-reloaded/
>Ctrl-w kills the tab and you cannot disable nor configure this.
>We are powerless against this insanity, of course. Ymacs doesn't even get notice that Ctrl-w has been pressed.
>>
>>109991419
>We have such websites to show you.
Kek
>>
>>109991236
Ignore the retard and just report him for either offtopic or advertising whenever you can.
>>
>>109993316
Yep. If you want to seethe about Urbit or Yarvin, you should go back to plebbit.
>>
look at how beautiful my shitlang is
(defnl transform [x]
{:hello "hello"
:world "world"
:original x})

(defnl main []
(defnl go [counter item]
(if (< counter 100000)
(go (+ counter 1) (transform item))
item))
(let [counter 0]
(go counter {})))

(main)

one more month of iteration and it's going to be actually good
>>
>>109979680
cute scrupper
>>
>>109993300
Yeah, I wouldn't try to emulate Emacs' default keyboard shortcuts, other than M-x. I'm not a fan of them anyway.

I would make it a modal editor, where
Insert Mode uses the shortcuts the browser comes with (C-v, C-c and so on) augmented with keybinds inspired by VS-Code,
Normal Mode as well as most apps (I'd want at least a Ranger-style file manager, structural editors for json and csv, and a magit clone) use keybinds mainly taken from Helix/Kakoune,
and then you'd have a Spacemacs-style leader menu.
>>
File: 1791171280853703.jpg (52 KB, 480x480)
52 KB JPG
mfw just realized haskell functions are all basically fancy lisp macros due to lazy eval
>>
>>109993495
>defnl
I swear to god there is something wrong with people for this to be so normalised. Scheme is so beautiful in how it's keywords are all just words, none of this contraction nonsense. Though for lisp, the obvious answer to me has always been to add a syntax for lambda that way you don't need special expressions for defining functions.
>>
>>109994958
then why does Template Haskell exist?
>>
How is clojure for game dev?
>>
>>109994958
>haskell functions are all basically fancy lisp macros due to lazy eval
No, not exactly. A macro receives its arguments unevaluated, not lazily evaluated. Lazy evaluation means that something gets evaluated later (as if it were wrapped in a thunk), not that it does not get evaluated at all. Macros, like fexprs, don't evaluate their input (unless they explicitly call eval). Rather, macros rewrite their input to something else that may or may not get evaluated (a macro call could expand to another macro call, which could expand to yet another macro call, which in turn could expand to a special form with idiomatic syntax).

As an example, consider if and cond. if can be implemented as a lazy function, because all of its arguments can be treated as expressions to be evaluated later, i.e., lazily. To convince yourself of this, all you have to do is write your own if-like function whose inputs are thunks, and then you decide which thunk to force depending on what the condition thunk evaluates to. But cond cannot be implemented this way, because its arguments are not expressions, but cond clauses, which is a piece of syntax that has to be rewritten to something else before it can be made sense of. If you want to implement your own cond, you can do it by writing a macro that rewrites the cond expression to an equivalent if expression, and then that if expression gets evaluated whichever way you prefer (lazy function/special form/fexpr).

>tl;dr: Macros can implement some things that lazy functions cannot.
>>
File: sfsim.jpg (103 KB, 920x430)
103 KB JPG
>>109996401
CLJoyful
https://www.wedesoft.de/software/2025/09/05/clojure-game/
https://github.com/wedesoft/sfsim
>>
>>109996401
not great, unless what you want to make is a 2D game that you want to write in ClojureDart (but ClojureDart itself is kind of pointless outside of some very specific usecases imo)
>>
File: spacewar.jpg (269 KB, 2490x1337)
269 KB JPG
>>109996401
>How is clojure for game dev?
Uncle Bob wrote a space shooter in it:
http://cleancoder.com/space-war
https://github.com/unclebob/spacewar
>>
>>109997075
the performance is pretty bad desu
Not saying it's necessarily the fault of Clojure.
>>
>>109997159
It literally is the fault of clojure. Clojure always has been slow as balls. But also, clojure is not lisp. It's a toy wrapped in a lisp uniform.
>>
>>109997075
Looks more fun than that flopped Kandria game written in CL. CLfags really need to make better games in CL.
>>
>>109997197
>It literally is the fault of clojure.
It literally is the fault of Robert Martin. He is a grifter snake oil salesman. He can't program, he never knew how to program. It's no surprise he went all in on ai agents. Not saying there is something wrong necessarily about using agents, but the reason he did it is because he is a talentless hack.
>>
>>109998406
Then how come every programmer has read his book?
>>
File: 1780357041520646.png (120 KB, 640x593)
120 KB PNG
>>109998612
>>
>>109998612
they have? i must have missed the memo
>>
File: 1791188784408066m.jpg (67 KB, 1024x880)
67 KB JPG
>>109998612
he's a good writer and speaker/presenter. His books are a mixture of common sense, some decent advice and a lot of utter nonsense.
>>
>>109998612
His main book, Clean Code, is basically the clearest manual to get up to speed with 2000's/2010's era corporate slop coding practices designed to get somewhat useful code out of large teams full of jeets using Java/C#.
>>
File: cleancode.png (204 KB, 1042x1835)
204 KB PNG
>>109998627
Most of his points aren't too bad
>>
>>109998919
The biggest problem is that some of the techniques, when naively applied, have a potential for introducing new bugs.
>>
>>109998950
whenever i bring this kind of shit up at work i just get "erm le premature optimization is le root of all evil"
splitting shit up into a gorillion functions with redundant and unnecessary work that i have to sift through does not make code more readable
>>
File: ousterhout.png (243 KB, 1150x2280)
243 KB PNG
>>109998998
I think part of the problem is that Martin is overly fond of methods that do their work entirely by side-effect:

increaseEachPrimeMultipleToOrBeyondCandidate();
if (candidateIsNotOneOfThePrimeMultiples()) {
registerTheCandidateAsPrime();


When you have a lot of methods like that, the code becomes increasingly difficult to follow. For comparison, pic related is Ousterhout's implementation, which has only a single method and no field variables.
>>
>>109999235
>overly fond of methods that do their work entirely by side-effect
yeah, and to me that's the exact opposite of clean code, it's peak oop java sir shittery
input -> function -> output is one of the core principles of computation
all the shilling for his book just seems like cargoculting to me
maybe i'm too fpbrained to understand the appeal of this kind of code
>>
Cause I see parenthesis all around me as I try to understand what makes Lisp do the things it does to everyone around it. And I bet you'd never know...
>>
>>109998950
I don’t know how these people get these ideas.
I worked with a guy that took thousands of lines of my completed code, turned every test (i.e every if statement) and put it in a separate function in a separate file. Every one.
He couldn’t figure out bash programming, and refused to look at examples of well written code.
>>
File: 1760418820774103.jpg (77 KB, 1024x1024)
77 KB JPG
I've been thinking about... going back to Nix...
>>
>>109999809
just use Fedora Kinoite
pic related is me waking up before logging into my Fedora Kinoite machine
>>
>>109999835
I like declarative systems, but I don't like when I fail to figure out how to make things work...
>>
File: soystemd.png (20 KB, 1353x550)
20 KB PNG
>>109999809
>>109999835
>ꜱoystemd
>>
>>109979569
>https://github.com/eNotchy/4g
* I just pushed a new version
** you can now use Org headings in posts without messing up the document structure
* inside of code blocks, lines that look like Org headings should get escaped with a comma
Any asterisks * in the rest of the code should be left untouched, and evaluation should work as normal
>>
File: 4g0.9.5.png (34 KB, 1142x324)
34 KB PNG
>>110000151
>>
>>110000126
What can a nigga do when he needs docker containers with working nvidia drivers?
>>
>>110000316
I think I kinda managed to get that working on Guix a while back, but I've since switched to AMD to spare myself NVIDIA pain.
>>
>>110000437
I just had a really good deal on a friends nvidia card and it'd be stupid to say no. I wish freetardism was more "do the best with what you have" instead of "buy this single FREE AS IN FREEDOM wifi card or youre literally hitler and we'll NEVER EVER EVER help you out because your evil incarnate".
>>
>>109997571
Alright I’ll give it a shot
>>
>>109997571
Kandria's pretty fun, it's just that it's one of a billion in a sea of indie games just like it, most such games flop.
>>
>>110001533
kandria is fun, i have 8 hour on it, it more fun if i startup emacs and "modify" while it run
>>
>>110001833
Dime a dozen shitgame but with shitskins and trannies. 0/10 would not even watch gameplay of.
>>
>>109990407
>Does anyone here know if there are decent "small emacs" editors like qemacs or mg, but with an extension language?
There's Lem. Written in Common Lisp

>>109991481
>What the fuck is a Urbit?
Feudalism recreated in cyberspace

>>109993495
>defnl
What the fuck is that supposed to mean?
Define...l?

>>109997571
>Looks more fun than that flopped Kandria game
Well it was made by a troon
>>
File: 1787988412277818.png (340 KB, 1876x1008)
340 KB PNG
>>109999835
>homosexual man uses DEI software
what a shocking turn of events
>>
File: 1790158136147504.jpg (69 KB, 680x680)
69 KB JPG
>>110002300
well it created by intelligent being not some
"Auto Text Generator"
>>
>>110003435
>intelligent
Obviously not
>>
>>110003228
>There's Lem. Written in Common Lisp
Lem is not small, and it was a pain to compile last time I checked. I basically had to run it inside a docker container to make it work
>>
https://coalton-lang.github.io/20260424-mine/
Cute TUI
>>
Just read actual Lisp code from the early 90s at latest. It was absolutely niggerlicious and so imperative it might as well have been Fortran.
>>
>>110005256
Still is. The thing about lisp was never a programming 'style' but a developer experience.
>>
>>110005256
i think a lot of emacs code is like that
>>
>>110005256
It took me like a decade to give lisp a shot again after bouncing hard off of junk in https://www.cs.cmu.edu/Groups/AI/lang/lisp/0.html
I did have access to https://www.norvig.com/paip/README.html which is much higher quality but less useful without the context of the book.
>>
>>109998406
>It literally is the fault of Robert Martin. He is a grifter snake oil salesman. He can't program, he never knew how to program
based
Robert Martin "Uncle Bob" should be tortured, then shot, then tortured again just in case. He's the scum of the earth.

>Then how come every programmer has read his book?
Millions of flies are attracted to shit, i guess shit must be delicious then.
>>
I don't like Clojure much but I like how it kinda associated lisp with functional programming again
>>
>>110007684
>Robert Martin "Uncle Bob" should be [blah blah blah]
No, he shouldn't. His mistakes should be calmly pointed out and be refuted with facts and logic, and that is all that should ever happen.

Angry and stupid attitudes like yours were the cancer that killed comp.lang.lisp.
>>
Usenet was cool in the late 1990s when the general public (let alone the turd world) didn't have internet access yet.
>>
File: gacha.no-gacha.jpg (1.32 MB, 3840x4320)
1.32 MB JPG
>>109999999
>>110000000
>>
File: 1788979394379808.jpg (41 KB, 730x730)
41 KB JPG
EVERY DAY ANOTHER FUCKING PROBLEM TO CODE AROUND
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
and I have a headache, just popped an aspirin
>>
>>110008073
>His mistakes should be calmly pointed out and be refuted with facts and logic, and that is all that should ever happen.
This has already happened, multiple times in fact. All he could do in response was using sophistry. For a recent example, see the exchange between Robert Martin and Casey Muratori. Please stop defending Martin. He and other grifters literally ruined millions of programmers with their retarded ideas.
>>
>>110000151
it works. god bnless
>>
>>110009826
what's so bad about your functions doing one thing and keeping things separate and neat?
>>
>>109999835
you look hot bro
>>
>M-x c
>”Right you are, Ken!”
>>
>>110009826
>Please stop defending Martin.
I am not defending Martin per se, but rather pic related.
>>
>>110010448
The way he means it is retarded. He basically advocates for functions that do basically nothing. See on YouTube "object oriented programming is embarrassing" by Brian Will, in particular the sections where he reviews Martin's code. It's literally the most over engineered garbage ever written. It's embarrassing to watch.

Also, to point out another big damage he did to programming, look here: https://agilemanifesto.org/authors.html
>>
>>110011421
That video’s creator seemed retarded too. There is a point to what Martin tries to do but Bob Martin is also a retard so it comes out mangled. He’s clearly trying to emulate the SICP style but Bob is an idiot and read SICP and seemed to think it was a book about functional programming in the same way an idiot thinks Moby-Dick is about a whale. He emulated the SICP style where you’re just trying to build modular abstractions to make everything nice and easy but it doesn’t seem to work well in Java for reasons I don’t understand because fortunately I’ve never had to use Java.
>>
>>110011421
>agile manifesto
Heh
>>
Will a naive homemade Lisp interpreter be fast?
>>
>>109997197
No, it isn't, I profiled it. He built on a library called Quil that uses reflection (satisfies?) On the hot path. It sucks. That's the bottleneck.
>>
>>110014243
No, a naive forth interpreter would be though.
>>
>>110014267
Caused by clojure
>>
>>110014281
>he doesn't know about type hinting
you can get Clojure going faster than SBCL in quite a few scenarios purely because the JVM has far more man hours put into optimizing it
>>
>>110014752
>Clojure going faster than SBCL
Retarded or profoundly demented?
>>
>>110014853
less retarded than you obviously
https://web.archive.org/web/20161125094132/http://benchmarksgame.alioth.debian.org/u64q/clojure.html
note that they removed Clojure from the Benchmarks Game, so in modern times Clojure will be going even faster due to JVM improvements.
>>
>>110015306
>clojure is significantly slower than java
>that means sbcl, which is consistently much faster than java, is slower than clojure
Profound retardation: confirmed.
>>
>>110015442
https://madnight.github.io/benchmarksgame/lisp.html
this link shows Java going faster than SBCL 6--3
I'm done arguing with you. post code
>>
>>110015501
>0.04 is higher than 0.34
>1.78 is higher than 3.13
Schizo status: meds untaken.
>>
>>110015522
>he doesn't know what a scrollbar is
>>
>>110015541
I accept your surrender.
>>
I like Clojure but I can't ever justify actually using it for a project.
>>
>>110015306
These are nearly meaningless
>>
>>110016535
why? I learned Clojure after years of many languages and now writing anything but Clojure makes me want to never touch programming again.
and I'm never limited by ecosystem-related concerns
>>
>>110017416
correct, large codebases are often faster on the JVM due to its aggressive JIT
>>
>>109995072
>>110003228
it's define function (local), same semantics as 'local function' in Lua
>>
>>109979569
I've seen this cat in old flashes.. 4chan city?
>>
>>110017424
Imagine being unironically this profoundly retarded lmao
>>
>>110018279
imagine shitting up a thread with an unsubstantiated opinion
why even post if you are not going to use the textbox to convey your thoughts?
>>
>>110018329
Take the L javajeet
>>
>>110017419
I like clojure's ergonomics. It has a lot of nice things and I enjoy programming in it. But not as much as in common lisp, because I hate languages that tell me how I should think and how I should program, that treat me as a retard.
> mutation bad
> global state bad
> oop bad
> capturing a free variable in a macro bad
> etc etc
Please, stop caring about me. Let me shoot myself in a foot when I need to.
>>
>>110018612
Forced FP kinda makes sense if you're doing concurrency-heavy work
>>
>>110018750
Not really. Just have decent thread-safe data structures for things that need collaborative updating, and try to architect for shared-nothing as much as possible.
I like functional data structures but their benefits for concurrency are overblown. Use more concurrent queues in your architecture, but such queues will likely be mutable.
>>
File: 1791312370149792m.jpg (100 KB, 688x1024)
100 KB JPG
>>110017419
>why?
because the only thing it's good for are large long-running web backends.

The long startup time, high memory usage and Java runtime dependence make it a hard sell for many usecases like CLI utilities or standalone desktop apps. The lackluster performance and inconvenient access to low-level data and interfaces (compared to something like Rust) excludes it from others.

>Babashka
much slower, doesn't support nearly as many libraries
>Graalvm
a nightmare to deal with, many libraries don't support it.

CLJS would've been interesting 10 years ago but now much of it is outdated and can't even interface with the modern JS ecosystem, the build tooling and especially the Closure compiler are nightmare fuel. Trying to use it instead of plain JS for websites is more pain than it's worth.

For all the other compilation targets, support is so immature, incomplete and buggy that it's barely worth mentioning. The good part about JVM Clojure is that is that you can use it without knowing any Java, but all the other runtimes have you dealing with the host language so much that the "learn once, use anywhere" benefit I've seen touted by Clojure fans is just a lie, you have to learn the host languages in addition to Clojure.

ClojureDart works at least, but by using it you give up much of the excellent tooling and documentation that make Dart worth using in the first place, for very little benefit. Much of what CLJD brings to the table can be replicated in native Dart by using persistent data collections from a library, using dynamic types in the few places where static typing is inconvenient, and relying on records and named types instead of classes. I've been using Dart a lot since ironically being introduced to it via CLJD, but the only time I added CLJD to a real project was for a small web backend where I wanted to use Hiccup syntax instead of dealing with HTML, but web backends are a really niche usecase for Dart since it doesn't even support multithreading.
>>
File: HUGOepCaIAAoJnr.jpg (722 KB, 2159x3352)
722 KB JPG
- For a while, I've been wondering what the equivalent of bash's !$ (or last argument) was.
- In eshell, it's $_.
- Furthermore, it can be indexed like an array.
- It also supports negative indices like Perl.

echo a b c d e
echo $_ # e

echo a b c d e
echo $_[-1] # e (same thing)

echo a b c d e
echo $_[2] # c (so it's 0-indexed)
>>
>>110019825
$ length $auto-mode-alist
299
$ echo $auto-mode-alist[-5]
("\\.tgz\\'" . tar-mode)
>>
>>109979569
Thread theme
https://youtu.be/SDJ-MVYjv7U?si=-BXXo9jOROIPgxNp
>>
>>110019372
>because the only thing it's good for are large long-running web backends.
That's like 90% of things being made...
>>
>>110020005
I mean if you have a reasonably secure Clojure backend job for me, I'll take it
>>
>>110015501
now show me two real codebases comparing both
>>
>>110020005
Tech is an industry that's 90% water by weight, so that means literally fucking nothing.
>>
>>110020135
>secure
>job
>in current year
We're past that age anon. Corposlop no longer needs to hire
>>
>>110018027
lurk moar
>>
>>110023061
I will lurk less actually thank you very much
>>
File: hrm.jpg (57 KB, 1080x561)
57 KB JPG
>>109979569
is that a Human Resource Machine reference I see there?
>>
>>110018027
https://nonexistentfandomsfandom.neocities.org/AAcats/cast
>>
>>110014853
Writing Java like C runs faster than C. The JVM's JIT is amazing regardless of what you think of Java as a language. Clojure is overall slower than SBCL but there are definitely cases where it's insanely fast. Pretty much all JVM languages are like that.
>>
Coalton is funny basically someone wanted typeclasses in common lisp for their very very specific use and couldn't do it without making a whole new language inside it
>>
>>110025178
My fucking sides!
Do the needful saaar do not redeem the java sar!
>>
>>110026448
Could do it but was too gay to do it more like.
>>
File: 1780119770032883.jpg (13 KB, 512x512)
13 KB JPG
>>110025178
>Writing Java like C runs faster than C
You can literally implement the same exact optimizations the JVM implements but in C, and without a garbage collector.
>>
hmm I don't like OOP time to make structs and dispatch on them with typecase
>>
>>110028489
This but ironically.
The horrible thing about the object orientation is the stateful objects.
>>
>>110027678
no actually, you would need to use asm. this stuff involves branch prediction using stats from previous runs and different forms of inlining. you need profile guided optimization for static lang like C.
>>
also this thread should stop talking about performance in such stupid ways, because it really is a waste of time and attracts some of the most useless, no-coding idiots that exist on the planet to spout absolute nonsense that they learned about a week ago and now think they understand things better than devs in the shit for a decade.
>>
>>110029822
Proof that javajeets aren't human, and worship cow shit because it really is above them in the intelligence hierarchy.
>>
File: JPL_Deep_Space_I.png (179 KB, 800x267)
179 KB PNG
>>109996729
>>109997075
>lisp
>space
Nice.
https://corecursive.com/lisp-in-space-with-ron-garret/
>>
Hello anons, I want to ask you a question (I swear it's not bait: I just want to understand the arguments): why is emacs lisp, and lisp in general, a better extension language for emacs compared to non lisps? Like why can't we have something like python? In python you can redefine variables and functions on the fly too; you can have a repl too. The only actual advantage of elisp I can think of are the macros. But even then: are they really that useful? Python seems to do just fine without. I'm also not convinced that homoiconicity is that useful. I mean lisp syntax makes it easier to implement editor tooling I guess, but modes for other languages work as well as lisp modes.
I'm not an expert at elisp, but any time I write something in it, it feels basically like a weird python; they are both dynamic imperative languages at the end of the day. So what's the advantage of elisp in emacs?
>>
>>110031683
Interactive development was amazing back then and it is amazing now. And yet, it doesn't seem to have caught on in the way you'd expect. While other languages have REPLs too these days, they aren't really geared towards interactive development the way Common Lisp is. Conversations like pic related show that people still don't "get it".

https://www.youtube.com/watch?v=PUv66718DII
>>
>>110032590
Lisp syntac is objectively simple. That makes it easy to learn and easy to write tooling for.

>you can have a repl too.
but a repl in a non-homoiconic language is less useful. I can write an emacs expression and paste its output directly into my code.

>macros. But even then: are they really that useful?
Sure they are, especially in a long-lived project like Emacs. Macros let you implement language features which in Python you'd have to beg Guido to do it for you.
>lisp syntax makes it easier to implement editor tooling I guess, but modes for other languages work as well as lisp modes.
Correct, using Lisp meant that the devs were able to make good editor tooling with less effort and more quickly, and it's more efficient to parse which means you spend less CPU time on that too. These are all good reasons for using Lisp.

>Python is doing just fine
Is it? Look how inconsistent it is, how every update introduces a bunch of new syntax you have to learn. That's how you get shit shows like the switch from Python 2 to Python 3, which some projects haven't managed to do even to this day. You wouldn't want this in something like Emacs.

elisp is older than python yet it never had a traumatic incision like that where suddenly all the extensions stopped working until they were ported from elisp2 to elisp3.
The basic syntax always stayed the same, the same as Lisp has been since the late 50s. There's 30, 40 years old lisp code running in my emacs right now, and I can read the code from 1991 just as easily as the code from 2021.
What syntax changes there were happened mainly through macros, which were thought up by extension authors and then organically became more widely used, until they were included in the base language.
>>
>>110032629
it's funny because i can't even see any of my colleagues taking proper advantage of it with clojure even though most of them have been working with it professionally for 6-10 years
i always get wide eyes when i jump to an external library function, change it and re-eval it for debugging purposes, and that's one of the most basic uses of it
>>
>>110032590
The advantage is that it's builtin.
It could be js, lua or python.
Lisp is more extensible that any of them because you can introspect and edit everything.
Functions in js, lua and python need hooks if you want to put behaviour inside, so you need to design with that in mind, or override the whole thing to inject your hooks. Which works as... expected when many people have to override everything multiple times.
>>
>>110001128
I mean yea but in this case you are making yourself suffer. The money you save by purchasing NVIDIA is less than the time you lose.

>>110017998
So why not have a nice and easy word like “define” which you can then amend with “define-public” when the definition is not local? Assuming that square bracketed lists are syntactically distinct, you can use the same forms for functions as values, by just checking to see if if the third argument is one such list.
>>
File: lambda.png (81 KB, 910x480)
81 KB PNG
>>110032590
>The only actual advantage of elisp I can think of are the macros.
I would politely suggest that we defer the discussion of such advanced topics to the day that Python finally gets proper lambdas in place.
>Python seems to do just fine
No, it does not. It is mired in weird design decisions like pic related. There is absolutely no good reason at all why the function body of an anonymous function should be limited to a single expression only, but that is what one has to live with in Python because the powers that be have decreed it to be just so.
>I'm also not convinced that homoiconicity is that useful.
Consider this, then. If Lisp's lambda form came with such a limitation, the user could easily write a macro to work around it. Of course, this exercise would quickly show how ridiculous such a limitation would be, and so there would be no point in retaining it.
>>
>>109980738
Absolutely unreadable garbage.
>>
>>110033526
Absolutely unreadable
Um, no?

Though one could simplify it even further with a pattern matching macro, like it is being done here:

https://www.youtube.com/watch?v=OyfBQmvr2Hc
>>
>>110033526
lmao this retard doesn't understand if-else
>>
Well you didn't mention anything better that Python would bring on the table other than "why can't we settle on less?"
If you're thinking of an alternative for elisp that's Lua which neovim uses (it's faster)
>>
>>110033507
>There is absolutely no good reason at all why the function body of an anonymous function should be limited to a single expression
Everytime Guido is asked about this, he responded with a "you must have come from scheme hehe" its gimped on purpose
>>
>>110033507
>Python lambdas
I didn't think about them kek. Yes that shit is retarded, and Guido is reddit in the flesh.
>>110032837
>Sure they are, especially in a long-lived project like Emacs. Macros let you implement language features which in Python you'd have to beg Guido to do it for you.
I didn't consider this. You'd have to extend the elisp c engine every time you want to introduce something as simple as dolist, and you would have to ask permission to the emacs developers.
>Is it? Look how inconsistent it is, how every update introduces a bunch of new syntax you have to learn.
Yes I didn't consider this. I don't notice it because I'm so used to python, but it's objectively shit and it's way more complex than elisp, both in syntax and semantics.

Overall, you >>110032837 and >>110033507 convinced me about syntax and macros, but I'm still not convinced about the repl and the fact that lisp is the only language that allows emacs to be "modified while it's running". For instance, when I code in python, I launch the repl with C-c C-p (run-python), which launches a python interpreter in its own buffer. Then I can send functions with C-M-x (just like elisp), and all the usual shortcuts to send code to the repl work. When I get something wrong in a function, I fix it and send it again to the repl so it gets redefined. You can even send the whole file with C-c C-c (just like eval-buffer in elisp). So what exactly am I missing here? I don't see why we couldn't have emacs-like facilities in a dynamic language like python. Maybe this could be done even in a static language like ocaml (or can it?).

>>110033093
>Hooks in python and other languages
You mean that other languages don't have mechanisms like advice-add or add-hook? Can't you use decorators in python instead of advices? And hooks as far as I know are just for loops at the end of each "hooked" function calling each hook in the hook list; why can't this be implemented in python?
>>
>>110034509
I was referencing python just because I know it and it's similar enough to lisp I think. I don't know lua. Last time I looked at lua i remember it being weakly typed garbage.
>>
>>110032629
An interpreter and a repl are not actually the same thing. Also lol at this retarded orange redditor having a melty over things that he doesn't do in python but claims to do just so he can try to stick it up to lisp, even though he has no idea what lisp is or does.
>>
>>110035306
>So what exactly am I missing here? I don't see why we couldn't have emacs-like facilities in a dynamic language like python. Maybe this could be done even in a static language like ocaml (or can it?)
There's not much difference here also utop in Ocaml is also pretty good
>>
>>110033080
Because clojurse is not lisp. It's the same in most (but not all) schemes. Only big-l Lisp can do these things correctly.
>>
>>110035344
>python
>any similarity whatsoever to lisp
You're high on your own farts, buddy.
>>
>>110035535
>Python is a good enough lisp
>t. Peter Norvig
>>
>>110035546
He's a sell-out, by the time he said that he was already nothing more than a paid mouth.
>>
>>110035546
He said python is better for small things that could be pseudo code and lisp for larger things
Which is objectively correct
>>
>>110035306
>that lisp is the only language that allows emacs to be "modified while it's running"
Apart from changing the language itself as we discussed with macros, it's not. As e.g. Neovim shows, you can do much of the same stuff now in other languages like Lua, Python or JS (in fact I may start a browser-based Emacs-like work environment as a hobby project soon), but keep in mind how old emacs and lisp are. Python, Lua and JS did not even exist yet when Emacs started in the mid-80s, and the entire concept of a garbage-collected language was new when Lisp was invented. Lisp is where these later languages took many of their features and concepts from. JS was in fact designed by Eich as a Scheme dialect and later changed into a Java abomination for marketing reasons.
>>
>>110035893
None of these languages allow the editor itself to be modified, they only allow extensions at fixed extension points. You are retarded.
>>
>>110035909
>they only allow extensions at fixed extension points
so does elisp, at some point you have to go to the C source to implement things

>You are retarded
tell that to the mirror
>>
>>110036039
>so does elisp
You can rewrite anything the elisp layer has. If emacs itself was written in elisp (or real lisp which would be 1000x faster on top) it would be possible to rewrite everything anywhere anytime. That is absolutely a big miss on emacs itself. But I guess the best analogy is the extension points are discrete for vim and continuous for emacs.

You are retarded.
>>
>>110033080
I did that in Racket and later sent my changes to the external lib as a patch :D
>>
>>110036068
You could make the same argument for neovim
>If neovim itself was written in lua it would be possible to rewrite everything anywhere anytime.
>>
>>110036543
No, it wouldn't, because lua does not work that way. That's the whole point. You walk straight into it.
>>
>>110036068
>You can rewrite anything the elisp layer has.
And?
Browser-based editors let you rewrite everything the JS/HTML layer has.
>>
>>110036599
No because they rely on a backend that's kept separate, but in principle you are correct.
What of it?
>>
I have another question to you anons: what's the actual advantage of dynamic typing (like lisp) compared to static typing? I know many advantages of static typing, like it spots immediately typos in variable names, you can refactor code assisted by the compiler, you can modify a function signature and immediately get errors in all places where it was called etc. So what's the actual advantage of dynamic typing, particularly in lisp?
>>
>>110037433
Dynamic code is often extensible in more ways than static code, the issue being that the full scope of these ways is rarely written down and once it is you effectively have unchecked static typing. It's also the case that there are some things you can't actually do without access to dynamic typing, though many languages get around this by having a dynamic escape hatch (think Object in Java).

The truth is that dynamic typing in lisp and similar languages is basically an accident. It was discovered fairly early that values on a garbage collected heap need to know their own type, so why bother with the annotations? The concept of types as a method for software correctness didn't really exist yet. You had C where everything was an integer and people chucked around void pointers everywhere, then lisp where types were fully checked at run time. A type system like Haskell that ensures invariant of the program didn't really exist conceptually at that point and types were mainly a formalism that allowed your code to compile by telling the compiler about the bit widths of registers.
>>
>>110037433
Dynamic typing helps with upgradability, maintenance and refactoring. You have to write less (in complex programs SIGNIFICANTLY less) code to "just make things pass the checks" even before you can test features.
The theoretical down side is that the type checks can cover bug classes, but there's no evidence they are materially real (meaning that dynamic language codebases do not have more bugs of any class than static language codebases of comparable size made by comparably skilled devs), and types can act as documentation (but that stops being the case in large programs as types are too aliased to reason about in this way).
>>
>>110037433
>>110037485 (Me)
I should add that most of the modern justifications you see for dynamic types are cargo cult bullshit. People who got used to them didn't want to change and had to come up with a load of reasons why the absence of formal verification in software is actually a good thing and most of these attempts fail. You'll hear vague claims about prototyping and how it type signatures are a waste of space and a load of other bullshit like that which has never really been an issue anyone who is proficient in with statically typed code (and has an IDE that can do things like find and replace and variable rename).
>>
>>110037485
Not true, ML dates back from 1973, but its precursor, ISWIM, is from 1968.
>>
>>110037510
You mean against dynamic types, not for. There is no modern "justifications" for dynamic types, everyone's pretending static types are the only way to go and then get caught into all kind of knots for this. In particular, dynamic type advocates will specifically point out that types are not formal verification, and if you're going to do verification anyway you don't need static types. Static typists routinely pretend otherwise. You have a lot of things very backward.
>>
>>110037520
Lisp was invented in 1958 and properly type-checked code was not really mainstream until the 90s.

>>110037532
All usable dynamic code bases have documentation of the types of functions. The only difference is that they are arbitrarily written in a language the computer cannot understand (English) and so less useful than types written in a language the computer can understand. Dynamic typing is strictly inferior for this reason. No one is pretending that static typing is full formal verification, but it is better than no verification at all.
>>
>>110037562
>1968 is in the 90's
>C was invented in 1958
Get your brain checked, you must have a parasite living in there.
>>
>>110037572
You are seriously trying to claim that ISWIM was a mainstream language in 1968?
>>
>>110037577
No argument I see.
>>
>>110037586
My argument, as stated previously, is that strictly typed languages did not get popular until the late 80s and early 90s. Your response that ISWIM came out in 1968 which doesn't at all address the point being made. The vast majority of people picking up lisp were doing so as a replacement to C, Fortran, or assembly.
>>
>>110035306
>For instance, when I code in python, I launch the repl with C-c C-p (run-python), which launches a python interpreter in its own buffer. Then I can send functions with C-M-x (just like elisp), and all the usual shortcuts to send code to the repl work. When I get something wrong in a function, I fix it and send it again to the repl so it gets redefined. You can even send the whole file with C-c C-c (just like eval-buffer in elisp). So what exactly am I missing here?
You can indeed do some basic interactive development in Python, but what you are missing out on is what it would look like if Python took the paradigm of interactive development all the way to its logical conclusion, the way it has been done before in Common Lisp. For example, it should never be necessary to re-evaluate the whole file (even if it may seem convenient); one should be able to redefine any part of the code, re-evaluate that single part, and have it work. With function, simply re-evaluating the definition works, but with classes, the language needs to know how to redefine them (>>110032629).

Then there is interactive debugging, a topic of its own which is also borne out of the interactive paradigm. If something goes wrong (whether it be because of a bug in the code or, say, because the Internet connection was briefly lost), it should be possible to resolve the problem on-the-fly and resume execution. Pic related contains some attempts to explain this functionality and its benefits.

>tl;dr: Common Lisp is still ahead even in 2026, and I wish other languages would catch up instead of making "good enough" excuses.
>>
>>110037562
>All usable dynamic code bases have documentation of the types of functions
Erlang has this external tool (Dialyzer) which checks your own types with static analysis
I wish lisp had something like that
>>
>>110037628
Lol
>>
>>110037754
Lisp compilers have type annotation and type compat checks natively.
>>
>>110037823
How would I write this type in Common Lisp?
f :: HashMap String t -> [String] -> [t]
>>
>>110037905
(: f (-> (hash-map string t) (list string) (list t)))
>>
>>110037532
Types are halfway to formal verification, the implementation of f : A -> B is a proof.
>>
>>110038984
I don't know what you're smoking but I want some of that.
>>
>>110038998
It's just shoddily stated Curry-Howard.
Logic ~ Types
Proposition ~ Type
Proof of the proposition ~ Value of Type
Implication A -> B ~ Function A -> B
Given A, A -> B then B ~ Build A -> B and you get the proof
>>
>>110039040
You're really dumb and you haven't thought this through at all.
Let's start with your garbage premise that types are halfway to formal verification. How do you determine the fraction point between types and formal verification? Is C typing just as half-way as an ML-style type system?
Is using a function defined as f: int -> int only within a more powerfully typed function not affecting the verification in any way to you?
>>
>>110036668
>they rely on a backend
you're wrong, browsers have had API's for file access for years, backend is optional for anything other than starting external processes now.

>What of it?
You claimed that being able to change every elisp part of emacs is somehow very special and not replicable with other languages. Browser-based editors prove that you're obviously wrong, and retarded.
>>
>>110039169
>browsers have had API's for file access for years,
Irrelevant.
> other than starting external processes now.
Congrats on your self-pwn.

Also not accurate. There are in-development APIs but only implemented partially in some very modern browsers. This is why people use the fake url trick to cause downloads, for example.

>Browser-based editors prove that you're obviously wrong, and retarded.
You can't modify the js engine itself inside the browser. You can do that in a lisp program (you can live-modify the compiler itself).
>>
>>110039100
>How do you determine the fraction point between types and formal verification?
It's a spectrum on how serious the system is on soundness escape hatches.
>Is C typing just as half-way as an ML-style type system?
No.
You can do MISRA C + CompCert to cover up for the unsoundness baked in the language.
>Is using a function defined as f: int -> int only within a more powerfully typed function not affecting the verification in any way to you?
It depends.
>>
So, have any of you written some cool programs in Lisp lately?
>>
>>110039222
So like I said, you have no idea and you think mashing random words you didn't even know 5 seconds ago will change things.
>>
>>110039349
Are you the kind of person that takes a Lean program that runs in 1 gb, put it in a chip with 256 mb, runtime crash it, and then say haha it's not well typed.
>>
>>110039520
You're really a big fan of digging your own grave deeper huh.
>>
File: mrh.png (2.21 MB, 1920x1200)
2.21 MB PNG
>>110039321
An anon in 2024 appears to have coded a game of some sort.
>>
>>110037532
I'm tired of you retards shitting up the lisp community. Dynamic types fucking suck.
>>
>>110040095
OK pajeet, no argument as usual. You can go back to your typescript wank webshittery and leave lispGODs alone.
>>
>>110040095
I use Clojure because it is about as dynamic as you can get, while also having trivial optimization when needed.
types are overrated for anything but performance. I've done lots of work with Rust btw.
>>
>>110040242
Yeah and the performance they buy you is everything. Of course when you have arbitrary predicates over symbols, which is trivially lowerable as a gradual type system for a lisp, you also get the ability to express contracts which is safety, and work with them composably and algebraically.

Dipshits hear SBCL is fast and then write zero type annotations and end up running worse than racket.

Stop fucking skipping the type annotations you fucking RETARDS.
>>
>>110040432
but performance is not everything. I do not write code, as a human, to go as fast as possible, unless going as fast as possible is my primary objective. I write code to produce cool shit. I've invented numerous algorithms at this point, and only one of them is meant to go as fast as possible (a hash table that outperforms Swiss Table with an implementation in Rust).
if your goal is to just do cool shit, something like Clojure will prevent all the ceremony of defining types and shit, and allow you to do WHATEVER, and I'm happy as long as my test suite passes, which you need in every fucking language.
>>
File: stressed.gif (902 KB, 498x280)
902 KB GIF
>>109979569
I'm losing my damned mind trying to architect my Guix systems. I have some shitty spaghetti code config on my machine, so I can actually use the thing, but I'm wanting to roll around on the floor screaming while trying to draw up UML diagrams and skimming random architecture/design books. Looking at Granin's "Functional Design and Architecture" at the moment to see if FP works better than OOP... In the end, it'll all pay off, but holy shit is it doing my head in right now
>>
>>110040432
Aschully sbcl is super fast even with no type annotations. You just need optimize 3 size 0, you can even keep debug on.
>>
>>110040792
How come programs are buggier than ever even though the habit of testing everything is relatively new? I.e. how come in the 70's and 80's, buggy code was everywhere, but the bugs were much milder and rarer in occurrence, despite 0 tests, while today there are tests everywhere and yet everytime you look at a program you find bugs by the hundreds?
>>
>>110042858
What do you guys use guix for?
jeepeetee says it's all package management stuff
That's all? Why would you need FP design patterns for that
>>
>>110042858
>Fell for the UML meme
>>
File: 1791617057494684.png (552 KB, 878x927)
552 KB PNG
>>110043186
>why did programs contain less bugs during a time when 98% of programmers were high-IQ White men
it is a mystery
>>
Fuck I was writing some sick Lisp code and I just ripped ass so hard I smelled what I had for lunch yesterday



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.