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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1747203800184851.png (339 KB, 1600x891)
339 KB PNG
萌えedition

>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 >>108664729)
>>
File: 4chan_mascots.jpg (154 KB, 1024x768)
154 KB JPG
http://xahlee.org/xa/funny/4chan.html
>>
e m a c
m
a
c
>>
File: md.webm (173 KB, 738x800)
173 KB
173 KB WEBM
>>108708075
>I didn't know that markdown-toggle-markup-hiding exists, wish I had known about this earlier.

>>108720425
>might be worth making it toggle together with normal/insert state change in evil

(defun evil-enable-markdown-markup-hiding (&rest args)
"If the current major mode is markdown-mode, enable markup hiding."
(interactive)
(when (derived-mode-p 'markdown-mode)
(markdown-toggle-markup-hiding 1)))

(defun evil-disable-markdown-markup-hiding (&rest args)
"If the current major mode is markdown-mode, disable markup hiding."
(interactive)
(when (derived-mode-p 'markdown-mode)
(markdown-toggle-markup-hiding -1)))

(advice-add #'evil-normal-state :after #'evil-enable-markdown-markup-hiding)
(advice-add #'evil-insert-state :after #'evil-disable-markdown-markup-hiding)


This should work for markdown-mode and any of its derivatives like gfm-mode.
>>
>>108769018
noice
>>
>>108769018
I don't use evil, but this should work without having to advice a function:
(add-hook 'evil-insert-state-exit-hook #'evil-enable-markdown-markup-hiding)
>>
>>108769209
I guess I am a bit overly fond of advising functions. I just think it's a really cool ability. I suppose the polite way to go about things is to look for hooks first, and only use advice if hooks don't exist for the functionality I'm trying to augment.
>>
>https://emarsden.github.io/pg-el/about.html
Does anyone know of a way of seeing maps/polygons in emacs? I'd like to visualize postgis data using this;
>>
>>108769647
You might be able to find something in here. It's an OpenStreetMap viewer for Emacs.
https://github.com/minad/osm
>>
>>108769677
I think I'd need to set up a geoserver/tileserver for that. You know in pgadmin or dbeaver when you hover over a geometry result it shows it in a little box? I was planning on doing that.
>>
>>108768928
l i p s
i
p
s
>>
Does anyone know if sly and slime can coexist? I naively thought they could, but my initial attempts at having both in one config have not worked. I normally use sly, but I wanted to try slime out, because it looked like it had support for Coalton.

This is the config I tried.
(use-package slime
:ensure t
:config
(slime-setup
'(slime-fancy
;; slime-company ; I don't think I need this, because I have corfu instead.
slime-coalton))
(setq lisp-lambda-list-keyword-parameter-alignment t
lisp-lambda-list-keyword-alignment t
lisp-align-keywords-in-calls t)
(put 'make-instance 'common-lisp-indent-function 1)
(setq slime-lisp-implementations
'((sbcl ("/usr/bin/sbcl") :coding-system utf-8-unix)))
(add-to-list 'auto-mode-alist '("\\.ct$" . lisp-mode)))

Derived from: https://coalton-lang.github.io/manual/topics/introduction/#setting-up-emacs-with-slime
>>
first for Clojure.
>he doesn't have namespaced keywords
>>
File: 1728297184272.jpg (117 KB, 970x824)
117 KB JPG
>>108770926
>if sly and slime can coexist?
Usecase for "coexistence"?
>>
>>108770954
>namespaced keywords
use-case?
>>
>>108772428
Two entities with idor name in the same map. Some queries can also return namespaces. Datomic IDs are namespaced, next.jdbc can namespace the column name with the table name.
Convenient for avoiding name collisions
>>
>>108765907
I think you'd need to change/advice eww-retrieve-command, but it seems doable.
>>
>>108769677
>https://github.com/minad/osm
interesting
>>
https://clojure.org/news/2026/05/05/deref
>>
>>108767473
Moe theme makes me cum
>>
>>108772251
I just wanted to see what I was missing from slime-coalton and swank-coalton.
>>
>>108769018
alternative setup with hooks instead of advice
(add-hook 'evil-normal-state-entry-hook #'evil-enable-markdown-markup-hiding)
(add-hook 'evil-insert-state-entry-hook #'evil-disable-markdown-markup-hiding)
>>
maybe I like Janet because she's small
>>
>>108776018
it's fine. i like ef-themes more when it comes to colourful themes
>>
Emacs Chat 22: Shae Erisson
https://www.youtube.com/watch?v=Ovya0O2otbU
https://www.scannedinavian.com/
>>
>>108767473
LISP is clearly failed BASIC of it's own era.
There's literally nothing written in LISP except Emacs related crap and old AutoCAD scripts.
Dead language.
Not related to modern day hardware.
Visual Basic was a nice attempt to resurrect old language, friendly for newcomers.
This is very pathetic bite thread.
You need Qt-LISP bindings and Visual, non-Emacs crap editor so actual software can be written in the dead LISP.

Hello, my name is fag and I write in LISP.
/thread
>>
>>108773284
Maybe advice around eww-render would work too since you could modify things before rendering.
>>
>>108777691
Good morning sir
>>
I'm used to python sqlalchemy and using "models" as a pattern for webshit and databases. What do you use in clojure?
>>
>>108778295
I like rawdogging SQL.
https://github.com/krisajenkins/yesql
>>
File: 1778207653907337.jpg (98 KB, 802x1200)
98 KB JPG
Are changes to emacs always documented in /etc/NEWS when they are committed? Or only when the major/minor version changes?
>>
>>108778295
HoneySQL with custom SCI bin for running migrations.
>>
>>108779736
>Are changes to emacs always documented in /etc/NEWS when they are committed?
usually yes, but sometimes they are documented in a different commit. and when there's a new version release, /etc/NEWS gets moved to /etc/NEWS.[version number] on the master branch

https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=edd345c33ffabdc5df12601305a8817566134b25
>>
>>108777691
>LISP is clearly failed BASIC of it's own era.
>There's literally nothing written in LISP except Emacs related crap and old AutoCAD scripts.
>Dead language.
>Not related to modern day hardware.
>Visual Basic was a nice attempt to resurrect old language, friendly for newcomers.
>This is very pathetic bite thread.
Hi retard, you should improve your writing, in particular your grammar. Perhaps you could use Grammarly... which is written in Lisp.

>You need Qt-LISP bindings
You mean like this one, which supports hot QML reload?
https://gitlab.com/eql/lqml
>>
>>108780045
there is zero point to arguing with people that string together random technological terms in an act of appearing intelligent on an anonymous basket weaving forum.
just hide their posts. it is very important that we do not allow stupid fucking shit to go on in the Lisp thread, the only thread on this godforsaken board that is actually decent.
>>
File: npms6anatmzg1.jpg (108 KB, 1179x1383)
108 KB JPG
>>108780042
thanks my lisppa
>>
>>108778609
project with multiple people, too complex, varying levels of skill. No way we will do that.
>>108779984
what is an 'SCI'? Search engines are fucked.
>>
>>108781247
he probably means https://github.com/babashka/sci

The most Clojure-y approach to databases is to not use sql at all and instead use Datalog databases like Datomic, XTDBv1, Datalevin, Datahike and Datascript.
I've only used Datalevin out of these, which was fine for my purposes, but it was just a small solo hobby project.
>>
>>108781718
I have to use postgis and postgres by contractual demand.
>>
Emacs shell-mode can find some stuff after I add it to 'exec-path (software installed with pip). But M-! (shell-command) doesn't. My terminal can find it. What do I do?
>>
>>108782617
Check your $PATH in your terminal and compare with (getenv "PATH")
There's like 3 ways to lookup binaries in emacs and all get lookup paths from elsewhere. It's always such a pain in the ass to figure out which ones I forgot to update
>>
>>108782617
for shell mode, exec-path is only relevant for completion and not for actually looking for executables, that's the shell's job. i'm guessing M-! can't find the new stuff because it launches a subshell that inherits the environment of the shell where emacs was launched
>>
>>108782617
Do `M-! echo $PATH` and see if the PATH is what you expect or not.

This might be able to fix it.
https://emacs.stackexchange.com/a/10572/37580
>>
File: erik-naggum.lisp.jpg (222 KB, 1230x1485)
222 KB JPG
I was surprised to find this still online (17 years after his passing).
https://naggum.no/
http://xahlee.info/Netiquette_dir/death_of_a_troll.html
>>
>>108782543
you could try using sqlalchemy via libpython-clj
>>
>>108781247
Smart enough for Clojure but not SQL?
Well, if you really must have ORM-like features in your DB layer, you can try this.
https://github.com/camsaul/toucan2
I haven't used it myself, but it seems like you're looking for something like this where you can define "models" and have a library do the repetitive parts of SQL for you.
;; lang: clojure
(t2/table-name :model/people)
;; => :people

;; Select one row from :people with the primary key 1
(t2/select-one :model/people 1)
;; =>
{:id 1
:name "Cam"
:created-at #object[java.time.OffsetDateTime 0x2c8ec7ed "2020-04-21T23:56Z"]}
>>
>>108781247
you use SCI to provide a Postgres transaction in your bindings, alongside whatever other useful HoneySQL constructs you want for DRY SQL migrations (how many times do you really want to write out the HoneySQL equivalent of `id uuid primary key default gen_random_uuid()`?
>>
>>108784157
I was thinking of something like the javasir "repository pattern". Namespace for each domain object, with associated fns..
>>
>>108785391
(defn topo-sort
[gr]
(loop [res [] ;; resultado
nodes gr ;; estado atual do grafo
]
(let [ready (all-isolated-nodes nodes)] ;; nós isolados agora
(if (empty? ready)
(if (empty? nodes)
res ;; não tenho mais nada
;; Tenho nís isolados mas o grafo já foi percorrido
(throw (Exception. "Ciclo detectado ou dependência não encontrada")))
;; nós isolados e ainda tenho grafo a percorrer
(let [current-node (first ready)
current-node-id (:id current-node)
updated-graph (->> nodes
(remove #(= (:id %) current-node-id))
(map (fn [node] (update node :depends-on disj current-node-id)
)))]
(recur (conj res current-node)
updated-graph))))))

Is this decent clojure? I'm a schemer. Topological sorting my migration files.

;; dummy migrations.edn
[
{:id 0
:file "migrations/00_init.sql"
:description "Create migrations tracking table"}

{:id 1
:file "migrations/01_network_topology.sql"
:description "Create network_topology schema"
:depends-on #{0}}

{:id 2
:file "migrations/02_node.sql"
:description "Create and populate tables related to network nodes"
:depends-on #{0 1}}

{:id 3
:file "migrations/03_link.sql"
:description "Create and populate tables related to network links (edges)"
:depends-on #{0 1 2}}

{:id 4
:file "migrations/04_subnet.sql"
:description "Create and populate tables related to subnets and VLANs"
:depends-on #{0 2 3}}
]
>>
>>108786316
>yes I do enjoy speaking Spanish with a hot potato inside my mouth, how could you tell
>>
>>108779736
'(cute titties)
>>
>>108786332
500 NuCredits have been deduced from your Nuccount.
>>
>>108786316
your
(let
[current-node (first ready)
current-node-id (:id current-node)])

could be
(let
[[{current-node-id :id
:as current-node}]
ready])

with destructuring
>>
>>108786316
also, you could just do a `(sort some-vector-of-tuples-where-the-id-comes-first)`, because `sort` defaults to the sort order of the first element in vectors (which would be the integer ID).
>>
perfect use case for macros: automatic error message generation and catching by using the predicate form as the message. also, any local variables located in the predicate form can be provided in the error map too. the following code is just a mocked out test of a fake make-user function.
(defn
make-user
[username password password-again]
(c.REDACTED.s-verification/verify
::make-user
(string? username))
(let
[username-length
(count username)]
(c.REDACTED.s-verification/verify
::make-user
(>= username-length 4)
(<= username-length 32)))
(c.REDACTED.s-verification/verify
::make-user
(string? password))
(let
[password-length
(count password)]
(c.REDACTED.s-verification/verify
::make-user
(>= password-length 12)
(<= password-length 1024)))
(c.REDACTED.s-verification/verify
::make-user
(= password password-again)))

(c.test/deftest
test-make-user-with-nil-username
(c.REDACTED.t-helpers/is-thrown-verification-failure
#(make-user nil nil nil)
::make-user
'(string? username)
{'username nil}))

(c.test/deftest
test-make-user-with-empty-username
(c.REDACTED.t-helpers/is-thrown-verification-failure
#(make-user "" nil nil)
::make-user
'(>= username-length 4)
{'username-length 0}))
>>
>>108786942
also, >>108772428 asked about the purpose of namespaced keywords, and you can clearly see them being used to identify the failing operation in my error handling system
>>
>>108786837
dependencies are not necessarily 1,2,3,4,..., the ID is just a unique identifier. I've provided a dummy example in my original post.
>>108786818
thanks, clojure seems to have a lot of those facilities.
>>
>>108787221
I know we need to use recur for recursion, but is it performant? In scheme it is natural, but I am not very familiar with java, jvm and clojure.
>>
>>108787231
`recur` is not general recusion (which is accomplished by simply calling yourself), but tail-call recursion (kind of, not really, see the "trampoline" concept for more info). it is literally just another way of writing a loop, and is absolutely no different in performance from a normal loop.
>>
>>108776018
Is it available somehow for Kate?
t. Kate user
>>
>>108787231
>recur for recursion, but is it performant?
it's reasonably fast, it gets compiled down to an iterative loop.

If you need to do speed optimization on clojure code, here's some good reading:
https://hackernoon.com/faster-clojure-reduce-57a104448ea4

https://blog.redplanetlabs.com/2020/09/02/clojure-faster/

(this one's a bit fanboyish but still has good tips)
https://bsless.github.io/fast-and-elegant-clojure/

generally you want to identify places in your code that are worth optimizing using profilers, because writing fast clojure is possible but verbose and tedious.
https://clojure-goes-fast.com/kb/profiling/clj-async-profiler/

It's also worth checking out alternative libraries if somethibg in those libs is a bottleneck. If you're doing webshit and need to parse a lot of json, Chris Nuernberger's charred and Metosin's Jsonista are something like 20x faster than clojure.data.json.
Malli coercers are usually much faster at data transformations than manually looping through data structures.
>>
>>108787510
I'm familiar with TCO, it is a regular occurrence in scheme.
>>108787918
>json
sadly yes.
thanks
>>
>>108787531
use case for not using GNU Emacs, one component of the GNU/Linux operating system?
>>
>>108787531
you could port it
>>
PSA: You can use imenu to jump to use-package declarations if you have this in your early-init.el. (It has to be set *BEFORE* use-package is loaded.)
(setq use-package-enable-imenu-support t)
>>
>>108789882
>It has to be set *BEFORE* use-package is loaded.
why can't setopt automagically deal with that?
>>
>>108791065
because you haven't written the implementation for that
>>
>>108770954
>>he doesn't have namespaced keywords
The point of keywords in CL is that they globally belong to the same package. Otherwise they offer nothing over symbols.
>>
What are some cool things you made with Lisp? I've never used it before but it looks interesting.
>>
>>108792170
I make webshit in Clojure
>>
>>108792170
emac
>>
I've always wondered why something like this doesn't come in the standard library in most languages:
https://github.com/clojure-goes-fast/clj-memory-meter
>>
File: 1590171351134-1.png (36 KB, 640x480)
36 KB PNG
>memory safe
>strong typing
>native compilation
What Lisp should I try?
>>
>>108794189
rms?!
>>
File: almighty.png (144 KB, 915x788)
144 KB PNG
This is a new and free to read online book on CL.
https://almightylisp.com/
>>
>>108767473
How do you live with millions of functions? In Java I can just "".endswith() or "".substring() and IDE will show me all the related methods.
>>
>>108795862
None of them, because there isn't one that does this. You're looking for Rust with parens, which is very different from what is traditionally considered a lisp.

>>108797575
Clojure has namespaces. `string/` -> autocomplete string/ends-with. Other lisps do the horrible but better-than-nothing C-style hack where you include string as part of the name: string-ends-with .
>>
>>108795862
Common Lisp, Clojure, Scheme and Emacs Lisp are strongly, dynamically and gradually typed. Strong typing ≠ static typing.

All of them are memory save unless you do something stupid with FFI. Garbage collection is means of memory safety.

SBCL compiles your code natively by default.
>>
>>108797575
babashka has a proper terminal REPL now so it's super comfy to use. as you type it shows you options for imports, functions, methods etc
>>108795862
common lisp!!!
>>
File: els2026.png (146 KB, 1622x912)
146 KB PNG
The European Lisp Symposium 2026 starts today.
https://www.european-lisp-symposium.org/2026/
https://web.libera.chat/#elsconf
https://www.twitch.tv/elsconf
Streaming started just a few minutes ago.
>>
File: schedule.png (267 KB, 800x1860)
267 KB PNG
>>108797955
>>
>>108797575
>>108797731

In Common Lisp, the standard library isn't that big. You will memorize most of it sooner or later. As for third-party libs and implementation-specific extensions, their functions are encapsulated in packages. In CL IDEs when you type a package name and colons, you'll get an interactive completion for all symbols in this package. But it doesn't mean that you always prefix such calls with a package name. When I write CL in Emacs+Sly, I usually type a package name, select a symbol, and then press "C-c i" to import it automatically, so I can use it without a package qualifier.
>>
>>108798014
https://time.is/compare/1000AM_11_May_2026_in_Krakow
https://time.is/compare/1000AM_12_May_2026_in_Krakow
>>
>>108798119
We also have shortcuts to get cross-reference information like who-specializes to list methods that have an argument dispatching on a particular class.
>>
>>108796486
very nice
>>
>>108797795
Common lisp typing is mega ass for no explainable reason.
>you can't define your own parametric types because fuck you
>the variance on function types is backwards because we hate you
>you can't define tuple types because you don't deserve them
These things would be so easy to correct if you allowed things like an array of VALUES types, but for some reason they made it stupid.
>>
File: file.png (1.79 MB, 3200x1800)
1.79 MB PNG
Does anyone identify what theme this is?
>>
>>108801127
If you go to the dotfiles of the guy who owns that repo, he uses `sanityinc-tomorrow-night`. I assume that's the one from the screenshot.
>>
>>108801227
>sanityinc-tomorrow-night
Thanks, I don't know why I didn't think of that.
>>
>>108801239
whoops didn't mean to quote
>>
>>108801127
I know it was answered already but it looks like a less pleasant version of ef-dream
>>
>>108801295
Ooh this also looks nice. thanks
>>
>lisp is so powerful which is why we only write books saying lisp is so powerful and sometimes emacs packages or bindings to shit written in other languages
lets be real, lisp is only glazed so much because of the comical level of jewish involvment in its development.
>>
File: 2026-05-11_16-04-18.png (143 KB, 1916x1012)
143 KB PNG
>>108801295
>ef-dream
https://github.com/protesilaos/ef-themes
That's one of my favorite themes from ef-themes. I've tweaked it a tiny bit for org though. Things that were DONE were too bright for me, so I darkened it.
'(org-done          (:foreground "#6667a9"))
'(org-headline-done (:foreground "#4270a1"))

I feel like I ought to publish my theme tweaking system. I just feel weird about publishing something that's more of a library and not a complete interactive system.

>>108801239
>sanityinc-tomorrow-night
Doom has a nice variation on this called doom-tomorrow-night.
>>
File: 1778479807586806.webm (1.4 MB, 1278x1078)
1.4 MB
1.4 MB WEBM
>(web http) uses raise-exception
>(web request) uses throw
>your program now uses both with-exception-handler and catch
>>
>>108797955
ELS 2026 Day 1
https://www.twitch.tv/videos/2769298786
>>
>>108803410
i want to like guile but it always seems like such a mess
>>
>>108803464
The module/library version specifier permits forward-porting changes like this, but we're likely the only two people on the planet who notice
>>
>>108803410
cant you just write your own?
>>
>>108803554
Yes, I was just hopeful someone maintained those modules since 2017/2012 respectively
>>
In case you want your mpv to behave more like emacs:
https://github.com/Seme4eg/mpv-scripts
>>
>>108803883
what if i want my emacs to behave more like mpv?
>>
>>108803447
man fare's keynote sucked so hard and I even like AI.
dude can't even use AI to get his dumb pet scheme fork's website back online lmao
>>
File: els2026.png (306 KB, 1280x720)
306 KB PNG
>>108797955
Unofficial Playlist for Day 1
https://www.youtube.com/playlist?list=PLpHdy7ydcZKf17kvGFPafbfxyA1cXWDAu

Last year, it took 9 months for the official videos to get posted, so I'm glad someone decided to post unofficial versions early.
>>
>>108804174
Make emacs unhelpful.
(dolist (mode (list #'which-key-mode #'vertico-mode #'global-company-mode))
(when (fboundp mode)
(funcall mode -1)))
(setq completion-auto-help nil)
(setq tab-always-indent nil)
>>
>>108801125
This is reasonable critique. Common Lisp standard is much worse than it could be. I agree that its typing is mostly ass, but it's still sufficient for most use cases.

Tuple types are covered in libs.

Parametric types... Do you really need it in a dynamic language? I've never had need for parametric polymorphism in my common lisp programs. I would be happy to learn how do you use it in your programs in dynamic languages.
>>
Day 2 is live at the moment, still on the McCLIM keynote
https://www.twitch.tv/elsconf
I appreciate the slides about the deficient areas, sometimes I get the feeling that lispers don't even know what they're missing that is table stakes in other ecosystems.
>>
File: okboomer.jpg (385 KB, 1920x1080)
385 KB JPG
>>108805474
I give him credit for doing the keynote presentation with his own McCLIM software (codename: "boomer").
>>
>>108805414
>Tuple types are covered in libs.
They aren't because of storage. An (array (values fixnum boolean)) should have a flat representation and return (values fixnum boolean) when you index it. They have to be done in the compiler.
>Do you really need it in a dynamic language?
You don't need any types. But even he most basic program could benefit. Consider hash tables. They must all have type HASH-TABLE but the keys and values cannot be specified. The same is true for any user defined data-structure. And this does limit the practical uses of programs. This is bad in terms of the ability to describe the program with types and in terms of performance. A hash table with only byte values must store the full 8 bytes of a fixnum despite most of them going unused.

It's easy to imagine a data-structure where this is a bigger problem. There are many generic data structures like ropes that operate on text, where you might want to store a UTF-8 byte in one case or a UTF-16 short on other platforms. Without parametric types, you have to make duplicate 8-bit and 16-bit representations of this type to avoid wasting space, or alternatively specify the type fully dynamically at runtime and completely forgo type checking and the potential optimisations you get out of it.

The more general reason for this is that common lisp types follow the rule that they must produce only one compiled function. You can't do C++ style templates where multiple functions are generated and optimised dependant on the machine representation of the input type.
>>
>>108805527
https://github.com/numcl/specialized-function
>>
types will be the last thing to slow your program. None of you type wankers reach that point.
Take for example I/O, that one autist here showed is 1000x slower than python because some wankery in *std-out*.
>>
File: U=MA2.jpg (955 KB, 4096x2604)
955 KB JPG
It's time.
https://guix.gnu.org/en/blog/2026/time-travel-without-borders/
>>
>>108807251

>the cake
>>
File: local-chairs.jpg (557 KB, 1920x1080)
557 KB JPG
>>108797955
fin
>>
>>108805653
I guess you missed:
>or alternatively specify the type fully dynamically at runtime and completely forgo type checking and the potential optimisations you get out of it.
This library will run a whole bunch of unnecessary checks for compile-time constant code.
>>
>>108806139
I don't think that's a requirement of the standard though, is it?
>>
File: wada rape.png (2.05 MB, 1896x1376)
2.05 MB PNG
>>108803410
>>
interesting desu
https://thanosapollo.org/posts/bzr-saga/
>>
>>108811549
I was a Vim user in this era, and I had no idea Emacs crippled itself for so long due to RMS's stubbornness.
>>
Am I the only person in the universe who thinks Smalltalk looks and feels nothing like Lisp? Why is it namedropped so often in Lisp discussions? Do people ever actually write Smalltalk?
>>
>>108811549
>noooooo they aren't keeping up with the new hot memes, this community sux!!!!11
>>
>>108802477
Speak Christian.
>>
>>108812660
The similarity is at the systems level, the interactive development model, and everything-is-an-object ideas. Xerox machines ran on both Lisp and Smalltalk code. The object ideas extended to every entity in the OS too, without a strong barrier between OS and userland programs. A random program could make a new bitmap object, register a global shared reference to it by sending a message to some global system workspace, and another program could view what was registered and fetch things by name. No need to make a bunch of copies or serializations to buffers/files/intermediary objects, you'd only do that if you want data to persist beyond reboots or send it out over the network.
I agree at the syntax level they're pretty different and I don't really have an interest in the language itself. But watch a demo like https://www.youtube.com/watch?v=NqKyHEJe9_w and compare to a LispWorks environment. Besides now standard IDE features like Class browsers and debuggers, the interactivity and ability to redefine any methods (including "built in" things) on the fly is the key difference with other modern environments that basically only Lisp still shares.
>>
Whenever I need to do something fancy with the loop macro in Common Lisp, I refer to the info docs for Elisp's cl library. It's not 100% the same, but it's very close.
(info "(cl) For Clauses")
(info "(cl) Accumulation Clauses")
>>
>>108812665
bzr is more of a meme than git ever was. in the distributed vcs wars, it was 4th place at best behind git, hg, and darcs.
>>
>>108812660
What you have to learn is that a lot of discussions of lisp hark back to a time where C was considered a high level language. If you have only ever used two garbage collected languages, then Lisp and Smalltalk will both seem similarly magical.
>>
*** How do you do set operations with lists?
**** special note on equality

- All of these functions take a :test key that takes a function that test equality.
- If you have a list of strings, use #'equal or #'string=.

**** initial data

#+begin_src lisp :results scalar :wrap src lisp
(defparameter a '(1 2 3 4 5 6 7))
(defparameter b '(4 5 6 7 8 9 10))
(list a b)
#+end_src

#+RESULTS:
#+begin_src lisp
((1 2 3 4 5 6 7) (4 5 6 7 8 9 10))
#+end_src

**** intersection

#+begin_src lisp :results scalar :wrap src lisp
(intersection a b)
#+end_src

#+RESULTS:
#+begin_src lisp
(7 6 5 4)
#+end_src

**** union

#+begin_src lisp :results scalar :wrap src lisp
(union a b)
#+end_src

#+RESULTS:
#+begin_src lisp
(3 2 1 4 5 6 7 8 9 10)
#+end_src

**** difference

>Everything in A that's not in B
#+begin_src lisp :results scalar :wrap src lisp
(set-difference a b)
#+end_src

#+RESULTS:
#+begin_src lisp
(3 2 1)
#+end_src

>Everything that's in B that's not in A
#+begin_src lisp :results scalar :wrap src lisp
(set-difference b a)
#+end_src

#+RESULTS:
#+begin_src lisp
(10 9 8)
#+end_src

**** symmetric difference

>Everything that's not in A or B
#+begin_src lisp :results scalar :wrap src lisp
(union (set-difference a b)
(set-difference b a))
#+end_src

#+RESULTS:
#+begin_src lisp
(1 2 3 10 9 8)
#+end_src
>>
>>108811549
http://esr.ibiblio.org/?p=5634
>>
Anybody got any experience in turning emacs into a WSIWYG editor for tex typesetting?
>>
If you use tab-bar-mode AND use a note taking system like org-roam or denote that creates long file names, you might like this.

(defun my/org-title ()
"Rename the buffer of an org document with its title if available."
(interactive)
(when-let* ((is-org? (equal major-mode 'org-mode))
(title (org-get-title)))
(rename-buffer title)))

(add-hook 'org-mode-hook #'my/org-title)


What it does is rename the buffer of org documents to the title of the org document. I think it makes tabs that contain org documents a lot more useful.
>>
>>108814897
Nice! Denote has it built-in:
`(denote-rename-buffer-mode 1)`
>>
File: 1747622138137126.jpg (726 KB, 1600x1313)
726 KB JPG
>>108767473
How do I make pasting from the windows clipboard (see picrel) work in emacs? Normal pasting works but I can't paste from the clipboard.
>>
>>108814897
nice but now I'll have to make 4g not use the date in the heading for the catalog or I'll end up with a hundred catalog buffers
>>
>>108815854
Oh man, I didn't even consider what would happen to 4g. I'm going to change it so that it only does this for org documents that are backed by a file. Virtual org docs like the ones 4g makes will be left alone.
(defun my/org-title ()
"Rename the buffer of an org document with its title if available."
(interactive)
(when-let* ((is-org? (equal major-mode 'org-mode))
(file (buffer-file-name))
(title (org-get-title)))
(rename-buffer title)))
>>
>>108815854
Leave 4g as-is. It was my mistake.
>>
>joined a company that works with Clojure
>but I'm an MLE so I'll probably never touch Clojure professionally
I feel like missing out but I think it's better to keep it as a hobby...
>>
>>108814180
Never found a need once I actually learned TeX. I find a lot of LaTeX "best practices" make it harder to convey your intent and so harder to visualise the output before compiling. Not that I think LaTeX is a good idea anyway.
>>
>>108803883
>script is called M-x
>it's bound to t
>>
>>108812597
>Emacs crippled itself for so long due to RMS's stubbornness
GNU Emacs wouldn't even exist if it weren't for his stubborness
>>
File: 2026-05-14_00-22-10.png (208 KB, 1916x1240)
208 KB PNG
>>108757116
>world-clock
Today's recreational Elisp hacking expands on the world-clock customization from the previous thread.
(defun toggle-world-clock ()
"Toggle the visibility of the *wclock* buffer."
(interactive)
(let* ((frame (selected-frame))
(windows (window-list frame))
(found? nil))
(dolist (w windows)
(let* ((buffer (window-buffer w))
(name (buffer-name buffer)))
(when (string= name "*wclock*")
(quit-window nil w)
(setf found? t))))
(when (not found?)
(world-clock))))

Optional: Display more time zones
(setq
zoneinfo-style-world-list
'(("Pacific/Honolulu" "Honolulu")
("America/Los_Angeles" "Los Angeles")
("America/Phoenix" "Phoenix")
("America/Denver" "Denver")
("America/Chicago" "Chicago")
("America/New_York" "New York")
("America/Argentina/Buenos_Aires" "Buenos Aires")
("America/Sao_Paolo" "Sao Paolo")
("UTC" "UTC")
("Europe/London" "London")
("Europe/Berlin" "Berlin")
("Europe/Helsinki" "Helsinki")
("Europe/Moscow" "Moscow")
("Asia/Bangkok" "Bangkok")
("Asia/Singapore" "Singapore")
("Asia/Shanghai" "Shanghai")
("Australia/Perth" "Perth")
("Asia/Seoul" "Seoul")
("Asia/Tokyo" "Tokyo")
("Australia/Sydney" "Sydney")
("Pacific/Auckland" "Auckland")
))

Optional: Display world-clock in a side window.
(add-to-list
'display-buffer-alist
'((derived-mode . world-clock-mode)
(display-buffer-in-side-window)
(side . right)
(slot . 1)
(window-width . 48)))

Optional: Bind it to a key.
(keymap-global-set "C-;" #'toggle-world-clock)
>>
>>108805203
It looks like Day 2 of the conf has been added.
>>
>>108819704
>C-;
embark recommends this binding in its README, so something else should be chosen so that it doesn't clash with other people's embark setup.
>>
>>108792170
It's not *that* interesting, but I've written a bit of web scraping code in CL. The standard stack for this kind of thing in CL is:
- dexador (for HTTP requests)
- lquery (for querying DOM trees)
- plump (for turning HTML documents into DOM trees)

On top of this, I made a tiny library that gives me a way to structure scraping code in a flexible way using defgeneric/defmethod which I really like over traditional single-dispatch OO.
https://codeberg.org/ggxx/scraper

I recently made another library that uses it as an example of how it's meant to be extended.
https://codeberg.org/ggxx/permafrost
It's nothing fancy, but I do think it's a very beginner-friendly way to get acquainted with defgeneric and defmethod in CL. I also think this is one of CL's best features but aside from the Dylan and Julia communities, people don't know about its benefits.
>>
>>108819918
clojur has multimethods, which are similar
>>
>>108820369
Yeah, it's similar.
https://clojure.org/reference/multimethods

There's also this new thing.
https://github.com/replikativ/raster
>>
>>108820401
>https://github.com/replikativ/raster
>claude.md and a 123k line initial commit
i'm just going to assume every claim made here is entirely hallucinated
>>
>>108821809
When I see any LLMs in contributors list of a new project, I pretend this project doesn't exist, no matter who's the author.
>>
File: 1772420877653178.png (429 KB, 1024x576)
429 KB PNG
I just installed (doom)emacs today
I can tell this is going to take a while to learn, I don't mind spending the rest of my life learning it, but I hope I can become productive in it pretty quickly
>>
File: 1749241153919842.mp4 (45 KB, 382x400)
45 KB
45 KB MP4
>>108823149
what made you choose doom over regular emacs?
>>
>>108823207
i already use vim bindings in vscode, i originally planned to graduate to neovim but upon further consideration I decided that mastering my personalised command centre was cooler than just setting up another IDE, but I'm still really attached to vim bindings...
>>
>>108819918
> dexador
Just get it with curl (and maybe tidy) and send it in as to a lisp input port or something. The stuff that matters is the processing.
Then you could easily off-line it too if you wanted.
>>
File: 1754119165655453.jpg (17 KB, 350x320)
17 KB JPG
>>108767473
Hello, newfag here, how often does emacs make breaking changes. I've come from neovim where my config broke every two months even with minimal plugins.
>>
File: tmicms.png (55 KB, 686x537)
55 KB PNG
>>108814180
>Anybody got any experience in turning emacs into a WSIWYG editor for tex typesetting?
Not personally but texmacs does that, in their git mirror these directories look sus:
TeXmacs/progs/convert/latex/
src/Plugins/LaTeX_Preview/
>>
>>108823843
There's still elisp files with dates at the top from the 1990s in emac
>>
>>108792170
I just got a basic gui program up and running that looks in my n64 roms folder, makes a button for each one, and configures wine and mupen for me so all I have todo is click on the one I want and boom, it all fires up and im playin muh n64.
>>
>>108795862
I'm a big fan of SBCL. It compiles to native.
>>
>>108823241
that's fair reasoning

enjoy your stay
>>
>>108814180
The undisputed champion of editing tex is TeXShop which is a mac thing. It’s not exactly wysiwyg but there is tex on one side and your page is updated as you go. This is better than wysiwyg and most people have wider monitors now instead of 4:3 so even better for side-by-side view.
Emacs can basically emulate TeXShop workflow well enough nowadays. But again, you don’t really want true wysiwyg.
>>
>>108823843
> emacs breaking changes
All the time. It usually is not emacs’ fault… other packages take advantage of useless shit like 12-bit alpha support on animated fringe emojis (i just made that up, but it will probably happen) and then their package breaks on old emacsæ and 12 other packages were depending on that one.
It’s mainly the package authors’ fault for “it works for me” syndrome.
>>
>>108823843
I don't use a ton of packages, but rarely have problems and when I do, I've had no problems fixing them. The other thing is that I can stay on the same emacs version for a long fucking time and not give a shit. I don't need a bajillion fancy features out of my text editor and don't need to be constantly updating it.

I just upgraded from 27 to 30.2 and the only problem I had was a clojure-mode file from 2016 that I'd manually downloaded from the internet and been carrying around in my emacs config directory for 10+ years. All I had to do was remove the (load "clojure-mode-5.6.1.el") from my init and install the clojure-mode package from MELPA and I was good to go.
>>
>>108780120
>it is very important that we do not allow stupid fucking shit to go on in the Lisp thread, the only thread on this godforsaken board that is actually decent.
i think i love you.
>>
>>108795862
>What Lisp should I try?
Common Lisp offers all these, in most of its implementations like SBCL, CCL, and also on the commercial implementations Allegro CL and LispWorks.

And, should you require to, ECL compiles lisp to C (note: it is faster to compile Lisp natively to binary, which is what SBCL and CCL does.). ABCL lets Common Lisp run on top of the java virtual machine (JVM) and call Java classes and methods easily, should you want to be as masochistic to want to call Java once you're using Lisp.

>>108797731
>None of them, because there isn't one that does this
You're wrong, go away.
>>
>>108767473
Smalltalk is more Lisp than Lisp itself.
>>
>>108823465
You guys are lucky if dexador or curl are sufficient for your web scraping needs. I have to use https://github.com/copyleft/cl-webdriver-client/
>>108780120
This general should be on https://lisp.community/
>>108824700
I never saw the point of wysiwyg tex editing. Side-by-side with your favorite editor and favorite dvi/ps/pdf viewer is the way to go. For many years I've done that with latexmk running in the background, rebuilding the pdf whenever I save a file, and the viewer updating automatically.
>>
>>108823843
emacs itself is extemely backwards compatible.
Problems arise with 3rd party packages. If you stick with what's in Emacs and just what you really need from ELPA, you're good.
>>
>>108823465
>The stuff that matters is the processing.
>Then you could easily off-line it too if you wanted.
This is the realization I also had which led me to a design that separated processing from data fetching. Although I default to using dexador, you're free to fetch the HTML however you want.
;; fetch HTML using dexador by default
(process (page 'all-images "https://lispcookbook.github.io/cl-cookbook/"))

;; fetch HTML using a hypothetical curl function instead
(process (page 'all-images (list (curl "https://lispcookbook.github.io/cl-cookbook/"))))

;; load HTML from a local file
(process (page 'all-images "file:///tmp/index.html"))

All three call the same process method, but the HTML is fetched in 3 different ways.
>>
>>108796486
I finally learned how to use stickers in sly. It was easier than I thought.
https://almightylisp.com/book/essentials/the-lisp-ide#stickers
>>
>>108822602
mpv is notably AI slop nowadays.
>>
There are a lot more Clojure-inspired lisps than I thought.
https://github.com/ilevd/clojure-like
>>
>>108769018
This is ok when you're reading more than writing, but if you're actively authoring a markdown document, the switching becomes really disorienting. During active editing, I would prefer to see the markup all the time regardless of whether I'm in insert state or normal state.

(I was really enjoying this until I had to update some of my own documentation.)
>>
>>108827892
[citations needed]
>>
File: 1771854719445181.jpg (716 KB, 1080x1350)
716 KB JPG
>>108767473
How do I make emacs prefer vertical splits over horizontal
>>
File: HIWUIbybUAAXMi8.jpg (528 KB, 1153x2048)
528 KB JPG
>>108831242
I used to fuck around with split-width-threshold and split-height-threshold, but that never got things quite right. I do not recommend wasting time with this.

*** My Current Approach
- I learned to control window placement more explicitly using display-buffer-alist.
- Most of what I know about this variable came from a video by Prot that I highly recommend watching.
- https://www.youtube.com/watch?v=1-UIzYPn38s
- It's 30 minutes long, and I think it's worth watching a few times.

Example from my init.el
https://bpa.st/WB5A
>>
>>108827892
Lisp felt very alien when I first encountered it. Smalltalk feels similarly alien.
I respect the language, and I think this project looks really interesting.
https://gtoolkit.com/
It could do for Smalltalk what Emacs did for Lisp if it ever gains traction.
>>
>>108819854
>embark
never understood the appeal desu
>>
>>108834983
>embark
I don't use it a whole lot either. I saw prot do something magical with it in one of his videos and thought I ought to add it to my own config, but it hasn't really stuck with me. Even now, I'd have to look up how to use it again.
>>
File: almighty-lisp-moon.png (294 KB, 1552x1986)
294 KB PNG
>>108796486
This is one of the more aesthetically pleasant works of Common Lisp documentation. I like the almighty-lisp-moon theme the best so far. The non-moon version was a bit too bright for me, but this darker variation is easy on my eyes. I appreciate the left sidebar, too. It really helps me navigate my way through the book.
>>
I think I found a bug in local-time:today.
CHVN> (now)
@2026-05-16T03:14:18.030538-07:00
CHVN> (today)
@2026-05-15T17:00:00.000000-07:00

The now function is correct, but today is giving me yesterday's date.
https://github.com/sharplispers/local-time
>>
>>108831242
Nice tits THOUGH
>>
>>108835528
>17:00:00.000000-07:00
#<generic-function clock-today>
Returns a timestamp for the current date given a clock. The date is
encoded by convention as a timestamp with the time set to 00:00:00UTC.

It seems the library expects you to normalize to utc first, as (- 24 7) is indeed 17
>>
>>108836154
I don't like that I have to do this. It's an unpleasant surpise.
CHVN> (setq local-time:*default-timezone* local-time:+utc-zone+)
#<LOCAL-TIME::TIMEZONE UTC>
CHVN> (local-time:today)
@2026-05-16T00:00:00.000000Z

What if I don't want to be in UTC? (My answer going forward is to not use the today function and just use the now function instead while ignoring the time portion when I don't care about time).
>>
>>108836259
I'm not familiar with the library, but perhaps you can pass either a clock or (now) to another function that zeros the timezone
>>
>>108831242
Just to be clear, do you want windows to be side by side or stacked on top of each other?
>>
>>108836370
This seems to work.
This is the behavior I wanted from today.
LOCAL-TIME> (timestamp-minimize-part (now) :hour)
@2026-05-16T00:00:00.000000-07:00
>>
>>108829094
vibeGODS won
>>
>>108836616
C-x 3
>>
Been playing around with some racket doing some very basic plotting and it's really nice. I'm surprised this isn't more popular given the repl can display plots and I don't have to fuck around bringing up a terminal, running the entire program or using some cope like notebooks to achieve a similar thing. Why did the lisps die in the mainstream?
>>
>>108838685
I had to do some shenanigans to plot stuff in chez. Dump data into gnuplot and call it... Chez's ecosystem is so dead... Racket is the oposite, it even has db drivers.
>>
>>108838640
>C-x 3
Thanks. The reason I asked for clarification was because what you and I and vim consider a vertical split, other programs like emacs and tmux consider a horizontal split. Some programs avoid this ambiguity by saying things like split-right and split-bottom.

Anyway, paste this into your scratch buffer and try running it to see how it feels. Run the last line repeatedly until it won't split anymore.
(progn
;; As long as the window is 40 chars wide or greater, split the windows side-by-side
(setq split-width-threshold 40) ; default 160
(setq split-height-threshold nil) ; default 80
)

;; Run this repeatedly to see where it stops creating new splits.
(split-window-sensibly)
>>
>>108831242
(中出し)
>>
>>108839132
>Chez's ecosystem is so dead
Sad, many such cases.
>>
>>108767473
I thought moe was a person and thought he had cool style

Now i am broken and sad
>>
File: 20220518_125843.jpg (747 KB, 1564x2048)
747 KB JPG
how do I tackle the little schemer?
thanks
>>
C-u m...
https://lists.gnu.org/archive/html/bug-gnu-emacs/2026-05/msg00901.html
>>
"Unhygienic" macros are a literal non-problem, and Scheme completely ruined its own macro system chasing some retarded academic theoretical perfection.
>>
>>108827892
Smalltalk at this point is probably an elaborate anti-Lisp trolling campaign.

Nobody. Ever. Posts. A. Single. Line. Of. Smalltalk. Code.
>>
>>108841969
>"Unhygienic" macros are a literal non-problem, and Scheme completely ruined its own macro system chasing some retarded academic theoretical perfection.
based
procedural macros exist for a reason: they have unlimited power, and they get the job done quickly.
>>
>>108841974
>talking. like. this.
kill yourself, nigger.
>>
>>108840807
think about the question, then read the answer
>>
>>108842896
I'll try, thanks.
>>
>>108840788
Moe is a real girl's name.
https://b-name.jp/%E8%B5%A4%E3%81%A1%E3%82%83%E3%82%93%E5%90%8D%E5%89%8D%E8%BE%9E%E5%85%B8/f/yomi/%E3%82%82%E3%81%88/
>>
File: moe.png (118 KB, 972x590)
118 KB PNG
>>108843190
very popular name with Jewish mafia bosses
>>
File: gimp-tan.jpg (741 KB, 3500x4500)
741 KB JPG
>>108843536
>moe the gimp
topkek
>>
>>108842173
>still not even a line of smalltalk code
>>
>>108836259
Another fun surprise if you don't do this set is when you compile and distribute a binary, the machine running the binary will use the time zone of the machine that compiled it. Great source of bugs.
I hate the library but there's not really a better one...
>>
>>108841969
I actually like Scheme and its macro system…
>>
>>108844965
I think it would be much more tolerable if there was a standard way to introduce multiple symbols. I often want to bind the results of multiple forms to variables and then use those later and it can be difficult. E.g.
(define-syntax bound-call
(syntax-rules ()
((_ f value ...)
(repeat-at name value)
(let ((name (bind value)) ...)
(f name ...)
(unbind name) ...)))

(f a b)
=> (let ((v1 (bind a)) (v2 (bind b)))
(f v1 v2)
(unbind v1)
(unbind v2))
>>
>>108841969
gensym is kind of gaytarded and ugly though
>>
something that has bothered me for ages in emacs:
whenever i open a minibuffer and leave it open, then go to another window and switch buffers there, and eventually close the minibuffer, it jumps the window back to the buffer i was originally in when opening the minibuffer
what causes this? is it default behavior or some retarded setting i changed years ago and forgot about?
>>
>>108845432
Maybe, but it's not bad enough to be a deal-breaker (for me at least).
>>
I wish Julia compiled as quickly as SBCL.
>>
>>108841969
> feminine hygiene products

So regardless of what you think about hygienic macros, they are great when you consider self-contained systems that use lisps' homoiconic features, where you can have new code added to the system using the existing system that can parse and compile the new code and add it to the system and execute it. Or change/replace existing code in that system.

BASIC was like this in the 70s and 80s and things like Perl that had eval as well as many other "interpreted" languages.

Now, if you're used to C and the CPP (and writing to compiled binaries) you might not care much, but retards can do a lot of damage with the CPP and introduce subtle, near-impossible-to-find bugs. I agree, there's an unlimited amount of power there, to the point where we have people running transliterators to turn one language into another.
CHICKEN is one such scheme that can turn your code into C if that's something you want to do. I work on embedded systems that use interpreters to execute extensions and custom actions, so I'm in a situation to appreciate the hygienity so we don't have to extend the core parser.
>>
>>108845751
I want to puke when dealing with C-- and C dependencies that have like 4 layers of make, cmake, whatnotmake and several files of JUST macros dealing with and creating more bullshit
>>
>>108767473
Is there a code formatter for common lisp akin to something like Go/Rust (or pretty much all languages today) or is that not a thing for it?
>>
>>108845346
It almost seems possible
(define (bind a)
(format #t "bind ~a~%" a)
(cons 'bound a))

(define (unbind a)
(format #t "unbind ~a~%" a))

(define (f a)
(format #t "f ~a~%" a))

(define-syntax macro
(syntax-rules ()
[(_ f x ...)
(let ([x (bind 'x)] ...)
(f x) ...
(unbind x) ...)]))

(macro f a b)

bind a
bind b
f (bound . a)
f (bound . b)
unbind (bound . a)
unbind (bound . b)

For f we can likely construct a lambda that gets both a and b, as ((f x) ...) I think expands into ((f x1) (f x2)). To do this more correctly we could use with-syntax and map over (x ...), but I'm less familiar with syntax-case
>>
>>108845703
Julia?
>>
>>108845703
julia actually has libraries so it has more stuff. SBCL and CL have no ecosystem so it is faster to compile.
>>
>>108846466
select it in emacs
press tab
>>
>>108845346
>>108847474
syntax objects in Chez sir
>>
>>108849819
What libraries?
>>
>>108849983
You can see what's being released here.
A lot of it is for scientific computing.
https://github.com/JuliaRegistries/General/pulls
>>
>>108846466
I let Emacs indent it.

C-M-h (mark-defun) is a good way to select lisp code. You can hit it repeatedly to mark multiple top-level forms.

C-M-\ (indent-region)
>>
>>108851218
Thanks.
Scientific domain-specific libraries are always going to be a gap. That's the whole reason Clasp exists, to better make use of C++ ones. Java ones can be used with ABCL. But the Julia, R, and Python ecosystems are probably best accessed from Lisp by shelling out or communication over a socket. Maybe LLMs are good enough to do rewrites on top of numcl/magicl/lisp-stat for a lot of things as you need them.
>>
File: izumi.jpg (291 KB, 2048x2028)
291 KB JPG
jank is very interesting
https://jank-lang.org/blog/2026-05-08-optimization/
https://news.ycombinator.com/item?id=48151251
>>
>>108851405
M-q will indent the current defun or fill the current string or comment depending on context.
>>
>>108851870
>Java ones can be used with ABCL
To add to this conversation, Java libs are damn easy to be called from ABCL. And it works in interactive mode so even for some stuff i find easier using ABCL to test a certain Java lib via the REPL, than having to write Java code, then compile it, then run it.
>>
>>108845751
>comparing CPP macros with Lisp macros
To begin with, C++ does not have anything remotely like "macroexpand-1", which makes debugging macros extremely easy.

Thus they're worlds apart.
>>
>>108847474
The issue is order of evaluation. Macros lazily evaluate their arguments, so if you want to “gensym” a list of symbols, it will be interpolated two places then evaluated later. You could get around it by implementing monadic macros through continuation passing and currying. You can technically do anything you want because Scheme's macros are turing complete. It's even possible to do surprising things like check for equality of symbols.
(define-syntax syntax-apply
(syntax-rules (syntax-rules)
((_ (syntax-rules rules ...) argument ...)
(let-syntax ((s (syntax-rules rules ...)))
(s argument ...)))
((_ s argument ...) (s argument ...))))
(define-syntax literal-symbols-equal?
(syntax-rules ()
((_ a b)
(syntax-apply
(syntax-rules ()
((_ b)
(syntax-apply
(syntax-rules ()
((_ a) #f)
((_ #t) #t))
#t)))
()))))

Then you can wrap that in monadic actions like these to actually use the results in macro code.
(define-syntax syntax-return
(syntax-rules ()
((_ value ...) (syntax-rules ::: () ((_ f) (f value ...))))))
(define-syntax run-syntax
(syntax-rules ()
((_ value) (syntax-apply value (syntax-rules () ((_ return) return))))))
(define-syntax syntax-bind-1
(syntax-rules ()
((_ ellipses name value body ...)
(syntax-apply value (syntax-rules ellipses () ((_ name) body ...))))))
(define-syntax syntax-bind
(syntax-rules ()
((_ body) body)
((_ (ellipses name value) rest ...)
(syntax-bind-1 ellipses name value (syntax-bind rest ...)))
((_ (name value) rest ...)
(syntax-bind-1 ellipses name value (syntax-bind rest ...)))))

You can see the continuation passing principle here. Instead of returning values, macros return a function that applies another to its result. I.e. T -> U becomes T -> (U -> V) -> V. The would require replacing the #t/f in the definition with (syntax-return #t/f).
>>
>>108851870
> Julia, R, and Python ecosystems are probably best accessed from Lisp by shelling out or communication over a socket

No, the best way to into the python ecosystem is to write lisp that generates into the python “bytecode” <spit> environment directly. An example of this might be something like Hy: https://hylang.org

Then you can move forward properly and start eliminating as much of the nonsensical python dreck as you have patience for, or until it’s gone.
>>
>>108851912
>M-q
That's nice. It makes it so you don't have to select any text if you just want to reindent one top-level form.
>>
>>108828507
>rebuilding the pdf whenever I save a file
AucTeX and C-c C-a?
>>
>>108854299
I did a test on a plain tex document (not a fan of latex--most of it seems to want to duplicate microsoft word) with metapost diagrams and I can get recompile-redisplay of 21 FPS on my laptop. Seems insane.

I guess that's not surprising since it's been 20 or 30 years of hardware speedup.
>>
>>108854600
>not a fan of latex
Probably nobody should be using LaTeX but alas it's too late for academia. Especially now that publishers are obsessed with translating to HTML for "better accessibility" even though a better TeX distribution could seamlessly handle PDF/UA... and alternative back ends like HTML without having to tardwrangle the mix of LaTeX structure and plain TeX by third party utilities that simply end up guessing because they dont want to implement or leverage a TeX engine.
>>
What if a lisp (or really any dynamic language) didn't have concrete types? For example it had a prototype based OOP system with CLOS style multimethods but there was no type-of because instances dont have concrete descriptors. Instead you only had 'satisfies?' which applies a minimum requirement to an object (e.g. checks if certain fields exist).
>inb4 clj
Ah yes now that I check the docs I find that it almost exists in Clojure with protocols (and satisfies? lmao) but my whole idea is to avoid the concrete record types that clj relies on for this.
>>
>>108854908
> plain TeX
You can actually program in TeX but it's a nightmare like using brainfuck or having only unary numbers to work with.
The legitimate successor is luatex, but sadly they gravitated to that shitass language instead of making it lisp or scheme.
LISP would make another fine front-end to the LuaJIT machine which is the only thing worth while the whole Lua debacle excreted in it's entire lifetime. I think I described "Fennel" here.

Ad this point, I should be able to take any random language, do an "escape" ... embed my lisp code with named access to all the variables ... and then simply continue with the shitass code until I see fit to replacing it with lisp. It's a one-way trip.
>>
>>108855280
>You can actually program in TeX
Sure there is very rarely a reason to unless you want to join the circlejerk. The things that are fairly hard to automate in TeX (e.g. properly line breaking a URL) are now trivial in LuaTeX.
>The legitimate successor is luatex
Now LuaMetaTeX
>sadly they gravitated to that shitass language instead of making it lisp or scheme
Sure Lua is not ideal but it is certainly close enough. The only lisp/scheme implementation they could consider is Chibi, which really sucks compared to Lua because the standard library is so tiny. Their focus is typesetting not spending all year writing another lisp implementation, and for that Lua is probably the best choice they could have made.
Do you have one good reason why Lua was a bad decision for them apart from muh parens?
>LuaJIT
Is dead, most projects don't support LuaJIT for a good reason. Also it's actually slower for ConTeXt than Lua.
>LISP
What is this, the 60s?
>>
>>108855043
https://clojure.org/reference/multimethods
>>
>>108855860
I don't think you understood what I meant. Clojure multimethods depend on Javas concrete type hierarchy.
>>
>>108856360
>I don't think you understood what I meant
No, you just didn't read the link I posted.
>Clojure multimethods depend on Javas concrete type hierarchy.
No, multimethods and protocols are distinct from one another.

Some more concrete examples of multimethods:
https://eddmann.com/posts/exploring-multi-methods-in-clojure/
>>
>>108856568
the examples in that blogpost are not good usecases for multimethods mind you, but they do illustrate how multimethods as a mechanism work.

If you built a frontend for 4chan, you could for example have a multimethod called render-post and it would test the post's data structure to figure out if it's an OP post, a post with a file or a regular reply, and do different things depending on what kind of post it is.
>>
>>108856592
to be even more specific, multimethods are great for EXTENSIBILITY. if your frontend is a lib, then users of that lib can add logic to your multimethod to modify rendering in whatever way they want.
>>
Do we have any libraries in CL that can be used to define read-only classes with type checking? Or is this easy enough to do with MOP that nobody really bothers?
>>
>>108856707
This. In Sepples, I have to make my own retarded class that inherits from an existing one just to add a method, while in Common Lisp, this is trivial.
>>
>>108845751
>
Now, if you're used to C and the CPP (and writing to compiled binaries) you might not care much, but retards can do a lot of damage with the CPP and introduce subtle, near-impossible-to-find bugs.
Almost never actually happened in practice. In fact, preprocessor macros in C are underrated (although certainly inferior to CL macros by far).

The real mess is Sepples templates.
>>
>>108856568
I see. Your first link spends the whole page first describing isa? then discussing dispatch based on it and doesn't seem to mention any alternatives.
I guess, like every idea I've ever had, Hickey has already thought of it and implemented it in Clojure in a more generic sense. Though in clj is it easy to define predicates that test for the existence of a set of keys in a hash map?
>>
>>108857219
>Though in clj is it easy to define predicates that test for the existence of a set of keys in a hash map?
yes, since keywords can be used as functions and return nil if the key is not found, something like (every-pred :children :horns)
could be used to test for non-nil values of :children and :horns in a map like
;;lang: clojure
{:age 3
:name "Tsubaki"
:species "Javan rhino"
:horns 1}
>>
>>108853700
Very cool, thanks for taking the time to write that up. For anon's original problem I'm guessing we could use run/bind/return to effectively delay the arguments so they are emitted in the order we want once

In the quoted example we could also do
(define (f . a)
(format #t "f ~a~%" a))

(let ([x (bind 'x)] ...)
(f x ...)
(unbind x) ...)

to get
bind a
bind b
f ((bound . a) (bound . b))
unbind (bound . a)
unbind (bound . b)

but this only works if xs are symbols, I think the original anon's intention was for the macro to expand on each new binding in the let
>>
>>108857219
(defn
contains-keys?
[m ks]
(every?
#(contains? m %)
ks))
>>
>>108855280
>The legitimate successor is luatex, but sadly they gravitated to that shitass language instead of making it lisp or scheme.
fennel, mlisp, scheme2luac, lux, and more. pick your poison.

>>108855442
>>LuaJIT
>Is dead
it isn't
>>
>>108856835
Maybe not, since defining a read-only metaclass was suggested for the implementation of conditions, since it’s obviously wrong to allow the user to modify a condition object
>>
File: 1778905406074872.jpg (73 KB, 1079x978)
73 KB JPG
I have discovered a syntax legitimately superior to Lisp. no, I will not share it. it involves a fundamental change in the way you think about functions.
>>
>>108858335
I have discovered a woman fatter than your mom. No, I will not post a picture.
>>
>>108858335
are those tung tung tung sahurs?
>>
>>108857665
Yes, it could be done as follows (note a few corrections because my old code was slightly buggy).
(define-module (syntax-continuations)
#:export (syntax-apply syntax-bind bound-call syntax-return run-syntax))
(define-syntax syntax-apply
(syntax-rules ()
((_ (rules ...) argument ...) ; This actually needed to accept any form, not just `syntax-rules`.
(let-syntax ((s (rules ...)))
(s argument ...)))
((_ s argument ...) (s argument ...))))
(define-syntax syntax-return
(syntax-rules ()
((_ value ...) (syntax-rules ::: () ((_ f) (syntax-apply f value ...)))))) ; I forgot `syntax-apply` here before.
(define-syntax syntax-bind-1
(syntax-rules ()
((_ ellipses name value body ...)
(syntax-apply value (syntax-rules ellipses () ((_ name) body ...))))))
(define-syntax syntax-bind
(syntax-rules ()
((_ body) body)
((_ (ellipses name value) rest ...)
(syntax-bind-1 ellipses name value (syntax-bind rest ...)))
((_ (name value) rest ...)
(syntax-bind-1 ellipses name value (syntax-bind rest ...)))))

(define-syntax gensyms-for
(syntax-rules ()
((_ ()) (syntax-return ()))
((_ (x . xs))
(syntax-bind
(xs* (gensyms-for xs))
(syntax-return ((new-symbol x) . xs*))))))

(define-syntax bound-call
(syntax-rules ()
((_ f value ...)
(syntax-bind
(::: ((name value*) :::) (gensyms-for (value ...)))
(let* ((name (bind value*)) :::)
(f name) :::
(unbind name) :::)))))

(define (bind a)
(format #t "bind ~a~%" a)
(cons 'bound a))
(define (unbind a)
(format #t "unbind ~a~%" a))
(define (f a)
(format #t "f ~a~%" a))

(bound-call f 1 2)
>>
File: mokujin-mugen-fan-gif.gif (419 KB, 227x379)
419 KB GIF
>>108858335
I doubt you've discovered anything of value desu
>>
File: image.png (125 KB, 895x314)
125 KB PNG
Why does evil-mode rebind C-e to evil-copy-from-below? I'm not asking how to fix it. I'm asking what motivated evil-copy-from-below in the first place. Is it a Vim thing?

>>108860141
I was just thinking about Combot last week.
>>
>>108860460
>I'm asking what motivated evil-copy-from-below in the first place. Is it a Vim thing?
Apparently, it *is* a vim thing. I had no idea. Do this in vim to see where that behavior is documented. (Today is the first day I've ever used it in my decade+ of vim usage.)
:help i_CTRL-E
>>
>>108857682
>#(contains? m %)
Is there a performance difference between these sorts of anonymous functions and ones created with (partial)?

>>108860460
I downloaded Tekken 5 last week, was very happy about the fact that it also comes with Tekken 1, 2 and 3 included
>>
>>108861007
I seem to remember that they're not the complete games. I went well out of my way as a kid to obtain Tekken 1 and 2 despite owning 5.
>>
>>108860460
Tangentially, another vim behavior I discovered through evil are the ; and , movement commands.
If you do a search via f, t, F or T then:
; will repeat it
, will repeat it in the opposite direction.

I had no idea they existed, and I don't find them that useful. I took over ; to use as another leader key which I find very useful since it's in a very ergonomic position.
>>
>>108860948
That's Ctrl E, not Ctrl e.
>>
File: kazuya-kirby.gif (2.43 MB, 800x450)
2.43 MB GIF
>>108861020
>I seem to remember that they're not the complete games
they're the arcade versions, so they don't include the videos etc.
But it was enough to satisfy my urge to experience some PS1-related nostalgia
>>
>>108861068
Did you try it out in vim? For me, it doesn't make a distinction between C-E or C-e while in insert mode. They both do the same thing.
>>
>>108861229
Shit, I'm dumb.
>>
>>108861007
performance of `#()` is the exact same as `(fn ...)` (as fast as you are going to get without doing weird shit). `partial` is for different behavior. idk the performance characteristics of `partial`.
>>
>>108853777
Hy is gay because it's built on the quicksand of Python, you can't escape the Python dreck on such foundations. The runtime will be slow, the debugging terrible, and the interactive experience I'm used to absent.
Fortunately there are many better ways to bridge Common Lisp and Python: https://github.com/CodyReichert/awesome-cl#python
>>
>>108856835
How read-only do you want? Just providing a :reader accessor and running check-type manually in the constructor to ensure fset or other immutable data structure types gets you the semantics from the outside.
"But muh (setf (slot-value '%slot) ..)" just don't do it. Similarly just don't sb-kernel:get-lisp-obj-address.
>>
Bros, what are some good examples of good/beautiful/elegant lisp code?
I'd like to examine some well written lisp that's actual full size projects, even little projects.
Just something more than example snippets and emacs settings.
I've been grinding like a motherfucker on learning lisp and writing shit, but I'm not sure what I should be looking at as a reference for 'this is how it's usually done / done well'.
>>
>>108861093
Yep, it's great.
>>
>>108862721
Jump to definitions in the code you’re using whether it’s SBCL or a Scheme implementation
>>
File: 0_jwbPDHXXZZAfQMwp.png (206 KB, 1280x787)
206 KB PNG
Another day, another sale, another step towards financial independence thanks to (lisp) Clojure
>>
>another lisp general
>another day hitting page 10 before 300
It’s all so tiresome
>>
>>108865249
Got something to contribute?
>>
>>108865249
frankly we should get off 4chan
this place is the surveillance state's ballsack
can't even sign your posts with PGP, so bot posting can run more easily rampant.
>>
>>108862721
On the Elisp side, I like the code for 4g and ob-duckdb. I thought they were both well-written. I use both almost daily.

Read 4chan in Emacs via org-mode.
https://github.com/eNotchy/4g

Query DuckDB through org-babel
https://github.com/gggion/ob-duckdb
>>
File: 1769973324380027.jpg (350 KB, 1026x1023)
350 KB JPG
>>108859379
That's so cool, thanks anon. To generate new-symbol-n I thought would involve syntax-case with syntax->datum/symbol->string, so my knowledge of macros is pretty lacking. bound-call is perfectly legible and close to the initial anon's request as well
>>
>>108865832
If you ever go to `ssh late.sh`, I made a lisp room.
>>
>>108865249
maybe if a certain someone finally releases 4g v1.0 and gets it into MELPA we'll get some more people here.
Packages on melpa.org are sorted alphabetically by default, so 4g would be near the top of the list.
>>
>>108858335
I know his secret.
>>108865904
>>
Finally finished both chapters of vim tutor. I guess I should just go straight to Evil Mode now?
>>
>>108867371
could've just used evil-tutor, sir

but yeah, why not
>>
>>108863997
what do you do?
>>108865249
its impossible to compete with the genai slop threads
>>
>>108767473
Why is lisp so hard? I wanted to learn it by writing a telegram bot, but there are no normal libraries. I actually found one, but I have no fucking clue how to install and use it and everything seems so foreign and unintuitive that I just can't get how to use it. And of course there is no documentation and no tutorials about it.
>>
>>108868138
>telegram bot,
what is it for? mass downloading CSAM and russian gore videos? lmao
>>
>>108868138
clojure and elisp have telegram libraries
>>
>>108868185
A toy bot for my friends chat. Basically it should send mocking replies to everybody whose using retarded slang and memes.
>>
>>108868204
Afaik clojure is not the best of the lisps. It uses strange syntax, so I wanted to start with CL
>>
File: 1775938534206484.png (336 KB, 1024x1024)
336 KB PNG
>>108868236
>>
>>108868236
>it uses a strange syntax
it's much less strange than purely using () for everything for programmers that are new to lisp.
>>
>>108868236
by all means try your hands at CL if you want, however
>It uses strange syntax
the only fundamental thing Clojure does differently compared to traditional Lisp dialects is the {map} literal syntax for expressing key-value relationships, which is a great idea.

Most of the other stuff (destructuring support, ->>threading macros, syntax sugar like ' and #', using [] for grouping) are things you'll come across in other lisp dialects too, just implemented with half-assed macros and used inconsistently.
>>
Is it just me, (it probably is) or does Doom actually have slightly noticeable input delay? I might jump boat over this. I love Emacs but, damn it can feel slow.
>>
>>108868974
>pgtk build + high res screen + fractional scaling enabled
unironically the slowest editor i've ever used with this combo. even visual studio community is faster
had to compile without pgtk
>>
>>108869148
Uninstall libwayland
>>
>>108868138
Did you setup quicklisp?
If you did, all you'd have to do load a library into the REPL is this.
(ql:quickload :cl-telegram-bot)

https://quickdocs.org/cl-telegram-bot

You can find some setup instructions here:
https://almightylisp.com/book/essentials/getting-started-w-doom-emacs-lisp#install-setup-on-linux
Also here:
https://lispcookbook.github.io/cl-cookbook/getting-started.html#install-quicklisp
>>
>>108868974
what modes are enabled by default?
>>
relatedly to performance >>108868974
has anyone tried to compile emacs following this guide? https://www.jamescherti.com/compiling-emacs/
>>
>>108870502
I think he disables too much.
I would keep:
sqlite3 (because I use it)
all the image format libraries
xinput2
>>
>>108868974
you can solve it by starting emacs like this:
emacs -nw
>>
>>108872690
Losing the ability to mix fonts and display images is a big sacrifice.
>>
3D and shader-accelerated Emacs GL front-end when
>>
>>108868138
Out of curiosity, what editor are you using?
>>
https://sachachua.com/blog/2026/05/emacs-chat-with-raymond-zeitler/
https://www.youtube.com/watch?v=ro6BZI0Z64I
sacha talks to a defense industry engineering boomer about emacs.
>>
>>108868138

Do you really need a library? Learn the API of Telegram and implement a subset of it with features that you need.

Relying on third-party libs for such tasks is childish. One day you will find a service for which there is no library. If you can't explore the HTTP APIs yourself you won't be able to use that service.
>>
>>108873433
I learned something from this old man.
select some text and:
M-s M-w (eww-search-words)
>>
>>108873166
SIXEL support when??
>>
Suppose I have sly running, and I want to run the following Elisp to evaluate a Common Lisp expression.
(sly-eval '(cl:+ 11 11))

That work, but I had to say cl:+ instead of just + to make it work. Is there a way to run an expression in a specific package? (I saw that sly-eval had an optional package parameter, but I couldn't find a way to make it work.)
>>
Now think long and hard on why Python became this popular.
>>
>>108873166
I don't give a shit about images, but variable size fonts are a must for me, I use the GUI version of Emacs for that alone.
>>
>new elfeed maintainer completely broke my config
lol
>>
File: frierenburger.png (1.74 MB, 1500x1200)
1.74 MB PNG
>>108877292
>elfeed
How did it break?
>>
>>108877560
renamed a few variables and broke my custom functions in the process, fortunately i just had to rename a few things.
>>
File: file.png (936 KB, 832x1216)
936 KB PNG
>>
> last Xah livestream was months ago
he dead isn't he?
>>
>>108873166
for me, it's the additional key combos that are possible



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