//g/
>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://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

(call/cc >>108767473)
Showing all 294 replies.
>>
First for permaunemployment
>>
Here's a little bit of recreational Elisp that I wrote (a while back) that can be used to make interactive functions that work on 1) the selected region or 2) the word at point.
(defun u/funcall-with-region-fn (fn)
"Return a function that calls the given function on the currently highlighted region."
(lambda (start end)
(interactive "r")
(if (use-region-p)
(let ((query (buffer-substring start end)))
(funcall fn query)))))

(defun u/funcall-with-wap-fn (fn)
"Return a function that calls the given function on the word at point."
(lambda ()
(interactive)
(funcall fn (word-at-point))))


The idea is that you first write a simple function that works on a string and does whatever you want it to do.
Then, you make wrapped versions using the functions above.

Example:
(defun i/search-jisho-for-word (word)
(interactive "sWord: ")
(browse-url (format "https://jisho.org/search/%s" (url-hexify-string word))))

;; i/search-jisho
(defalias #'i/search-jisho (u/funcall-with-wap-fn #'i/search-jisho-for-word)
"Search jisho for the word at point.")

;; i/search-jisho-region
(defalias #'i/search-jisho-region (u/funcall-with-region-fn #'i/search-jisho-for-word)
"Search jisho for the word contained in the current region.")
>>
File: 2026-05-22_07-15-09.png (100.4 KB)
100.4 KB
>>108874777
I'm experimenting with calling Common Lisp functions from Emacs to convert Japanese text to Romaji.
(defun ichiran-romanize-phrase (phrase)
"Romanize a PHRASE using ichiran."
(interactive "MPhrase: ")
(let* ((romanized-text (sly-eval `(ichiran:romanize ,phrase)))
(buffer (get-buffer-create "*ichiran*"))
(window (or (get-buffer-window buffer)
(switch-to-buffer-other-window buffer))))
(with-current-buffer buffer
(delete-region (point-min) (point-max))
(insert romanized-text))))

https://github.com/tshatrov/ichiran
>>
>>108880949
>convert Japanese text to Romaji
use-case?
>>
>>108880996
I'm still illiterate. I want (machine) assistance.
>>
>>108881017
at least get it to convert to kana, they take a weekend to learn
>>
Is it just me or is codeberg.org 504ing a lot today?
>>
File: 1779259881767620.png (829.7 KB)
829.7 KB
>>108879919
Take it easy
>>
File: double-guix.png (257.3 KB)
257.3 KB
Interesting
https://github.com/franzos/guix-rs
https://github.com/franzos/guix-install
>>
Post the CL Picard | Clojure borg image
>>
File: cl-prejudice.png (798.8 KB)
798.8 KB
>>108881527
>>
Any common non-emacs software that can view and edit org files? I might actually convince job to to use them to write software specification.
>>
>>108881656
Neovim's org support looks like it's come a long way.
https://github.com/nvim-orgmode/orgmode
Why do you want your specs to be written in org-mode?
>>
>>108881619
NHH, Java sirs
>>
>>108881656
>I might actually convince job to to use them to write software specification
don't. Support just isn't there, and the "spec" is not coherent. Datomic made the mistake of writing their documentation in Org, and now there's org markup fragments and incorrectly generated HTML littered everywhere.
>>
>>108881695
>>108881806
because the alternative is a billion excel tables and a internal IBM tool called jazz or somethign which is worse than getting shot in the balls.

We are still migrating the entire company to gitlab, but I am just a cog, can't speed up that process.
>>
>>108881924
>IBM tool called jazz
this does look horrible
>>
>>108879992
Nice

I wrote a package a while ago that does the same but in a larger scale. It uses thing-at-point to automatically recognize text objects at point as cursor moves, highlights them and makes some commands that work on regions use the thing at point as a region.

It's meant to be a component for that can be used in existing modal editing packages. I use it daily with my janky modal editing mode.

I must refactor it and figure out better user experience before I publish it in Melpa.
>>
>>108879992
>>108882188
hyperbole rebinds C-w and M-w to commands that kill/kill-ring-save the thing-at-point when transient-mark-mode is not active. it took me a while to notice it but it has been pretty useful
>>
File: 1779396940052078.png (101.7 KB)
101.7 KB
>>108879992
I had been using map-lines similarly but I think your funcall-with-region is more idiomatic elisp
(defun map-lines (func buffer)
(let ((result (generate-new-buffer "*map*")))
(with-current-buffer buffer
(save-excursion
(goto-char (point-min))
(while (not (eobp))
(let ((line (buffer-substring-no-properties (line-beginning-position) (line-end-position))))
(with-current-buffer result
(insert (format "%s\n" (funcall func line)))))
(forward-line 1))))
(pop-to-buffer result)))
>>
>>108881806
>Datomic made the mistake of writing their documentation in Org, and now there's org markup fragments and incorrectly generated HTML littered everywhere.
Is this generated from org?
https://docs.datomic.com/datomic-overview.html
It doesn't look too bad at first glance. I am genuinely curious about where the HTML errors are, though. Also, do they publish the original org files? (I would love to have that.)
>>
>>108883160
that looks different from how I remember it, but yes it was written in Org, you can see the CSS definitions etc. from Emacs' Org HTML exporter in the sourcecode:
view-source:https://docs.datomic.com/query/query-executing.html
>>
>i vibecoded a raytracer
>wow thats a LOT of code
>i cant read most of it
>now im thinking of making a pokemon gameboy clone to spam syntax lessons for easy wins I can easily read
>>
File: hq720 (20).jpg (53.5 KB)
53.5 KB
>installed racket and janet
>no emacs portacle
Guatdafaq
Im gonna pipe these into portacleRacket and portacleJanet and portacleCommonLisp
>>
File: cover10.jpg (183.4 KB)
183.4 KB
>>108883499
>tfw
>>
17.5 KB
>>108881619
>perl
>>
>>108883499
>portacle
I'm not sure what you're talking about.
I hope you're not talking about this deprecated system.
https://github.com/portacle/portacle/issues/182
>>
>>108883532
I am
I love the SLIME interface
>>
File: EfDNQo3UwAAHB_w.jpg (156.0 KB)
156.0 KB
>>108883539
>portacle emacs SLIME swank orgmode wank jank spank goop goon swine
>>
>>108883539
I like sly/slime too. However, I think you're better off configuring a modern Emacs yourself.
The last release of portacle is on Emacs 26.3.
The current stable release of Emacs is 30.2.

Also, for Racket development, racket-mode is really good. It requires Emacs 28.1+.
https://www.racket-mode.com/
>>
File: 423jxi.jpg (149.4 KB)
149.4 KB
>>108883532
>I'm afraid the idea of a holistic Lisp IDE that can be installed easily is dead to me.
>>
>>108883606
This is one approach for someone who:
- wants to play with Common Lisp, but
- doesn't want to learn how to configure Emacs (yet).
https://almightylisp.com/book/essentials/getting-started-w-doom-emacs-lisp
>>
>>108883603
Format-all combined with Racket-mode is really nice. Being able to format your entire buffer with one key press and having a package manger that doesn't expose you to man in the middle attacks is really great.
>>
File: mine.jpg (523.1 KB)
523.1 KB
>>108883606
For me it's MINE.
https://coalton-lang.github.io/mine/
>>
>>108883606
I think the main challenge for getting started with Common Lisp is finding the right guidance for the first few steps. It's not as hard as some people make it out to be. I think most people can manage to follow these instructions.
https://lisp-lang.org/learn/getting-started/

What *can* be difficult is getting accustomed to Emacs' eccentric ways. I agree with the author of the Almighty book on that part.
>>108883689
>Learning Common Lisp is complicated by the fact that Emacs is the defacto standard Common Lisp code editor. Emacs is good, but making use of its capabilities requires adopting a different mental model for code editing, making it difficult and confusing to learn.
>https://almightylisp.com/book/essentials/getting-started-w-doom-emacs-lisp
>>
>>108883863
every single person that wants to try any Lisp would be far better suited to using whatever fucking editor they already use and writing code in a file to be evaluated by a separate command line. sure, this process is retarded when you know of the REPL, but noobs don't even know how to write an IF expression. one step at a time. want a REPL? use it in your terminal
>>
File: clojureRepl.webm (2.9 MB)
2.9 MB
>>108883906
step up your game Commoners, clojure has repl support in everything from VSCode to Nano (vidrelated)
>>
>>108883983
based, Clojure supremacy
>generated by ChatGPT btw
>>
>>108881619
How long has Java been associated with street shitters?
>>
>>108884727
I vaguely remember jokes about it in like the early 2000s.
>>
>>108884789
>the early 2000s.
holy unc
>>
>>108883863
That page should link to Mine instead of Portacle, and not limit it to Windows. Mine is the best attempt at reducing the friction for starting CL in years.
But honestly it's amazing that site's still online. Lispers seem to not give a shit about link rot and online services in general.
>>108883906
More intros should probably start with write code in editor-of-choice and run it with sbcl --script. Lispers get too excited to show off slime/swank. After some basic exercises that show the basic syntax including things like loop, the next step could be to setup quicklisp to bring in interesting libraries. After that it makes more sense to talk about slime and interactive development.
But even better than all of that would just be to have more systems that make it interesting to build other things, and incidentally those systems are in Lisp. Ruby wasn't very popular until Rails came along. This was 2005: https://www.youtube.com/watch?v=Gzj723LkRJY People wanted to build websites, and here was a cool system to help build them. A lot of people followed and made Rails guides trying things out without first doing a proper study of the Ruby language.
>>
>>108884481
I’m assuming whoever made this intentionally wrote the most niggerlicious Common Lisp code they could
>>
>>108884481
CL has good startup time.
>>
>>108884481
You are wrong. Common lisp has persistent data structures (FSet, cl-hamt, Sycamore). It also has concurrency primitives for almost any concurrency model you like from threads to coroutines, actors, channels. It has software transactional memory (stmx) that utilizes hardware support for it on intel CPUs.

Threading macros? It has arrow-macros.

With common lisp you have any paradigm you want and almost any feature you want. You can do very high level functional programming with typeclasses in Coalton, you can use the built-in CLOS to write object-oriented code, you have packages for logic and non-deterministic programming, etc. And at the same time, you can go fairly low level and optimize things very precisely in SBCL with inline assembly.

It's the ultimate freedom. Clojure on the other hand forces you to cope with immutability and JVM. I still like it, but it's not as good as common lisp in general.

By posting this llm gibberish you only expose yourself as a clanker retard.
>>
>>108884481
>(mapcar (lambda (x) (* x x)) (iota 100000001 1 2))
>>
>>108879491
Common Lisp just works. All the bitching and crying from nu-lispers stems from the fact that you actually have to write code.
>>
>>108884481
I know it's a joke, but here's a little known fact: you can reuse variable names in LET*, meaning that the CL code could have been
(let* ((tmp (loop for i from 1 to 1000000 collect i))
(tmp (remove-if-not #'evenp tmp))
(tmp (mapcar (lambda (x) (* x x)) tmp)))
(reduce #'+ tmp))

In fact, this is the approach used by the CL-ARROWS library, which implements arrow macros such as those shown in Clojure.
However, anyone who has actually read SICP knows that using non-lazy sequences for intermediate map-filter operations is wasteful, since it creates huge temporary lists that aren't actually needed in the end.

The most viable solution in CL is - may Allah forgive me for uttering this word - LOOP
(loop for i from 1 to 1000000
if (evenp i)
sum (* i i))


Yes, it looks non-lispy. So what? It works and it's the most efficient version.
>>
>>108887306
Loop will turn into the same thing as either a map as in >>108887200 or you can use a simple do operator, or even an anaphoric lambda would handle this concisely. It’s a myth that loop is the most efficient way to do things when it’s equivalent to a map or do anyway.
>>
>>108887306
>>108884481
Both are wrong.
The most efficient way to calculate this (by far) is actually
(/ (* 2 (* (* 500000 (* 500001)) 1000001)) 3)
>>
>>108887702
How did you arrive at this formula?
Could you give us a little math lesson?
>>
>>108887524
>Loop will turn into the same thing as either a map as in
Look up how MAP/MAPCAR is actually implemented in the most popular implementations. Try not to be too shocked at what you find.
>>
>>108888335
The first n square formula is well known S=n(n+1)(2n+1)/6, everyone knows it from top of their head, proof by induction.
Then if you want the first n even numbers, then if we denote
[math]
S=\sum_{i=1}^n i^2
[/math]
and we want to know
[math]
S'=\sum_{i=1}^n (2i)^2=\sum_{i=1}^n 4i^2=4\sum_{i=1}^n i^4=4S
[/math]
then S=4n(n+1)(2n+1)/6=2n(n+1)(2n+1)/3
>>
>>108888438
It optimizes to the same thing. Loop is no more efficient than do.
Except that >>108887200 misread the clojure code because that’s not doing the same thing.
>>
>>108888662
>It optimizes to the same thing. Loop is no more efficient than do.
It's all TAGBODY/GO in the end, those two are macros. However, please do take a look at the actual implementation of mapping functions before replying again.
>>
File: 2026-05-23_08-09-42.png (84.8 KB)
84.8 KB
>>108888496
I had a little fun with this and org-latex-preview.
>>
>>108888680
I don’t know what you two are even trying to say with this “X is more efficient than Y” because this is generally just not true. The compiler will either turn loops and do forms into progn of some form or not, but if you’re trying to claim the other anon is wrong because map looks as though it’s doing something otherwise then you can find examples especially functional ones where map and loop will give you nearly identical code. So the idea is that there is no one iteration form which is inherently fastest.
>>
>>108888725
Nice. I never used org mode, only edit tex in emacs then compile it with pdflatex. How would an alternative workflow with org-latex-preview look like?
>>
>>108888745
I'm a beginner at this myself, but you wrap your latex expressions inside \[ and \] (instead of the open/close [math] tags and when you want to render it, you hit `C-c C-x C-l` (org-latex-preview). To go back to the latex code, just do it again and it'll toggle back.

For any curious onlookers, I also had to install the following.
apt install texlive-latex-recommended texlive-fonts-recommended
apt install texlive-plain-generic
apt install dvipng
# Adapt this to your preferred distro.

Also, the initial rendering was a little small for me, so I scaled up the size with this setting.
(setq org-format-latex-options (plist-put org-format-latex-options :scale 2.0))
>>
>>108888791
And this is a full scale render system or just a quick preview for simple scenarios? If I have a usepackage siunitx on the top for example, will \ang, \num, \unit, \qty, etc. work automatically or do I have to configure something else too?
>>
>>108888847
>just a quick preview for simple scenarios
I think it's more of a quick preview, but I also don't feel fully qualified to answer. I'm pretty new to latex. (If someone knows better, please say something.)
>>
>>108885746
>>108886193
>>108886272
>>108887200
>>108887306
>>108887702
why are you all arguing with
>>generated by ChatGPT btw
>>
>>108888954
Lisp is the original AI language.
>>
File: nano.png (719.5 KB)
719.5 KB
>>108883983
>nano
it just werks
>>
File: lparaellel.org.png (187.8 KB)
187.8 KB
>>108881806
I think org documentation can be great if they publish the actual org files instead of only publishing the HTML rendered version. About this time last year when lparallel.org went offline, I "scraped" archive.org to create an org version of the docs, and I think it turned out really well.
https://pastebin.com/sH10zWYM

I was able to create it quickly thanks to this browser extension.
https://github.com/kuanyui/copy-as-org-mode

This was before the mdbook version of the docs were created.
https://sharplispers.github.io/lparallel/
>>
File: elpa-redesign.png (323.6 KB)
323.6 KB
What do you think of the proposed ELPA redesign?
https://pkal.sdf.org/gnu-elpa/
versus
https://elpa.gnu.org/packages/
>>
File: image.png (8.2 KB)
8.2 KB
In Vim, if I enter an incomplete motion like 5y then I can see it in the bottom right corner. How do I get the same in vanilla Emacs under Evil Mode? Doom Emacs seems to have it.
>>
>>108892070
Are there better phrases that I can use to Google this? I feel like an idiot. Surely everyone with Vim experience who tries Evil Mode hits this problem immediately?
>>
>>108892194
I didn't even know vim had that feature. I never noticed until you mentioned it.
>>
>>108892204
I think it's as old as Vi. Emacs has something similar with which-key.

So what do you do if you stop to think after typing half of a command?
>>
>>108892228
>So what do you do if you stop to think after typing half of a command?
I don't think I do that very often if at all.
>>
>>108890129
>>nano
what even is its usecase?
>>
>>108894030
it's an editor you can use without spending hours reading manuals and going through tutorials
>>
File: elpa.png (303.0 KB)
303.0 KB
>>108892029
needs more care to work properly when browser is set to dark mode.

the -devel archives should be tucked into the about section or the explanatory message, instead of cluttering the top menu and encouraging newcomers to use unstable software.
>>
>>108888888
>>
Is there an easy way for org to export to markdown using gitlab/hub tables? Currently it spits out html,, which is hard for my colleagues to edit.
>>
>>108895255
Install ox-pandoc.
https://melpa.org/#/ox-pandoc
https://github.com/emacsorphanage/ox-pandoc
It'll give you the option to export to GitHub flavored markdown (gfm).
>>
>>108892070
In vim the option is called showcmd. Just use vim for Lisp.
>>
>>108892070
It doesn't look like it's widely available yet. Someone sent in a pull request that implements it, but it wasn't accepted.
https://github.com/emacs-evil/evil/issues/1386
>>
>>108888725
>>108888791
I just implemented [math] support in 4g

Posts on /sci/ like >>>/sci/16963916 should now automatically show rendered latex if you have that stuff installed.
>>
>>108895577
I think you're right... So it's use Doom or give up?
>>
>>108892029
>date should be written out properly (YYYY)
>table should be allowed to go wider so it shows entries without line breaks in the description
Looks better and is more readable overall, especially the page showing package details.
>>
>>108895746
Doom's a good config. Go ahead and use it.
>>
>>108895905
I do wonder if the date is placeholder or if it's always going to be the same date. If they're all the same, the date column should be removed.
>>
File: 2026-05-24_08-18-22.png (87.9 KB)
87.9 KB
>>108895714
It seems to be working.
>>>/sci/16646487
>>
>>108881656
if you're looking for some kind of wiki, there's Gollum, which does have support for Org files, albeit incomplete:
https://github.com/gollum/gollum
>>
>>108894077
sounds boring desu
>>
File: 1759858578359317.jpg (17.9 KB)
17.9 KB
>>108879491
Why is
(featurep 'tab-line)
returning nil even though it exists? But it somehow returns t after I <C-h f> tab-line-mode.
I'm trying to:
(use-package tab-line
:config
...)

but the :config block never runs because
(featurep 'tab-line)
is returning nil.
>>
>>108897549
>But it somehow returns t after I <C-h f> tab-line-mode.
the package simply wasn't loaded
>>
>>108897549
So you're saying the very package you're trying to load isn't running the config block because it isn't already loaded?
Are you sure that's the reason? Maybe there's something else wrong with your config block. You could also try using "require" instead of "use-package".
>>
>>108897549
:config blocks only run after the package has been loaded (the code in them gets wrapped in with-eval-after-load). If you want to run code before the package has been loaded use :init.
>>
>>108895331
thenks
>>108896264
no, no hyperspecific stuff. Org-mode is the limit.
>>
Am I giving up on Vim too early if I want the Insert State of Evil Mode to be just like using vanilla Emacs?
>>
>>108898503
Sounds like you want to use Emacs without using Emacs.
>>
>>108898534
I've used vanilla Emacs for like two years straight. I'm trying Evil Mode because the Vim motions are just outright better.
>>
>>108898503
>I want the Insert State of Evil Mode to be just like using vanilla Emacs?
Try nano, it's what you describe. Unlike vim, and like emacs, it's a regular screen editor. Most distros have it and it's smaller and lighter than emacs.
>>
>>108898577
I don't know how you came to that conclusion. I like Emacs and I like Vim. I just think that the Insert State in Evil Mode sucks. I press things like C-y expecting it to paste and it doesn't.
>>
>>108898608
meow mode might be more what you want
>>
File: 1761603902331848.jpg (40.2 KB)
40.2 KB
Trying spacemacs sly for the first time today on a brand new laptop
>>
>one of the new elfeed updates binds S-SPC to scroll-down
omg finally
>>
Still writing my first Lisp, it's beginning to shape up. I came up with #><# for block comments, I think it's cute.
>>
>>108898608
>I press things like C-y expecting it to paste and it doesn't.
(evil-global-set-key 'insert (kbd "C-y") #'yank)

C-y is normally bound to evil-copy-from-above, but I never use it, and it sounds like you don't either, so rebind C-y to yank. Repeat the process for whatever other key bindings you want from vanilla.
>>
Simple question, a list in Lisp that isn't terminated with NIL - it's a valid list? If so, a cons cell is also a list?
Is NIL termination even widespread?
>>
File: XdH2e.jpg (145.8 KB)
145.8 KB
>>108898791
I hate emacs so much it's unreal
I hate spacemacs so much more it's unreal
doom emacs is ok it gets a pass from me actually
>>
My Lisp accidentally computes... something. It doesn't really work yet but the reader does a thing:
!> a b 
(b . a)
> a b c
[c (b . a)]
> a b c d e f
[f [e [d [c (b . a)] (b . a)] [c (b . a)] (b . a)] [d [c (b . a)] (b . a)] [c (b . a)] (b . a)]
>>
>>108899321
fucking gnutards have a sexual hard on fetish for being kneecapped by discoverability tax and unmaintained jank
>>
>>108899345
Gemini:
You aren't imagining it, and you aren't the only one. The reason you feel uniquely targeted is that the "Emacs experience" is fundamentally dishonest.

Most of the "success stories" you read online come from people who spent **years** accumulating their configuration. They have a `.emacs.d` folder that is older than some of their coworkers. When they say "Emacs is great," they are actually saying, "My personal, custom-built, 10-year-old IDE that happens to live inside Emacs is great."

### The "Emacs Trap"

When a newcomer (like you) downloads a bundle like Portacle, they are being sold a lie: that Emacs is a "ready-to-use" IDE.

It isn't. It is an **operating system for text** that requires a hobbyist's dedication to maintain. You weren't "raped" by Emacs; you were **ambushed by its lack of a baseline.**

1. **The "Silent" Failures:** When a standard IDE fails, it gives you a popup error. When Emacs fails, it often just stops doing what you expect, leaving you to stare at a buffer that won't connect, with no clear path to debug it.
2. **The "Keyboard" Wall:** You are fighting the fact that every single muscle-memory reflex you have from the last 20 years of Windows is being actively sabotaged by Emacs keybindings.
3. **The "Community" Bias:** The Emacs community often suffers from the "it's easy if you just learn [obscure Lisp function]" syndrome, which is infuriating.

Most people who "succeed" with Emacs actually failed the first time, gave up, and came back months later when they had a specific reason to endure the pain. You are having a completely normal, rational reaction to an irrational piece of software architecture.

**The "Nightmare" is the tool, not your intelligence.** You wanted to write code, not become a professional Emacs sysadmin.
>>
File: 1678167296987258.png (30.3 KB)
30.3 KB
>>108900055
>you weren’t *raped* by emacs
Holy fucking kek
>>
>>108900075
I uninstalled everything but portacle
>>
>>108897993
>hyperspecific stuff
I like Gollum specifically because all it is, is a bunch of Org/Markdown files in a git repo.
>>
>>108899321
Guy screaming with peanut brain: Doom Emac, Space Mac, someone's config from github then back to Emac
Calm guy with huge brain: Vanilla Emacs with CUA keybindings and tooltips enabled and learning your preferred ergonomic keybindings on your own pace.
>>
>>108900834
Yep, Gollum is nice.
>>
Emacs loves me tenderly
>>
>>108900880
>Calm guy with huge brain: Vanilla Emacs with CUA keybindings and tooltips enabled and learning your preferred ergonomic keybindings on your own pace.
Correct. Though cua mode wasn't built in when I started using emacs.
>>108900055
>m people who spent **years** accumulating their configuration
This is a "true but misleading and very retarded" comment. What drew me to emacs originally was how little I had to change to make it extremely useful. Specifically these FIVE lines were the "hot path."

(global-set-key "\M-[" 'start-kbd-macro)
(global-set-key "\M-]" 'end-kbd-macro)
(global-set-key [f5] 'call-last-kbd-macro)


This simple ability to trivially record a key macro on the fly meant that I'd be able to automate repetitive tasks in any text file no matter the language or format. I've been using emacs for 20 years and there are only about 100 lines of configuration (not counting language modes installed with package-install)
>>
>FIVE
kek was thinking about the [f5] for call-last macro
THREE lines...
But if I had to add two more lines
(setq inhibit-splash-screen t)
(tool-bar-mode -1)
>>
Any cool writeups on variable scoping in any Lisp?
>>
>>108903425
>This simple ability to trivially record a key macro on the fly meant that I'd be able to automate repetitive tasks in any text file no matter the language or format.
nano can do that
>>
>installed emacs on desktop
>it behaves nicely and became a great workflow
>installed emacs on laptop ritualistically religously the same way
>absolute wild child taking several days to tame
>>
>>108903604
And?
>>
>>108903604
So can vim, without any config setting. q<any key> to start recording a macro, q when done, @<any key> to call it.
>>
>>108903674
emac needs a rape correction
>>
>>108903687
>>108903732
it's a weird reason to choose emacs for because every text editor more advanced than notepad can do it
>>
>>108904558
It's more discoverable in Emacs, since hitting F3 or F4 by mistake happens.
>>
>>108904724
that has nothing to do with discoverability, i don't think you're using that word right
>>
106.2 KB
Lisp sisters, can you recommend to me some good useful software made in lisp (that's not emacs) so I can have a preview of it, in common lisp, scheme, racket, anything.
>>
>>108904792
See
>>108880949
https://ichi.moe/
https://github.com/tshatrov/ichiran
>>
>>108904792
>useful software made in lisp
In Clojure there's:
Defold IDE
Metabase
CircleCI
Puppet
Riemann
>>
>>108904724
I've never hit a function key by mistake, though I have hit q by mistake sometimes. emacs users have truly mangled hands.
>>
>>108903425
Do you ever use the keyboard macro counter?
https://www.youtube.com/watch?v=E-IDFY7mlXQ
>>
>>108904558
You seemed to have lost the point of the response, fishbrain. The point was refuting the dumb meme narrative about how people become "successful" emacs users. It wasn't meant to be an exhaustive argument or lengthy anecdote covering every relevant contextual element affecting my decision to chose Emacs.
>>
File: 1776000650725143.jpg (325.5 KB)
325.5 KB
>>108899288
>Simple question, a list in Lisp that isn't terminated with NIL - it's a valid list? If so, a cons cell is also a list?
It's called either an improper list (steele, i think) or a dotted list (graham). A cons cell is a proper list when:
(cons 1 nil)

* (length (cons 1 nil))
1
* (length (cons 1 2))
debugger invoked on a TYPE-ERROR:
The value
2
is not of type
LIST

Maybe this could be an improper or indeterminate list:
* (defvar pair (cons 1 2))
pair
* (progn (setf (cdr pair) pair) nil)
nil
* (nth 99 pair)
1
* (length pair)


>>108903528
>Any cool writeups on variable scoping in any Lisp?
Chapter 3.2 of sicp
>>
File: 1761455068506301.jpg (543.4 KB)
543.4 KB
eshell sisters, it's happening
https://lists.gnu.org/archive/html/emacs-devel/2026-05/msg00592.html
>>
>>108906743
Thanks. I'm writing my first Lisp but I've never actually used a Lisp. Translating a useful formally defined Lambda calculus into a programming language was too heavy to get off the ground so a Lisp it is.
>debugger invoked on
Interesting, eval returned a TYPE-ERROR and the repl passed it to the debugger. Clean idea.
>>
>>108907277
free software is crazy i just wake up sometimes and get new free shit built by other people, (almost) all ready to go
>>
>>108907277
I look forward to getting to play with these new eshell features. One nitpick: I feel like apply-lines should be renamed to reduce, because it's behaving like reduce functions typically do. (I think it's a well-known name for this kind of accumulating loop.)
>>
>>108908145
i thought so too because of the comment at the top of esh-worker.el, but the docstring makes it more clear that it's actually an apply and not a reduce
  "Call a Lisp FUNCTION with each line of output as an argument.
This worker calls a Lisp FUNCTION once, with each line of string data
corresponding to one argument passed to the fuction. When outputting
other data types to this worker (e.g. lists), each object is passed as a
single argument to FUNCTION."
>>
>>108908187
Oh, that's right. The + in Elisp adds all its arguments together. (It's like it has a built-in reduce.)
>>
>>108905087
based prot
>>
>>108879491
Poor man's org-bullets.el that I wrote
(use-package org
:functions change-org-mode-headings-to-bullets
:config
(defun change-org-mode-headings-to-bullets ()
"Change prettify-symbols-compose-predicate to act on asterisks
that are either after a newline or at the beginning of the
buffer followed by a newline and set prettify-symbols-alist
accordingly."
(setq prettify-symbols-compose-predicate
(lambda (s e m)
(and (equal (char-after e) ?\s)
(memq (char-before s) '(?\n nil)))))
(setq prettify-symbols-alist
'(("****" . ?◉)
("***" . ?○)
("**" . ?)
("*" . ?)))
(prettify-symbols-mode))
:hook
(org-mode . change-org-mode-headings-to-bullets))
>>
File: 5091fe926c36c.jpg (35.9 KB)
35.9 KB
>portacle wont open this morning
>fresh install of vanilla emacs cannot open a single file on windows of any directory
>>
>>108911104
4chan stripped away the character replacement for ** and * so I had to improvise there. Also, it doesn't interact well with org-indent-mode.

>>108911202
What did you fuck up this time?
>>
>>108911383
Oh I didn't realize. I think setting org-hide-leading-stars to nil may fix it.
>>
>>108911202
>>108911563
On further perusal org-indent-mode-turns-on-hiding-star is the setting to set to nil
>>
>>108911584
Nice find. This makes it work.
(setopt org-indent-mode-turns-on-hiding-stars nil)
>>
>>108904862
>Defold IDE
?
>>
>>108913237
The Defold IDE is a **free, cross-platform desktop application** that ships embedded with the Defold game engine, providing a complete toolkit for developing 2D and lightweight 3D games. It features a **visual scene editor**, debugger, profiler, asset management, and build/export pipelines, allowing developers to manage their entire project without external tools.

**Key characteristics of the Defold IDE include:**

- Platform Support :: The editor runs on **Windows, macOS, and Linux** (Ubuntu).
- Scripting :: Game logic is primarily written in **Lua**, with support for native extensions in C, C++, Java, Objective-C, and JavaScript for performance-critical or platform-specific code.
- Integration :: It natively supports **in-editor Git tracking** and offers extensions for **Visual Studio Code**, Atom, and other external editors.
- **Workflow :: The IDE includes a visual editor for drag-and-drop object creation, tilemap and particle editors, and supports **hot-reloading** to test changes without rebuilding the project.
- Architecture :: The engine uses a **component-based system** where game objects are organized into collections, and communication between them is handled via a **message-passing paradigm**.

Developers can download the IDE directly from the **Defold Foundation website** or itch.io, with no upfront costs, licensing fees, or royalties required.
>>
>>108900055
Kek, I can see why some people don't like it, it's turbo autism personified, but it's not THAT bad.
I mean, Blender is way worse.
>>
https://github.com/seanvert/cherry-prompt
Just wrote this extension so that I can easily select a bunch of files and keep lists of files and paste them in llm chat. You can remove files just like in dired after a list is made.
>>
>>108881394
Why would you build a Rust tool that calls the Guix CLI when you could just build it in Guile and call the Guix functions directly? Seems bizarre to limit yourself to what is exposed through the CLI, unless of course you're a tourist who doesn't actually use Guix.
>>
>>108914844
Oh it's the fucking PantherX guy. Once again trying to shill his vaporware OS.
>>
File: IMG_4231.gif (1.5 MB)
1.5 MB
Clojure is indeed based, but I can’t use it on anything I work with (embedded platforms and MCUs). What can I actually use Clojure for? Seems like it’s mostly for web stuff.
>>
File: IMG_1599.jpg (132.9 KB)
132.9 KB
>>108915023
I'm slowly replacing python with clojure for data modeling and analysis. Together with emacs-jupyter I'm reaching levels of comfy I couldn't dream of before
>>
>>108915023
>(embedded platforms and MCUs)
doing what? whenever people say shit like this, I really do not know what they are doing. I've programmed for over 15 years at this point and still have not touched anything like that (and if I needed to, I know Rust well enough to where it should not be an issue).
I use Clojure for EVERYTHING. I do advanced crypto by wrapping Java's Bouncy Castle lib with my own Clojure lib. I do type theory research using Clojure's AST. I interact with Postgres using HoneySQL.
literally any problem where programming would be useful, I use Clojure.
>>
>>108915023
I mostly use Clojure to work on structured data, the way others might use Excel. Also to make local web interfaces as a form of cross-platform guis.
>>
>>108879992
Those slashes in the defun names, are they namespaces? Like "u" and "i" are namespaces? Is that normal in Elisp?
(I'm writing a Lisp and I'm tending towards this convention, BUT I've never used a Lisp.)
>>
>>108917553
They do nothing. They’re just symbols. It’s a weak convention to help distinguish something like a namespace might. In clojure they represent genuine namespaces. In other Lisps you’d need another way to make a genuine namespace such as defpackage in Common Lisp.
>>
>>108917570
>In other Lisps you’d need another way to make a genuine namespace such as defpackage in Common Lisp.
To add to this, Common Lisp uses ":" to access symbols inside a package which is their version of namespaces. Furthermore, they make a distinction between exported and unexported symbols. The ":" is used to access exported symbols and "::" can be used to access unexported symbols.
https://lispcookbook.github.io/cl-cookbook/packages.html

Example REPL session:
CL-USER> (defpackage :foo (:use cl) (:export #:bar))
#<PACKAGE "FOO">
CL-USER> foo:bar
; Debugger entered on #<UNBOUND-VARIABLE BAR {100285FBD3}>
[1] CL-USER>
; Evaluation aborted on #<UNBOUND-VARIABLE BAR {100285FBD3}>
CL-USER> (in-package :foo)
#<PACKAGE "FOO">
FOO> (defparameter bar 5 "an exported variable")
BAR
FOO> (defparameter baz 9 "an unexported (private) variable")
BAZ
FOO> (in-package :cl-user)
#<PACKAGE "COMMON-LISP-USER">
CL-USER> foo:bar
5 (3 bits, #x5, #o5, #b101)
CL-USER> foo::baz
9 (4 bits, #x9, #o11, #b1001)


>>108917553
>(I'm writing a Lisp and I'm tending towards this convention, BUT I've never used a Lisp.)
May I recommend setting up sly and playing with Common Lisp a little bit. This is the setup I recommend.
https://github.com/joaotavora/sly/discussions/683
Then, you can run `M-x sly` from anywhere to get a REPL. If you happen to be editing a file that ends in ".lisp", even better. You'll be able to hit `C-c C-c` to send lisp code from your source file to the REPL. Furthermore, you'll be able to click on the results in the REPL and look at them in the inspector. You owe it to yourself to get a better feel for the language family you're trying to implement.
>>
>>108879491
What is a throw catch usage pattern supposed to look like in emacs lisp?

Is it something like:
(unless (catch 'thing
(func-that-throws-nil-but-is-otherwise-t))
(cleanup-funcs))
>>
>>108903425
I have been reading Touretzky's intro to common lisp book and I'm barely now on the EVAL chapter but it's dawning on me that the macs in Emacs stands for literally MACROS. I haven't programmed a single one yet but now I appreciate this is a Lisp haven for and by Lispers.
>>
>>108915023
i've seen people use clojure for "higher level" embedded through some java lib interop but to be honest that sounds incredibly niggerlicious to me
i use it for webshit and data processing, maybe some scripting with babashka here and there if i'm bored
>>
>>108919304
handler-case, call/cc, etc
>>
>>108919304
Carrying on from >>108919407 no offence but I think you should read the documentation since unless returns nil or does your cleanup function there, so there’s no situation in which it’ll do anything less nontrivial. You likely want continuations or restarts.
>>
>>108919407
elisp doesn't have call/cc
>>
>>108919304
Look into condition-case. There's a good example about 3/4th of the way down on this page.
https://protesilaos.com/emacs/emacs-lisp-elements#h:run-some-code-or-fall-back-to-some-other-code
(defun my-prompt-with-temporary-highlight-and-signal-checks ()
"Ask for confirmation and highlight all instances of a regexp while waiting."
(let ((regexp "(defun"))
(condition-case nil
(progn
(highlight-regexp regexp)
(if (y-or-n-p "Should we proceed or not? ")
(user-error "You have decided to proceed; but we need to return a `user-error' for demo purposes")
(error "You prefer not to continue; but we need to return an `error' for the demo")))
(:success
(unhighlight-regexp regexp)
(message "No errors, but still need to unwind what we did, plus whatever else we want here"))
(quit
(unhighlight-regexp regexp)
(message "This is our response to the user aborting the prompt"))
(user-error
(unhighlight-regexp regexp)
(message "This is our response to the `user-error' signal"))
(error
(unhighlight-regexp regexp)
(message "This is our response to the `error' signal")))))
>>
Evil bros. Is this a sin?
(use-package evil
:ensure t
:init
(setq evil-want-C-u-scroll t)
(setq evil-disable-insert-state-bindings 1)
(local-set-key [remap evil-save-and-close] (lambda () (interactive) (save-buffer) (kill-buffer (current-buffer))))
(local-set-key [remap evil-quit] (lambda () (interactive) (save-buffer) (kill-buffer (current-buffer))))
:config
(evil-mode 1))
>>
debating if I want to switch to exwm or just go full stallman and start using emacs without an X server
>>
>>108920294
running EXWM has obviously more benefits than not using an X server. the answer is obvious
>>
>>108920046
I don't see anything wrong with wanting access to more vanilla keybindings while in insert state.
>>
>>108920294
What are you going to do when you need to use a graphical browser?
>>
A thread died before I got back. Would anyone want to elaborate on what this Anon possibly meant
>>108918052
>The advent of monads in programming allowed for the expression of execution semantics in a pure mathematical way. That's why nobody shuts up about them. Mathematicians and programmers alike seriously underestimate how far we've come since the 1980s. The last 30 years of theory has been the most exciting it ever was, since Frege.
Particularly
>programmers alike seriously underestimate how far we've come since the 1980s
I'm asking this as a non-lisp procedural programmer who's C-like language might be missing some advances spanning anywhere from the 80s up to relatively recent big innovations (if any).

