Thread #108486131
File: Frieren_SICP.png (1015.8 KB)
1015.8 KB PNG
>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
(set! prev-bread (quote >>108410757))
314 RepliesView Thread
>>
Imageboard:
https://github.com/ECHibiki/Kotatsu-V
Textboard:
https://gitlab.com/naughtybits/schemebbs
>>
File: (E)LISP.png (506.7 KB)
506.7 KB PNG
>>108459837
https://protesilaos.com/codelog/2024-11-28-basic-emacs-configuration/
https://protesilaos.com/emacs/emacs-lisp-elements
http://xahlee.info/emacs
>>
>>
>>
>>
>>
>>
>>
File: let-completion-showcase.webm (2.9 MB)
2.9 MB WEBM
Alright I'm satisfied with this. All aspects of it can be customized so users can decide what they want to show or how.
Also while recording it occurred to me that I could add a minor mode that filters out any candidate that's not local, good for showcasing the completions without flooding with globals but it might also be useful when you want to focus only on the current scope.
So now there's this minor local-only mode (which im using in the video) and an interactive command that basically:
>enables the mode
>executes completion at point
>disables the mode
So I can bind it to a key and get local scope completion without having to enable and disable the mode manually.
>>
>>
>>108486131
Is there a LISP but low level, like C or ASM but with S-expression?
>related
>>108487794
>>
File: 6065ed531e366633beb395138ccb0012.png (1.3 MB)
1.3 MB PNG
>>108487141
r5rs is smoler
>>
>>108488008
Check out cakelisp.
I'm working on one right now too, kind of similar to cakelisp in that it compiles down to C, but with an actual standard library, CLOS-style object system, REPL/eval, etc. It's been a lot of fun.
>>
>>
>>
Hello anons
I'm currently learning Emacs and I plan to read either HtDP or SICP after I'm done with the basics.
Which do you recommend more? I'm leaning more towards SICP since it seems to have a wider coverage of computer science but I'm definitely slow and barely remember any calculus which is making me hesitant.
I already did some online courses like Systematic Program Design, and Dan Grossman's Programming Languages both from OSSU's CS core programming section.
>>
>>108488099
Maybe you're looking for Forth? Cakelisp is pretty barebones, it's basically just C with sexp. I don't think it has any intellectually masturbatory features, at least not last time I checked. Not sure what you're asking for.
Also machine code and IR are pretty different things, the lang I'm working on compiles to IR and then I just have a backend for C and the interpreter. Do you mean so you add a native backend to one or something?
If you don't want functional or OOP then what are you really looking for, something mostly just procedural without anything else? Have you checked out pre-scheme maybe?
>>
>>
>>108488008
It's called Common Lisp.(define-generic-arith-routine (+ 10)
(move res x)
(inst add res y)
(inst jmp :o BIGNUM)
(inst clc) (inst ret)
BIGNUM
;; Unbox the overflowed result, recovering the correct sign from
;; the carry flag, then re-box as a bignum.
(inst rcr res 1)
(when (> n-fixnum-tag-bits 1) ; don't shift by 0
(inst sar res (1- n-fixnum-tag-bits)))
(return-single-word-bignum res rcx res))
SBCL compiles to machine code. You can disassemble any function with the built-in function disassemble.
Having s-exp syntax does not make something a lisp.
>>
>>
File: 2026-03-30.png (101.2 KB)
101.2 KB PNG
>>108488099
Snippets of lisp->assembly compilers have been posted in previous breads
>>
>>108488316
A conservative definition is that it must be able to run most Lisp code with few to no modifications for everything called Lisp from McCarthy to Common Lisp. This applies to Common Lisp. Naturally this excludes Scheme and Clojure.
A more liberal definition includes languages like Dylan, and McCarthy's version of Lisp before switching to s-exps.
There's a shitcoin called Chia that uses an s-exp syntax for smart contracts, and web assembly's WAT uses s-exps, neither are lisps.
My personal most liberal criteria for what makes something a lisp is whether it has runtime interactivity or not. If I can't modify the program while it's running in any way I please, then sorry, you're not even in the running, regardless of what surface-level syntax you might have.
>>
>>108488419
That's kind of the issue though, everyone has their own opinions of what a lisp is. I guess the real answer is who gives a shit, it's a label for a family language that is irrelevant nowadays. I personally think homoiconicity and sexp syntax + metaprogramming/first-class macro system are more central to what a lisp is than runtime interactivity, otherwise stuff like Smalltalk would count as a lisp.
>>
>>108488419
>>108488451
maybe the real lisp was the friends we made along the way
>>
>>108488070
Done: https://github.com/gggion/let-completion.el
>>
>>108488451
>Smalltalk would count as a lisp.
Now you're getting it.
Another way to look at this is whether you really have a programming system rather than just a language. The language paradigms and system paradigms are incommensurate. Lisps have historically been more on the system side and when people struggle with them it's usually because they can't cross the gap to thinking in systems.
>>
>>108488497
I agree with you, I just think there should be another term than "Lisp" for the type of environment you're describing. You're describing more of a feature than a language of families. There's a reason it's called Lisp, it's an abbreviation of LISt Processing. If you make a language identical to MacLisp or Common Lisp, but you have no runtime features, I would still call that a lisp. It's not lispy to not have runtime features, but it's definitely a dialect of lisp in my opinion. Who cares though.
>>
>>
>>108488419
>McCarthy's version of Lisp before switching to s-exps
It had sexps from the start. The end goal was M-exps which inspired the Wolfram language syntax.
>If I can't modify the program while it's running in any way I please
Even modern C runtimes have support for this.
>>
>>108488513
Yeah, it doesn't really matter, other than it's annoying when idiots call everything with s-exp syntax a lisp, even if it doesn't have macro support or lambdas, and miss out on all the other elements of Common Lisp that are inherited from a rich tradition of older Lisps.
>>108488551
>Even modern C runtimes have support for this.
Not really. Show me a modern C tutorial that shows this up front like Lisp tutorials do. The approximations I've seen always have severe limitations. Usually it's a form of plugin architecture which requires fully unloading and reloading things rather than redefinition, and the things must conform to a static API.
Every video game engine ever wants this sort of functionality, they all eventually get something approximating it with many, many caveats and limitations. Tomorrow Corporation's tech demo is probably the best version I've seen of this but required them to make their own editor on top of everything else.
Another criteria is if the language has support for OOP, does it also have something like change-class? Such a function is a sign of system thinking, not language thinking.
>>
File: 1774905114701067.png (66.3 KB)
66.3 KB PNG
>>108488483
Thanks anon
>>
>>
>>108488483
Have you look into how elisp--local-variables works? It seems like it would be a lot easier to deal with everything as an sexp rather than as text in the buffer. It concatenates everything from the outermost open paren upto to point, appends elisp--witness--lisp and enough closing parens to balance the expression and read-from-string's it. Then it recursively walks the sexp keeping track of variables in scope until it finds elisp--witness--lisp and returns the variables currently in scope. I ended up reusing most of the body of elisp--local-variables-1 as the base method of a generic function and wrote methods specializing on the heads of the sexp which would do manual macro expansion by transforming that level of the sexp into something that could be processed. It would also be possible to define methods for safe macros that just macroexpands them. For example(cl-defmethod let-completion--local-variables-1 (vars
(sexp (head cl-defmethod)))
(pop sexp)
(while (cl-generic--method-qualifier-p (car sexp))
(pop sexp))
(let-completion--local-variables-1
(nconc (cdr (cl--generic-split-args (pop sexp)))
vars)
`(progn ,@sexp)))
>>
>>108488419
There are two senses of the word Lisp. One is as you describe, the other is a short hand for a language using s-expressions. If you call something without quotes a Lisp, nobody is going to be confused or care.
>>
Anyone know how to get the leader key defined by general to work in the *Messages* buffer? I've tried the following snippet, and it works after it gets evaluated, but not on startup, regardless of where I put it in my config file:(with-eval-after-load 'evil
(general-add-hook 'after-init-hook
(lambda (&rest _)
(when-let ((messages-buffer (get-buffer "*Messages*")))
(with-current-buffer messages-buffer
(evil-normalize-keymaps))))
nil
nil
t))
>>
>>108488618
I think you're overestimating how many features the C runtime has.
>modify the program while it's running in any way I please
Means replacing a function definition at any time. Sure, you can't freely redefine C structs but you can't do that with CL structs or Scheme record types either.
In the C ecosystem this is generally called hotpatching and Win32 has supported it natively for at least two decades.
https://devblogs.microsoft.com/oldnewthing/20110921-00/?p=9583
Windows uses this to live patch security updates.
>modern
If by "modern" you mean contains code snippets that still work as is then sure.
https://aegisknight.org/2009/03/disabling-functions/
Theres also a few libraries that build around features like this
https://github.com/EasyHook/EasyHook
https://github.com/Microsoft/Detours
Its a fair bit harder on *nixtard but the best solution is typically using detours.
For example https://journal.lunar.sh/2022/linux-detours.html
Both of these techniques use indirection to essentially replace the body of the old function with a call to the new function and the result is really quite similar to the general lisp case which uses runtime indirection via symbol lookup.
>Every video game engine ever wants this sort of functionality
Game engines have a lot more to worry about than just loading some new function definitions and a lot of the big ones actually do support reloading models and scripting but its always low on the priority list because it doesn't actually make the game better.
My point is that using an implementation feature like muh redefinition is a very bad way to define a language (family). The typical lisp implementation family (which is not exclusive to lisp-like languages) is regularly conflated with the language family (which is also not exclusive to "lisp-like" implementations, a prominent example of this would be STALIN).
>>
>>108489419
I was aware of the classic win32 hotpatching. I think you are probably aware that it has many more limitations than you are suggesting besides just being appropriate for function patching, e.g. that the function replacements must share the same signature, number of arguments, and calling convention. You'll find no beginner C tutorials that use these types of tricks because it's not standard practice, unlike Lisp. The use of these tricks is not typically to enable interactive development but to enable dynamic instrumentation, typically for logging or extra debug info (especially of third party code you can't simply recompile).
It's disingenuous to compare the many limitations of these hotpatch approaches to the CL standard's exceptional "The consequences of redefining a defstruct structure are undefined." (This does not prevent an implementation like SBCL from defining its own consequences -- indeed, you can freely redefine structs in SBCL. When the redefinition is incompatible, you get thrown into the debugger and presented some options.)
>Game engines have a lot more to worry about than just loading some new function definitions and a lot of the big ones actually do support reloading models and scripting but its always low on the priority list because it doesn't actually make the game better.
Yes, thanks for agreeing, though these features are desirable not because they directly make a game better, but because they contribute to better and faster development of a game, which leads to more time to make a game better.
>an implementation feature like muh redefinition is a very bad way to define a language (family)
It is much better than surface level syntax, otherwise almost every other language is just an algol.
Mostly I'm sick of idiots posting their "look I made a lisp!" and you look inside and it doesn't even have the features of McCarthy's Lisp.
The "Build Your Own Lisp" book is a bad offender of this but a lot of people don't even go that far.
>>
>>108488945
Yeah my initial approach was exactly that, but after checking the code in elisp-mode.el
>https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/elis p-mode.el#L844-L845
I decided to purposely avoid any macroexp. There's a lot of discussion in there about the safety concerns of evaluating arbitrary lisp code to get completions (hence the talk about defining a list of safe macros, the trusted-content-p gate, etc)
I don't necessarily agree with this limitation, but I figured from a 'provider' POV it would be better if I left that decision to the user instead of assuming they wanted to do it. And I could gain much more freedom to develop and showcase the package if I killed any talk about safety and side-effects from the root
Still, to my surprise once I started going through the manuals and documenting the signatures of every binding form I could find, it turned out that the vast majority of them fall into like 4 structural patterns. 40 out of 46 registered forms are handled by those 4 extractors, you just tell the registry "bindings are at index 1, they're shaped like a list, scope is body" and it works.
Like 80% of work was from the 6 custom forms and having do deal with complex shit like defmethod and letf, but registering a new standard macro or function is a one-liner, and you can even register symbols that aren't loaded, it simply defines a symbol property so no errors if you register a binding from an external package. So the coverage came almost for free once the patterns were identified.
Also to my surprise this approach still benefits from adding files to the 'trusted' list, there's some cool synergy where if you enable macroexpansion for completions in a file you'll see more values in the middle column, so you can still benefit from the original --local-variables approach
imo the extractor approach came out on top, it works in untrusted buffers, it works before the macro is loaded and it works with incomplete forms mid-edit.
>>
>>
>>108488672
Being technically image-based or not is an implementation detail I don't care about. Clojure isn't image-based but still supports a high level of interactive development, I'm fine with calling it a lisp even if it's no more capable of running 40+ year old code with little or no changes than Python.
>>
>>108489841
I am not macroexpanding anything. I just read the sexp so I can walk a list instead of unstructured text. syntax-ppss gives you enough information to construct a readable string from a partial form.(let* ((ppss (syntax-ppss))
(txt (buffer-substring-no-properties (or (car (nth 9 ppss)) (point))
(or (nth 8 ppss) (point))))
(closer ()))
(dolist (p (nth 9 ppss))
(push (cdr (syntax-after p)) closer))
(setq closer (apply #'string closer))
(condition-case nil
(car (read-from-string
(concat txt "elisp--witness--lisp" closer)))
((invalid-read-syntax end-of-file) nil)))
>>
File: GNU_Compiler_Collection_logo.png (257 KB)
257 KB PNG
>>108488008
>C or ASM but with S-expression
Interestingly enough, even GCC uses S-expressions.
>RTL is inspired by Lisp lists
https://gcc.gnu.org/onlinedocs/gccint/RTL.html
>>
>>108489699
>that the function replacements must share the same signature, number of arguments, and calling convention
Sure, to ensure a correct program after a single patch they do but there is nothing stopping you from changing these aside from the consequences when it gets called incorrectly. If you're going to change any of those then you'll also need to rewrite/recompile all the callers and you don't need hotpatching then. The only thing lisps do to aid this process is by confirming the lambda lists match.
It would also be fairly trivial to introduce an argument conversion in the Win32 patch style.
>because it's not standard practice
>The use of these tricks is not typically to enable interactive development
They also have a very different mindset about how development should be done. These techniques are widely used to apply security fixes at runtime but isn't applied more widely because those developers would typically rather force a restart.
Anyway, it would be complete ass no matter the runtime support without dynamic typing and a REPL.
>>
>>
>>108489290
I figured it out. You just need to actually run the code in the lambda at some point after loading in general:(use-package general
...
:config
(general-evil-setup)
...
(when-let ((messages-buffer (get-buffer "*Messages*")))
(with-current-buffer messages-buffer
(evil-normalize-keymaps)))
)
>>
File: Crash_Bandicoot_Cover.png (174.4 KB)
174.4 KB PNG
>>108488008
The only thing that came to my mind was GOAL
https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp
https://opengoal.dev/
No idea if this is what you meant or if it's good for what you intend to use it for.
>>
>>
>>108486131
https://protesilaos.com/politics/2025-06-19-america-interventionism-de stiny/
>Israel is winning the battle of impressions with its subterfuge and sabotage tactics combined with its friendly media machinery across the West, yet it needs America (and other Western allies) to prevail in a total war against Iran. The Israeli government’s gambit, if not well informed expectation, is that its fait accompli will pull the Americans into the conflict, despite President Trump’s personal branding as an anti-war president. The goal is to topple the Iranian regime and replace it with a puppet of their choosing. All in the name of liberating people, of course.
What did prot mean by this?
>>
>>
>>
File: file.png (44.7 KB)
44.7 KB PNG
>>108489933
Ah yeah I see what you mean, regarding read, i did use it in the first version of the package, but I encountered some edge cases which were unsolvable, like dealing with broken contents inside the parens even if they're balanced.(condition-case err
(read-from-string "(let ((a 1) (b #<broken>) (c 3)) witness)")
(invalid-read-syntax (list 'FAILED (cadr err))))
it wasn't a complete dealbreaker but I also plan to add support for other Lisps in the future, plus by moving through the buffer you could also collect other stuff like text properties, overlays or anything currently living inside of it. Your approach is superior structurally I think notwithstanding those small edge cases, but it's too late for me to turn back.
>>
>>108493073
>(class-precedence-list (find-class 'anon-class))
It kind of goes in the opposite direction than what I wanted. It goes from a leaf node to the root instead of recursing from the root to the leaf nodes. I can still work with this though. Thanks.DS2> (c2mop:class-precedence-list (find-class 'uri-https))
(#<STRUCTURE-CLASS QURI.URI.HTTP:URI-HTTPS>
#<STRUCTURE-CLASS QURI.URI.HTTP:URI-HTTP> #<STRUCTURE-CLASS QURI.URI:URI>
#<STRUCTURE-CLASS COMMON-LISP:STRUCTURE-OBJECT>
#<SB-PCL::SLOT-CLASS SB-PCL::SLOT-OBJECT> #<SB-PCL:SYSTEM-CLASS COMMON-LISP:T>)
>>
>>108493257
Not sure if related but I remember slime-help doing some stuff related to finding classes:
https://github.com/mmontone/cl-def-properties/blob/8c4d833749ecfdc9dbc 6d08f47db7db63d73678e/def-propertie s.lisp
>>
>>
>>108493435
Quicklisp remains my only gripe with Common Lisp. I always get tangled up when trying to set dependencies, I wish there was a way of pinning libraries or pointing to a specific repository url, unless that already existss in qlot,vend ultralist or whatever the fuck it's available, I haven't been able to find an exact answer in any of these.
>>
>>108493488
I never had big issues with quicklisp itself, just the delays in distribution updates make my ~/quicklisp/local-projects/ folder expand and then I forget about what's in there and don't update, and it encourages others to not even bother making the GH issue to include their package at all because it won't happen until 6-18 months later anyway.
qlot supported pinning on repo url and commit id and maybe hash, or quicklisp distribution month as an alternative, but I haven't touched it in years.
I think part of vend's existence is to support pinning. ocicl probably supports it too. I just hate having external tools for package management after getting used to quicklisp.
Things were nice when quicklisp distributions updated more frequently. Most packages could update without problems, culturally people try not to break things.
>>
File: zbuffer-before.png (264.6 KB)
264.6 KB PNG
>>108490586
Great project.
https://opengoal.dev/blog/progress-report-q4-2025
>>
>>
File: 6d1d2fa2c74f812dbb06bebd0889e263a149f1d2.jpg (190.7 KB)
190.7 KB JPG
Is switching to Emacs actually worth it? My entire workflow currently lives in the terminal and browser, using Neovim for coding, config editing, and note-taking. However, I’ve heard Org-mode is more powerful than any other tool available. How steep is the learning curve to migrate my entire setup? I tend to be pretty dense, so learning configs might be a problem, though i dont have problem learning elisp if necessary.
>>
>>108497661
Org mode is seriously fucking bonkers if you go the extra mile and learn elisp. You can pretty much make whatever the fuck you want.
>How steep is the learning curve to migrate my entire setup
Depends on your current setup. Honestly you could probably use Doom Emacs and get 90% of the way there without much effort.
What do you usually do? what kind of notes?
>>
>>108497677
I "tried" Doom Emacs, but I felt uncomfortable, i like setups where I know what plugins (packages I think) I'm using, a full configuration feels overwhelming.
>What do you usually do?
Aside from programming, i use vim to make documents with typst or just anime backlogs and stuff in plain text. I also use typst to take notes that i can then print or share.
I dont need much, just solid autocompletion, a way to manage files within Emacs, and a built-in shell, everything else is just for toying.
>>
>>
>>108497757
Makes sense, well in that case if you want a quick setup I recommend: https://github.com/ashton314/emacs-bedrock
It's not a 'framework' like doom, it's simply a config for multiple solid packages that you're meant to simply check for what fits your usecase and either copy it or simply check for reference.
You can get a solid baseline with:
- vertico + corfu + orderless + marginalia
- consult + embark
- evil + evil collection
- org obviously
I know I just threw like 10 things at you with that list but honestly if you're looking to make your own config piece by piece (which is the sane way to do it honestly), I recommend you check out bedrock and see how those packages are configured.
Another starter I like for reference is minimal-emacs.d, don't recommend it if you want to make your own config, but it does have some good defaults to copy from like bedrock.
On org-mode, I love it for writing technical documents, its absolutely worth it on that side, I've even made packages for it to expand my set of tools for job related stuff, but I know there are some who use it for actual academic/fiction writing. From that side you can get reference from Emacs Writing Studio (https://github.com/pprevos/emacs-writing-studio) which is another place where you can get stuff to copy/adapt from, the configuration found there are more geared towards writing and around org-mode.
>>
>>108497844
whoops that's the stale github mirror link.
correct link for bedrock: https://codeberg.org/ashton314/emacs-bedrock
>>
>>
>>
https://itch.io/jam/spring-lisp-game-jam-2026
>You may use existing libraries, third-party or self-created, as long as they have an open-source license.
>You may use existing assets, including but not limited to artwork, music, and sound effects, as long as they are free for others to use as well. You must disclose what you used, and give proper credit where it is due. See Open Game Art for a great collection of freely-licensed assets.
>Code and assets generated by so-called "artificial intelligence" (like a large language model) are not permitted.
What's this guy's problem
>>
>>108498309
lol
>Hosted by technomancy
Ah that makes complete sense. He's one of the most anti AI people I've ever talked with. Not an hypocrite by any stretch of the imagsination though, he seems to be on a steady path towards becoming completely self reliant and free of anything related to AI/Bigtech or non-free software.
>>
Testing out futur. Goddamn async is a fucking chore to do even with this. It's considerably better than raw async though, surprisingly intuitive API. But no panacea, Emacs is still the main issue, I keep getting segmentation faults or emacs getting stuck due to random shit like pressing M-x while the async process was running.
>>
>>
File: ayumu-kasuga.png (126.3 KB)
126.3 KB PNG
alist vs plist
Which do you prefer?
>>
>>
>>108500703
depends on use case.
I think plists would be better if you could actually get completion for them while writing elisp.
I do like to use pcase and pcase-exaustive for setting up cases.
alist for almost everything else where I just need to push and nreverse to assemble something quickly.
>>
>>
>>108500813
Are you already using Emacs? are you familiar with installing packages and configuring and all that shit?
Regardless, first you need to install mit-scheme:
>https://www.gnu.org/software/mit-scheme/
Then you have a couple options on how to do the excercises. My prefered approach was setting up a mit-scheme repl with geiser and then use org-mode with mit-sch source blocks to keep notes and executable blocks of code.
There's an org-mode version of SICP too: https://github.com/jabl/scip-slides
The absolute quickest way of getting setup is using doom emacs and enabling this in init.el(scheme +mit)
and that's it. People like to talk shit about doom but it's easy as fuck to get started.
>>
>>108500966
Shit, wrong link to the org-mode version of SCIP, it's this one.
>https://github.com/ilmotta/sicp-org
>>
>>
>>
>>
>>
File: yo.png (174.6 KB)
174.6 KB PNG
>normie editors
>users can't just configure their own faces AND use an unaltered theme, must fork
>chad emacs
>(custom-theme-set-faces 'user) lmao
>normie editors
>you VILL swallow the shitty colors of internal terminal and you VILL be fine with it
>emacs chads
>can just lazily write a dirty picrel function in scratch bufffer, xcolor through vterm's *fetch and mapcar themselves a darker set of matching colors to base16
what can i say? it's good to use some nice editor macros, that's for sure
>>108501444
https://sicp.sourceacademy.org/sicpjs.pdf
>>
>>
File: griffith.png (117.2 KB)
117.2 KB PNG
>>108502161
Something in that code is trying to use a variable called lcbs that isn't in scope when it was trying to be used. ...It might actually be interpreting a string like "|LCBS |" as a variable.
>>
>>108502097
and ye, i'm... gonna throw... ERROS
frankly i'm just in a very good mood. i've stumbled upon base16-phd theme and the monaspace font, they seem to be a good combo once mishapes like vterm colors are smoothed out
>>108502161
i absolutely dunno but https://www.sbcl.org/manual/#Saving-a-Core-Image tells that the stack's unbound in the saved image, you need to pass :executable t and you get no multiple threads anyway. doesn't seem save-lisp-and-die is the recommended way. i would consider a cl implementation which can be embedded into c code and thus be compiled into an executable without problems, like ecl
>>
>>
Consider the following CL code that uses dexador and quri.;;;; Variables
(defparameter *proxy* nil "Optional HTTP proxy")
;;;; Functions
(defgeneric load-resource (src)
(:documentation "Load a resource in an appropriate way based on the type of `src'."))
(defmethod load-resource ((src quri:uri-http))
"Load `src' via HTTP(S)."
(dex:get src :proxy *proxy*))
(defmethod load-resource ((src quri:uri-file))
"Load a `src' from the file system."
(uiop:read-file-string (uri-path src)))
(defmethod load-resource ((src simple-string))
"Interpret the string in `src' as HTML."
src)
;; XXX: They all return strings except this one.
;; XXX: I wish I could specify vector of plump-dom elements.
(defmethod load-resource ((src vector))
"Interpret `src' as a vector of plump-dom elements."
src)
I have a generic function load-resource that dispatches on various types. Its goal is to take a src of various types and return a string in most cases. In one case, it returns a vector, and I've decided that's OK. However, I'd really like to be able to specify that it wants a vector of plump-dom elements and not just any old vector.
Is that something that can be expressed in Common Lisp? Can vectors be typed by their contents? I'll survive if I can't, but it'd be really nice if I could.
>>
>https://www.gnu.org/software/emacs/manual/html_node/emacs/Shell.html
Do you use it?
>>108502547M-x zone
>>
>>
>>108502952
For CLOS method dispatching, you can only dispatch on classes or eql specifiers, not types in general, so you can't dispatch on the type of the inner elements. Maybe it's possible to use the MOP to get some support for this, but if it's similar to manually doing it with a typecase on array-element-type it won't really work in general either. That's because while you can specify the inner type in make-array, there's not consistent enforcement to ensure all elements remain the same type, the inner type may be upgrade to T regardless. Specifying the inner type is mostly useful for optimization cases with double-floats or uints.(let ((a (make-array 3 :element-type 'double-float)))
(setf (aref a 0) "a")
(list a (array-element-type a) (type-of a)))
In SBCL this will error. Take out the setf and it'll initialize the elements to 0.0d0 for you. But change the type to float, it'll be a warning that the initial elements aren't floats, but the setf works and array-element-type will be T. Add :initial-element 0.0 to remove the warning but the inner type is still T. Integer works, no warning. Character, error. (unsigned-byte 8), error. Symbol, warning about initial-element but works.
You can add an :after method if you want to make sure the return values of all of these ends up as a string, though it'd be better to just fix the one method that's odd.
Note that if you use Coalton you can dispatch on inner element types as well as return types using typeclasses.
Or you can use this helper library from numcl if you want some support for numeric inner type specialization https://github.com/numcl/specialized-function
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>108503945
>it's similar to manually doing it with a typecase on array-element-type
I didn't know about typecase and friends until you mentioned it. My desire for checking the type is for correctness rather than speed, so I decided to try to manually do it.(defmethod load-resource ((src vector))
"Interpret `src' as a vector of plump-dom elements."
;; Manually type check contents of src to make sure
;; they're all of type plump-dom:node.
(loop for el across src
do (etypecase el
(plump-dom:node el)))
src)
>>
File: 2026-04-02_03-25-52.png (86.7 KB)
86.7 KB PNG
>>108493412
I'm using sly, and I just realized that I could click on the class to give me a lot of info. It doesn't work for quri:uri, because it's a struct (presumably), but it works for classes like plump-dom:root.
>>
File: use strict.jpg (72.6 KB)
72.6 KB JPG
For the anon who put this >>108426803 together: a big thank you!
>>
>>108507313
feels like old luxury
https://www.youtube.com/watch?v=v702APyD9JY
>>
>>
>>108493435
I started using ultralisp instead.
https://ultralisp.org/
>>
>>
Just came across this: https://github.com/carp-lang/Carp
I remember an anon was talking about making a lisp without GC for real-time applications, well:
> A statically typed lisp, without a GC, for real-time applications.
>>
>>
>>108508194
I'm that anon. I know about Carp, it's very similar to what I want, but last time I checked the project was abandoned for years. I see some commits coming in now but I remember the author specifically saying the project wasn't being supported anymore, maybe I'll give it another try now.
That being said it's interactive programming/runtime capabilities were not very good, which is something I need
>>
File: mfw.png (159.1 KB)
159.1 KB PNG
>spend half an hour carefully crafting an email to the mailing list, re-writing it several times to make it as concise and clear as possible
>completely ignored
>find a possible resolution for a bug and email an explanation in the bug report
>completely ignored
>>
File: mfw.jpg (230.6 KB)
230.6 KB JPG
>go on #emacs
>they are talking about punching nazis for the 5th time this hour
>somebody starts the 27th get angry about AI olympics of the day
>the occasional emacs question gets shot-down with an offhand, unhelpful remark before everybody goes back to arguing about politics
>>
File: 1770211747518346.jpg (105.4 KB)
105.4 KB JPG
>>108509261
I've been subscribed to emacs-devel and bug-gnu-emacs for a few months and I don't think I've seen an email go without at least one response. But I don't monitor the bug mailing list too closely.
>>
>>108509480
>>108509261
No idea about mailing lists. Do you have to be subscribed to mailing lists to send patches/fixes or reply to someone in it?
>>108509367
Real, shit's unusable.
>>
>>108509711
to send a bug report/patch you don't need to be subscribed to the mailing list, you just send an email bug-gnu-emacs@gnu.org and it will be processed by debbugs (and maybe manually too? the only time i sent a patch it took a few hours to be processed) and then CC'd to the mailing list. i think you can also reply to a report without being subscribed to the list
>>
>>108509367
https://archive.stormer.kyun.li/azzmadors-sunday-morning-blitzkrieg-de briefing/
>>
File: 1764024256482518.png (1.5 MB)
1.5 MB PNG
Any Guix users on a foreign distro here? I run debian with a guix setup, but I have the problem that Debian packages keep getting intercepted by Guix profiles, specifically GTK packages via the GIO_EXTRA_MODULES envar. E.g. after a recent update I getfirefox-esr: symbol lookup error: /home/anon/profiles/network/lib/gio/modules/libdconfsettings.so: undefined symbol: g_once_init_enter_pointer
I can fix this for Firefox by simply removing the Guix envars via a shell script, but is there a sensible way of doing that for every GTK app? Real annoying innit.
>>
>>108511775
>but I have the problem that Debian packages keep getting intercepted by Guix profiles
My first guess would be to check if the guix paths inside those env vars are being prepended or appended.
If all the paths are at the end then it would give precedence to the debian versions over the guix ones.
>>
File: 1775063676088562.gif (347 KB)
347 KB GIF
>>108506349
>eval my heart
>lambda lifting
>cdr to nowhere
>>
>>
>>
>>
File: Screenshot_20260403-143429.Termux.png (153.4 KB)
153.4 KB PNG
I should've started min-maxing my diet and planning my monthly grocery shopping a decade ago, could've saved so much money and would probably be healthier
>>
>>
>>108516182
i wanted to laugh at you for making a retarded list, but after quickly jotting down my own list it's not much different. you don't have celery/parsley and i've seen no sign of eggplants, zucchini, carrots, onions, garlic and mushrooms as well as no fish eggs, butter, milk and fruits in sight, but otherwise it's fine... even if you're unironically buying 20 kilos of quark.
if you don't mind satisfying my curiosity, are you deliberately overpaying to get food of the best quality. or have i gotten a wrong impression? i don't know euro prices (nor your country) but surely 2 kilos of beef shouldn't cost 50 euros...
>>
File: file.png (682.4 KB)
682.4 KB PNG
>So, in fact, we have matched the performance of C almost exactly. Furthermore, the generated code is still not as lean as it could be. Not to put too fine a point on it, but, <100 lines of Lisp
based
FINALLY some respite in the benchmark autism wars for CL bros.
>https://www.stylewarning.com/posts/nbody/
>>
>>
>>
>>108516500
Most of the list are the ingedients for my two daily cold meals, which I pack full of nutrients while keeping calories low so that I can eat whatever I want as my third meal or as snacks, or even just fast if I'm on a cut.
The avocados, salmon, liverwurst and beef are things I eat 1 or 2 times a week to close nutrient gaps. Obviously I'll buy some more veggies etc. for my warm meals.
>you're unironically buying 20 kilos of quark.
Because it's amazing, it's about the cheapest source of high-quality protein there is.
Some of it is going to be swapped for skyr, kefir or yoghurt.
>are you deliberately overpaying to get food of the best quality
Most of what's on the list is organic, the salmon is wild-caught. The beef is expensive because one half is high-quality grassfed and the other is in the form of cold cuts and jerky.
>>
>>108517085
>check-type
That's another function I didn't know about. This makes me wonder: how do CL people do function discovery? Coming from Elisp, I can hit `C-h f` (describe-function) and type a guess and let vertico's autocompletion help me out. I've discovered many functions and their docs this way.
For CL, I can similarly use `C-c C-d C-f` (sly-describe-function), but check-type doesn't have a docstring. This is my one of my biggest frustrations with CL. Maybe Elisp set my expectations too high, but I got used to seeing a docstring for almost everything. In CL, that's not the case.
>>
>>108517356
This might help increase your CL vocabulary. Just strip off the leading "cl-" when in actual CL and not Elisp.(info "(cl) Function Index")
Emacs documentation culture is so strong, it can help other languages too.
>>
>>108516682
It's amazing to me that he did all this in 4 hours. This is my first time seeing inline assembly in CL code too.
https://github.com/stylewarning/lisp-random/blob/master/nbody/library. lisp
>>
>>
>>
>>108518140
I used oldschool nutrition trackers to create my diet, I just assumed he wouldn't want to spend 10 minutes adding up nutrients in someone else's meal plan.
I did ask Claude for comments on my meals, but it said it's already about as good as it gets given my constraints (low prep-time, low calories). It claimed the plan lacks iodine, which was incorrect because dairy and eggs in central Europe are iodine-fortified.
>>
File: 1696016576944974.png (121.4 KB)
121.4 KB PNG
>>108517356
>That's another function I didn't know about. This makes me wonder: how do CL people do function discovery? Coming from Elisp, I can hit `C-h f` (describe-function) and type a guess and let vertico's autocompletion help me out. I've discovered many functions and their docs this way.
>For CL, I can similarly use `C-c C-d C-f` (sly-describe-function), but check-type doesn't have a docstring. This is my one of my biggest frustrations with CL. Maybe Elisp set my expectations too high, but I got used to seeing a docstring for almost everything. In CL, that's not the case.* (apropos "type")
* (documentation 'check-type 'function)
* (describe 'check-type)
common-lisp:check-type
[symbol]
check-type names a macro:
Lambda-list: (place type &optional type-string)
Documentation:
Signal a restartable error of type TYPE-ERROR if the value of PLACE
is not of the specified type. If an error is signalled and the restart
is used to return, this can only return if the STORE-VALUE restart is
invoked. In that case it will store into PLACE and start over.
Source file: SYS:SRC;CODE;MACROS.LISP
* (documentation 'check-type 'function)
>>
File: t.png (25.5 KB)
25.5 KB PNG
>>108518760
Hmm. (describe 'check-type) shows the docs for me, but sly-describe-function did not. It just showed T.
>>
>>
>>
>>
File: file.png (927.2 KB)
927.2 KB PNG
>>108517356
I was adapting slime-help to sly a few months ago but got sidetracked. I got it working somewhat (pic related) but was in the middle of chaning one of it's submodules for shinmera's definitions:
https://codeberg.org/shinmera/definitions
>slime-help
https://github.com/mmontone/slime-doc-contribs
>>
>>
>>108519383
Yeah I added a source Code section since the original slime-help only had the button, which sent you to the source code location.
I'll see if I can get it done this month and post it, It was pretty functional already.
>>
>>
>>
File: 8DDFB474-86F4-4122-B875-17C5A21537FB.jpg (691.4 KB)
691.4 KB JPG
>>108516682
We’ve been doing that shit in lisp for over 25 years.
A lot of the early implementations had functions implemented in a mix assembly or C.
>>
>>108517356
http://clqr.boundp.org/ browse through this and you'll come across all sorts of built in functions organized in a sensible manner.
I also have a keybind that opens the hyperspec on a symbol which is often more helpful than a docstring would be.
For library code, I look at the list of exported symbols for a package, if it doesn't already document that.
>>
>>
>>
>>
>>
>>
>>108521335
On Guix, I had this issue one day recently for no reason and never figured it out. I had no obvious updates that should have affected EXWM, but somehow it just bounces me back to the login screen if I try to login to exwm. Literally no errors I could even see when I tried anything. I think an anon said there was an issue with exwm-no-x-toolkit but I have no idea what’s causing the issue for me either. Very surprised to see such strangeness on Guix.
>>
File: Screenshot 2026-04-04 at 8.21.51 pm.png (279.4 KB)
279.4 KB PNG
>>
Guys, I need advice on how to make my emacs more cute and comfy!
>>
File: reka.png (1.4 MB)
1.4 MB PNG
>>108521380
>reka
This is the first I've heard of this window manager.
https://code.tvl.fyi/about/tools/emacs-pkgs/reka
https://codeberg.org/tazjin/reka
>>
>"(60) Peer certificate cannot be authenticated with known CA certificates."
Fuck... I have to update Emacs don't I~ λ (emacs-version)
GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.2)
Wish me luck...
>>
I used to love ob-jq, because it allowed me to write complex jq expressions in Emacs. However, after using ob-duckdb, jq has been obsoleted for me for a lot of use-cases. I had a clever jq code block that took 14 seconds to run. I just replaced it with a much simpler SQL query that took just 1 second to run. I regret not picking up duckdb sooner. I had no idea it was so good at wrangling JSON, and doing it from Emacs makes it so much nicer. (It's things like this that make people love org-mode too.)
https://github.com/ljos/jq-mode
https://github.com/gggion/ob-duckdb/
>>108525897
C-h v system-configuration-options
^-- This will provide some info on how the current emacs was compiled.
>>
>>
>>
File: emacs-neko-mimi-mode.png (232.8 KB)
232.8 KB PNG
>>108523924
Add an anime girl somewhere
>>
>>
>>108526434
I don't update unless I need new features or bugfixes.
Either way it was much smoother than my move from 27 to 29:Warning (emacs): consult-customize: consult--source-bookmark is neither a command nor a source
Warning (emacs): consult-customize: consult--source-file-register is neither a command nor a source
Warning (emacs): consult-customize: consult--source-recent-file is neither a command nor a source
Warning (emacs): consult-customize: consult--source-project-recent-fileis neither a command nor a source
Error (use-package): ef-themes/:config: Wrong number of arguments: ef-themes-select, 1
Ef-themes was a simple fix to ef-themes-load-theme and I hope the consult thing doesn't matter...
>>
>>108527723
Maybe what he has in mind is that because a macro translates syntax it itself is something which treats code like data and alters the structure before running it.
But I don't know if I'd say the macro IS "code as data". Lisp certainly has other ways of executing a data structure as code, like eval.
I guess he could make some argument that whatever you do with the data structure prior to running eval could be loosely thought of as some kind of "macro", but I don't know what the point would be in making that leap.
>>
>>
>>
I'm assuming that using this:(string-split "foo bar " " " :omit-nulls)
instead of this:(string-split "foo bar " " " t)
is bad idea, can someone confirm? I know that some functions actually use keywords for named arguments so it could be confusing but are there any other reasons?
>>
>>108528282
>is bad idea, can someone confirma?
No, I do this whenever possible, there was also discussion on github about including this as a guideline in bbatsov's Emacs Lisp Style Guide. It makes the code much more readable.
>are there any other reasons?
Yes, if the function checks for equality to t instead of just for anything non-nil, this will break.
>>
>>108528282
my most recent change to 4g's code was to substitute all the t's in function calls for symbols, which sidesteps the issue of confusion with named keyword args:
https://github.com/eNotchy/4g/commit/e33ea7b32807e9812c52c8978a84a42fe 46d5206
>>
>>108528580
>>108528622
Alright then, switching to symbols makes sense, even though it won't look as pretty
>styleguide
I completely forgot I wanted to read something like this before getting more into elisp, thanks for reminder, the mentioned one looks good
>>
>>
>>108528840
here's the discussion I mentioned
https://github.com/bbatsov/emacs-lisp-style-guide/issues/30
>>
>>
>>
>>
>>108529209
empv is pretty gud
https://github.com/isamert/empv.el
>>
>>108529451
>in what scenario would one do this?
I would say it's bad practice in elisp, but the author might not think about it, or even agree that it's bad.
But here's an example where it might seem reasonable, even elegant:
a json parser accepts a custom function to parse the keys in json map objects. If the arg is nil, it leaves everything as strings; if it's t, it uses its default function (e.g. parse integers as such, convert everything else to ketwords); for any other value, it's assumed that the arg is a custom function to be applied to the integers.
>>
>>
>>108532450
What makes Clojure better for this than say Common Lisp? I’m only curious, but for making simple websites, would it be worth learning Clojure for as opposed to just using Common Lisp if you didn’t already know Clojure? I’ve never done any web dev stuff so I’m asking out of real interest here.
>>
>>108532574
I'm sorry, maybe someone else can answer.
You just reminded me about Common Lisp and I am wondering the same thing now.
I was just comparing Schemes to Clojure and I chose Clojure due to the mature web ecosystem.
>>
>>108532615
lol I was wondering exactly the same thing a while ago since I saw an online business near me is notorious for price gouging its customers but has no competitors so I was thinking of starting a simple alternative, but I’m so unwilling to do JS that I was considering Clojure vs CL vs even Scheme myself
>>
>>108532629
Well, what attracts me to Clojure as well is that you can write Clojure on the backend and also Clojurescript on the Front end. So you may not have to use JS with Clojure.
https://clojurescript.org/
>>
>>108532574
access to javasaar libs and the jvm and >>108532670
>>
>>
>>
I've been writing a lot of web scraping code in CL, and I've settled on a simple policy for organizing this scraping code.
https://codeberg.org/ggxx/scraper
I have a generic function called process and it dispatches on subclasses of abstract-page. Page instances also specify where the page is located, and those are polymorphically loaded too.;; scrape all images from document fetched via HTTP
(defparameter mi (page 'all-images "https://metacpan.org/"))
(process mi)
;; scrape all images from document read from filesystem
(process (page 'all-images "file:///tmp/index.html"))
;; it can also use dom trees
(defparameter dom (load-resource-as-dom (uri "file:///tmp/index.html")))
(process (page 'all-images dom))
;; partial dom trees are ok too
(process (page 'all-images ($ dom ".footer-social")))
;; scrape all feeds from document fetched via HTTP
(process (page 'all-feeds "https://metacpan.org/"))
I'm kinda happy with how this turned out.
>>
>>108532450
based
use Postgres, next.jdbc, HoneySQL, Ring, Reitit, Hiccup2, and Malli as your bread and butter libs.
pull in anything else you need. check out the Awesome Java list of libs, all of them are available to use in Clojure.
start with deps.edn right away, the documentation is just written in a shitty way, but ultimately you just create a basic deps.edn (look for an example with the Kaocha test runner) in a directory, then run `clj` in that directory to start a REPL, which will automatically download all dependencies from Maven, as indicated in your deps.edn.
I recommend using plain HTML, then HTMX in lieu of ClojureScript, unless you actually need client-side processing of state. Btw, never forget that if you think you need ClojureScript, what you might actually need is a client application that runs a local webserver with HTMX that itself interacts with your server. then, HTMX is just as cheap as JS (basically).
DEFINITELY start using Babashka to replace Bash scripts that are anything more complicated than a sequence of commands.
Clojure is a fucking excellent, excellent language. I'm using the SCI lib (Clojure subset interpreter lib, used by Babashka) for my Postgres migrations, and it offers a custom namespace with a bunch of Postgres-specific HoneySQL constructs/functions that allow for easy, concise definitions of Postgres schemas.
>>
>>108534101
My experience with htmx has been very good. It eliminated the need for me to write a lot of client-side JS. Highly recommended.
https://htmx.org/
>>
>>
>>108529099
I should have mentioned that the code is in elisp, and in plain elisp defun:omit-nulls tshould be passing it as 2 args if I'm not mistaken
>>108528851
That's interesting I'll keep that in mind if I ever decide to try CL out
>>108528971
thanks
>>
>>108528282
I've seen prot do this in his basic Emacs config.
https://protesilaos.com/codelog/2024-11-28-basic-emacs-configuration/ (setq custom-file (locate-user-emacs-file "custom.el"))
(load custom-file :no-error-if-file-is-missing)
I think the :no-error-if-file-is-missing is a nice touch. He could have just said t but the keyword provides context that I appreciate.
>>
>>
File: 1744188801823930.png (6.3 KB)
6.3 KB PNG
>>108527248
this so much this
>>
>>
>>
File: cubular.png (698.4 KB)
698.4 KB PNG
>>108523924
MATE Window Decorations and desktop bars.
>>
>>
>>
>>108534597
I've had my own share of hacky iterations on this idea. In the back of my mind, I kept thinking I could organize this better, and I finally got around to trying out my idea. I also had to get used to defgeneric/defmethod, but I'm really happy with it. This style of polymorphism is nice.
Even though I'm not the owner of quri:uri or plump-dom:node or string, I can dispatch against them. This is a welcome change from how most other OO languages implement polymorphism.
>>
>>
>>108534537
The top-stack for web scraping in CL seems to be dexador/lquery/plump. My library pulls them in, and it provides a little bit of structure for you to follow so the scraping code you write can be used in many contexts easily.
Extra reading:
https://lispcookbook.github.io/cl-cookbook/web-scraping.html
https://shinmera.github.io/lquery/
https://shinmera.github.io/plump/
https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/St yling_basics/Basic_selectors
>>
# lquery question
I have a function I call a0 that I use to dig strings out of vectors that lquery likes so much.(defun a0 (a)
"Return the 0th element of A or nil if it doesn't exist."
(if (> (length a) 0)
(aref a 0)
nil))
;; Return the text inside of h1.title.
($ dom "h1.title" (text) (a0))
This has had me thinking "surely there's a better way...". However, a0 works for me, so I've kept using it. Is there a better way though? Is there something in the lquery API that I missed?
>>
>>
>>
>>108534939
If you write SQL in Emacs, I recommend using sql-indent-mode. It's a minor mode that aligns queries very aesthetically.
https://elpa.gnu.org/packages/sql-indent.html SELECT year,
month,
COUNT(*)
FROM article
GROUP BY year, month
ORDER BY year, month;
>>
File: 2026-04-05_13-34-26.png (19.8 KB)
19.8 KB PNG
>>108534526
How did you customize your eshell prompt?
>>
>>
>>108535414
i installed Mona font, which is the type of font used in 2ch ascii art, and defined a face(defface shift-jis-art
'((t :font "Mona Gothic Wide" :height 120)))
instead of changing `eshell-banner-message', i wrote a function that chooses a random file with ascii art and returns its contents propertized with the shift-jis-art face(defun random-ascii-art ()
(with-temp-buffer
(insert-file-contents
(seq-random-elt
(directory-files "~/.emacs.d/ascii-art" t (rx (not ".") eol))))
(propertize (buffer-string) 'face 'shift-jis-art)))
and this function gets called by ~/.emacs.d/eshell/login, like this(let ((inhibit-message t)) (random-ascii-art))
>>
>>
>>
>>108535151
https://github.com/datalevin/datalevin
datalog database for clojure. free and faster than sqlite and postgresql
>Datalevin is about 2.4X faster than PostgreSQL and 4X faster than SQLite on average in running these complex queries that involves many joins.
>>
File: anon.jpg (83.7 KB)
83.7 KB JPG
>>108535740(defun day-and-hour ()
"the current day and hour as the list (1-7 0-23)"
(mapcar #'string-to-number (split-string (format-time-string "%u %k"))))
(defun reveal-powerlevel ()
"t on the weekends and past 17:00, otherwise nil"
(pcase (day-and-hour)
(`(6 ,hour) t)
(`(7 ,hour) t)
(`(,day ,hour) (> hour 17))))
(when (reveal-powerlevel)
(init-weeb))
>>
>>108521944
are you using emacs-no-x-toolkit? the issue the other anon had is fixed now, but the commit that introduced the issue changed a lot of package inputs, like hundreds of them. this is the reason why btw
https://codeberg.org/guix/guix/src/branch/master/etc/news.scm#L52
>>
>>
>>108535414
There's also:
https://www.emacswiki.org/emacs/EshellPrompt
>>
>>
File: 1766873166461869.png (31.5 KB)
31.5 KB PNG
>>108536567
ty anon
>>
>>
>>
>>
>>
>>108536323
I’m not but I mentioned it because I assumed that kind of thing might be the case where other packages were affected too. I can actually see that the issue appears to be when I try M-x exwm-wm-mode after logging in to an xfce session instead, I get hit with XELB complaining about no authorization which is very weird to me since this has never happened before and shouldn’t have been affected by any home reconfigures I’ve done recently. I’ve got absolutely no clue what the cause of that would’ve been.
>>
File: 1747180264462350.png (340.1 KB)
340.1 KB PNG
I wonder why youtube takes down their RSS feeds every fucking day at around the same time.
I don't like updating it hourly but I guess I'll start doing that.
>>
>>
>>
>>
Seems that the last Guix update has broken something else since for me, eshell now fails to autocomplete Guix commands. Instead it warns `error: help-string: undefined variable`
Really seems like some recent updates have been causing some issues. Hard to believe multiple users here experience sudden problems as pure coincidence.
>>
>>108537792
If it’s a home reconfigure only that you’ve done, I bet te cause is something like putting an instance of some emacs package you have in your system config file also in your home by mistake and this can cause the system to get mixed up and you’re going to be unable to boot into exwm
>>
>>
>>108538474
JS, while popular, is relatively new and largely dogshit, especially React and everything to come from that branch.
There's still a large number of websites, including this one, that are just HTML, CSS, and/or PHP.
>>
>>108538474
Most interesting sites, including this one, do use JS in some way, but often it's not required, and if you use something like htmx you can use less of it directly.
ClojureScript is nicer than plain JS but you're still beholden to the browser and JS model of everything, which sucks in a lot of ways. If you're not building a big web app with reagent there's no point to it over just putting bits of JS here and there as needed.
>>
>>
>>
>>108538532
http://anime.en.utf8art.com/
https://seesaawiki.jp/asciiart/
here's the portion of my ascii art collection that's organized. all of it comes from those two sites
https://litter.catbox.moe/buvokipo50rbvi78.tar
>>
>>
File: smartoko.png (185.9 KB)
185.9 KB PNG
>>108536142(defun reveal-powerlevel-p (&optional current-time)
"Return T on weekends or at 6 PM and later."
(string-match-p "\\(^[6-7]\\|[1][8-9]$\\|[2][0-3]$\\)" (format-time-string "%u%k" current-time)))
Your function does not return T past 17:00, because it doesn't take minutes and seconds into account.
>>
>>108517653
mb later, not a priority atm. though the guy who did arch and gentoo install with claude has inspired me. i've not used neural network chatbots much, but now i want to ask deepseek to either write a kernel config or categorize config options. but that's after i finish doing it manually.
>>108517103
thanks for explanation
>>
File: Screenshot 2026-04-06 at 8.54.32 pm.png (296.1 KB)
296.1 KB PNG
Added moon phase, sunrise and sunset. Next will be higher level stuff to generate patterns of day level TODOs from a dsl mapping longer term goals to daily tasks.
>>
File: sjis.fonts.png (122 KB)
122 KB PNG
>>108539058
https://fonts.aahub.org/
>>
(defmacro ref (slot obj)
"Like SLOT-VALUE but with
reverse order and SLOT is not evaluated."
`(slot-value ,obj ',slot ))
(defmacro init-object (class &rest slot-bindings)
"Create an instance of CLASS, initializing slots by name.
Each slot name is bound sequentially LET* style."
(let ((obj (gensym "OBJ")))
`(let* ,slot-bindings
(let ((,obj (make-instance ',class)))
,@(mapcar (lambda (binding)
`(setf (slot-value ,obj ',(car binding))
,(car binding)))
slot-bindings)
,obj))))
E.g.GENERAL> (init-object some-class
(x 10)
(z (* x 12)))
#<SOME-CLASS {120854DAE3}>
GENERAL> (ref x *)
10 (4 bits, #xA, #o12, #b1010)
I wrote this because I got annoyed with writing
(... :accessor slot-name :initarg :slot-name) every time. I don't need to be concerned about accessor fname conflicts either. I can just defgeneric the accessors I want to expose to the outside packages anyways.
>>
File: leg-factory-exception-catcher-logger.webm (2.2 MB)
2.2 MB WEBM
Testing out struct slot completion when point is inside a constructor, was much much easier than let-completion.el since I had all the introspection commands at hand to use. It takes into account inheritance and displays type and docstrings in the popup.
I think this is good enough for version 0.1.0 but I'll see if I can polish it a bit for MELPA, there's still a lot of struct use cases to take into account but this should covers about 60% of normal use.
Hopefully this makes it more attractive and commonplace to use docstrings for struct slots, I've noticed people barely use :documentation.
>>
>>
>>
>>
>>
>>
File: popup.jpg (34.1 KB)
34.1 KB JPG
>>108540664
>or more generally
see picrel and disregard my settings, do your thing
>>
>>108540673
Ahh that's corfu-popupinfo. It's a corfu extension.
>https://github.com/minad/corfu/blob/main/extensions/corfu-popupinfo.e l
Check the configuration section in the corfu repo:
>https://github.com/minad/corfu?tab=readme-ov-file#configuration:~:tex t=%28global%2Dcorfu%2Dmode%29-,%3B% 3B%20Enable%20optional%20extension% 20modes:,%29,-%3B%3B%20A%20few
>>
>>
>>
>>108540839
>Signature: (org-agenda-phases-of-moon)
>Documentation: Display the phases of the moon for the 3 months around the cursor date.
What the fuck? how come I can do M-x <random shit> and get a function that does something related to it, every single time.
>>
>>
>>108539058
i'm using the one provided by debian
https://packages.debian.org/trixie/xfonts-mona
>>
>>108536142
>>108539190
I usually use decode-time for time-related functions(defun power-level-revealable-p ()
"Return t on weekends or at 5 PM and later."
(seq-let (_ _ hour _ _ _ day-of-week) (decode-time)
(or (> hour 16) (not (< 0 day-of-week 6)))))
>>
>>
>>
What's a good name for an Elisp (or CL) function that starts from the current directory and looks for a file, and if it doesn't find it, repeat the search recursively in the parent directory. I want to use this for searching for the existence of .git/ directories and justfiles in parent directories.
>>
>>
>>
File: file.png (109.2 KB)
109.2 KB PNG
>>108542521
>>108539500
thanks to both of you
i did some research, and concluded that monaya and monapo are the closest to original mona, but for unicode it's probably better to use saitamaar or robotojaa
picrel is fonts in order: mona, monaya, monapo, robotojaa, saitamaar, aahub. note how the last 3 make the first cat smile instead of having a neutral expression; that seems like a big change in meaning, so i would not rely on these fonts to show shiftjizz art. although in the end i suppose it's up to personal preference
>>
>>
>>
>>108544644
If I implemented it in terms of locate-dominating-file, it would look something like this.(defun file-ladder-search (file)
"Find the full path of FILE, searching parent directories until found."
(if-let* ((dir (locate-dominating-file default-directory file)))
(expand-file-name (concat dir file))
nil))
>>
>>108543656
>locate-file
>directory-files-recursively
locate-file-recursively perhaps? then you can specify how the recursion works (i.e. recursion happens after searching through the directory or immediately; how far the recursion happens; should the function recurse through all directories or only those satisfying a predicate; as well as standard symlink, remote and permission stuff i guess)
>>
>>108545597
>>108543801
ah nvm then
>>
How do I get the bounds of a number at point?(thing-at-point 'number)will properly return a number, but(bounds-of-thing-at-point 'number)will give me the bounds of an entire word (including non-digit characters) that doesn't match what was returned by thing-at-point.
>>
File: 1621259784234.jpg (16.3 KB)
16.3 KB JPG
>>108546270
>(get 'number 'forward-op) => forward-word
>(get 'number 'thing-at-point) => number-at-point(defun number-at-point ()
"Return the number at point, or nil if none is found.
Decimal numbers like \"14\" or \"-14.5\", as well as hex numbers
like \"0xBEEF09\" or \"#xBEEF09\", are recognized."
(cond
((thing-at-point-looking-at "\\(0x\\|#x\\)\\([a-fA-F0-9]+\\)" 500)
(string-to-number
(buffer-substring (match-beginning 2) (match-end 2))
16))
((thing-at-point-looking-at "-?[0-9]+\\.?[0-9]*" 500)
(string-to-number
(buffer-substring (match-beginning 0) (match-end 0))))))
thus(defun number-at-point--bounds ()
"Return the bounds of number at point, or nil if none is found.
Decimal numbers like \"14\" or \"-14.5\", as well as hex numbers
like \"0xBEEF09\" or \"#xBEEF09\", are recognized."
(cond
((thing-at-point-looking-at "\\(0x\\|#x\\)\\([a-fA-F0-9]+\\)" 500)
(cons (match-beginning 2) (match-end 2)))
((thing-at-point-looking-at "-?[0-9]+\\.?[0-9]*" 500)
(cons (match-beginning 0) (match-end 0)))))
(put 'number 'bounds-of-thing-at-point 'number-at-point--bounds)
it's weird how the two are different in the first place. i'm not that familiar with thingatpt.el, but maybe it's a bug?
>>
>>108546786
Probably a bug. Anyway, for completeness, this is what I'm going with for now:(defun my/get-number-at-point ()
(let (beg end (num (number-at-point)))
(unless num (throw 'not-number nil))
(save-excursion
(catch 'break
(while t
(cond
((eq (point) 0)
(throw 'break nil)
)
((not (eq (number-at-point) num))
(goto-char (1+ (point)))
(throw 'break nil)
)
)
(goto-char (1- (point)))
)
)
(setq beg (point))
)
(save-excursion
(catch 'break
(while t
(cond
((eq (point) (point-max))
(throw 'break nil)
)
((not (eq (number-at-point) num))
(goto-char (1- (point)))
(throw 'break nil)
)
)
(goto-char (1+ (point)))
)
)
(setq end (point))
)
(list num beg end)
)
)
>>
File: 1621572707429.jpg (66.6 KB)
66.6 KB JPG
>>108546798
you are offending my eyes with this shit code formatting
>>
>>
File: 1604253273857-0.jpg (15.1 KB)
15.1 KB JPG
>>108546835
come back when you've been writing lisp for longer than a week, ok?
>>
File: 1752083841008375.jpg (306.9 KB)
306.9 KB JPG
>>108546882
Make me.
>>
>>
File: 1772615503482833m.jpg (87.9 KB)
87.9 KB JPG
>>108546835
>better readability and easier refactoring
>by writing all those parens manually
yeah, no thanks
https://shaunlebron.github.io/parinfer/
>>
>>108543656
>justfiles
This is very handy.
https://github.com/casey/just
https://github.com/leon-barrett/just-mode.el
https://github.com/leon-barrett/just-ts-mode.el
>>
I'm starting to use eshell more than my normal unix shells (nushell and zsh). One feature that I accidentally found that I like a lot is that you can put your cursor on any line and hit RET to execute it as an eshell command. That lets me write scripts that output eshell commands, and it's kind of like getting a menu of options. It's fun to be able to mix subshell output with ${} and lisp values with $() too.
It's not a 100% replacement for unix terminals+shells, but it can do a lot in kind of a fun way. It just took a little getting used to.
>>
>>
>>
>>
File: file.png (50.4 KB)
50.4 KB PNG
>>108548286
Added, will be merged alongside the others this afternoon.
>>
File: 2026-04-07_07-42-05.png (43.7 KB)
43.7 KB PNG
>>108547679
I learned how to style text inside eshell. This is more fun that a regular shell in a terminal.(propertize "Imagine the possibilities." 'face '(:foreground "#e1b07e" :height 5.5))
>>
>>
>>108548303
>>108548709
I just merged it now, did some tests and it seems be working reliably so why not.
>>
File: 1757568351907496.jpg (156.4 KB)
156.4 KB JPG
gnu.org is kill
>>108548906
Anon, that ascii art... you're not using the right font?
>>
When using evil-collection, I find it useful to look at the code for a mode it modifies to see what keybindings you get. I just found [[ and ]] for navigating the sly info window.
https://github.com/emacs-evil/evil-collection/blob/master/modes/sly/ev il-collection-sly.el#L145-L149
It's possible to also discover these through `C-h b` but looking at the source is sometimes easier, because everything is in one place and isolated from the other keybindings.
>>
Why is this general the only one where people actually share pieces of code, discuss how their favorite technology works, and generally engage in high quality discussion? Is the tech literacy of the rest of /g/ that low, always arguing about stupid shit like 13 year olds? Save for, of course, a couple other technically-minded generals.
>>
>>
File: 2026-04-07_12-31-00.png (118.6 KB)
118.6 KB PNG
>>108550813
>Anon, that ascii art... you're not using the right font?
I'm trying to use Saitamaar, but it's not coming out right.
This is the elisp I'm using for aacat.;; [2025-09-07 Sun 02:35] banner
;; >>106448149
(defface shift-jis-art
'((t :font "Saitamaar"))
"The face for Shift_JIS artwork, which requires an appropriate font,
e.g. Mona font.")
(setq eshell-banner-message
(with-temp-buffer
(insert-file (concat user-emacs-directory "aa/2.txt"))
(propertize (buffer-string) 'face 'shift-jis-art)))
(defun eshell/aacat (file)
"Print FILE to the terminal using the shift-jis-art face."
(let* ((aa (with-temp-buffer
(insert-file file)
(propertize (buffer-string) 'face 'shift-jis-art))))
aa))
>>
>>
>>108551278
https://desuarchive.org/g/thread/106419114/#106448149
>>
>>
>>
File: 1753875790540747.png (11.6 KB)
11.6 KB PNG
>>108551278
For some reason, when eshell-banner-message is set to this ascii art >>/jp/50832678 it doesn't get propertized correctly. But instead of modifying the banner message, I wroteaacat /tmp/test
in ~/.emacs.d/eshell/login and it does get propertized. It doesn't seem to be a font issue (Saitamaar vs Mona in picrel). I tried it with this Saitamaar font
https://github.com/asciiart-development/SaitamaarFont
>>
>>108551571 (me)
Using the login script is in fact the preferred method for doing this type of stuff, according to em-banner.el:;; This code is only an example of a how to write a well-formed
;; extension module for Eshell. The better way to display login text
;; is to use the `eshell-script' module, and to echo the desired
;; strings from the user's `eshell-login-script' file.
>>
>>108535089
>This has had me thinking "surely there's a better way...". However, a0 works for me, so I've kept using it. Is there a better way though? Is there something in the lquery API that I missed?
To answer my own question, lquery has lquery:$1 exactly for this purpose. Instead of using that a0 function, I can write something like this instead.($1 dom "h1.title" (text))
There *was* a better way.
>>
>>
>>108543767
>>108544644
>>108545597
I exposed this functionality to shell scripts by writing an eshell script. I called the script locate-dominating-file so that it would have the same name as the elisp function doing most of the work.#!/usr/bin/env -S emacs --batch -f eshell-batch-file
(defun locate-file-recursively (file)
"Find the full path of FILE, searching parent directories until found."
(if-let* ((dir (locate-dominating-file default-directory file)))
(expand-file-name (concat dir file))
nil)) > /dev/null
locate-file-recursively $1
I had to redirect the function definition to /dev/null, because it was printing the function name.# Example
locate-dominating-file .bashrc
>>
The jankiness of eshell/clear has annoyed me for a long time. I finally have a solution.(cl-loop for i from 1 upto (eshell-get-variable "LINES") do (eshell-print "\n"))
I made it into an alias.alias blank "(cl-loop for i from 1 upto (eshell-get-variable \"LINES\") do (eshell-print \"\n\"))"
>>
>>
I like emacs because it feels like one of those antiquated, unique softwares that's cool but impractical, but is in fact actually practical (at least to us lol). Is there anything else in tech that you think is similar? Doesn't have to just be software.
>>
File: eshell-clear.png (91.9 KB)
91.9 KB PNG
>>108553506
I don't know what (clear t) is. That function doesn't exist for me. All I have is eshell/clear, and this is how it behaves.
>>
>>108553752
I think it didn't clear everything, because I shrunk the font size in that buffer. If I restore the font size to the default, it clears everything but it still does the double prompt at the end.
My blank alias works every time though.
>>
>>108553752
NTA but tryeshell/clear t
;; from esh-mode.el
(eshell/clear &optional SCROLLBACK)
Scroll contents of eshell window out of sight, leaving a blank window.
If SCROLLBACK is non-nil, clear the scrollback contents.
>>
>>
>>
>>
>>
>>108551046
I still miss /cumg/. That was the best general on /g/.
https://desuarchive.org/g/thread/85205005/
>>
I am once again trying to learn lisp. How can I set up a repl that isn't painful to use? I will not use emacs. Typing multiline functions into a terminal is pain. Is there any way I can just use jupyter lab with a lisp backend?
>>
>>
>>
>>108557157
racket -> Dr Racket
common lisp -> https://github.com/atgreen/icl
Emacs -> doom emacs and enable your lisp of choice alongside org-mode, no need to learn emacs from scratch.
>>
>>108557327
I have SBCL installed, but I'm willing to go with whatever dialect is actually easy to get a decent workflow running.
>>108557372
No emacs.
>>
i wish the :box face attribute was more polished
since the boxes overlap and double in thickness you can't really use it on adjacent lines without it looking ugly, and there is also no way to specify that the box should be drawn around multiple lines, i.e. a bounding box around some region of text, instead of a single line
>>
>>108557467
Use vim. Install https://github.com/tpope/vim-pathogen/ per instructions. git-clone https://github.com/kovisoft/slimv/ to ~/.vim/bundle/ Open a lisp file, type ",c" to open a repl, send over top level forms with ",d" or single expressions with ",e". Consult the doc for more.