[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [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


Thread archived.
You cannot reply anymore.


[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 (Site)
https://github.com/emacs-tw/awesome-emacs (Awesome Emacs)

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

>Emacs Distros
https://spacemacs.org (Spacemacs)
https://doomemacs.org (Doom Emacs)
https://ergoemacs.github.io (Ergoemacs)

>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 (Introduction to Elisp)
https://gnu.org/s/emacs/manual/elisp.html (Elisp Manual)

>Common Lisp
https://lispcookbook.github.io/cl-cookbook (CL Cookbook)
https://cs.cmu.edu/~dst/LispBook (CL: A Gentle Introduction)
https://gigamonkeys.com/book (PCL)
https://lem-project.github.io (CL editor/IDE)
https://nyxt.atlas.engineer (CL Browser)

>Scheme
https://docs.scheme.org (Docs)
https://scheme.com/tspl4 (TSPL4)
https://eecs.berkeley.edu/~bh/ss-toc2.html (Simply Scheme)
https://archive.org/details/Schemer (Books)

>Clojure
https://clojure.org (Site)
https://clojure-doc.org (Docs)
https://mooc.fi/courses/2014/clojure (Functional programming with Clojure)

>Guix
https://guix.gnu.org/manual/devel (Guix Manual)
https://systemcrafters.net/craft-your-system-with-guix (Introduction to Guix)
https://gitlab.com/nonguix/nonguix (Nonguix)

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

>More Lisp Resources
https://paste.textboard.org/52b08691

(defparameter *alt-names* '(/emg/ /emac/ /lambda/ /lol/ /let/ /flet/))
(setf *prev-bread* >>100016159)
>>
File: drinkikuri.jpg (812 KB, 2400x2700)
812 KB
812 KB JPG
Fantastic.
https://www.softwarepreservation.org/projects/LISP/le_lisp/
>>
Finally some Lisp representation that's not CL Scheme Elisp Clojure
>>
>>100071071
werks on my macheen
>>
File: 1684172347518.gif (123 KB, 408x314)
123 KB
123 KB GIF
>>100071445
kurwa faakheda
>>
Is there any reason to learn lisp other than to use emacs?
>>
>>100071828
Yes.
>>
>>100071371
lispworks open source when
>>
>>100071445
>destroy
>attack
>die
>>
>>100071828
No.
>>
File: aida-macos.png (203 KB, 1440x900)
203 KB
203 KB PNG
>>100071371
>Le Lisp
https://github.com/c-jullien/lelisp
http://christian.jullien.free.fr/lelisp/lelisp.pdf
>>
>>100071828
a better question would be if there is any reason to use emacs other than to write lisp.

I guess Org-Mode and Magit are useful in their own right.
>>
>>100071828
Maybe.
>>
replaying works. now the novel work may commence
>>
File: MEDS.gif (2.56 MB, 1200x800)
2.56 MB
2.56 MB GIF
>>100072150
>suicide-note
Consult
M-x doctor
ASAP sir
>>
>>100072267
far too late for doctors
https://www.youtube.com/watch?v=IcYfWknChuo
>>
>>100071263
>picrel
(((You)))
>>
Weird feeling of feeling the need of something you can't describe
>someway for emacs to know my most accessed directories and projects
>make easier to open the most important files at startup, instead of C-x-f ~/projects/my-project-1 (...)
>possibly display this visually just at start
>also clean and fold my laundry
>>
>>100072267
im liderally using the pointy part of my parenthesis to cut myself rn...
>>
>>100071263
Ebin comic
>>
>>100071828
Perchance.
>>
has anyone built anything usable with lisp other than emacs (arguable) and hackernews
>>
>>100072742
Yes.
>>
>>100072742
grammarly uses SBCL in production and normies absolutely love it
>>
>>100072742
No.
>>
>>100072742
Maybe.
>>
>>100072742
Perchance.
>>
thread FAQ

- why doesn't lisp have static typing
because lisp doesn't exist statically. in the moment your first sexp is read by the reader, the program is already running

- has anyone ever built something with lisp besides emacs?
yes, such as grammarly and n-world

- is there any reason to learn lisp in (current-year)?
yes. lisp is so different from other languages you're bound to have a few "whoa, so you can do [thing] this way? I had no idea" and that will change slightly how you see all languages

- should I learn lisp from SICP?
no. SICP is not a lisp book, it's a computer science book

- should I read SICP?
yes. it's not black magic or anything but you will learn a lot of things from it


if you have any others pls add
>>
take the vaccine, goyim
>>
>>100072742
>https://allegrograph.com/
Graph shit used by 3 letter spooks. Also DART and other army cuck stuff, probably rewritten in C++ or Java sir.
>>
File: 1713428121359141.jpg (32 KB, 907x916)
32 KB
32 KB JPG
>>100066069
yes, it's hard, especially if you are trying to just do all the questions. i keep telling people this and they never listen. the book is not a self-contained course for auto-didacts. it was intended as a text book for a university course, which means that it implicitly assumes that all the university infrastructure (lecturers, teachers assistants, lectures etc) will be there to help things along. they will also tell you that some of the questions are much harder than others and take much longer. you can otherwise get quite discouraged because you don't know what you're walking into.

if you want to get the most out of it, follow the berkeley course that gets posted in this thread sometimes. it will help you dramatically, especially as the calendar for it gives you a reference timeline for what a full-time course looks like. a working week for one paper is ~15-20 hours, so that will help you keep track of how you're going. the lecture notes clarify a lot, and then it has model answers. otherwise the book is a rabbit hole that you can go down and get lost in quite easily.
>>
how do I use lisp to get a girlfriend?
>>
File: paredit_assert.webm (107 KB, 648x364)
107 KB
107 KB WEBM
>>100072913
>How do you keep track of all the parens?
You let the computer do it, via packages like parinfer, paredit and rainbow-delimiters.
>>
>>100072913
- should i just work through all the questions in SICP?
maybe. this can be quite difficult. it helps to follow a course instead, especially for first time programmers.
>>
I'd just like to interject for a moment. what you're referring to as SICP is, in fact, the textbook for MIT's 6.001, or as I've recently taken to calling it, MIT/SICP. SICP is not a computer science course unto itself, but rather the companion text book to a fully functioning computer science course made useful by the calender, weekly homeworks, labs and teachers assistants comprising a full university course as defined by MIT.

Many readers of SICP learn a modified version of the MIT course every day, without realizing it. Through a peculiar turn of events, the 2nd edition of SICP which is widely used today is often thought to be an MIT course, and many of its users are not aware that it is actually the original course plus a great deal of extra non-course material, developed by Abelson and Sussman.

There really is an MIT computer science course, and these people are using it, but it is just a part of the textbook they use. SICP is the textbook, the book that the course uses to allocate readings and topics to the students. The textbook is an essential part of a course, but it is useless by itself; it can only function in the context of the complete university course. SICP is normally used in combination with the course syllabus: the whole system is basically MIT 6.001 with SICP added, or MIT/SICP. All the so-called "SICP" students are really students of MIT/SICP.
>>
File: shrimple.jpg (245 KB, 1507x1240)
245 KB
245 KB JPG
>>100072956
Write her in LISP. Shrimple as that, faakhead.
http://xahlee.org/xa/pretty_girls_art_index.html
>>
>>100072956
use it to write a chatbot. start with peter norvigs paradigms in artificial intelligence programming, then forget all of it and fuck around with local models. then smoke a lot of weed, develope a drinking habit and sustain it by hanging out in bars. get drunk enough to start talking to random strangers and making cynical conversations about real-world bullshit. realize that now your painful self-consciousness is now gone and that you're habitually talking to women without fear of rejection or interest in their negative opinions of you. find yourself exchanging details with a woman without negative opinions of you and arranging to meet with them at a later date. continue to do this and discover that you gravitate to a particular woman who mutually enjoys your company. have sex with here. congratulations, you have now used lisp to get a girlfriend.
>Verification not required.
>>
File: 1702304566901036.gif (1.58 MB, 250x250)
1.58 MB
1.58 MB GIF
>>100072913
THEY CREATED NIGGERS WITH LISP????
>>
>>100073160
it's hard to talk about n-world seriously
>>
File: 1711173079439574.png (144 KB, 251x361)
144 KB
144 KB PNG
>>100073160
bro never heard of mike tyson
>>
>>100072913
>n-world
built in 1990
>emacs
built by hitler in 1942
>no lisp software since then

grim
>>
>guile web client http-get does not like guile's escaped strings
>string is scaped correctly but they still send the \" in the request
>API I am querying uses " " as way to specify an exact match
I guess I will just die then
>>
>>100073549
>string I want SENT "www.mydickandballs/hairyass?q="big+ass+hole""
>string this dumb fuck sends: "www.mydickandballs/hairyass?q=\"big+ass+hole\""
>>
>>100073597
What I am trying to do:
(http-get (format #f  "rest-of-url/?q=\"~a\"" "big+ass+hole"))
>>
>>100073639
What you need
>Jesus
>>
>>100073639
(http-get (format #f "rest-of-url/?q=~a~a~a" "\"" "big+ass+hole" "\""))
?
>>
>>100073639
escape it as %22

https://en.wikipedia.org/wiki/Percent-encoding
>>
>>100070235
>>100070397
Factor is a self-contained Forth descendant with image-based programming, batteries-included.
I've played around with it last Summer, and it was revelatory. I still think Lisp's are better though for general programming, especially now that Clojure/script is mainstream, and Common Lisp has a second wind in the last few years.

From what I understand, CL (at least with SLIME, or Lem hopefully when it matures), Smalltalk (Pharos), and Factor looks like reflections of each other, similar to Schemes and Forth in the lower-level.

Multi-paradigm, true OOP, and conctenative programming...

>>100072913
Coalton is introducing static typing (HM, ML-style) into CL ecosystem.
A few Schemes have typed dialects. Typed Racket and other experiments, for example. Gerbil-on-Gambit is introducing static typing next version (0.19)

Racket and Steel (scheme in Rust, is going to be adopted by Helix as its Guile-style scripting language) also fully implement contracts; but I think those are runtime, hence are not types.
Similar to Clojure's specs which seem... passable ?
>>
>>100074615
I mostly do factor now as my second language for my fun programming. I like it more than cl or racket. Less typing to do stuff, it is very easy to pick up, and I can write small snippets of it by hand in my notebook. I would highly recommend it to people who like lispy languages to give it a look.
>>
File: *#($#.jpg (152 KB, 549x768)
152 KB
152 KB JPG
>>100071263
is anyone here actually programming something in lisp instead of just jerking off in .emacs?
>>
>>100074615
>Steel (scheme in Rust, is going to be adopted by Helix as its Guile-style scripting language)
guile is LGPL, why the hell would you not use it if you wanted scheme embedded in your FOSS app
stupid rust NIH syndrome faakheads
>>
>>100075641
me, I use babashka to automate desktop tasks (e.g. download torrent from nhentai, wait until finish, convert dir to cbz then delete) portable between windows and linux.

Also trying to do some web programming using Electric Clojure, which is not something doable using non-lisps. Due to all the macro transformations going on.
>>
>>100075641
I am programming things but not in lisp

I still use lisp as my shell script language tho
>>
billions must lisp
>>
>>100075669
Found this from the BDFL of Helix
>Both Guile and Chibi were considered because they implement the r7rs spec and are intended for embedding. Guile would be preferred but there are no complete bindings for it in Rust and I've seen that there's some issues with it breaking rust's destructors (https://github.com/ysimonson/guile-sys).
https://github.com/helix-editor/helix/pull/2949#issuecomment-1186159322
>>
>>100075725
unironically true.
>>
>>100075669
Once Guile has good Windows support, I can start recommending it for these kinds of projects. Also Chibi, once it stops being (no joke) 100x slower and more memory intensive than it needs to be.
>>
>>100076098
>Once Guile has good Windows support
never gonna happen
>Also Chibi, once it stops being (no joke) 100x slower and more memory intensive than it needs to be
also never gonna happen

chez is de wey
>>
>>100076098
>>100076188
I mean chez is the only scheme that's both fast and has windows support. maybe gambit, idk

for embedded I think the best option is s7
>>
>>100076188
The Chibi performance situation is annoying, given how easy it would be to fix.
> O(n) lookup on every function call meaning that lookup dominates 30% of all runtime.
> Every lambda and closure allocated has a ~40 kb "context" value, thus making these objects often measured in bytes into massive values in memory. This inflates the base memory from around 7 to over a hundred megabytes.
> Allocation uses a naive first-fit algorithm, fragmenting the memory due to the non-compacting collector and hitting worst-case allocation performance the majority of the time. Worst-of-class in both of these measures. Far, far worse performance than any standard malloc.
Fix these things alone and Chibi will be 70% faster.
>>
>>100076297
I never looked at the chibi's source, but I had a project of a toy computer/game engine in the style of pico-8 using chibi as the language. I still think it's a good project and if it gained any traction it would help scheme gain popularity, but I haven't had time to work on it for like 2 or 3 years.

I got to a point where I had a C function to draw a pixel on the screen and I wrote a program to draw the mandelbrot set in scheme, and it took like 10 seconds to draw a single frame. chibi is unbearably slow
>>
>>100069605
What? Are you writing embedded or driver code?
>Programmers just treat electronic components like black boxes most of the time
Good. We have standards and abstractions for a reason, they allow you to change the underlying components with ease and reduce overall system complexity.
>It would be much much better if all of these things and their information were compiled into one easy to access source.
Data sheets are typically quite easy to find. Both the manufacturer and seller would give you a copy on the product page, its in their interest for these documents to be easy to read and readily available.
What are you asking for in one source? Perhaps a website where you can search components and get their details and related documents? Any of the big sellers have websites that achieve this.
t. EE
>>
>>100072913
>because lisp doesn't exist statically. in the moment your first sexp is read by the reader, the program is already running
I would prefer "because its convenient, why do you think you need static typing?"
It wouldn't be impossible to make a lisp with static typing but most lisper's have learned that it's not as important as most programmers try to tout. Hence why none of the little projects ever take off.
Having a strongly typed language is much more impactful to runtime guarantees than statically proven types.
>>
>>100072913
>- has anyone ever built something with lisp besides emacs?
Could also just add that there are one billion clojure startups, and nubank.
>>
File: 1708892571197242.png (655 KB, 1417x1080)
655 KB
655 KB PNG
Anons can someone please post the Lisp compiler book that used nanopass-like techniques? It was posted here a couple of months ago but I forgot to save it. Also I would like generally useful resources for making a self-hosting Lisp compiler.
>>
>>100071828
I will never use emacs, I'm just learning it for fun and to see why people meme it as magic
>>
>>100072913
>no. SICP is not a lisp book, it's a computer science book
But it teaches Lisp
>>
File: 1713472184599.jpg (130 KB, 1205x521)
130 KB
130 KB JPG
>>
File: 1682924985067177.jpg (357 KB, 828x637)
357 KB
357 KB JPG
>>100072953
I don't have time to get through an entire CS course, I'm starting a master's degree in a month.
>>
File: 1712458629844971.jpg (1.57 MB, 1192x1497)
1.57 MB
1.57 MB JPG
Frens!! Remember to join the spring lisp jam!
>>
>>100077616
FUCK

forgor de link https://itch.io/jam/spring-lisp-game-jam-2024
>>
>>100077622
Best choice for a Lisp game engine?
>>
>>100071071
>>100071445
It is because he is using sly-completions and no autocomplete. I tried that too for a while and it fucking sucks.
>>
Is Python's tree-sitter module not working for anyone else? I've reinstalled it twice from scratch, and every time I try to use python-ts-mode it just crashes. Other modules seem to work fine.
>>
Is there any Common Lisp impl. besides Clisp that allows you to save the core image WITHOUT killing your process?
>>100077774
cl-sdl2 and your bare hands
>>
>>100073031
>>100072953
University courses are worthless. Watching SICP lectures, if anything, made things more confusing than just reading the fucking book instead.

What *is* a meme is the notion that you must do every single exercise. Knuth himself acknowledges in TAOCP that textbook exercises, while important, are not some kind of checklist. Do enough to ensure you understand how to apply the material you've learned, but don't feel like you need to spend any more time than that on them.
>>
>>100078184
>midwit: the post
>>
>>100077946
Oop, it's not even because of Emacs. Tree-sitter broke upstream. Rust faakheads.
>>
>>100078235
>midwit: the post
>>
>>100077911
I did (setopt sly-complete-symbol-function #'sly-simple-completions) and now it's usable. That default flex matching style is worthless.
>>
>>100077774
If CL there's Trial, else Fennel with LÖVE2D.

There's plenty of bindings though, also check out Dave Thompson and his work on Guile. He maintains the OpenGL interface and has a library called Chickadee that is for gamedev.
>>
>>100074003
that actually works. Thanks. I hate the web even more now
>>100073982
>>100073860
nope
>>
The Berkeley lectures aren't all that good compared to the book itself, imho
>>
>>100079079
Meant to quote
>>100072953
>>100073031
>>
>>100077185
dude, it's like you haven't read a word i've written. the fastest way to get through sicp is by following a course. if you try and do it question by question you will get lost, waste time and typically give up. it's the most common sicp trap there is. if you just read it and think you're going to learn anything then you're kidding yourself. but you do you.
>>
>>100078184
sounds like you didn't understand it the first time around and didn't want to try again. basically a skills problem.
>>
>>100079079
>The Berkeley lectures aren't all that good compared to the book itself, imho
they're meant to expand and explain the material covered in the book, they're not meant as a substitute, in the same way the book is not a substitute for a university course. holy shit i don't know how many times i have to explain basic fucking shit to you people. i give up. continue to talk about it in abstract terms while not know a fucking thing about it.
>>
>>100079583
I already learned a few things by reading the first few chapters. I don't get why it's purportedly impossible to derive any value from SICP unless you also follow videos at the same time.
>>
whats up with all the newfriends arguing about sicp and other books? just write code lmao
>>
>>100079641
To suggest that the book cannot be read as a standalone programming textbook is wrong
>>
Good morning sirs
>>
File: babu.jpg (56 KB, 474x288)
56 KB
56 KB JPG
>>100080328
Imagine a world where pajeets latched onto lisp instead of java
>>
>>100080513
That'd be a very cool world indeed sar as it'd mean that specializing in lisp was a pragmatic decision
>>
>>100080513
>>100080809
Having Scheme in the browser instead of Javascript would've been great, but for backend/desktop/mobile stuff it's good that things turned out the way they did.
Clojure lets me use infrastructure that corporations have poured billions of dollars into AND I don't have to deal with streetshitters on a daily basis. It's a win-win.
>>
File: %22yukari%22 hafner.png (15 KB, 378x120)
15 KB
15 KB PNG
>>100078628
>Trial
Reminder.
>>
>>100082252
not my problem
>>
>>100082300
Using troonware is a risk that anons interested in it should be aware of.
>>
Is Guile a legitimate Lisp or is it more like elisp?
>>
>>100079859
Go back to your /agdg/ Groomcord circlejerk
>>100082252
>Yukari
Why do they always use these stupid overly weeby names
>>
So tail recursion is when a procedure calls itself at the end of its definition? A "tail call" is when the last expression to be evaluated in applicative order is the procedure itself?
It's pretty confusing how a procedure can be defined using recursion, yet be an considered an iterative process though
>>
>>100082636
I assume he lifted it from touhou and picked an very womanly character as compensation to make the LARP seem more real to him.
>>
>>100083022
>Alan turing
>imperative number pushing is "good" code
So just a different version of Java? Lambda calculus is more fundamental to reality and has the added benefit of not being troon-ware.
>>
>>100083079
sorry sweaty, his efforts were instrumental in defeating the german chuds. Follow your leader etc etc or start posting about lisp
>>
>>100083022
>write code
Do they? After the troonsition they mostly maintain the repo and its Code of Conduct. Even Trial was made mostly prior to the creator trooning out and it still has his "dead name", i.e real name Nicolas in associated docs.
>>
>>100083234
>defeating
C++ is instrumental too in defeating evil "dictators" around the world. Doesn't make it good code. Lambda calculus is the most fundamental programming concept and was made by a trad white religious man, not a troon larping as a Japanese girl.
>>
>>100082252
Please don't remind me that these mentally ill eunuchs exist. I just want to look at my beloved (parens) and forget about this dystopian world.
http://xahlee.org/Periodic_dosage_dir/t1/insanity.html
>>
>>100082899
To be fair Yukari is a transracial transager weeb programmer (she metaprograms her shikigami and force the body to emulate another spirit by using Chinese Prolog... Err, Shen Lisp)

So not too weird naming compared to otherwise.

>>100082631
It's legitimate. R6RS/R7RS Scheme. People are extending it into WASM with Erlang-style distributed objects.

https://spritely.institute/news/scheme-wireworld-in-browser.html

Guile VM itself also run TCL and Elisp, but... Pretty much a dead-end.
>>
>>100082310
Risk of what, cooties? I don't give a fuck who makes the libraries I use as long as they're useful.
>>100083323
>Guile VM itself also run TCL
Wait, what? What a bizarre design choice.
>>
File: λ-calculus.jpg (525 KB, 1044x720)
525 KB
525 KB JPG
>>100083259
>Lambda calculus is the most fundamental programming concept and was made by a trad white religious man, not a troon larping as a Japanese girl.
TRVTHNVKE
https://research.scheme.org/lambda-papers/
>>
>>100082631
elisp is a legitimate lisp
>>
File: @(*@@.jpg (217 KB, 721x705)
217 KB
217 KB JPG
>>100071263
nearly all new programs are written by mid-curve bootcampers
similar to how nowadays everyone is churning out some completely disposable book, blog, or 'side project'

does anyone here know of any really well designed open source lisp codebases? maybe some from the 80s-90s?
i'm interested in learning from the design patterns of great lisp programs
>>
>>100084191
just stop larping you dumb fuck and contribute to an existing project.
>>
File: 1709217995771910.jpg (156 KB, 1092x750)
156 KB
156 KB JPG
>>100071263
>(condemed-to-eternal-existence-in-metaphysical-realm-p) ;; => t.png
Wait.. does this work?
>>
File: joker.gif (1.46 MB, 220x220)
1.46 MB
1.46 MB GIF
>>100083817
>elisp is a legitimate lisp
>>
>>100084191
if they are mid-curve does that mean it is impossible to write good code? it seems like you think that the code from the 80s would have to been written by someone who has six years of experience instead of five years of experience, so that makes the code better.
>>
>>100084478
He's naive. Most codebases back then were spaghetti nightmares and Lisp projects were hardly any different.
>>
>>100084268
that's my goal yes. at the moment i'm going through sicp.
i'd like to learn more about program architecture, as well as algorithms and data structures before contributing

>>100084478
no, it's just that any programs from the past that are still referenced today are much more likely to be good because they've stood the test of time.
there's too much garbage that gets pumped out today, so trying to separate the signal from the noise is nearly impossible
>>
>>100084303
Elisp is the closest we have to the earlier Lisp variants. In fact, it's probably the "purest" Lisp left.
>>
>>100079614
Either bot response or you replied to the wrong post.
>>
>>100078420
Tree sitter is a fantastic solution for problems that don't exist.
>>
>>100084816
>purest
In what sense?
>>
>>100077146
It uses Scheme (not Lisp) as a tool to teach general computing concepts.

If you thought SICP was a Scheme tutorial, you missed the whole point of the book.
>>
>>100084935
>Scheme (not Lisp)
So common lisp is not lisp either?
>>
>>100084935
You learn Scheme with SICP. You don't need another book, the syntax is minimal
>>
File: catbird.png (879 KB, 1208x681)
879 KB
879 KB PNG
If Lisp is so great, why isn't anyone writing meaningful programs in it, other than Emacs?

Nevermind commercial software.
A language isn't bad just because some asshole in a suit hasn't been brainwashed by enough corporate marketing material to convince him to let his employees put it into the company's codebase.

But there's not a single open source app on my computer that was written in Lisp.
While thinking about which language I should learn to contribute to free software, I looked up some 50 or so good open source apps and found them to use all sorts of different languages like C, C++, Rust, Lua, Java, Perl, Python, Ruby, Javascript, TCL, Go, Haskell, you name it. But not Lisp.

The closest things to exceptions were Audacity and Gimp.
Audacity uses a custom Lisp dialect called Nyquist for its plugin scripting system, and those plugins make up a whopping 1.7% of its codebase:
https://github.com/audacity/audacity

A phenomenal 1.3% of Gimp consists of plugins written in Scheme:
https://github.com/GNOME/gimp

I did find one case where Clojure was used to build an actual application rather than just as a glue for scripting, namely the editor of the defold game engine:
https://github.com/defold/defold
But I'm not sure if Clojure even counts as Lisp.

So, what gives? Why do I see all this shilling for Lisp all the time when nobody actually uses it to write useful software?
Is shilling Lisp just some sort of ersatz religion for certain people?
>>
>>100085339
I don't understand either
Lisp is extremely powerful, expressive, it can be used for anything from scripting to low level programming or game dev
Yet nobody uses it. I don't get it
>>
>>100018107
Interesting.
https://github.com/mattwparas/helix-config/blob/master/init.scm
>>
>>100083022
>muh alan turing means you have to be gay to write code
Shit like this is why people say homosexuality is a mental illness. I never cared what two adults did in their bedroom up until the point that
>we just want to be equal
turned into
>WE'RE THE BEST AND IF YOU DON'T ACCEPT US WE WILL DESTROY YOUR LIFE
>>
>>100085822
Sir I'm here to court smart lisp sissies, please do not scare them away
>>
>>100085339
>While thinking about which language I should learn to contribute to free software, I looked up some 50 or so good open source apps and found them to use all sorts of different languages like C, C++, Rust, Lua, Java, Perl, Python, Ruby, Javascript, TCL, Go, Haskell, you name it. But not Lisp.
Useful Lisp applications are admittedly uncommon but I can't even remember the last time I used an app written in some of these languages. Haskell in particular has what, shellcheck and pandoc?
The reality is that the top ~10 languages tend to dominate the industry by a considerable margin. But that doesn't mean no one is using niche languages.
>>100085822
YHBT, probably by a /pol/ack.
>>
>>100071371

why is she getting her dirty fingers into my beer
>>
File: indianStreetVendors.webm (2.5 MB, 404x720)
2.5 MB
2.5 MB WEBM
>>100085984
sir, this makes good flavor and is popular with the street food enjoyers
>>
>>100071828

Clojure, Ruby and Scala share aspects with Lisp. Haskell is pretty much the same. I think it's a good idea to learn it, because it will give you many many advantages in the future when learning other languages.
>>
>>100084935
Is it necessary to learn scheme before reading sicp?
>>
Reposting here in case it helps someone:

I dropped Emacs about a year ago after I got tired of sluggish LSP performance. If I used Corfu/eglot with a low enough delay/prefix length, there would be noticeable stutter frequently throughout my coding.
Not anymore. Some rando posted this absolute godsend setting:

(fset #'jsonrpc--log-event #'ignore)

I have Corfu delay set to 0, and prefix set to 1, and there is absolutely zero stutter when using LSP. It looks like the log events were adding a crazy amount of overhead.
gonna take me a bit of time to get used to it again but feelsgood. I actually enjoyed my time using helix/wezterm, but it's not a true replacement for a customizable IDE like Emacs. Especially now that Dape is a thing and I can use debug adapters with Eglot.
>>
>>100085339
Graham shills Viaweb as Lisp's success and then it got rewritten to C++.
Lisp projects are hell for multiple teams when you have six billions DSLs in it.
>>
>>100071263
is there a lisp without GC yet? carp honestly looks great but no commits in over a year probably means it's dead.
(no I don't want to configure SBCL to run without GC)
>>
>>100086151
https://prescheme.org
>>
>love modal editing and vim bindings
>love lisp
>evil is a dirty hack and feels like one
how do i cope
>>
There is thousands of niche programming languages out there, but somehow we Lispers always have to listen to the screeching if JavaScript tards. "HUH IF LISP IS SO GREAT HOW COME NOBODY USES IT???", as if there is a correlation between the two.
>>
>>100086103
no. The whole point of them using Scheme is that it's so simple that you don't have to waste time learning a language and can spend your time learning concepts instead.
>>
>>100085984
You know you love it
>>
>>100086181
ooh this is cool, thanks anon, will keep an eye out for it
>>
>>100086203
DIY
>>
>>100086207
jobberscript is netscheme with java syntax
we won
>>
File: 1382988951462.jpg (19 KB, 268x265)
19 KB
19 KB JPG
>>100086203
meow
>>
>>100082704
I had to study this shit for an exam last semester so hopefully I can explain it clearly to you.

- Tail recursion is when the recursive call is the last thing your function or procedure does before ending. This kind of recursion can be optimized into an iterative process because your computer doesn't need to keep track of variables defined in the function after the recursive call happened, since it won't do anything with this memory anymore. This has the advantage of having a constant memory usage. (depending on how many variables you define in your function/procedure)

- On the other hand you have recursive processes, which happen when your recursive call is NOT the last thing your function/procedure does. In this kind of process you have to keep track of all variables defined in your function/procedure because you might need them after the recursive call. This means that the memory usage keeps growing linearly at each recursive call.

I hope this helped!
>>
>>100086217
Can I read Land of Lisp on the side or will it just confuse me
>>
>>100086375
Yep this is a very clear explanation, thank you anon.
This stuff about memory is interesting. I feel like I'm being utterly bombarded with information while reading SICP. How did you memorize all of this programming theory?
>>
>>100086203
meow
>>
>>100086435
you don't memorize it, you understand it.
>>
File: xahlee.jpg (14 KB, 298x298)
14 KB
14 KB JPG
>hates C
>hates Unix and its philosophy
>hates Linux
>hates TWM's
>pretty much hates everything good about computers
What the fuck is his problem?
>>
>>100086659
Is he done with 2023's advent of code yet
>>
>>100085976
>Haskell in particular has what, shellcheck and pandoc?
I was thinking mainly of XMonad because I used it as my WM for years, but yeah those too.
There are also a bunch of compilers for niche languages written in Haskell, including for Lisp dialects.

>>100086207
>There is thousands of niche programming languages out there, but somehow we Lispers
...are always shilling their language everywhere instead of actually writing apps in it.
Lisp absolutely has the highest ratio of fanatical shilling to useful code output. The next langs on the list are Haskell and Rust, but I have to at least admit that not having ripgrep, yazi and pandoc around would be a loss.
>>
>>100086549
>you understand it.
Sure, I just mean that there are many concepts to take into account relevant to the theory of computation and so on and it sounds like a lot of stuff to keep in mind when designing good programs.
>>
>>100086409
>Can I read Land of Lisp
I dropped that book because it bored me out my mind, so I can't tell you

>>100082704
basically if you understand Clojure's recur command you understand tail recursion
>>
>>100086435
What I do:
>read the theory once or twice so I understand the basics but don't pay too much attention to details
>do the exercises
>read it again but now try to understand everything
Doing the exercises in between seems to help me a lot when it comes to actually understand and remember the concepts
>>
>>100086711
>I have to at least admit that not having ripgrep, yazi and pandoc around would be a loss.
I would be way more pissed if Maxima and pgloader stopped existing than if we lost 200 gay little terminal apps. And that's not even mentioning Clojure, a way more "alive" language than CL.
>>
>>100072913
>grammarly
>n-world
How about AutoCad?
Or Google Flights?
>>
>>100086659
He's Chinese.
>>
>>100085339
Lisp code is really hard to distribute unless you have total control over distribution, and that creates serious problems when writing smaller programs. The amount of distribution effort of a Python script or Go program is substantially lower than distributing a CL program. That cost is amortized for bigger applications, but if you're writing a bigger application, there's a higher chance it's something internal or proprietary.
The solution to something like this would be a focus on "ecosystem" like all those other languages mentioned have. C is the only real exception to the ecosystem/distribution rule.
>>
>>100087955
wdym by distribute? you can generate a binary pretty easily with sbcl that doesn't need any libraries installed on the client. I guess cross compilation is a pain in the ass but with CI/CD workflows it's not that bad.
>>
Honestly I'd say the main weakness of CL is just the package manager not having version support or asynchronous updates. There's the version up on quicklisp and that's that, and when it updates, everything changes.
Not exactly great for development. The only reason it works at all is because there are so few contributes and the projects are all stable or update infrequently anyway. If we suddenly got a few thousand more active CL devs it would implode.
>>
>>100086711
Doom Emacs depends on ripgrep.
>>
>>100088267
This is reflecting my experience in trying to make and distribute a small CL program. Generating a binary is one part, and SBCL does that well enough. Generating a binary under 10 MB is much tougher. Also, it's hard to get good startup time I've found unless you are ruthless about stripping out what you don't need. Small utilities optimize for startup time and file and in-memory size. I haven't found a CL implementation that does well on these factors. They all have some moderate to significant amount of overhead in all these areas.
And yeah, libraries on the client is tough. There's not a real path for statically linking C code into SBCL without doing some complicated stuff.
I believe if these things were improved, and there was a path for building a possibly slower but much smaller minimal runtime, then CL would be more competitive in the "small program utilities" space.

Also Scheme is a great candidate for program scripting, except that many non-Lisp people struggle to get to grips with its minimalism.

>>100088337
I'm more in the Scheme space now than the CL space, but I do remember ASDF really sucking in many ways. It's very imperative, in the "tightly-coupled with implementation and hard to reverse things when you make a mistake" sense, which is super bad for a package manager. CL seems to have some substantial force locking it into a local maximum. Problem is that this local maximum is a hodgepodge of the most "pragmatic" (read: incorrect but worked for the time) solutions from the '80s to the '00s. Fortunately it's pretty easy to get around most of that, but again, getting around it is a cost that's hard to pay for small high-velocity programs.
>>
>>100088616
>Also Scheme is a great candidate for program scripting, except that many non-Lisp people struggle to get to grips with its minimalism.
"yes" but a scheme in that context would be like elisp. if you're using scheme in a specific context, there's no reason to not make its "standard library" gigantic with everything someone could possibly want to do in that context.

elisp is by far the most productive lisp for this reason, anything you can imagine emac doing is already at least 50% written for you
>>
SSAX sucks ass. Hyper obscure half finished crap.
>>
>>100086659
classic insectoid
>>
>>100088616
Can't chez do scripts with petite-chez?
Or am I misremembering the size?
And there's always ECL.
>>
Ok, so I know there are Lisps without a garbage collector that compile to C for example.
But then you lose the ability for Lisp to evaluate itself, right?

Is it possible (in theory at least) to make a Lisp without a garbage collector that can do self evaluation? Do any such Lisps already exist?
>>
>>100090058
you're wrong in all of your assumptions. the lisps that compile to C (like chicken and ECL) do have garbage collectors. idk about carp, but carp is vaporware anyways

and also that has nothing to do with runtime evaluation. garbage collection is just a way to automatically manage memory
>>
File: .jpg (303 KB, 850x1200)
303 KB
303 KB JPG
>>100086659
wow he's just like me
http://xahlee.org/Periodic_dosage_dir/why_i_hate_sjw.html
>>
>>100090122
Wait, how can it have a garbage collector if it compiles to C and C doesn't have a garbage collector?
>>
>>100090649
The garbage collector is implemented in C. Doing mark and sweep in a malloced arena in C or counting references in C is still garbage collection.
>>
>>100090649
...anon, how do you think garbage collectors are made? they're just code
>>
>>100090693
any kind of GC can be implemented in C, in fact you can write C programs using GC. you just don't use malloc/calloc/free and use the GC's API for all memory stuff. the boehm GC is a C library
>>
>>100090058
>>100090122
>>100090693
>>100090702
Ok let me rephrase the question then. Is it possible to have a Lisp that can do self evaluation (i.e. interpreting data as code at run-time) without a garbage collector?
>>
>>100090739
I mean, aside from the obvious danger of user input being run as code and leading to memory leaks I suppose.
>>
>>100090739
yes, it's possible

the thing that allows lisp to do runtime evaluation is the fact that eval is itself a lisp function.

when you compile a C program, the compiler is like an evaluator, it takes your code as input, 'evaluates it' and outputs an executable. in lisp the evaluator is part of the language
>>
>>100090739
Carp lisp exists so I don't see why not.
>>
>>100090822
carp """exists"""
>>
>>100090833
It's a proof of concept.
If anyone thinks that a Lisp with no gc would be the prime choice for systems programming and therefore super popular they would be wrong because it would probably have a fat runtime or some weird big static memory consumption to track shit or keep clones or whatever.
I would go about implementing it with langs with functional support like C++ or Rust (currently reading about https://github.com/HigherOrderCO/HVM).
>>
>>100077005
Essentials of Compilation?
https://github.com/IUCompilerCourse/Essentials-of-Compilation/releases/
>>
>>100077005
is it lisp in small pieces?

afaik nanopass was created by kent dybvig, the creator of chez scheme. and guile uses a similar concept, they call it a compiler tower
>>
>>100081927
honestly I think they would have enshittened scheme to a point where it would be as bad as JS. part of scheme's charm is that no one uses it, I'd rather it stays that way
>>
>>100090739
You know about save-lisp-and-die, right?
Imagine that there's another function that similarly collects all live function bindings and bundles them into an executable, but it leaves out eval and the GC
Then you can write fairly normal Lisp code during interactive development and spit out an executable that allocates and deallocates deterministically
The tricky part would be working with code that can be called from either environment
You would likely need some form of RAII or the moral equivalent, and "polymorphic" deallocation functions that do nothing when the GC is present, or else you'd just have one dialect for use in code generation and another for use in actual function bodies
I don't know how close this concept is to Carp but it's what I would try
>>
>>100089589
As for libraries, R7RS-Large is coming along more nicely than I thought it would be:
https://codeberg.org/scheme/r7rs/issues
Seems like there's real progress being made, and considerations beyond just adding in a bunch of SRFIs arbitrarily.
>>
>>100090739
Yes. It's called PreScheme.
>>
>>100086750
What are some non boring lisp books?
>>
>>100092812
Problem is that object lifetimes are as nondeterministic as the program itself. There are some lifetimes you can know ahead of time, but not in the general case. You'd have to use some kind of refcounting with a backup tracing GC in this case, or do the Go method of finding as much as you can to allocate on the stack and use a simpler GC since you've lowered memory pressure.
>>
File: back-cover.png (26 KB, 458x800)
26 KB
26 KB PNG
>>100093977
https://letoverlambda.com
>>
>>100086750
>>100096198
What's wrong with Land of lisp, is it a bad book?
>>
>>100096301
read anything you want just write code you fucking fucks whats up with all the book talk recently jesus fucking christ
M-X WRITE-CODE-MODE
>>
>>100096623
>just write code
You don't get it, I need to optimize everything I do, always
>>
>>100096882
you're not optimizing by not writing code. programming is the application of certain models of computation in correct contexts. you will not map models to contexts by reading them, because there are hundreds, and identifying contexts and models requires doing so through implementation and work.
>>
>>100096623
>>100097150
>dont try to understand, dont read, dont enlighten yourself
>just write code
good morning sir!
>>
Officially gave up on using scheme for scrapping shit from the web.
>SSAX is some obscure shit
>uhhh yeah you want to parse the most widely used format ever used?
>SXML seems to have been done by a slav 20 years ago and never touched by anyone sane again
>autists seem to forget the web uses html
>fucking strings

It doesn't help that the webshitters that do 90% of the web make the most hyper-complicated and malformed sites, but it still shouldn't be this hard.

I will question /webdevgeneral/ if any of those jeets are willing to go through feminization and start developing our ecosystem.
>>
Is it possible to sort-lines respect indentation/depth? Most specifically within Org-Mode.
For example
* A
* C
* B
** a text
* D

(sort-lines)
* A
* B
* C
* D
** a text

Same thing happens here:
- A
- C
- B
- a text
- D

(sort-lines)
  - a text
- A
- B
- C
- D

Or just indenting
a
c
b
a text
d

(sort-lines)
  a text
a
b
c
d
>>
>>100097595
Do you want something to read? Pick RS6S or https://www.scheme.com/tspl4/.
Pure unadulterated enlightenment, read it back to back and then write code and stop being dumb.
>uhh should I read this intro book or that intro book, maybe that other intro book INTO THE SAME SUBJECT
definition of tutorial hell
>>
>>100097637
I am just starting out with org but I don't think so, because "a text" in your example is under B not D, you'd be changing the tree that way.

There is (setq org-adapt-indentation t), maybe that helps you.
>>
>>100097632
Why don't you write your own parser?
The only hard part of parsing HTML is finding the documentation for the malformed shit it allows like not requiring closing tags for paragraphs.
>>
>>100097695
I already have that setting turned on unfortunately, doesn't help with this issue.
>>
>>100097840
because I hate web development, I just need to do one thing that involves this shit.
>the only hard part is 95% of html
>>
>>100098055
just use clojure
>>
So, Scheme or Common Lisp? What is the definitive answer?
>>
>>100097659
>Pure unadulterated enlightenment,
SICP is better
>>
>>100098075
well what's the best Clojure library for parsing HTML?
Is https://github.com/clj-commons/hickory hickory any good?
>>
>>100088337
>Honestly I'd say the main weakness of CL is just the package manager not having version support or asynchronous updates.
That's a bummer, but nowhere close to being a deal breaker. C has no package manager whatsoever yet it's doing fine.

If anything, the compilattion model of CL effectively negates the distinction between "shared libraries" "static libraries" and "header-only" libraries (obviously this applies to pure CL libraries, if you use FFI that's a different story). If you want to avoid dependencies and libraries changing under your butt, just bundle a specific version of the library source with your project.

Lisp programmers have a far easier time than most languages in this regard, and yet they spend entire days on IRC crying that le dependencierino with the wrong numberino is going to nuke their entire project. Just sit down and write code ffs.
>>
>>100098380
hickory is pretty good yeah. it's either that or enlive
with enlive you'll probably have to do a lot more work yourself
>>
>>100086119
>Graham shills Viaweb as Lisp's success and then it got rewritten to C++.
Yes, only after he sold it after becoming rich and successful himself.

I'd be a massive Lisp shill too if Lisp single-handedly made me a millionaire.
>>
>>100098151
Both.
>>
>>100088337
Just use clpm and a different image for every project.
>>
>>100098151
OCaml. People actually use it instead of writing blog posts about it all day.
>>
>>100098528
Redundant, no?
>>100098605
OCaml is not a Lisp.
>>
>>100098605
Then they rewrite it in F#
>>
>>100098055
>start with SXML parser
>add a way to handle tag-specific rules
>scrape the websites you want, fixing problems as they arise with custom rules
HTML is not the problem with current web. Just start making the library you want to see instead of complaining here.
>>
>>100088616
>I'm more in the Scheme space now than the CL space, but I do remember ASDF really sucking in many ways.
I stopped using ASDF and similar stuff altogether and don't miss it. "System definition facilities" are a soluition to a problem that doesn't exist.

Belive it or not, I just LOAD the sources needed and everything just works. No conflicts, no nothing. CL development is super simple unless you make it complex. The "community" of course doesn't like it, but who cares, I'd rather write more Lisp code than rebuttals to their stupid arguments.

It's funny. We make fun of Unix, C and Windows all the time for introducing unnecessary complexity, and yet modern Common Lisp programmers do the exact same things, despite having the tools available to avoid it. What gives?
>>
What will you do when Helix merges scheme as a scripting language? Personally, I'm going to start complaining about Scheme not being Clojure.
>>
>>100098619
Is F# the only functional language that's actually practical to do large projects with? Especially anything related to gaming, graphics or requiring a GUI
>>
>>100098669
>Is F# the only functional language that's actually practical to do large projects with?
Clojure is practical.
>gaming, graphics
I can't speak for those, really, but aren't you just tied to whatever the graphics engines are using? Unity is C#. In theory, I'm sure you could write unity in F#, but it's probably highly unsupported.
>requiring a GUI
Here, Clojure has great alternatives; there are many choices, and some even seem decently mature. HumbleUI for desktop is pretty new and decent, there's ClojureDart for Flutter dev, and there's of course clojurescript, and you can call any java GUI library you want of course.
>>
>>100098709
>graphics engines
Well there aren't really any of those for gaming that aren't for C# or C++ anyway
>>
>>100098723
Yeah, that's my point
>>
>>100097637
org-sort
>>
>>100099127
I love you.
>>
http://www.gotw.ca/publications/c_family_interview.htm
>Q: Outside the C family of languages, what language(s) do you like the best? What in particular makes them interesting to you?

>Ritchie: I have to admire languages like Lisp. But, just as in the earlier question about a "simple" language, an astonishingly simple language grows in practice into something that can be fearsome.
>>
>>100098151
learn both
>>
File: emacs_fencing_wtf.png (77 KB, 752x712)
77 KB
77 KB PNG
Can someone explain to me what the fuck is going wrong here? I am trying to use rmarkdown in emacs (poly-R-mode I think), but the syntax highlighting - or absence of it - inside the fenced code chunks is a bit weird. Sometimes they are highlighted, sometimes they aren't, and sometimes they also happen to be a different font - here you can see three completely different looking code chunks right next to each other in a document; has anyone dealt with this? Or am I doing something wrong?
>>
>>100101839
Another variation has just entered the chat
>>
>>100071263
>Want to learn Common Lisp.
>I like my current editor (Zed) but it doesn't support syntax highlighting/completion for Common Lisp.
>Don't want to use VSCode.
>Plain Emacs is unbearable.
>Doom-Emacs runs noticeably slow on my computer with hangs and jittering.
Am I just fucked? What do I do?
>>
>>100102281
write your own emacs config my brother in christ


have you tried spacemacs?

also what kind of toaster are you on to make doom emacs noticeably slow?
>>
>>100102281
Have you enabled some dumb mode in Doom that kills your performance, or is there such a mode that was enabled by default? It shouldn't be slower than vanilla emacs beyond laggy packages.
>>
>>100102514
>also what kind of toaster are you on to make doom emacs noticeably slow?
It's the base model M1 Macbook. It's something to do with the way Emacs renders and the retina display according to discussions.
>spacemacs
I'll try that out.
>>100102565
>Have you enabled some dumb mode in Doom that kills your performance?
It seems like Doom enables them by default, there's discussion on settings to change to make it smoother.
>>
Org chuds, how can I read a file in a literate block using awk? :stdin /file/path did not work
#+begin_src awk (????)
>>
File: 1698269931513869.jpg (26 KB, 400x400)
26 KB
26 KB JPG
Best linear algebra library for Common Lisp? There's a bunch of them and I don't know which one to use, since now I need to do some vector manipulation.
>>
File: s(cratch)-expression.png (22 KB, 1240x256)
22 KB
22 KB PNG
I really want to make an editor for S-expressions that looks like Scratch, but instead of using the mouse to drag and drop stuff around, you'd mostly use the keyboard with paredit-style commands and a permanent on-screen menu similar to which-key but with intelligent suggestions.
At first I would make it just good enough at editing Scheme that you could go through The Little Schemer with it, then I would add a Clojure mode.

Trouble is that if this doesn't actually turn out to be a convenient way of editing programs, it'll be a couple hundred/thousand hours wasted.

>>100102783
>It's something to do with the way Emacs renders
try running emacs in a terminal via emacs -nw
>>
>>100071263
has anyone here written a useful emacs package?
>>
Is LISP just academic shit? I mean, I've never seen something so shilled by Computer "Scientists ", yet so uncommon in production
>>
>>100105885
Lisp is so good of a language that it's dangerous to the powers that be. It is flexible enough to subvert the fragile control system in place. Therefore its knowledge is suppressed, and its popularity is artificially prevented.
>>
>lisp is unsuitable for large teams
Is there any evidence of this? Any companies that were using lisp but had to change as it grew because a larger team was making it unwieldy specifically because of lisp?
I know of a couple instances they switched to appease tech illiterate board members or make hiring new employees easier but none because actual lispers were struggling in a large team.
>>
aaaaaaaaa why isn't windows working from croatoaaaaaaaaan
I'm literally following the tests in the repo and they don't work. nothing shows up. I can do whatever on the main screen though, so I know something works. ncurses is updated on my machine. any thoughts?
>>
>>100106764
disregard
>>
>>100106629
>Any companies that were using lisp
there's the first problem
>>
>>100106932
>there's the first problem
How many employees does Franz have?
You don't just make AllegroGraph for the fun of it.
>>
>>100106629
>I know of a couple instances they switched to appease tech illiterate board members or make hiring new employees easier but none because actual lispers were struggling in a large team.
Answered your own question. There's a longstanding myth that languages like Lisp tend toward unmaintainable code bases, but that's all it is, superstition.
>>
note for fellow arch troons: install tree-sitter 0.22.2 from your pacman cache to fix the emacs regression

also fuck the arei guy for making guix a de facto dependency
>>
Hi, I'm new to emacs and making a config from scratch. But it seems I can't reach the package archives. How do I figure out what's going wrong?
(require 'package)

(setq package-archives '(("melpa", "https://melpa.org/packages/")
("elpa", "https:// elpa.gnu.org/packages/")))

(package-initialize)
(unless package-archive-contents
(package-refresh-contents))

(unless (package-installed-p 'use-package)
(package-install 'use-package))

(require 'use-package)
(setq use-package-always-ensure t


Importing package-keyring.gpg...done
Failed to download ‘melpa’ archive.
Failed to download ‘elpa’ archive.
>>
>>100108337
(and yes the last () is closed I just failed to copy it)
>>
>>100108357
And nevermind the extra space in elpa's URL, I was just adding a space to line up with previous URL to see if I screwed anything up

Anyway figured out the toggle-debug-on-error thing. The error was I was doing commas instead of dots in the packages lines.
>>
>>100102281
Write a CL mode for your editor.
>>
>>100106220
This is the meme answer but what's the real answer?
Lisp is obviously a great language. What stopped it from acquiring the same kind of popularity as Java, Python, JS, or even languages that are less used as those but still popular in industry, like Go, Erlang, Scala, Ruby or whatever?
>>
>>100110192
It was too popular and powerful so the creators locked it away out of fear of the masses misusing it's power to strike back at them.
No really. It was all extremely proprietary closed door corporate/military tech used with million dollar licenses and custom designed silicon by teams of trained mathematicians.
Naturally when Unix was created Lisp was never even close to an option, and so they used the humble and available C instead. From Unix came gnu/linux and here we are.
Later on the lisp developers realized their folly, mostly after all the grant money dried up after the AI winter, and released most of the code into the open source, but by then it was over and no amount of doing things first or better could possibly match up to something people already knew and were actively using. Just like a standard CPU can run lisp just as fast as a lisp machine, a C program works just as well as a lisp program. You can argue that a lisp machine is much nicer to work with, and that lisp itself is much easier and nicer to work with than C, but mathematically they're equivalent, any lisp program can be accomplished in any other language given enough time and effort, so once the ball got rolling there was no reason to switch.
>>
>>100110459
This plus the American history of Lisp alongside general American culture preferring toil and effort over knowledge and insight. At nearly all societal levels, the American economy rewards processes that optimize for toil. Lisp programmers are not very rewarded by this standard, except by places that need efficiency and quality and can afford this in spite of economic forces.

In fact, Lisp used well would not just be suboptimal for, but actively destructive to the American economy. A Lisp programmer completes what they set out to do quickly and reliably. Quick completion of projects is bad, since that means less hours worked. Reliable completion, though, is doubly bad. Reliability means less support, service, Q&A, and maintenance. It means less need for competition. It means less need for paid bugfix and "feature" updates. This drastically reduces the economic impact of Lisp software in the larger (non-niche) sphere.

Lisp isn't the only language that would have this impact if used well, it just happened to be the first.

This has been a dramatic re-enactment of the smuggest Lisp programmer you know.
>>
>>100110459
>corporate/military tech
Like what?
>>
>>100110733
a logistical software called DART and its sucessor, most of the old DARPA AI revival stuff was made by lisptards.
Also franz inc. has a AI database stuff only used by spooks.
>>
>>100110683
Lisp was born from pragmatic American academia. Europoors were too busy with PLT wankery and shit like that (just look at ML and derivatives, it's Lisp minus everything that makes Lisp good).
>>
>>100111127
>AI database stuff only used by spooks.
This seems interesting, for what purposes?
>>
>>100110683
Eh... while I'm not a lisp hater... even after all this time lisp is still slower at a performance level. Anything you do in lisp will be faster done in any other language. You have the superior language, "you are so fast". Then implement a faster interpreter "fast".
Something It kind of annoys me of lisp enthusiast is that they keep peddling against all practical evidence that the speed differences that anyone can see don't matter.
People aren't happy with C/C++ speed alone, and do all sorts of hacks and use all sorts of silly stuff to shave one extra milisecond, why do lispers feel this isn't important?
>>
>>100111591
C is not fast. C is primitive, which means it has a potential of being fast if
the programmer is a genius and the compiler is on his side. if the programmer is
an idiot, and the compiler expects smarter programmers, you will get abysmal
performance.

People use C because it /feels/ faster. Like, if you build a catapult strong
enough that it can hurl a bathtub with someone crouching inside it from London
to New York, it will feel /very/ fast both on take-off and landing, and probably
during the ride, too, while a comfortable seat in business class on a
transatlantic airliner would probably take less time (except for getting to and
from the actual plane, of course, what with all the "security") but you would
not /feel/ the speed nearly as much.
>>
>>100111591
Isn't Lisp basically as fast as C by default?
>>
>>100107628
>also fuck the arei guy for making guix a de facto dependency
i feel like im out of the loop here
>>
File: 403.jpg (172 KB, 1080x344)
172 KB
172 KB JPG
>>100098461
>>100098380
>>100098075
>modern websites almost all forbid scraping now
fml
>>
>>100112338
Did you try changing the system agent? (System/setProperty "http.agent" "Clojure REPL")
>>
>>100112338
Retarderald
>>
>>100112376
I did, including to my actual browser's user agent, but to no avail. I'll look into more specialized http libraries and try some different stuff. Maybe they just want some if-modified-since headers or something.
>>
>>100112338
>slurping a https connection
Anon, I
>>
>>100111878
I don't trust benchmarks game too much as the people that write those tests usually do very shoddy work, but...
https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/sbcl-gpp.html
and the breach becomes higher if you do the comparison with C, as its not burdened with IdIoMaTiC "Modern" c++

>>100111666
you are not building planes with lisp aren't you? You can gloat about being the sophisticated item when you are not even used in the actual sophisticated item.
I like lisp because its smaller and generally no nonsense, I like the smaller footprint and how everything works in the same way. Everything else is a cope, if you do two similar codes and both run at different speeds, then one is faster than the other, the whole argument about "well, if you were smarter the other one would be faster" is silly, because even if the problem was me, nobody seems to be playing those lisp airplanes either.
>>
>>100112724
>https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/sbcl-gpp.html
java sars we won
>>
>>100112724
>cnile reading comprehension
>>
>>100111504
It's a specific sort of database known as RDB, they used lisp and autism to make a super fast one that can handle ~1/2 records and process queries fast. https://allegrograph.com/products/allegrograph/
The only ones who need such things are corpos and spooks.
>>
>>100112824
~1/2 billion records *
>100112724
do you actually code or just larp
>>
>>100112517
>>100112441
can you actually give me a line of code that'll work or are you just sperging out?
>>
>>100112724
>you are not building planes with lisp aren't you? You can gloat about being the sophisticated item when you are not even used in the actual sophisticated item.
NTA but this is literally just argumentum ad populum. If SpaceX can use webshit in their manned rockets, you can probably use Lisp for a plane.
Besides, the entire point of benchmarks is to measure performance differences that are difficult, if even possible, to perceive. There is a world of difference between "slow" and "not as fast as meticulously hand-optimized C with magic x86 intrinsics".
>>
>>100113031
>Besides, the entire point of benchmarks is to measure performance differences that are difficult, if even possible, to perceive.
"Entire point" is a bad way to put it. But still.
>>
>>100112873
no idea what that anon is on about, slurping https works fine. im pretty sure this is just cloudshart
>>
>>100113031
james webb literally runs javascript
https://www.jwst.nasa.gov/resources/ISIMmanuscript.pdf
>>
>>100113197
Are you a bot or just retard/illiterate?
>>
>100113273
write code,help with emacs doubts. stop fighting the newtards and book people jesus christ.
>>
>>100113388
You'd think all the AI shit nowadays would make botspam better but this one can't even quote right
>>
>>100113031
The problem is I'm not claiming that it's not possible because TeSlA isn't using lisp. I'm claiming that he could write code that goes faster and write a better compiler/interpreter for lisp that goes faster than C compilers. He is claiming that lispers are some kind of elite that does the best code. But he isn't writing faster code, nobody seems to be doing it. It's not anymore about what the big guys are using, it's about what the people that claim to be capable of something aren't doing.
>>
My init.el is just a bunch of random macros that I made because I'm too lazy to make functions
>>
>>100114006
this sounds like "my fridge is full of cakes because I'm too lazy to bake bread". what makes a macro lazier than a function? writing functions is so much simpler
>>
>>100114038
Macros are made interactively, then are easier
>>
>>100114162
what are you talking about? you mean keyboard macros, not lisp macros?
>>
>>100114175
kbd macros, obviously
>>
>>100086007
top kek
>>
>>100085500
>But there's not
I suspect people don't want to write emacs, or vim, people nowadays want auto complete and some actual debugging support, repl might be nice to some but it's not what most people want.
>>
Stuck on the (count-change) procedure in SICP around page 80, I'm having trouble understanding it fully. I kinda get what it does but it's not obvious to me. Should I do the exercises or just drop it for today and come back to it later
>>
>>100114811
Typescript and VSCode exploded in popularity thanks to the language servers where you write object.something and you get squiggly lines all over the place telling you about how retarded you are.
Either that or a killer app. Programming emacs is not a killer app. Programming neovim is not a killer app.
>>
MIT's 6.001 lecture is really good
>>
>>100085500
>>100114811
>>100116167
for scripting -> python & js/ts is easier for normies
for fast computation -> rust / cpp
for learning computer science theory -> lisp
lisp is academia, pedagogy
>>
>>100111591
I was the original poster that you replied to and I was being a bit tongue in cheek. You can be quick and reliable in many languages and not just Lisp if you know what you're doing. The economic issue starts at education.

> faster done in any other language
Lisp (and Java, and what have you) is going to go faster than C for many tasks. The "arithmetic on a flat vector" model of performance that C touts is good for specific scenarios and microbenchmarks, but a dynamic and evolving system cannot be modeled that way. Try to make a global M*N parallel message queue in C using persistent data structures. At best, you'll reinvent Lisp in C. The actual slowdown of SBCL or Chez Scheme over plain C is under a factor of 2. Add parallel computing, and that sequential loss is gained back rapidly.

> People aren't happy with C/C++ speed alone
People like this don't write C/C++. They write SIMD code through C and C++. This is the current performance meta if you're not using a GPU, which you should be using for performance btw. My view is that much of the time this kind of optimization is penny-wise and pound-foolish, unless you're writing a codec, statistics package, or the like. Other kinds of software simply don't work well with the flat SIMD approach, and even if you get it to work in a moment, you make the program brittle and unmaintainable. This is easily worth a 500% loss in performance, because that's the lower bound of what you can gain back if you're able to select better algorithms without breaking the program.
>>
Have you watched your MIT 6.001 lectures today?
>>
>>100114458
Please post init, this is the craziest thing I've heard all week.
>>
Did you watch your MIT 6.001 yet?
>>
>>100116925
>People aren't happy with C/C++ speed alone
People like this don't write C/C++. They write SIMD code through C and C++. This is the current performance meta if you're not using a GPU, which you should be using for performance btw. My view is that much of the time this kind of optimization is penny-wise and pound-foolish, unless you're writing a codec, statistics package, or the like. Other kinds of software simply don't work well with the flat SIMD approach, and even if you get it to work in a moment, you make the program brittle and unmaintainable. This is easily worth a 500% loss in performance, because that's the lower bound of what you can gain back if you're able to select better algorithms without breaking the program.

A lot of people are actually noticing that computers work slower, software has become slower and worse, not only slower to run, but also slower to boot up, and less stable. Everything has little delays here and there.
So, I wouldn't say a 500% loss of performance is something we can accept, specially when programs in the pass seemed less janky. I have my own opinions about why is this happening, but certainly people using less plain vanilla C for common applications has not helped.

Personally I work in video games, I am given a budget in the order of milliseconds, and each time our department is goes above our allocated time we have to measure everything and see who's responsible. I want to do games in something like lisp, I am very familiar with game engine architecture, and a lot of trends go towards to trying to fake features of dynamic languages in the most akward and hacky manners. Adoptions is already a problem, but there's a certain guarantee that your game will run slower if it was implemented in lisp.
>>
>>100118115
Are C and C++ the only game-viable languages?
>>
>>100118159
It depends the kind of game. Unreal is munching the industry, unity is still sort of strong. Not sure what will happen pertaining godot. I have only touched two propietary engines used in this decade, not sure what the rest is doing, but I can't imagine annoying using anything but C++ as much as I hate it, or C at best for anything serious as things are going.

There's still plenty of game engines featuring some amount of scripting, there has been for the last 30 years, and I don't think it's gonna go away. And some studios do use some lisp here and there. But usually this is given to game designers that have no idea of programming, or performance, and a lot of time what happens is that a designer might implement a feature in scripting, and then a programmer would reimplement it efficient in c++ once its done.

I would like to see some C + Lisp games, instead of C + lua (though some would argue that lua is kind of lispy, also check fennel)
>>
File: 1670627207817057.gif (1019 KB, 500x373)
1019 KB
1019 KB GIF
Can anyone tell me how/if quicklisp manages FFI libraries?
I've been using guix for a while for all of my CL libraries but have been considering using quicklisp instead
since seemingly a lot of software (e.g. Lem) assumes you use it. (I will still not use roswell, though. No idea what that shitware is even for).
>>100118159
Most games are written in C# nowadays which is a Java clone, and Java is like a bastard child of Lisp and C++. So, very barely.
>>
>>100118115
> 500% loss in performance
There are two "sides" to approaching performance. The positivist side: finding the quickest way to do something. It can easily double or triple performance. The negativist side: finding ways to avoid work. This can easily multiply performance by 100, 1000, or more. Consider the difference between doing an operation for one second and finding a way to avoid needing to do that operation at all.

The hypothetical 500% loss in "positive" performance can often be regained by an order of magnitude through avoidance of work. When it can't, and we've found the minimum of work necessary, this is where SIMD and such becomes very useful. But concretizing the data structures and algorithms before negative performance is achieved drastically reduces one's ability to find and apply negative optimization. Positive optimization has to be done after the fact, or you can expect multiple full rewrites of the optimized core.

In video game terms, if I can avoid the physics simulation for half the objects without changing the gameplay, then I have more than doubled the performance of the game's physics. Not processing 10000 entities every frame is faster than processing 10000 entities, no matter how quickly.

In light of this, positivist optimization is useful to extract the last droplets of performance juice from the orange of computation. In video games, this is very useful and necessary. Importantly, however, video game developers I've met trend towards an overly-positivist approach rather than looking for work they could avoid or defer. It is a style of performance programming that sees only costs, and never their benefits. The human mind has a negativity bias: a 20% loss in performance to enable a 500% gain is often perceived as a 20% loss, rather than a 400% gain.

None of this information is specific to Lisp, btw. I just like Lisp because it's so malleable and amenable to total changes in operation with no adjustment to the interfaces.
>>
If I have a code block
#+NAME: process-file
#+begin_src awk
Awk code that process a file
#+end_src

Is it possible to call that block "as a command" in another one?

#+begin_src bash 
find . "*.txt" | (something here that uses that awk script)
#+end_src
>>
>>100118503
>since seemingly a lot of software (e.g. Lem) assumes you use it.
There was a lem package for guix posted here which doesn't need quicklisp or roswell: https://github.com/arthur-dog/lem-guix-packaging/blob/main/package.scm
looks like it substitutes everything referencing quicklist with asdf instead.
>>
>>100118646
I actually managed to run Lem without quicklisp by making a fake package but there seems to be built-in quicklisp support there so might as well use it
>>
>>100118503
Quicklisp doesn't care at all about FFI libraries.
>>
>>100118613
You can reference another block as a variable or take it's input as stdin. I think it is also possible to go the other way (send output to another block).
>>
>>100118343
>There's still plenty of game engines featuring some amount of scripting, there has been for the last 30 years, and I don't think it's gonna go away. And some studios do use some lisp here and there. But usually this is given to game designers that have no idea of programming, or performance, and a lot of time what happens is that a designer might implement a feature in scripting, and then a programmer would reimplement it efficient in c++ once its done.
i'd argue that we're seeing a reversal in this trend. epic gayms were the ones who pioneered the "just use sepples for everything!" mindset years ago when they killed unrealscript, then in recent years they released an entirely new scripting language (verse) specifically for game dev
>>
>>100118989
A good scripting engine, even if it's interpreted, is quite a bit faster at development time and runtime, as long as you use it for scripting only.
C++ has no first-class control facilities (i.e. real closures, continuations, or coroutines). Scripting usually deals with the high-level multi-frame execution of a game, which means that even the simplest implementation of first-class control will be faster and better than what C++ provides for this task. C++ has a "coroutine" library, but they are coroutines like two slices of cardboard is a sandwich. C++ has "lambdas", and as a bonus, you get to deal with "dangling references". These are not fit for the purpose of higher order control.
>>
is there any real significant performance difference between structs and classes in common lisp? I hate how changing a struct def makes everything lose its mind constantly, but it just seems like some things don't need the wankery of CLOS.
>>
>>100119656
Structs are more lightweight and in principle faster, but you should benchmark it for your given CL implementation. I know that on CCL structs are faster though.
>>
>>100119656
structs are faster. if you don't actually need classes the easiest thing to do is have a switch somewhere that makes things class backed when you are working with it interactively and struct backed otherwise.
>>
Okay, fiddled a bit with this piece of shit qlot thing and it didn't work so I just installed the libraries in the qlfile manually and asdf:make'd Lem.
>>100119656
Structs are theoretically faster but there is little point to using them outside of the hot path and if you are looking for performance might as well just use an array, which will be even faster.
>>
>>100119215
a "continuation" can be simulated with a switch at the beginning of a function and some extra state. Sure We would probably enjoy more power and some sugar, but that switch at the beginning of the functoin, and some extra data in wathever instance the function is running in will do the trick. It is equivalent yet it will be faster in c++

The only way it is faster, and this is strictly the only way its faster, not one of the many ways, its implementation time. Lying to ourselves doesn't help with adoption. There's nothing special about what lisp, lua and other simple scripting languages can achieve, and that's the point. Simple is good, the rest of the things should be as good and as simple. But let's not pretend we reached a point where the guy writing C somehow gets it wrong 99% of the time and we are just as fast most of the time. It rarely happens.
>>
>>100120091
> a "continuation" can be simulated with a switch at the beginning of a function and some extra state
That's a stackless coroutine, not a full coroutine, and DEFINITELY not a continuation.

> The only way it is faster, and this is strictly the only way its faster, not one of the many ways, its implementation time.
Problem is that this is false. How fast is it to save and restore the state of the C++ stack? How fast is it to repeat execution from a certain point in the stack? How fast does an integer that has overflowed get converted into a bignum? How quickly can you serialize the state of your C++ program?
>>
Okay. Tried to replicate the most basic feature of my emacs config in Lem:
(defun my/kill-context ()
(interactive)
"Kill word or kill region depending on whether there is an active region."
(if (region-active-p) (kill-region (region-beginning) (region-end))
(backward-kill-word 1)))

Unfortunately, in Lem there is no lem:region-active-p function, and region-beginning/end signal an error when there is no mark..
Unbothered, I set out, until apparently encountering the fact that pressing tab to complete the (lem:buffer query to find out some buffer functions crashes Lem. After some testing I've determined that the performance of the completion rapidly decreases with the number of possible completions. Probably some O(n^2) thing but I can't be bothered to try to figure it out so I'll go to sleep now.
>>
>>100118159
people overestimate comically how demanding games are on the CPU side. on one hand, all game libraries and engines have some C in them, because they need to access lower level OS APIs, graphics, audio, input, and that will have to touch the OS C layer at some point. on the other, even high budget 3D games are almost never bottlenecked by the CPU. the expensive part is always the rendering, and for the GPU it doesn't matter what language is sending the buffers, it does its black magic all the same.

so basically given a minimal set of game facilities (like SDL2) and access to the GPU (shaders, vertex buffers, etc) you could write the game logic in fucking python and it wouldn't slow down. there are very, very few games capable of making a modern CPU sweat.

people in this board seem to think gamedev is some kind of wizardry, but most of the common problems in the field are beyond solved. sure the people working on unreal engine, creating stuff like nanite and all that advanced shit, they're actually doing the mythical inhumanly advanced gamedev work this board idealizes. but 99% of all people working with games in the world are not
>>
Has anyone else noticed how similar Allegro CL is to Chez Scheme? Like their design style, the manual writing style, down to their custom APIs being similar.
It's so similar that I'm almost wondering if there is some communication going on, or maybe it's convergent evolution.
>>
>>100121857
the bottleneck is the memory because they need 256 gb because they MUST have the 6 million triangle unseen internal pussy texture loaded for female npcs at all time
>>
new
>>100123076
>>100123076
>>100123076
>>100123076
>>100123076



[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.