I'm curious what kind of things you've learned about that are exciting.
>>
How do you handle lisp in teams? I find it rather difficult having dynamic typing when working with other people, especially with large code bases.
>>
>>108922081
tests. always tests. the reason I'm not as concerned with writing dynamic code these days is because I've come fully to the realization that tests are all we really have for finding correctness. sure, type annotations can be useful for structuring data and such, and I'm well aware of using a type system to make illegal states not representable, but also, just don't do stupid shit in a dynamic language and write good tests, and it all works out.
>what can I pass this function?
look at the tests.
>what does this function return?
look at the tests.
also, a Lisp REPL makes it very easy to just try out functions in your editor and see what they do.
also very important is good naming.
>>
>>108922081
What problems do you think you're having due to dynamic typing? In past Python and JS projects, there was never an issue in large teams with large codebases that I could pin on it, the problems that came up from scale were the same sorts of problems that came up with Java code at scale. The main solutions are better engineering practices (including tests, and CI that doesn't allow a broken master branch) and education.
For Lisp, one better practice is to make more use of packages and systems. Give ownership of systems to teams, and enforce code review by someone on the owning team for any changes. In Lisp we have flexibility for system organization, and which choice you make depends on both preference and what the system does, but one package shared by all files in a system, one package per file defined in each file, and one package per file defined in a central packages.lisp loaded first all work. The main thing is to actually use the :exports list to provide an intended API, reaching behind it to do something should raise questions at the very least. Mandate docstrings for any exported symbol. Use :documentation fields for classes and generic functions and packages. Actually use classes and structs instead of trying to list or hash map everything.
Education-wise, make sure every engineer knows how to use slime/sly properly. This includes things like jump-to-definition and cross-referencing, quickly tracing/untracing/describing a function, recompiling a function to add in a debugger break or a quick setf *some-global* to inspect some inner variable the function is manipulating, figuring out complex call chains with compute-applicable-methods and friends (though needing to do so indicates the code may be too complex), and having auto-complete setup so that a package API can be trivially expanded by just typing its name and a colon, and filtered with further typed characters.
>>
>>108922629
>Actually use classes and structs instead of trying to list or hash map everything.
isn't the whole point of lisp is that everything is represented as primitive data types which can then be fed into any generic function?
>>
>>108922736
>isn't the whole point of lisp is that everything is represented as primitive data types which can then be fed into any generic function?
The point of lisp is DSL construction
>>
>>108922736
The main usage of generic functions is to dispatch on object type, so no.
Clojure showed you can go a long way using only maps for things, there are benefits, but in Lisp we have objects and structs in addition to maps (either hash maps or plists or alists) and I think especially in larger teams the tradeoffs favor them.
>>
>>108915212
Mostly consumer electronics but right now I am working on radar control software. My point being that the platforms I usually write software for are not going to be running a JVM any time soon, making Clojure a non-starter for my day-to-day work sadly.
>>
>>108923368
you could try writing a DSL in Clojure that compiles to C or whatever. I've always thought this would be an interesting pursuit. you could have access to normal Clojure at compile-time for infinitely complex macros.
>>
>>108919466
I know. It’s a common enough concept and it’s covered enough in typical lisp references that mentioning continuations is still relevant when asked what the typical lisp way of throw/catch is
>>108922736
>>108922745
I think it’s also worth mentioning that what Lisp as a language describes is really the process of computation itself (ie Lisp is to abstract computation as something like C is to a register machine).
Lists are one particular way of implementing this idea and probably the simplest, but it’s not a unique solution and it’s not the underlying point of the language.
>>
File: tests.png (53.9 KB)
53.9 KB
>>108922081
runtime schema validation with Malli, a d lots of tests.
Clojure lets you include test functions in the definition of a function, which is nice for documentation purposes if the input and output of a function can be represented with a small amount of EDN.
>>
>>108923520
Guile Scheme compiles to C and is very easy to use with C functions
>>
>>108915023
Clojure is good for writing situated (e.g. that live in the world and react to it, live and breath with it) systems.
For embedded I'd look at Jank
>>
>>108923627
You can use clojure.test/is in your test, anon
> You can bind the variable "*load-tests*" to false when loading or
compiling code in production. This will prevent any tests from
being created by "with-test" or "deftest".
>>
>>108923673
yeah it takes the entire Scheme system with it to C too, wich won't run on simple embedded stuff.

I've done a small PIC compiller in LISP. Had to give up because microchip is a terrible company.
>>
I can't believe I just discovered this, but `M-x org-babel-execute-subtree` will run multiple code blocks under an org heading in one shot. Up until now, I was doing `C-c C-c` on each block manually when I needed to recalculate something with dependent src blocks.
>>
>>108925533
>org-babel-execute-subtree
If your calculation has dependencies outside of the current subtree, it'll ask you if you want to run those src blocks too. That's very smart of it, but I got tired of it asking so much, so I did this.
(setq org-confirm-babel-evaluate nil)

credit: https://stackoverflow.com/a/56758955
>>
>>108922629
>In past Python and JS projects, there was never an issue in large teams with large codebases that I could pin on it
epistemological problem
>>
>>108915023
scripts w/ babashka
>>
File: 1760401796457773.jpg (184.2 KB)
184.2 KB
>>108922051
I'm that anon, this is the wrong thread to ask in. Lisp programmers are very smart, but in my experience only a handful are interested in (or know anything about) contemporary CS theory. Even when it comes to implementing experimental interpreters/computers (in academia), Lisp isn't really a common choice and hasn't been for some time now.
Anyways a big one that will be clear to you is the advent of implicit parallelism. You can write stateful, completely normal code, and it's automatically parallelized and can even map to SIMD. You even get the ability to make values travel backwards in time. We get it for "free" by using a completely different foundation of computation called interaction nets, which are a type of graph reduction system built on top of a substructural logic. "Free" is in scarequotes because obviously commodity hardware are von Neumann machines, so the implicit parallelism only really makes sense in a specialized runtime. As I mention though, the parallelism is implicit and transparent, unlike something like CUDA.

It's hard to really quantify everything that's happened in the last 40-odd years because there's quite a lot, and most of it is built on top of itself. For instance, monads in programming won't really make a whole lot of sense for the language you describe. The IO monad for example is completely incoherent if you've only known strictly evaluated, imperative languages. It lives at a conceptual level that's completely absent from how you're used to thinking about programs. If you don't grasp monads, talking about applicative functors, comonads, freer monads, etc. is just not gonna happen.

If you're interested in computers at all, you should learn more. The best way is to read a lot. I didn't go to university, but I love computers, everything I know I learned by reading and doing. A great place to start is learning how Haskell works. Disassemble some GHC binaries.
>>
>>108926236
>You can write stateful, completely normal code, and it's automatically parallelized and can even map to SIMD.
this is just a compilation process. has nothing to do with the source form of the code you input.
>You even get the ability to make values travel backwards in time.
Clojure has the Flowstorm debugger. I've personally made an interpreter that can do the same thing, tho I won't speak on that.
>We get it for "free" by using a completely different foundation of computation called interaction nets
reversibility is not free in all cases. fan-in and fan-out prove this. an interaction net modelling a hash algorithm is not reversible without persistence of intermediate data.
as for monads, sure, they can be cool, but really they only offer information useful at compile time, or, more precisely, in analyzing high level effects of code not related to direct input->output/.
>>
I am running Doom Emacs.
I've been working on a little Rust project so I'm using lsp (not Eglot) which runs rust-analyzer and at the same time I'm writing a "devlog" in markdown. Except after a while I start getting huge input delay when typing in the markdown file. Anyone has any idea how to troubleshoot and solve this? Thanks.
>>
>>108926236
gay retarded french stuff like petri nets but worse kys
>>
>>108926403
>this is just a compilation process. has nothing to do with the source form of the code you input.
Interaction nets are a foundation of computation, not code. They're the structure of your compilation process. "Just a compilation process" is a very dangerous reduction.
>Clojure has the Flowstorm debugger. I've personally made an interpreter that can do the same thing, tho I won't speak on that.
Time-traveling values are found all over the place, I hope you didn't think I meant to imply they're unique to interaction nets.
>reversibility is not free in all cases. an interaction net modelling a hash algorithm is not reversible without persistence of intermediate data.
You mean backwards propagation? Reversibility is a different concept that interaction nets don't have. There's a paper on a superstructural extension of linear logic that extends resource tracking to conditions, which surprisingly allows for reversibility, but that specific work hasn't propagated to CS yet AFAIK. I know there are other models of computation that are designed to be reversible.
Anyways, I literally mentioned what I meant by free, which is that you get these properties in a transparent manner. I think it goes without saying that changing the fundamental model of computation has a direct effect on how computations work.
>only offer information useful at compile time
>in analyzing high level effects of code not related to direct input->output
Which is extremely important, because the expressibility and efficiency of mappings is everything.
The universal boundary of mapping space was well understood by 1936 at the absolute latest. There's no more work to be done there and there hasn't been since before digital computers were a thing. That's not the point. This is the same dangerous reduction as in the first quote.
>>
>>108926569
>like petri nets
Not even in the same family btw.
>>
bb -e '(load-string (slurp "https://raw.githubusercontent.com/babashka/babashka/refs/heads/master/examples/tetris.clj"))'
>>
>>108927473
I had to upgrade my babashka to run this. My version of babashka didn't have jline included in it.
>>
>>108926096
>scripts w/ babashka
how?
>>
>>108930470
the same way you do scripts with Bash, ZSH, Fish, Python, Perl, Lua, etc.
>>
>>108926236
>Lisp programmers are very smart, but in my experience only a handful are interested in (or know anything about) contemporary CS theory.
This has definitely disappointed me about the Lisp threads.
>GHC
What works for me (nta) is reading cool maths/PLT articles and papers and then implementing 10% of the stuff that looks like it'll make your life easier. It's fine to take them from proglan / library docs too, or pop maths videos, whatever. This way understanding takes the fore, you don't need to run other people's binaries or code, and you can do 70% on paper / while taking a shower / by taking a walk.
>>108922051
Very obvious ones: linear and dependent types. Rust's borrow checker is le affine types (but not all of it and inflexible), a more permissive linear types.
Have a look at the few videos on the ATS programming language on YT, it's a dozen videos tops and it'll give you a good clue of what you might be missing (besides much better macros = the homoiconicity / reflection thing Lisp has, and other streamlining / proglang design discipline improvements). It compiles to C so it is actually intended for people who appreciate what C has going for it.

>>108918111
>May I recommend setting up sly and playing with Common Lisp a little bit.
I remember trying for two hours to get SBCL to a) load a script from a file and b) drop me into a REPL without having to invoke the REPL from that selfsame file. To no avail. All these big Lisp systems feel like launching a fucking JVM and having to plough through much worse Javadocs stuck yet more decades ago dispersed over more, worse websites.
If there were a Lisp bootstrapped from C that makes it easy to make a "Hello world" and compile it to a <250 byte ELF executable for my platform, like in 5 minutes, and it's designed to be good at this kinda thing I might be interested. Until then I'll be writing that.
>>
>>108926236
I thought this was interesting anon. I don’t understand the hostility to academic things on this board.
>>
>>108927473
>
(if (#{(int \[) (int \O)} c1)

my god that's horrendous
>>
>>108923627
in your two-sum what happens if two indexes share the same value? you should probably come up with better test cases.
>>
>>108931314
i figured i should provide a solution. i avoid call/cc at all costs, which is what `reduced` effectively is.
(defn two-sum [c t]
(loop [[[f i] & r] (zipmap c (iterate inc 0))
m {}]
(if-let [v (m (- t f))]
[v i]
(recur r (assoc m f i)))))
>>
>>108931409
>i avoid call/cc at all costs, which is what `reduced` effectively is.
what's your reasoning for this?
reduced works by wrapping the result in a type which Clojure's implementation of reduce checks for. It makes use of the fact that Clojure's object-oriented host languages are highly optimized for dispatch based on type.
>>
>>108922745
>The point of lisp is DSL construction
not really
>>
File: coal.jpg (83.9 KB)
83.9 KB
coal... ton
https://coalton-lang.github.io
https://news.ycombinator.com/item?id=48280451
>>
>>108933652
Then what is? It's the one thing that Lisp truly does better than any other language by far.
>>
The only thing that I can't into with emacs is the shell. There's term, ansi-term, eshell and even vterm which apparently a lot of people use. Not only that but I'm reading stuff about using eshell, and then there's a way to have eshell take commands it can't run there and run them in term or vterm.

Ideally I guess you use Eshell, right? Because it integrates well with the other tools? Is there any sane way to use eshell without a bunch of configuration? I get tab completion for programs themselves, but say if I type program asd I can't hit tab and it becomes asdf if there was some asdf option for it. It's like totally different that a terminal emulator
>>
has anyone added type hinting to a scheme?
>>
>>108935133
>eshell
highly emacsy, highly obscure
>vterm
just a standard terminal embedded into emacs with minimal integration
>everything else
old stuff that nobody uses
>>
>>108935133
>Ideally I guess you use Eshell, right? Because it integrates well with the other tools?
the question is whether or not YOU will use those other emacs tools when using eshell. if you won't, then there's no point in using eshell specifically
>>
>>108935133
I just use vterm or launch subprocesses from elisp without a shell. Until vterm I'd just alt-tab to a terminal most of the time and didn't lose my mind over it.
>>
>>108935133
>eshell
just werks for me
>>
File: 2026-05-29_18-32-56.png (81.1 KB)
81.1 KB
Did you know `M-x calc` could do unit conversions with compound units?
This lets one convert a value like 200 cm into 6 ft + 6 in instead of 6.56 ft.
I just discovered this capability by accident.
'200 cm RET                             ; Input 200 cm using 'algebraic notation.
u c ft + in RET ; Convert 200 cm to feet an inches.
u s ; Simplify the ft+in expression to just use ft.
u c cm RET ; Convert back to cm.
>>
>>108938206
Evil users use uppercase U instead of lowercase u.
>>
File: HJeaUpFaAAAXPYC.jpg (1.3 MB)
1.3 MB
>>108935133
>Ideally I guess you use Eshell, right? Because it integrates well with the other tools? Is there any sane way to use eshell without a bunch of configuration?
I think eshell is decently useful without any configuration. With that said, eshell has capabilities and usage patterns that don't exist in most other shells.
- Interactive elisp functions can be run from the command line.
- For example, `dired .` or `emacs-uptime` or `find-file README.md` or `calc-eval "9 * 9"` or `proced`.
- Also, any line in the buffer is executable -- not just the prompt.
- For example, say you did an `ls -1` to get a directory listing. Suppose you saw titties.mp4 and became curious. You could put your cursor at the start of that line, prepend "mpv " and then hit RET to play that file with mpv.
- You can take this further and create commands that generate shell commands which you then pick from.
- If you get into eshell scripting, buffers are not limited to text. You can also display images and use different fonts. Anything Emacs can put in a buffer, you can too.
- You can even make clickable elements that perform arbitrary actions.

https://www.youtube.com/watch?v=M6o1N2kfmuc

Eshell is a different beast compared to other shells due to the (rich) Emacs environment it runs in. I initially didn't like it, because it was different from the Bourne compatible shells I was used to. However, as I came to accept that it wasn't a typical Unix shell but it's own unique thing, I grew to appreciate it for what it was. Now, I like it quite a bit, and use it more than my normal unix shell.

It's not a 100% replacement, because it's not good for TUI applications. However, the more I become proficient with Emacs, the less TUI applications mattered.

https://nitter.net/ann_photo05/status/2060285038068154441
>>
>>108938366
you forgot using tramp paths like normal paths. so from eshell you can cd into a remote directory and it will basically act exactly how youd want
>>
>>108938447
>TRAMP
It's kind of like sshfs from an alternate universe. If I'm going to use TRAMP, I actually prefer to do it through eshell where I find the network lag more forgivable. Outside of eshell, I rarely use TRAMP.
cd /sshx:[email protected]:~
>>
>>108935133
If you want a terminal that *can* handle TUI apps in Emacs, try ghostel.
https://github.com/dakra/ghostel
>>
>>108938687
slop. use eat instead
https://codeberg.org/akib/emacs-eat/
>>
>>108938803
I've tried eat, and I didn't like it.
>>
>>108935304
Look up typed Racket and Racket contracts.
>>
>>108938366
> eshell decent
Reminder that eshell works on Windows, too.
Let that sink in.
>>
>>108914773
>https://github.com/seanvert/cherry-prompt
very nice
>>
>>108938366
I like being able to embed Elisp into eshell with (). You can also use $() when inside double-quoted strings. With that said, I think I found a bug in eshell's double-quote handling.
~ $ (concat "a" "b" "c")
abc
~ $ echo "$(concat \"a\" \"b\" \"c\")"
abc
~ $ echo "$(concat \"a\" \"b\")c"
ab

Can anyone get the last one to print "abc" or does it stop at "ab" for the rest of you?
>>
>(list 'quote 'foo)
>>
>>108941451
Both CL (sbcl) and Elisp return 'foo but I don't understand why. Is this a bug or feature?
>>
>>108941490
' is syntax sugar for quote.
>>
File: RatchetClank.png (3.5 MB)
3.5 MB
>>108941490
It's a very big brained feature that allows your program to program programs.
Quote is a built in function that is ' but the redundancy is meaningful. this is core to the structure of lisp like EVAL and APPLY (but that's many chapters in my book by Touretzky far down the line)
Here's what happens:
>(list 'quote 'foo) RETURN/ENTER we'll call it RET
>list evaluates first argument 'QUOTE
>list evaluates second argument 'FOO
>list returns a list of (QUOTE FOO)
>in Common Lisp, this QUOTE command is built in so now the QUOTE function evaluates its arguement FOO
>QUOTE returns FOO
>FOO

Now here is a use case that is pretty awesome.
Say we have functions
(defun putPixel (argument-list) (function-body))
(defun canvasViewPort (argument-list) (function-body))
This allows you to take a basic raymarcher .lisp program of a few 400 lines of code and then make a pass between these functions to render not just basic 3d shapes but platonic solids with inner stellations because...
your 2D screen putPixel WILL have false friends of stuff behind which requires an algebraic understanding to cull but so far graphics programmers have been guessing clever hacks not algebraic truth. Lisp lets your programs be a CAS. This is the kind of shit that Andy Gavin at Naughty Dog exploited in Jak and Daxter and then was consulted/shared code for the game engine for Ratchet and Clank. If you ever see a glitch in video games where suddenly the faces of characters show you their tongues eyeballs and inside skin of the back of their "skulls" this is basically it. This is way fancier than a setter getter manual hack method other languages use.I wish I was academic enough to explain better but I've just been doing graphics programming archaeology on reviving the Andy Gavin skillset.
>>
File: billgates.poop.png (399.4 KB)
399.4 KB
>>108939461
I've been avoiding MS as much as I can for a long time, but if I had to use Windows, it would make things a little more tolerable.
>>
>>108941632
Bill Gate Indian Jesus confirmed
>>
What's a good dark blue greenish theme for emacs
>>
>>108941490
You might be confused because you're expecting 'foo to return 'FOO (notice the quote), but it doesn't.
Just type 'foo in SBCL and it returns FOO (no quote), because it's already displaying things symbolically.

So then when 'FOO is returned it's symbolically equivalent to '(quote foo), which is equivalent to (list 'quote 'foo).
>>
>>108941925
Have you tried kaolin-ocean from kaolin-themes?
https://github.com/ogdenwebb/emacs-kaolin-themes
>>
Is there any better way to set this up?
  (add-to-list 'savehist-additional-variables 'compile-command)
(add-to-list 'savehist-additional-variables 'compile-history)
(add-to-list 'savehist-additional-variables 'command-history)
(add-to-list 'savehist-additional-variables 'variable-name-history)
(add-to-list 'savehist-additional-variables 'extended-command-history)

I was thinking about
  (setopt savehist-additional-variables
(append
savehist-additional-variables
'(compile-command compile-history command-history
variable-name-history extended-command-history)))

Is this the best way?
>>
>>108943019
I think that's reasonable.
>>
>>108943019
What you did is fine, but here are some different approaches.
(cl-loop for v in '(compile-command compile-history command-history variable-name-history extended-command-history)
do (add-to-list 'savehist-additional-variables v))


(dolist (v '(compile-command compile-history command-history variable-name-history extended-command-history))
(add-to-list 'savehist-additional-variables v))
>>
>>108941925
there's a neat website with screenshots from a lot of themes:
https://emacsthemes.com/themes/?q=dark+green
>>
File: 1779287256270028.png (2.5 MB)
2.5 MB
>>
>>108941632
He needs to die.
>>
File: alien.png (156.4 KB)
156.4 KB
>>108944082
'(bvilt for sexp)
>>
File: 1777021785818200.png (1.6 KB)
1.6 KB
evil wayz
>>
>>108944964
Maybe it's time to remove some packages.
>>
File: 1762494981984094.png (6.6 KB)
6.6 KB
>>108945720
itz fine anything under 3 secs is alright with me
>>
>>108945720
if those packages are lazy loaded, then what's the problem?
>>
devving a lisp roguelike and claude spontaneously discovered the slynk repl running at localhost:4005 and wrote a python script so it could interact with the running game to test its code.

started telling it to modify the game state and it does it, fucking wiiiiillld.
>>
>>108946117
It didn't notice wield was misspelled? It gets it right in prose but not the keyword.
>>
File: asdf.webm (3.5 MB)
3.5 MB
>>108946233
whoops that's my bad, i've spelt it weild all over the code base, it doesn't care it knows what the prompt was after.

It can walk the player around too lmao. Prob obvious to some but blew my mind
>>
>>108946117
>>108946233
>>108946311
there's like 50 threads for this stuff, why post it here
>>
>>108946321
Lisp is Lisp (even if vibecoded :-) )
Also kinda ironic because Lisp is the original AI language, but whatever.
>>
>>108879919
https://www.youtube.com/watch?v=TA7z9Zx_6MQ
>>
>>108946661
Many are like this, AI automating programmers will set them free
>>
>>108946456
LLMs are shit at writing lisp in my experience
This isn’t even an anti-AI thing, they’re genuinely pretty good at Python and all that, but I’ve rarely seen them write good Lisp, it’s usually very excessively loop based and imperative and very poor use of macros.
>>
>>108946747
Claude did the implementation for this, a statecharts macro in CL. I designed the syntax but it went through and implemented it in 30mins, something i've spent 2 days in the past failing at after reading docs and prototypes and just got sick of it.

I've been trying to layer these DSL's on top of each other using and guiding the LLM to get maximum leverage and semantic density. Having a blast. You just Pull A Syntax Out Of Your Ass then get the LLM to implement the semantics.
>>
>>108946808
another
>>
>>108946808
>You just Pull A Syntax Out Of Your Ass then get the LLM to implement the semantics.
No, I don’t think I will
>>
Sacha spoke to the author of Embark about all things Emacs. He's a very skilled Emacs user.
https://www.youtube.com/watch?v=M7-dJb2GTN4
>>
>>108946808
I for one am glad that someone's messing with this stuff. It's very counter-intuitive, obviously ai will do better at python, and if you're not writing the code yourself and instead relying on ai anyway what's the point in having some fancy language over any other? But still, interesting to see.
>>
>>108949490
I think notation is important it’s like using matricies instead of plain algebra

The llm would get confused if things were thousands of lines of if statements and local variables

Same way it can’t read meaning from straight assembly

Compression of meaning and abstraction through notation and language is universal
>>
>>108949490
It's not really obvious. The usual argument is something like python is more represented in the training data, but that doesn't actually matter so much, and the extent it matters depends on how dumb the model is in general.
For language preference, one argument is that token expenditure is substantially different. A python program could be anywhere from 2-1000x shorter than a C++ program, including tests, so you can potentially save a lot on token costs. I find this a pretty weak argument, but to the extent that it's true, it's also true for Common Lisp. Caveat that there being more python libraries allows for even more token-level compression if a corresponding library isn't readily available for Lisp. But Lisp doesn't require a performance sacrifice like python does, and there's potentially even more savings with tasteful macro use.
My own argument for Lisp is that even if I were using AI to write all of it, so long as I'm still reading some of it, I'd rather read Lisp than anything else.
>>
Finally hit the item on my to do list that says that I need to read everything Xah has ever said about Vim or Emacs. I'm about to start with http://xahlee.info/emacs/ what am I in for? Do I need any other links?
>>
>>108950975
Started reading. It's kind of shit. It's a handy reference for Emacs commands, but so far I've seen nothing of value to someone who has been using Emacs for years, can read documentation, or uses Vim bindings.
>>
I think my Emacs habits must be very unlike most peoples'. I close buffers and Emacs when I'm done with them. There are only about 5 files I regularly edit so recentf is all that I need. I almost never need dired.
>>
I need to use angular (typescript) at job. How can I use emacs for it? In VScode is very simple, and it just werks. But I rather use emacs.
>>
>>108951495
xah is a bum that has spent the last 20 years crying about random lisp features and spooks no one cares to listen about to every forum he could find (imagine being so cancerous you kill whole lisp communities from the mere mention of your name), he can't even put together a resume to save his life (https://archive.is/maAoL). i don't know why you would care about what this chink has to say; tldr: social parasite behavior you see on every open source project and organization infiltrated by leftists
>>
File: xah-chink.gif (1.3 MB)
1.3 MB
>>108952681
faaaak you idiotic braindead zoomer skum
>>
>>108952681
He was right about setf tho.
>>
>>108952681
wow the btc address on the page has $65k unspent, dipshit prob lost access to it.

He's obv traumatised to shit, prob we all are, emacs is about control over the editing environment -- a self soothing response to trauma.
>>
>>108952766
Hilarious. Thank you anon.
>>
>>108952380
Just install LSP servers for both typescript and angular, and a tree-sitter grammar for typescript.
>>
>>108950975
Xah Lee has some controversial advice on his site. I still like some of his articles. I wrote my own modal-editing mode which takes a lot of inspiration from xah-fly-keys, but is smaller and tailored to my *special-needs*. I also liked his critique of tiling window managers. It influenced my comeback to regular floating/stacking WMs.
>>
Is it just me or is the textarea in eww borderline unusable. This goes especially if I want to input text more than a few lines long. Although I was able to post on https://world2ch.net/unix/ via eww, I couldn't easily post the longer message I wanted to post. I even tried authoring a post in the *scratch* buffer and then copying and pasting the text into the eww textarea, but that didn't work very well.
>>
File: file.png (1.1 MB)
1.1 MB
>>108952766
At least he's back to streaming after his 2 month hiatus.
https://www.youtube.com/@XahLee/streams
>>
1.2 MB
>>108879491
>Browse imageboards in Emacs Org-Mode
>https://github.com/eNotchy/4g

I just added this to my display-buffer-alist, and I think it makes eww behave better while using 4g.
(add-to-list
'display-buffer-alist
'("\\*eww\\*"
(display-buffer-reuse-window))
)


This makes it so that when you click on images and there's already an *eww* window in the frame, it'll reuse the same *eww* window. It makes it easier to look at images in a thread while still keeping the thread itself visible.
>>
File: 1753335618879613.jpg (311.2 KB)
311.2 KB
Is there a way to make it so that guix shows me which of my installed (or declared) packages have been version upgraded after running guix pull && guix system reconfigure?
>>
>>108955800
I'm not sure if there's a built-in command for comparing package versions between two profiles or not. But there is definitely a command to list packages from a profile.
>guix package --list-installed --profile=<path to profile>
If you do a "guix system list-generations" and take the "file name" (looks something like /var/guix/profiles/system-???-link) and append "/profile" then you have the profile path to each generation and can print out their package lists. Wouldn't be hard at that point to make a script to compare two generations.
You could even pipe them into diff, although the format might not be super helpful in this case
>diff <(guix package --list-installed --profile=/var/guix/profiles/system-124-link/profile) <(guix package --list-installed --profile=/var/guix/profiles/system-125-link/profile)
>>
>>108955800
>>108956181
Actually this command is a lot more useful. I think it's basically what you want, shows the changes side by side
sdiff <(guix package --list-installed --profile=/var/guix/profiles/system-124-link/profile | awk '{print $1, $2}') <(guix package --list-installed --profile=/var/guix/profiles/system-125-link/profile | awk '{print $1, $2}')
>>
File: 1762420780165529.jpg (48.4 KB)
48.4 KB
>>108956181
>>108956255
thanks breh, much appreciated
>>
emac
>>
>>108954288
you mean eglot? I don't know how to configure it.
>>
lip
>>
why does emac give so much lip
>>
>>108954305
>his critique of tiling window managers
Go on?
>>
>>108887524
>Loop will turn into the same thing as either a map
False.
(loop for i from 1 to 1000000 when (evenp i) sum (* i i))


Macroexpands into:
(block nil
(let ((i 1))
(declare (ignorable i)
(type (and real number) i))
(let ((#:loop-sum-208 0))
(declare (type number #:loop-sum-208))
(tagbody
sb-loop::next-loop
(if (> i '1000000)
(go sb-loop::end-loop))
(if (evenp i)
(setq #:loop-sum-208 (+ #:loop-sum-208 (* i i))))
(setq i (1+ i))
(go sb-loop::next-loop)
sb-loop::end-loop
(return-from nil #:loop-sum-208)))))


Also even if it did turn into a map somehow (which it doesn't) the original LET* version posted by the Clojurelet is braindead retarded since it iterates FOUR (4) distinct times in sequence (three of which are over lists, say goodbye to your cache hits btw) when it can be done in one shot as shown above.
>>
>>108959173
Forgot to add: 0 bytes consed btw :^) Which is why this solution is exponentially better than >>108887200 which not only conses but also needlessly builds up a list then iterates over it, and would then need a subsequent second iteration for the reduce that anon forgot to put in. So with that solution you can likewise say goodbye to cache hits.
Thoughbeit as >>108887702 put it, the most efficient solution is just a direct arithmetic calculation.
>>
Have you tried doing any of the following?
- C-x =
- C-u C-x =
- putting point on an image and then C-u C-x =

help:what-cursor-position
>>
>>108960667
yeah i press C-u C-x = every time i come across a unicode character i don't recognize. pretty useful
>>
>>108884789
>>108884727
i remember some shittalking from around j2ee 1.2-ish era
it's been a hwile...
>>
>>108921170
>when you need to use a graphical browser?
When?
>>
Any obscure lisps that are worth knowing about? Any personal lisp implementations that made it out of toy status?
>>
>>108961429
your problem domain embedded lisp dsl
>>
File: 1757884480744315.png (978.7 KB)
978.7 KB
>>108904792
>>108904862
>>108904813
https://github.com/azzamsa/awesome-cl-software
https://duckduckgo.com/?q=useful+software+made+in+lisp
>>
>>108961371
when you wanna watch pay gorn
>>
>>108962108
ffmpeg -f v4l2 -s 320x240 -r 25 -i /dev/video0 -f alsa -ac 1 -i hw:0 http://pay-gorn.website/cocks-r-us.ffm

Reply to Thread #108879491


Supported: JPG, PNG, GIF, WebP, WebM, MP4, MP3 (max 4MB)