← Home ← Back to /g/

Thread 106419114

299 posts 94 images /g/
Anonymous No.106419114 >>106420967 >>106424182 >>106427540 >>106427923 >>106431090 >>106461002 >>106462175
(λ) - ᵋLisp General
>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.amodernist.com
https://systemcrafters.net/emacs-from-scratch
http://xahlee.info/emacs
https://emacs.tv

>Emacs Distros
https://spacemacs.org
https://doomemacs.org

>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://lem-project.github.io
https://stumpwm.github.io
https://nyxt-browser.com
https://awesome-cl.com

>Scheme
https://scheme.org
https://try.scheme.org
https://get.scheme.org
https://books.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://calva.io
https://clojure.land
https://www.clojure-toolbox.com
https://mooc.fi/courses/2014/clojure
https://clojure.org/community/resources

>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 >>106288815))
Anonymous No.106419122 >>106419132 >>106488983
>A Wayland color temperature control daemon written in Common Lisp inspired by wl-sunset. Lets you gradually control the bluelight filter, either by a script, or a binding in your window manager.
https://github.com/luciusmagn/waytemp
Anonymous No.106419130
sdfdsf
Anonymous No.106419132
>>106419122
>https://github.com/luciusmagn/waytemp/blob/master/LICENSE.lisp
Cool license
Anonymous No.106419189 >>106419451
XLibre finally packaged 4 Guix! ( ̄▽ ̄)b
https://gitlab.vulnix.sh/spacecadet/guix-xlibre
https://github.com/orgs/X11Libre/discussions/291
https://www.youtube.com/watch?v=-bTeRTo02S4
Anonymous No.106419451
>>106419189
very nice desu
Anonymous No.106419501
>>106413839
>http://xahlee.info/kbd/symbolics_space-cadet.html
Interesting
https://www.rcsri.org/collection/symbolics-keyboards/
Anonymous No.106419593 >>106419653 >>106441273
git gud
>>106340331
https://gitlab.com/naughtybits/schemebbs
>>106399271
https://github.com/ECHibiki/Kotatsu-V
Anonymous No.106419653 >>106420345
>>106419593
>kotatsu
>Hackable and easy to deploy imageboard software written in Guile/Scheme.
>Dependencies
>>>>>>>>artanis 0.5.1
Anonymous No.106420345 >>106420726 >>106420852 >>106422646
>>106419653
Artanis is a fucking web framework thing.
This kind of shit will destroy lisp like it did Java.

I was looking through the srfis and a large number of them are absolute dogshit. 119 stands out as maybe being the worst, the likely intent is to destroy lisp and scheme… and I’m being generous and kind to it with my assessment,
Anonymous No.106420726
>>106420345
>destroy
>one of the top 3 most used languages in the world
I actually think webshit is the thing missing from most lisps. Most personal computers run on windows and cellphones on HIVdroid, no sane person likes to develop natively in those things, it is easier to just develop for the browser.

Most SRFIs are dog shit, but you are not forced to use them.
Anonymous No.106420847 >>106420960 >>106429949
>>106409804
I shared the proced thing with the guys in #emacs-til, and one of them came up with this.
(use-package proced
:custom
(proced-enable-color-flag t)
(proced-format 'user)
:hook
(proced-mode . hl-line-mode)
:config
(setopt proced-format-alist (seq-union '((user user pid tree pcpu pmem start time comm)) proced-format-alist)))
Anonymous No.106420852
>>106420345
Don't be cringe.
Anonymous No.106420960
>>106420847
I tried his 'user format. I guess it looks cleaner, but it removes too much information. When I'm trying to find a process to kill, I often need to see the args it was started with to disambiguate it from other similar processes. Luckily, switching back to one of the built-in formats (short, medium, long, verbose) is easy.
(setq proced-format 'short)

Then `M-x revert-buffer` in the proced window to refresh it.
Anonymous No.106420967
>>106419114 (OP)
Tsumo-nyaa!
Anonymous No.106421202 >>106432392
Where's the anon who posted this while going through SICP? >>106400773
Any more insights? Report, report!
Anonymous No.106422646 >>106425707
>>106420345
>Artanis is a fucking web framework thing
Great. I don't want to use Rails or Django shit.
GNU Guix and other GNU websites use Artanis btw.
Anonymous No.106424059
Interesting
>The infinitely extensible command runner, control plane and project automator à la Make (Guile Scheme - Lisp)
https://codeberg.org/jjba23/maak
Anonymous No.106424182
>>106419114 (OP)
Mahjong Lisp client when
Anonymous No.106424351 >>106424453
I was looking through Artanis and I'm wondering what the point was of choosing a lisp for this project. Tons of impure FP, use of iterative forms where idiomatic scheme would have sufficed, etc. A lot of it reads like any other clunky, imperative project. What am I missing?
Anonymous No.106424453
>>106424351
Lisp is a multi-paradigm programming language. Guile even has GOOPS (inspired by CLOS).
https://www.gnu.org/software/guile/manual/html_node/GOOPS.html
Anonymous No.106425707 >>106428708
>>106422646
>There are only three web frameworks in the world
Clojure has you covered if you need web dev.
Anonymous No.106425963 >>106426714 >>106427867
Waiting for this bad boy to appear on annas-archive because I do not have 40 bucks to give the author.
https://t3x.org/lfn/index.html
>What is the minimal LISP language that can interpret itself?
>What is the smallest LISP that can compile itself?
>What was LISP hacking like in the age of punch cards, teletypes, and mainframe computers?
>How is LISP related to Lambda Calculus?

>This text plays with the theme of minimal LISP by providing several implementations from a simple metacircular evaluator to a full compiler that emits a single, self-contained C program. The discussion is embedded in reflections on what hacking looked like in the early days of LISP.
>The second edition adds a chapter on the relationship between LISP and Lambda Calculus, introduces quasiquotation in the section about macros, fixes various small typos and mistakes, and smoothes out some of the prose.
Anonymous No.106426714
>>106425963
>What is the minimal LISP language that can interpret itself?
>What is the smallest LISP that can compile itself?
>How is LISP related to Lambda Calculus?
https://anthonylorenhart.com/2021-09-04-Extremely-Simple-Self-Interpretation/
Y = λ[λ[1[0[0]]][λ[1[0[0]]]]]
nil = λ[λ[1]];
evn =
λ[Y[λ[λ[λ[
1[λ[λ[4[1][λ[λ[0[2][4]]]]]]]
[λ[1[λ[λ[λ[1[λ[7[4[λ[λ[λ[0[3]]]]]][nil]]]]]]]
[λ[4[1[0]]]]]]
[λ[1[0][λ[4[λ[λ[λ[0[λ[λ[λ[2[7][10[6][nil]]]]]]]]]]]]]]
]
]]][0][nil]]

Alternatively in binary format
19468
05580
05f00
bfe5f
85f3f
03c2d
b9fc3f8
5e9d65e5f
0decb f0fc3
9befe 185f7
0b7fb 00cf6
7bb03 91a1a
Anonymous No.106427057
>>106300881
>still waiting for org-4chan
You might need this.
https://orgmode.org/worg/dev/org-element-api.html
Anonymous No.106427540 >>106427548
>>106419114 (OP)
What happened to that anon making a wm in lisp for arcan?
Anonymous No.106427548
>>106427540
He transcended.
Anonymous No.106427842 >>106428051 >>106430543
What Emacs is this? It looks nothing like Emacs.

This is allegedly Magit, so it must be Emacs.
Anonymous No.106427867 >>106428796
>>106425963
um, fren
https://libgen.gs/ads.php?md5=78231ea75047f062021bd1b1e62b55fd
Anonymous No.106427923 >>106428142
>>106419114 (OP)
The OP image inspired me to try this.
#lang racket
(require 2htdp/image)
(require lang/posn)

(define (yin #:radius (radius 50)
#:color (color "black"))
(overlay/offset
(wedge radius
180
"solid"
color)
(- radius (/ radius 2)) (- radius (/ radius 4) 1)
(rotate 180
(wedge (/ radius 2)
180
"solid"
color))))

(define (yang #:radius (radius 50)
#:color (color "white"))
(rotate 180
(yin #:radius radius
#:color color)))

(define (yin-yang #:radius (radius 50)
#:yin-color (yin-color "black")
#:yang-color (yang-color "white"))
(overlay/offset
(rotate 180
(wedge (/ radius 2)
180
"solid"
yin-color))
(- (/ radius 2)) (+ (- (/ radius 4)) 1)
(underlay/offset
(yin #:radius radius #:color yin-color)
0 (- radius (/ radius 2))
(yang #:radius radius #:color yang-color))))
Anonymous No.106428051
>>106427842
https://tigerbeetle.com/blog/2025-08-04-code-review-can-be-better/

I don't think that's Emacs. It's probably VSCode or a derivative. Magit clones exist for VSCode.
https://github.com/kahole/edamagit
Anonymous No.106428142 >>106428212
>>106427923
cement
Anonymous No.106428212
>>106428142
Interesting approach.
Anonymous No.106428708 >>106429635 >>106447301 >>106455258
>>106425707
> Clojure
As soon as they drop the JVM to make it viable—in and of itself—it has a chance.
Right now it’s just an fancy alternative to Java the language for outputting jvm bytecode that astonishes your coworkers at TATA consulting services Pvt.
Anonymous No.106428796
>>106427867
That's the first edition, fren
Easily found, yeah, but I want the second.
Anonymous No.106429583 >>106429649 >>106429940
Apart from Emacs, do you use any other software made with a LISP language?
I used Lynx for some weeks, but then it started to break almost every 10 minutes, then I just gave up. It's a nice browser, though. Not sure if it still breaks every 10 minutes, but apart from that it was pretty cool actually.
Anonymous No.106429635
>>106428708
> He doesn't know about Clojurescript
Anonymous No.106429649 >>106429745
>>106429583
You mean Nyxt?
https://nyxt.atlas.engineer/
https://lynx.invisible-island.net/
Anonymous No.106429745
>>106429649
Yeah, it was Nyxt, my bad.
Anonymous No.106429940 >>106453913
>>106429583
Believe it or not, yes I do.

https://opusmodus.com/
Anonymous No.106429949 >>106430144 >>106430633
>>106420847
>use-package
Anonymous No.106430144 >>106434627
>>106429949
Not her but what's wrong with that now? I used it with straight for years now, it's handy. I'm not up to date with the latest Emacs zeitgeist and I don't know elisp.
Anonymous No.106430543 >>106436399 >>106437086
>>106427842
See this? It's the status indicator/button for Remote, VS Code's killer feature.
Anonymous No.106430633 >>106434627
>>106429949
any problem not related to the fact that it's macro dsl, not lisp?
Anonymous No.106431090 >>106431106 >>106431395 >>106431530 >>106431556 >>106431726 >>106433404 >>106447314
>>106419114 (OP)
Use case for lisp?
Anonymous No.106431106
>>106431090

write and sell books to autits
Anonymous No.106431395
>>106431090
Increased IQ points.
Anonymous No.106431530
>>106431090
Free Software (as Saint IGNUcius intended)
https://www.gnu.org/gnu/rms-lisp.html
Anonymous No.106431556
>>106431090
Basically creating concepts for all modern languages. Yes, all the fancy crap you see people adding to "modern" languages was already done in old LISP languages.
Anonymous No.106431726
>>106431090
I need to write the filter for use case.
Anonymous No.106432392 >>106432538
>>106421202
Nothing super interesting for today. I'm working through chapter 2 steadily; exercises for today were implementing some relatively boilerplate set functionality: unions, intersections, etc. A bit of complexity analysis for different algorithms. For the first time in a while, it all feels relatively trivial. I'm going to keep doing all the exercises just in case I would otherwise miss something interesting to me, but as of now... all quiet on the western front.
Anonymous No.106432538
>>106432392
Keep us posted.
Anonymous No.106433404 >>106433603 >>106435716 >>106441311
>>106431090
bb.edn
{:tasks
{server {:doc "Run a server on `/tmp/notify-send.sock`."
:task (shell "socat UNIX-LISTEN:/tmp/notify-send.sock,fork EXEC:./notify.clj")}
client {:doc "Pipe an EDN expression through socat to send a request to the server."
:task (shell "socat - UNIX-CONNECT:/tmp/notify-send.sock")}
ssh {:doc "Forward unix domain socket to a remote server."
:task (let [remote (System/getenv "REMOTE")]
(shell "ssh" "-R" "/tmp/notify-send.sock:/tmp/notify-send.sock" remote))}
autossh {:doc "Forward unix domain socket to a remote server using autossh instead of ssh."
:task (let [remote (System/getenv "REMOTE")]
(shell "autossh" "-M" "0" remote "-N" "-R" "/tmp/notify-send.sock:/tmp/notify-send.sock"))}
}}

notify.clj
#!/usr/bin/env bb
(ns script
(:require [clojure.edn :as edn]
[babashka.process :refer [shell]]))

(def defaults "Default options for notify-send" {})

(defn notify
"Shell out to notify-send with the given parameters."
([message]
(notify {} "ATTENTION" message))
([title message]
(notify {} title message))
([opts title message]
(let [final (merge defaults opts)]
(->> final
(map (fn [[key value]] [key value]))
(flatten)
(#(conj % "notify-send")) ; prepend to beginning
(vec)
(#(conj % title)) ; append to end
(#(conj % message)) ; append to end
(apply shell)
))))

;; Read one EDN expression from `*in*` and use it as arguments to `notify`.
(apply notify (edn/read *in*))


I wanted remote servers to be able to send me local desktop notifications, so I used babashka and socat to write a wrapper around notify-send to make it a server.

Run server locally
bb server


Test server locally
echo '["hello"]' | bb client


Expose server to remote
env REMOTE=anon@remote.org bb ssh
Anonymous No.106433441 >>106433964
What's some benefits of GNU Guix? I'm not trying to be like "usecase?" but I mostly run NixOS and have seen Guix described as "inspired" by Guix. I know it's all free software which is cool, and the config files being in Scheme is sick, but I just wondering like is it practical or just a GNU self-sucking machine?
Anonymous No.106433506 >>106433699
Emacs: Golden Ratio or Zoom?
Anonymous No.106433603
>>106433404
Once you've exposed the server to a remote host, you can ssh in to the remote host to test it.
ssh anon@remote.org
cd /to/directory/that/has-notify.clj-and-bb.edn-in-it
echo '["hello from remote server"]' | bb client
Anonymous No.106433699 >>106433814 >>106436042
>>106433506
Like this?
https://github.com/roman/golden-ratio.el
^-- This style is not for me. I don't split a frame into too many windows. If I split a frame, it's usually just 2 evenly-sized vertical windows side-by-side. Sometimes a little more, but not often.
Anonymous No.106433703
Anybody using soju bouncer with ERC? How's the experience? Are timestamps for messages coming form the bouncer when ERC was offline correct?
Anonymous No.106433814
>>106433699
yeah, for me it's a 2 vertical split and repl/eshell at the bottom. anything more seems overwhelming and distracting
Anonymous No.106433964 >>106437254 >>106440716
>>106433441
I'm the only man on earth who uses both nix and guix, guix is as practical as any other linux distro and it's also a machine for gnu self-sucking
advantages over nix are ideological or preference, libre only, no systemd, no auto-generated packages, only source-based builds, and a full source bootstrap of guile and guix itself using MES
build scripts are written in scheme too, not just configuration
there's also a lot of disadvantages compared to nix, but I'm not going to write a blog post this early on a saturday
Anonymous No.106434627
>>106430144
>>106430633
NTA but I don't see the point of using it considering `with-eval-after-load' exists.
Anonymous No.106434956 >>106435723
Anyone working on traditional AI? Cellular automata and such, not LLMs and stupid ass chatbots
Anonymous No.106435716 >>106435920
>>106433404
No matter how cool the a new shell is, I can't seem to bothered to change from Bash. Unfortunately interop is more important for shell scripts (and me) than confort.
Anonymous No.106435723
>>106434956
There is an incredibly schizoid Guile AI thing. Cogs or something. One of the corporate LISPs also has some hyper autistic databases and AI stuff.
Anonymous No.106435920 >>106436098 >>106440807
>>106435716
Babashka isn't a shell. It's a subset of Clojure with fast startup that makes it suitable for command line scripting.
https://babashka.org/

You'd use it in situations where you might have used Perl or Python before.
Anonymous No.106436042
>>106433699
The one exception to this is when I use irc via erc. I'll split the frame into lots of windows, so I can monitor many channels at once. They're roughly evenly sized though. The only resizing i do is M-x balance-windows.
Anonymous No.106436098
>>106435920
Yeah I mean shell/scripting language. I rather stick with python and bash because everyone else understands that.

I will use lisp for projects thought.
Anonymous No.106436205 >>106442626 >>106442691
is Dylan still the best "lisp" descendant ?
https://opendylan.org/
Anonymous No.106436399
>>106430543
https://code.visualstudio.com/docs/remote/remote-overview
Anonymous No.106436620 >>106436868
What's some good schizo uses for lisp. Like if I wanna really go off the deep end and start thinking my computer is talking to me, what do I code
Anonymous No.106436868
>>106436620
M-x doctor
Anonymous No.106437028 >>106437049 >>106447362
Clojure is the best Lisp.
Anonymous No.106437049
>>106437028
Do you want to work for Nubank? They are a bunch of scammers. Brazilians are fucked with them.
Anonymous No.106437086
>>106430543
>VS Code's killer feature
Why is it better than tramp?
Anonymous No.106437254 >>106439014 >>106439745 >>106439760 >>106440716
>>106433964
I wanted to love Guix SO bad, but it was just slow to do anything and make configuration changes. The documentation wasn't clear on service options and Geiser wasn't giving me decent autocomplete, so I had to dig into the service definitions to understand what options they expect. Maybe I'm just a brainlet but I found it difficult to set it up the way I wanted to.
I will stick to Fedora until I gain the mental capacity to understand Guix.
Anonymous No.106437795 >>106438086 >>106439747 >>106442779 >>106458048
If you have a function that calls a passed in function with 1 values, but in your passed in function you want to have access to the previous value you can use mutation and closures like this

```lisp
(define f
(let ((prev-x #f))
(lambda (x)
;; do something with x and previous x
(set! prev-x x))))

(call-f-with-something f)
```

Is there any way to do this without mutation (assuming you can't rewrite call-f-with-something to make it pass in the previous value)? I don't really understand what state monads are, are they a way to solve this kind of thing?
Anonymous No.106438086
>>106437795
Read the sticky to learn you to use code blocks in your posts. There's no markdown support here.
>>105076684
Anonymous No.106439014 >>106439760 >>106440129 >>106440716
>>106437254
>slow
Yeah that's the main problem people have with Guix, specially when it comes to guix pull.
https://guix.gnu.org/en/blog/2025/guix-user-and-contributor-survey-2024-the-results-part-2/
>Geiser wasn't giving me decent autocomplete
What do you mean? Like the argument names of functions/special forms weren't showing up?
Anonymous No.106439564 >>106439651
I never use M-r. Persuade me.
Anonymous No.106439651
>>106439564
Lol, yeah, i’ve never heard of it either.
Sounds like it’s used for people with nervous fidgets while thinking.
Anonymous No.106439727 >>106440182
I'm looking at Guile and https://dthompson.us/projects/chickadee.html (particularly interested in the channels part of it).
If I make something with it will I be able to distribute the program to normal people (i.e. for Windows)?
Anyone tried to shove a Chickadee project into browsers with https://codeberg.org/spritely/hoot ?
Anonymous No.106439745 >>106440129
>>106437254
> slow when make config changes
Is that so something you do frequently? I do it once every few years or so. All you really need.
It might be easier to re-evaluate your priorities.
For example, I don’t really use the “desktop” environment at all. I just run emacs mostly, and compilers.
On windows 11 I’ve started killing “explorer” immediately because it’s hopelessly slow.
And then I just run emacs and eshell withn that. Or just regular shell if I have the perms.
Anonymous No.106439747
>>106437795
> can’t use set! For no apparent reason
So, just treat prev-x as a list and cons x onto it, and then use car to get it back in “do something”
> no, i can’t use lists either, or stack, or storage, or closures, or lambdas…except the one I used there once, or defines, or recursion, or more functions, i can’t use cons, my lisp doesn’t have it….
Anonymous No.106439760 >>106440129
>>106437254
have you tried guix home? you can install guix on top of fedora and just use it configure your dotfiles and user services, good way to get more hands on without committing to it
it might be the one part of guix I love more than nix, home-manager in nix is a big mess
>>106439014
pull performance is only going to get worse too, pull in general is fucked but none of the devs I've tried asking about it want to entertain alternatives
Anonymous No.106440059 >>106447398
bros, i just like clojure because it gives me access to java classes
Anonymous No.106440129
>>106439014
>guix pull
Yep that was it. Took so long I wanted to set up my own caching server, but at that point I feel like I'm working around too many things to justify it. Are you aware of any plans to address that issue?
>What do you mean? Like the argument names of functions/special forms weren't showing up?
I don't quite recall, but I think so. And I was having issues with Geiser's stability in general.
>>106439745
Well yeah when I was getting my initial config going. Very slow feedback loop.
>>106439760
>have you tried guix home?
I think when I was playing with Guix, home was just starting out, and the documentation was non-existent so I stayed away. I might just give it another try, fuck it. I've definitely been thinking of installing Guix on top of Fedora to specify builds for my own projects, but I'm worried about running into missing packages and whatnot.
Anonymous No.106440182
>>106439727
>will I be able to distribute the program to normal people (i.e. for Windows)
I think Guile hasn't been properly ported to Windows yet, although it should probably work on WSL or using MinGW/Cygwin.
For macOS, apparently it's available:
https://formulae.brew.sh/formula/guile
>Chickadee project into browsers with https://codeberg.org/spritely/hoot
There are some games written with Guile Hoot:
https://davexunit.itch.io
Anonymous No.106440716 >>106440889 >>106444122
>>106439014
>>106437254
>>106433964
The fatal flaw of guix/nix is that you're trapped inside a nonstandard ecosystem and can't get out.
ALL your programs now have to be declaritive packages. Effectively it's impossible to run non packages software, even writing your own code needs to be packages to run correctly.
It's all consuming and oppressive, you've run from the terror of arbitrarily mutable chaos breaking everything directly into the jaws of the beast.

Realistically they should only be used as secondary package managers. I love installing guix/nix packages, I HATE making them.
Anonymous No.106440807 >>106447419
>>106435920
The worst thing about Clojure is that pretty much everything outstanding out of Java is a subset of it, Jank, ClojureJS, ClojureCLR, Babashka...
Anonymous No.106440889 >>106441208
>>106440716
>inside a nonstandard ecosystem and can't get out
That's the price of reproducibility & bootstrappability. Something that most package-managers/distros don’t really care about.
>Effectively it's impossible to run non packages software
At least in Guix, you can use FHS Guix containers. Not ideal, but it works.
https://guix.gnu.org/en/blog/2023/the-filesystem-hierarchy-standard-comes-to-guix-containers/
Anonymous No.106441208
>>106440889
It's isolating. I never realized how often I download and run random ancient shit or follow cryptic tutorials to get old games running correctly or compile random git repos of stuff people threw together before suddenly I couldn't do any of it anymore.
it's awful on the same scale as what made me switch in the first place(having to literally brace for impact every arch update to see if my entire system would brick itself and literally having memorized all the steps to manually fixing the packages pr reinstalling and configuring everything with bash scripts)
I do enjoy being able to just start and update and walk away or even go to sleep and not worry. I even had a blackout in the middle of an update and had to reboot and nothing happened besides having to continue where it left off. That's great, but I don't want to have to deal with writing wrappers for everything all the time. Nix is especially bad since I can't stand how horribly the shitlang is designed and literally don't want to learn more about it.

I think I'm just going to go back to arch but go full meme btrfs automatic rollback snapshots before every package install.
Anonymous No.106441273
>>106419593
kotatsu was the software for 4taba(dead)
it was broken and buggy
it was different from other imageboards though and kinda neat
Anonymous No.106441311
>>106433404
>flatten
You almost always want to mapcat instead of flatten
You also rape thread-last, just do something like
(apply shell (concat (cons "notify-send" (mapcat vec final)) [title message])))
Transform that with thread last and you get something slightly different.
Anyhow, (#(,,)) in a threading macro is a smell, better use as-> if you're at it.
You're also slightly abusing collection types while you are signalling you want to be in the world of sequence abstraction with thread-last.
If you want to not jump around collection types just
(concat ["notify-send"] (mapcat vec final) [title message])
I also think babashka has facilities for reading arguments, why not use that instead of piping to stdin? Use *command-line-args*, which will already be packed into a list, then you don't need to fuck around edn reading, either.
bb client hello
Simpler, no?
Anonymous No.106442626
>>106436205
For another non-sexp Lisp, there's also Rhombus:
https://rhombus-lang.org
https://docs.racket-lang.org/rhombus/
Anonymous No.106442691
>>106436205
good feature
https://opendylan.org/about/examples/generic_functions.html
Anonymous No.106442779 >>106442816
>>106437795
Define f as an inner function with tray arguments, call it from the outer function with 0 or nil depending on the algorithm, pass x and last-x to any further recursive calls. No need for nasty stateful garbage.
Anonymous No.106442816 >>106442864
>>106442779
>tray arguments
*two arguments. Fucking phone. Something like this:
(define (f fn x)
(define (i-f next x last-x)
(if (cond? x)
term
(i-f next (next x) x)))
(i-f fn x 0))
Anonymous No.106442856 >>106442970
Try C-x C-n if you haven't already.
Anonymous No.106442864
>>106442816
This is a shit example for the record because i-f has the structure of a higher order abstract function and as such should be a reusable structure declared outside f... but it's just supposed to illustrate how you can seed an inner function and feed your outer function's arguments into it to mimic stateful behavior in a pure way.
Anonymous No.106442970
>>106442856
I'll try it once.
Anonymous No.106443376 >>106445065
I want to switch buffer but show the new buffer in a new frame. Is there a built-in command for this? C-x 2 C-x b seems too slow.
Anonymous No.106443522 >>106454275
Anyone having issues with Emacs on Gayland? When moving around a file by large chunks (like with M-] or page down, but not when just scrolling with a mouse or arrow key) I seem to get rendering issues like picrel. I can't recall this ever happening to me, even on wayland, ever before.
Anonymous No.106444122
>>106440716
I'm already used to using wine, using "guix shell --container --emulate-fhs" needs less fucking around and works about as often as wine did 10 years ago, maybe even more
on the other hand I actually like writing packages, it's nice knowing that if you can get it working once it'll work forever
Anonymous No.106445065 >>106445595
>>106443376
>C-x 2 C-x b
There's `switch-to-buffer-other-window' which is bound to C-x 4 b and `switch-to-buffer-other-frame' which is bound to C-x 5 b. From your example I'm guessing you're looking for the former (other window).
Anonymous No.106445595
>>106445065
>C-x 4 b
Excellent. Go visit /d/. You deserve a break.
Anonymous No.106447301 >>106452973
>>106428708
>Right now it’s just an fancy alternative to Java the language for outputting jvm bytecode that astonishes your coworkers at TATA consulting services Pvt.

and Scala3 does the functional/immutable thing better than Clojure.
Anonymous No.106447314
>>106431090
>Use case for lisp?

Interactive programming for systems of high or unknown complexity.
Anonymous No.106447362 >>106447448 >>106447835
>>106437028
>Clojure is the best Lisp.

Clojure was created when someone said, "Macros, lack of syntax, and tail recursion, defining features of a lisp, right? Well fuck out of here with them." We all know that what really embodies the lisp spirit of freedom is building a language on a Java Virtual Machine. Ever since John McCarthy had S expressions revealed to him by God in a dream, lispers have thought, "If only I could use horribly written libraries from a shit language with an unsound type system!"

We tried in vain to build a lisp on a Fortran VM, but we couldn't make it miserable enough (and also, IBM didn't like Fortran being used to innovate, its apparently against the language standard). Clojure frees us to finally do that. Thanks, Clojure! I only hope that one day people can bring the same innovative ideas to Prolog! All of these idiot professors trying to improve the language with higher order logic or thoughtful object systems? Fools in ivory towers! What prolog needs most is the ability to easily call Java libraries. I can't tell you how many times I've been writing AI code and thought to myself, "There's a Java library that would make this so easy!".
Anonymous No.106447398 >>106447970
>>106440059
>bros, i just like clojure because it gives me access to java classes

you can easily access java classes from Common Lisp by using Armed Bear Common Lisp (ABCL)

example:

For example this lisp code shows a dialog using Java Swing, using ABCL

;; JDialog - modeless dialog
(defun dialog (&optional parent-frame (title "") (is-modal +false+))
"Create a JDialog."
(if parent-frame
(jss:new 'JDialog parent-frame title is-modal)
(jss:new 'JDialog)))


Instancing java objects is as easy as instancing CLOS objects.
Anonymous No.106447419 >>106447500
>>106440807
>The worst thing about Clojure is that pretty much everything outstanding out of Java is a subset of it,

This is because Clojure was badly designed: The creator (Rich Hickey) let many Java stuff leak straight into the standard library.
Anonymous No.106447448
>>106447362
>and tail recursion
Explicit tail recursion is literally the best tail recursion
Anonymous No.106447500 >>106447591 >>106447595
>>106447419
>This is because Clojure was badly designed
Yeah, so badly designed that many companies use it instead of the almighty Common Lisp.
I wonder why...
Anonymous No.106447591 >>106447801 >>106447989
>>106447500
would you respond the same way to someone saying javascript is badly designed? how well designed a language is is hardly a factor in its popularity
Anonymous No.106447595 >>106449119 >>106451230
>>106447500
>Yeah, so badly designed that many companies use it instead of the almighty Common Lisp.
>I wonder why...

Reading skills good, sir? Badly designed in the sense that the creator let Java leak into it.

As for "many companies use it": Popularity is not a measure of quality. Otherwise Javascript or Python would be considered the highest quality, most advanced language.

Clojure is used because if you need to target the JVM and you have a brain, you woudn't use Java at all. Kotlin, Scala, Clojure, they're all fine choices in that case.
Anonymous No.106447634 >>106447716
Why can't you be happy for the success of another Lisp?
Trying to bring others down is bitch behavior.
Anonymous No.106447716
>>106447634
le crabs-in-a-bucket mementality
Anonymous No.106447801
>>106447591
>how well designed a language is is hardly a factor in its popularity

based

"programming is pop culture" -- Alan Kay
Anonymous No.106447835
>>106447362
> closure was created when…
No, that was scheme

As long as you can write clean, portable subsets that are pure scheme (or common lisp) then nobody will have a problem with it.
If you can’t, then problem.
Anonymous No.106447970
>>106447398
Can java use kabob case internally in the jvm for named objects? This would be the greatest fuck-over ever—produce a bunch of classes that can’t be called (or named) from bare java.

I don’t know clojure, but I can’t wait to use it when working on my next java project I am forced to inheret to fix and maintain.
Anonymous No.106447989
>>106447591
> is hardly a factor in its popularity
It seems to be, in many cases, that it’s inversely proportional
Anonymous No.106448149 >>106448607 >>106473337
japanese ascii art as the eshell banner message
;;; see https://en.wikipedia.org/wiki/Shift_JIS_art
(defface shift-jis-art
'((t :font "-Mona-Mona Gothic Wide-regular-normal-normal-*-16-*-*-*-*-160-iso10646-1"))
"The face for Shift_JIS artwork, which requires an appropriate font,
e.g. Mona font.")

;;; you want non-breaking spaces to be invisible. for example:
;; (set-face-attribute 'nobreak-space nil :underline nil)

(setq eshell-banner-message
(with-temp-buffer
(insert-file "~/.emacs.d/ascii-art/alice")
(propertize (buffer-string) 'face 'shift-jis-art)))
Anonymous No.106448607 >>106467331
>>106448149
Added bonus. Looks more like real lisp machine.
Is that a proportional font?
I always dreamed of a day standard tab based indenting (as used by steele, sussman, kerginghan, ritchie, etc.) could be used with proportionally based fonts for lisp code again.
Anonymous No.106449119 >>106457847
>>106447595
you're greatly underappreciating Clojure''s abstractions of sequences, associative data structures (assoc/dissoc), and data structures where things may be added/removed (conj/disj).
yes, you can writing generics for doing this in Common Lisp, but the rest of the community might not, and you end up with the common problem of everyone off doing their own shit
Anonymous No.106450723
If nothing else Clojure heavily influenced a lot of new Lisp dialects (Fennel, Janet, Carp, Phet, Basilisp...), so clearly it did at least some things right.
Anonymous No.106451230 >>106451673
>>106447595
>Badly designed in the sense that the creator let Java leak into it.
If it wasn't hosted on the JVM it would never have taken off. It would have been ignored by the community and then abandoned by its creators.
Anonymous No.106451673 >>106453478
>>106451230
I think the whole point of it is to be a endoparasite of Java codebases. And that is why it is a successful. Everyone uses java despite being a bad thing for developers.
Anonymous No.106452973
>>106447301
>does the functional/immutable thing better
lolno
Anonymous No.106453478 >>106456763
>>106451673
I mean, guaranteed portability is not a trivial consideration. Because lisp is too heavy for embedded work, in a sense it finds a natural second home on the JVM since we're in the cursed worldline where lisp machines died out.
Anonymous No.106453913 >>106465104
>>106429940
looks amazing
>400 brit bucks
i guess lilypond is fine
Anonymous No.106454129 >>106454506 >>106454813
Did you guys know that rebinding M-[ and M-] fucks up terminal mode?
It starts sending the raw inputs to it (DEL turns into ~3 Page up turns into 5~ etc etc), you can just add
(global-set-key (kbd "M-[") 'backward-paragraph)
(global-set-key (kbd "M-]") 'forward-paragraph)
Or something to your init and check it with -nw
Spend 20 minutes commenting out random parts of my init until I found that shit.
Anonymous No.106454275
>>106443522
>I seem to get rendering issues like picrel
I think it stopped for me when I switched to the emacs-wayland package, the one with PGTK enabled.
Anonymous No.106454506
>>106454129
Meta key in general fucks up in terminal emacs.
Anonymous No.106454813 >>106455008
>>106454129
I was expecting failure, but it worked for me on Emacs 30.2 running in wezterm.
Anonymous No.106454886 >>106455053 >>106455470
Can you configure or extend emacs using guile/scheme instead of elisp? If not, is the difference in semantics between the two significant?
Anonymous No.106455008 >>106455173
>>106454813
What the frick how? I only found out about this problem when I was getting dropped to tty and wasn't able to edit shit because of it. This issue, at least to me, happens on the tty, konsole and foot.
I'm also on 30.2, maybe wezterm just does something different.
Anonymous No.106455053
>>106454886
There's guile-emacs which intends to replace elisp with Guile, but it's a work in progress and it only got "resurrected" somewhat recently. Unlike Scheme, elisp has no TCO, but you can still write Scheme-inspired elisp code with named-let for example
https://www.gnu.org/software/emacs/manual/html_node/elisp/Local-Variables.html#index-named_002dlet
Anonymous No.106455173
>>106455008
Unfortunately, I discovered a weird side-effect. This happens with both tilix and wezterm. After setting up those bindings,
- if the window gains focus, an "I" is inserted;
- if the window loses focus, an "O" is inserted.

I have no idea what's going on. With that said, the bindings do still work.
Anonymous No.106455258
>>106428708
>TATA consulting services
Actually worked there in London before they moved building.
Anonymous No.106455470
>>106454886
There are ways to extend Emacs in languages that aren't Elisp. For example, if you wanted to write OCaml extensions, you could do it with ecaml.
https://github.com/janestreet/ecaml
Anonymous No.106455533 >>106455749
I'm currently reading through the entire elisp manual top to bottom. About a quarter through so far.
Anonymous No.106455749 >>106456459
>>106455533
Nice digits. This may help you get a more accurate view of how far you are through the Elisp manual.
(defun Info-percent ()
"Return what percentage of the way you're into the current info manual.

Examples:

;; Return a plist with current-line, total-lines, and percent.
ELISP> (with-current-buffer \"*info*\" (Info-percent))
(current-line 113 total-lines 2569 percent 4.398598676527832)
"
(interactive)
(without-restriction
(let* ((current-line (line-number-at-pos))
(total-lines (line-number-at-pos (point-max)))
(percent (* (/ (float current-line) total-lines) 100.0))
(result `(current-line ,current-line
total-lines ,total-lines
percent ,percent)))
(message "%s" result)
result)))


- https://desuarchive.org/g/thread/105652614/#105696372
- https://desuarchive.org/g/thread/105652614/#105706173
Anonymous No.106456459 >>106456867
>>106455749
I'm sorry to disappoint, but I'm reading the HTML version in my browser.
Anonymous No.106456763
>>106453478
> natural second home on the JVM since
Yeahbut…The JVM is even less suited to running lisp/scheme than it is to running Java.
If you want to look at one that is suited, look at the guile VM.
The thing that makes the JVM minimally acceptable (to some) is the (quite literally millions of) hours spent in developing hotspot optimizations.

> cursed worldline where lisp machines died out.
Agreed. However note that Sun/Fijitusu’s “pico” processor, designed to run JVM bytecode natively also died out, but somehow that jvm turd persisted.

Today, if we add facilities to configurable processors (e.g. tensillica) there is a good chance it would take over in embedded applications fir people that favor correctness over C slop.

Interestingly Tom Knight became a biologist and is company is being investigated for collecting money without doing anything or having any real customers. If he had decided to become a fabless lisp chip/coprocessor manufacturer he probably would have been more successful. There’s still time.
Anonymous No.106456867 >>106456917
>>106456459
Why?
Anonymous No.106456917
>>106456867
Mostly because I hate how info manuals are split into tiny sections and I currently don't have info+ installed (which can recursively merge them).
Anonymous No.106457323
evil users:
Is it just me or is emacs sometimes unable to register that I typed :w because I typed it too fast? This never happens to me in vim or helix, but it happens regularly in emacs+evil.
Anonymous No.106457410 >>106457453 >>106457899 >>106458089
Does Common Lisp have any decent sqlite bindings?
Anonymous No.106457453 >>106457899
>>106457410
I've used SQLite via mito which is using cl-dbi under the hood. It works.
https://github.com/fukamachi/mito
https://github.com/fukamachi/cl-dbi
Anonymous No.106457847
>>106449119
>you're greatly underappreciating Clojure''s abstractions of sequences, associative data structures (assoc/dissoc), and data structures where things may be added/removed (conj/disj).
>yes, you can writing generics for doing this in Common Lisp,

I appreciate these good ideas.

>and you end up with the common problem of everyone off doing their own shit

Most, or all these features are already available on CL using libraries. Of course, some of those libs were inspired by Clojure.
Anonymous No.106457899
>>106457453
>'ve used SQLite via mito which is using cl-dbi under the hood. It works.
>https://github.com/fukamachi/mito
>https://github.com/fukamachi/cl-dbi

Fukamachi libs usually have source that is a pain to read and insufficient documentation. And sometimes they depend on Roswell (yuck)

>>106457410
>Does Common Lisp have any decent sqlite bindings?

CLSQL, which is a Good lib, supports sqlite2 and 3 too.

and there is also this:
https://cl-sqlite.common-lisp.dev/
Anonymous No.106457902 >>106458048 >>106458313 >>106469541 >>106469715 >>106469719
I'm trying to learn lisp from a C background
What kind of project could I do to get used to functional programming?
Every time I think of a project I imagine something like a long list of imperative statements
Anonymous No.106458048 >>106458182
>>106457902
Lisp has functions.
C has functions.

Translating >>106437795 into C….
void f() {
static int prev_x



Simple as.
Anonymous No.106458089 >>106458121 >>106461274
>>106457410
> sqlite bindings
I’d go for a database that supports sexp-like expressions personally.
(&(objectCategory=person)(objectClass=user)(sAMAccountType=805306368)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(sAMAccountName=username))
Anonymous No.106458121 >>106458549 >>106458649 >>106459282 >>106461571
>>106458089
https://x.com/andy_pavlo/status/1659740200266870787
Anonymous No.106458182 >>106458552
>>106458048
I think the problem is that if I want to iterate over lines for example, I wouldn't think of stuff like map, reduce, etc, I would think of imperatively telling the compiler to change the memory
I could write C-styled Lisp, but I really would like to learn what's the Lisp way of thinking about problems
Anonymous No.106458313
>>106457902
You need to start thinking differently and for that you need to be shown the way.
Unironically do SICP or HtDP.
Alternatively start learning Clojure and do whatever using it.

Eloquent JavaScript also works as a primer if you want to start with something that uses a language with C-style syntax.
https://eloquentjavascript.net/03_functions.html
https://eloquentjavascript.net/04_data.html
https://eloquentjavascript.net/05_higher_order.html
Anonymous No.106458474 >>106458506 >>106458516 >>106458522 >>106458553
What books should I read if I want to know more about rolling my own lisp interpreter?
Anonymous No.106458506 >>106458523
>>106458474
https://github.com/kanaka/mal/blob/master/process/guide.md
Anonymous No.106458516
>>106458474
https://www.buildyourownlisp.com/
Anonymous No.106458522
>>106458474
sicp
lisp from nothing
lisp in small pieces
an introduction to scheme and it's implementation
Anonymous No.106458523
>>106458506
Cheers m8.
One of these days, I want a lisp interpreter for my graphing calculator.
I mean, it's already got a python interpreter, so surely a lisp thing would be possible.
Anonymous No.106458549 >>106458633
>>106458121
https://github.com/seancorfield/honeysql
Anonymous No.106458552
>>106458182
>I wouldn't think of stuff like map
Of course you already do without realizing it.

You use "grep" right? what about "perl"?
Now imagine the lines grep reads in are just the elements of a list.

(grep "a.*" '("foo" "abacus" "bar"))

and it returns
"abacus"


map works the same way as grep except instead of a regex you use a function and it
returns the list with that function run on each element.
in fact, someone probably already wrote a "grep" function in lisp.
it certainly exists in perl.
Anonymous No.106458553 >>106458583
>>106458474
stop reading and start coding
process a string via some loop mechanism
there are opening and closing parenteheses, they're prettyy important, so you ought to handle them in some way
whitespace is used to separate symbols
Anonymous No.106458583 >>106459111
>>106458553
No point in re-inventing the wheel, though, is there?
Anonymous No.106458633
>>106458549
Stuff like this is nice, because it addresses one of SQL's weaker points. When you're just working with just strings, it can be awkward to build an SQL query programatically. However, if you have data structures (like Honey SQL), then building SQL queries via code becomes much cleaner and way less error prone.
Anonymous No.106458649
>>106458121
Yes, I'm familiar with that self-serving verbiage.
I remember the first time SQL became available to us professionally in the 80s.
It was so slow that we ended up throwing away a halfway-done project to convert our "manually implemented" queries in COBOL to SQL.
I've used SQL continuously until now. I actually like it. I remember when "SQL 3" came out, and it took years before they could even figure out how to parse it and it became it's own nightmare. I remember when Oracle 12 broke ANSI joins, but their native joins still worked.

I agree it's a standard, but it's become ugly and complicated, and even in the 90s I'd see 10-page printouts (66 lines/page) with single queries on them left on the printer. It's also really slow even when not abused. I have a 100% perfect track record of tossing that shit and implementing manual database operations especially if the underlying (say) ISAM primitives are available to me with many orders of magnitude speed-up.

There's a better way. Maybe javascript and python are the most popular languages in the world. So what.
Note that DB/2 and Oracle also essentially became hardware companies and the "solution" for the slowdown was to buy more hardware.
Anonymous No.106459111
>>106458583
yet you want to write your own lisp
Anonymous No.106459282
>>106458121
Full PDF
https://db.cs.cmu.edu/papers/2024/whatgoesaround-sigmodrec2024.pdf
Anonymous No.106459467 >>106459561
>no > greentext in org mode
feels bad. i use ==, but it's not the same
Anonymous No.106459561 >>106459621
>>106459467
(font-lock-add-keywords
nil
'(("^>.*$" 0 '(:foreground "green") t)))


probably wanna put that in an org mode hook
Anonymous No.106459621 >>106459670
>>106459561
this works, thanks. it's unfortunate that <> is a syntax for timestamps and as such conflicts with my preferred citation methods
Anonymous No.106459670 >>106459686
>>106459621
cont.
perhaps an org-greentext-to-verbatim-mode should be made.
basically you enable it with a keybinding (c-c c-,), it does the following
>disable syntax highlight for timestamps and timestamp syntax errors
>insert > on mode activation and after a newline
>you write your greentext
>run c-c c-, again
>all lines with > which were inserted while the mode was active are converted in == lines
hmmmm
Anonymous No.106459686 >>106459829
>>106459670
literally just ask claude to make it you lazy fuck. it one-shot it for me by copy-pasting your instructions.
Anonymous No.106459829
>>106459686
403 lol))))
funny thing, all this ai hype made me genuinely curious about the tech.
it's temporary issue on my side, sure. but atm i can't do it.
Anonymous No.106461002
>>106419114 (OP)
What should my first Lisp app be?
Anonymous No.106461274 >>106461278
>>106458089
>random bullshit
>staple db that runs on every device on the planet
yeah sure
Anonymous No.106461278 >>106461943
>>106461274
Looks good to me.
Anonymous No.106461571
>>106458121
A non-SQL query language that I thought was cool was Datalog.
https://learn-some.com/
[:find ?title
:where
[_ :movie/title ?title]]
Anonymous No.106461943
>>106461278
Humans will go extinct before sql and sqlite.
Anonymous No.106462087 >>106462248
We might have lost paredit.org.
https://archive.is/KtoJp
The official git repo was hosted on paredit.org, but the best we have now is:
https://github.com/emacsmirror/paredit/
Anonymous No.106462175 >>106462929
>>106419114 (OP)
Is it feasible to use Common Lisp for multiplatform game development?
Anonymous No.106462248
>>106462087
The last public sighting of the paredit maintainer was a few months ago. Hopefully, he just forgot to renew.
https://www.youtube.com/watch?v=vZmzWNcV0Q0
Anonymous No.106462929 >>106462954
>>106462175
Yes, I'm doing it.
Anonymous No.106462954 >>106463477 >>106463614
>>106462929
What do you use for
>window communication with the OS
>file paths
>image loading
>software rendering
>hardware rendering, 2D and 3D
etc?
Anonymous No.106463477 >>106463566 >>106463577
>>106462954
Uh it's a text-based MUD that runs in a terminal
Anonymous No.106463566
>>106463477
I'm doing just that, actually.
Anonymous No.106463577
>>106463477
I use a slightly modified rmoo.el to connect to MUDs.
https://github.com/lisdude/rmoo
I had to change set-face-underline-p to just set-face-underline to make it work.
Anonymous No.106463614
>>106462954
>raylib
>strings
>raylib
>raylib
>raylib
you don't need anything else
Anonymous No.106464111 >>106467718 >>106470384
Can I just use Guile to work through the whole of SICP?
Anonymous No.106464947 >>106465261
emacsbros how can i get something similar to this kwrite feature? i find it very useful
Anonymous No.106465104 >>106470391
>>106453913
NTA, but am a user of both OpusModus and Lilypond. If what you're looking for is a music typesetting solution, it's still hard to do better than LilyPond. Definitely better than OM, as its output is often ugly and error-prone.
OM is intended to be a fancy computer-assisted composition tool, very useful for taking some musical germ you come up with and finding all sorts of ways of transforming it (definitely an oversimplification but this is already heading into blogpost territory as it is). It's easily the best in the business for what it does, but it IS expensive, as you pointed out. A more apt comparison would be with something like OpenMusic.
Anonymous No.106465261 >>106465318
>>106464947
While not exactly the same, there's something similar in spirit called highlight-changes-mode. It will give you unsaved new text in red. The underlined portions are places where I edited my own new text. It won't give you saved new lines, but if your text is in git, some kind of git-gutter could give you that.
Anonymous No.106465318 >>106466362
>>106465261
I am aware, but even with the way i set it up it still polutes the text quite a bit and I don't like it, i'm more than happy with just a "gutter" highlight like you called it.
>git
Nope they're not.
Anonymous No.106466362 >>106466809
>>106465318
I'll highlight your gutter
Anonymous No.106466809
>>106466362
OwO
Anonymous No.106467331
>>106448607
>Is that a proportional font?
it is. that sort of ascii art doesn't work with monospace fonts
Anonymous No.106467606 >>106467736
Is there an elisp function where I can give it a filename and it gives me back a matching mode from auto-mode-alist? I figure it must already exist, because Emacs itself needs this functionality, but what could it be called?
Anonymous No.106467718 >>106471003
>>106464111
yes
Anonymous No.106467736 >>106467793 >>106467800 >>106468157
>>106467606
you can use assoc-default with string-match as the test
(assoc-default "foo.el" auto-mode-alist 'string-match)
https://www.gnu.org/software/emacs/manual/html_node/elisp/Association-Lists.html#index-assoc_002ddefault
Anonymous No.106467772 >>106469194
Can't get profanity xmpp client in ansi-term scrolling up. Any anons able to run profanity in ansi-term?

>inb4 jabber.el
It doesn't have OMEMO.
Anonymous No.106467793
>>106467736
Thank you so much. I'm not as familiar with the alist and plist related functions as I'd like.
Anonymous No.106467800 >>106473009
>>106467736
Is gnu.org still being DDoS'd?
Anonymous No.106468157
>>106467736
Here's what I ended up writing.
(defun org-babel-insert-file-as-src-block (&optional file)
"Insert a FILE as a src block, and set it up for tangling."
(interactive "f")
(newline)
(let* ((mode (assoc-default file auto-mode-alist #'string-match))
(file-type (string-replace "-mode" "" (symbol-name mode))))
(insert (format "#+begin_src %s :tangle %s :mkdirp yes :eval never\n" file-type file))
(let* ((res (insert-file-contents file))
(len (cadr res)))
(forward-char len)
;; If the file doesn't end in a newline, add one to the src block.
(if-let* ((char (char-after))
(nl? (not (= char 10))))
(newline)))
(insert "#+end_src\n")))

Then I setup a temporary binding for my current little task.
(keymap-set org-mode-map "C-<" #'org-babel-insert-file-as-src-block)
Anonymous No.106468648
LisperはASTを直に書くのが楽しいという通好みな嘘
>The lie of Lispers that writing AST directly is fun
https://zenn.dev/g000001/articles/lisp-syntax-ast
Anonymous No.106469194 >>106470017
>>106467772
>ansi-term
Is using vterm instead a viable option for you?
https://github.com/akermu/emacs-libvterm
Anonymous No.106469541
>>106457902
>I'm trying to learn lisp from a C background
>What kind of project could I do to get used to functional programming?
>Every time I think of a project I imagine something like a long list of imperative statements

Lots of lisp code is imperative too. The language is more flexible and expressive so imperative code also ends up being more readable and maintainable.
Anonymous No.106469715
>>106457902
>Every time I think of a project I imagine something like a long list of imperative statements
I didn't stop doing this until I started working on much larger projects.
Because in all honesty, a series of imperative statements is probably the most efficient way to write simple programs, so it's natural to start out that way and hard to see the value in doing anything else. But that flips around when the project becomes very large and complex, and the need for other methods is not only clear but almost necessary (try doing imperative programming with multi-threading and see how quickly you run into race conditions).
The shift in thinking is that you stop asking what the next thing your program needs to do, and start asking how to make the code you're writing re-usable and scalable to arbitrary complexity.
Anonymous No.106469719
>>106457902
>I'm trying to learn lisp from a C background
Maybe you can start super simple by writing a Unix-styled filter that consumes stdin and produces results on stdout. Unix shell script hackers may not realize this, but all that piping and filtering they're doing is pure functional programming. I think this may be a good way to dip your toes into functional programming from a (hopefully) familiar setting. (I'm hoping your C experience has been on some kind of Unix. If not, sorry.)

Have you decided which lisp you're going to use?
https://lisp.nexus/
Anonymous No.106470017
>>106469194
I am staying with built-in emacs functionality as much as possible. I don't want to install vterm.
Anonymous No.106470384 >>106471003
>>106464111
Can YOU?
Even JS can be used with it. Crazy and ugly, but can be used.
Anonymous No.106470391
>>106465104
Interesting insight.
I think in one previous post some months ago this topic of music composition was brought too.
I remember having read some great articles on the software used.
Anonymous No.106471003 >>106471203 >>106473592
>>106467718
Thanks
>>106470384
I mean yes, I can. But I should've specified that I mean (close to) direct compatibility to the mit scheme being used. And without needing to jump through dozens of hoops and trying to reimplement behaviour that the book assumes to just work.
Anonymous No.106471203
>>106471003
I never got far into the book but in all exercises I did we implemented things from zero anyways, lol. It's kinda the whole spirit.
Anonymous No.106471229 >>106471241 >>106471291 >>106474448
I like CL so much but the ecosystem is so dead.
Anonymous No.106471241
>>106471229
Meaning you got the chance to create something new, anon. Go for it! Lit the fire!
Anonymous No.106471291
>>106471229
>the ecosystem is so dead
Let me guess - because it hasn't been updated in 2 weeks?
https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/#s4-escaping-the-hamster-wheel-of-backwards-incompatibility
Anonymous No.106473009 >>106494567
>>106467800
Yep.
https://www.fsf.org/blogs/sysadmin/our-small-team-vs-millions-of-bots
Anonymous No.106473337 >>106474875
>>106448149
aaaaaaaaaaaaaaaaaa cuteeee cute cute cute gimme the art
Anonymous No.106473547 >>106474875
Is there a way to disable fullscreen entirely? I'm using the Android version of Emacs for pocket hacking but the operating system's top status bar hides and unhides itself randomly, toggling the fullscreen. Often times it does it repeatedly, making everything bounce around. toggle-frame-fullscreen gets it to calm down, but it's only temporary before some kind of timeout is reached and it spazzes out again.
Anonymous No.106473592 >>106477181 >>106479149
>>106471003
>I mean (close to) direct compatibility to the mit scheme being used
(use-modules (srfi srfi-41))

(define cons-stream stream-cons)
think that's it
Anonymous No.106474448 >>106474478
>>106471229
>I like CL so much but the ecosystem is so dead.

dead? in which sense? I develop in CL too.
Anonymous No.106474478 >>106475380 >>106475472
>>106474448
I'm a corporate webshitter. There is nothing that I can convince a manager to sign on using.
Anonymous No.106474875 >>106475133
>>106473337
http://anime.en.utf8art.com/arc/touhou_48.html
https://jbbs.shitaraba.net/bbs/read_archive.cgi/computer/6306/1180340546/#690

>>106473547
what phone/android version are you using? i don't have this problem. maybe you could try (defalias 'toggle-frame-fullscreen 'ignore)
Anonymous No.106475133
>>106474875
Thank you, that fixed it. I'm on Android 14, I just bought a new Chinese shitphone. I didn't have the issue on my last shitphone with an older version of Android either, not sure what the problem is. Thankfully, easily resolved.
Anonymous No.106475156
4chan janny d0x dump
go fuck yourself you disgusting kike nigger sludge
https://files.catbox.moe/r1zn79.7z
death to israel, death to all kike niggers and their golems. there is no future for you.
Anonymous No.106475366
I'm going over HTDP and will now start applying the Design Process to everything in my life.
Anonymous No.106475380
>>106474478
>I'm a corporate webshitter. There is nothing that I can convince a manager to sign on using.

I used CL in a corporate context, but then, I had the power to choose.

Convince with important arguements: Time to market (speed to delivery for a reliable, working solution). Cost (if performance gains are achievable, they diminish cloud instance hosts.)
Anonymous No.106475472 >>106476334
>>106474478
>I'm a corporate webshitter. There is nothing that I can convince a manager to sign on using.

Say that it is a Java project then load ABCL from Java and build the rest of the program in lisp.

Ostensibly it'll be a Java project,
Anonymous No.106475779
Finally got my VIA-compatible keyboard and now I have a dedicated LISP layer(and dedicated key to toggle it). Currently, [ ] are bound to ( ). I am happy with my purchase.
Anonymous No.106475826
How can I get Magit to always show the date of the previous few commits, without it also being some sloppy extra margin that cuts a fifth of my screen?
Anonymous No.106476334 >>106478391
>>106475472
Clojure IS Java, soooooo....
Anonymous No.106477181
>>106473592
thanks scheme breh
Anonymous No.106477273 >>106477550
Has anyone here worked through pic related?
If so can you talk a bit about it? I really liked SICP and am thinking about getting this as well but unsure whether it is worth the time commitment and most info on what exactly it teaches seems vague.
Anonymous No.106477550 >>106477574
>>106477273
> I really liked SICP
What's your verdict on SICP, anon? Did it blow your fucking mind and made you a 5-6-10x programmer?
Anonymous No.106477574 >>106477631
>>106477550
No, what makes you think or say that?
What would even classify someone as an "n times programmer"?
Anonymous No.106477631 >>106477639
>>106477574
It's common classification down of way of Imposter Syndrome.
Anonymous No.106477639
>>106477631
>our way
Anonymous No.106478391
>>106476334
>Clojure IS Java, soooooo....

It is also not exactly Lisp.

But I guess it fits the bill for corporate dev
Anonymous No.106478482 >>106478619 >>106478990 >>106479597
I'm working through HTDP, still in the beginning, but I have a feeling that the way Racket is structured I'm suppose to eventually start to write these functions backwards, like I'm supposed to have quite a delineated solution already, otherwise I have to wrestle a bit with the countless (((())(()))(()())(())). As much as I find amusing to draw vaginas-like constructs everywhere, this can easily turn into a messy stream to navigate.
For example, and this is quite a simplistic example, going over the 0 without a clear mind of what I have to do afterwards made me, for a second, be a bit bamboozled over the parenthesis galore.
(define (string-remove-last str)
(substring str 0 (- (string-length str) 1)))

Again, pretty minor "issue", perhaps not even an issue, but to big nested beasts of a functions I expect this to become a little bit annoying, especially if a need to fix something that involve less or more parenthesis.
I'm not complaining, I guess, especially because I give zero probability to the possibility of swapping JavaScript for Racket professionaly and I'm doing this more as an intellectual exercise and to learn what's up with this book and eventually SICP, but still, just an observation.
Anonymous No.106478619 >>106479626
>>106478482
structural editing plugins would make your life far easier, and would make other languages more annoying
Anonymous No.106478990 >>106479626
>>106478482
Code structure is not as different as you think.
function stringRemoveLast(str) {
substring(str, 0, stringLength(str) - 1))
}
Anonymous No.106479149
>>106473592
> srfi-41
Turns scheme into haskel
Anonymous No.106479597 >>106479626
>>106478482
>For example, and this is quite a simplistic example, going over the 0 without a clear mind of what I have to do afterwards made me, for a second, be a bit bamboozled over the parenthesis galore.

Your example easily reads straight away to me.

Two suggestions:

1. the indent is giving you visual cues all the time

2. Your brain will eventually ignore the closing parentheses.

3. Like in the "matrix" movie, eventually all the parentheses "magically dissapear" and you just grok the code straight away, easily.
Anonymous No.106479626
>>106478619
>>106478990
>>106479597
I just started the thing for the nth-time, so maybe it's also just getting used to. Also, yeah, you are right, anon, indentation will probably ameliorate that a lot, and practice, of course.
Anonymous No.106481011
nice
new easel update
https://clojure.org/news/2025/09/02/deref
>Easel Instarepl Demo (https://www.youtube.com/watch?v=ac_ydoqPPWQ)
>https://github.com/phronmophobic/easel
Anonymous No.106481411
How the fuck do I use elglot with python envs and pylsp?
Anonymous No.106481892
Anonymous No.106482176 >>106482984
Is there a guide on how to install Guix with nonguix packages right away but using the latest upstream Guix installation image? (not one of the prepared images from system crafters or nonguix, or generating one with nonguix myself from an already running guix system)
Or maybe you guys can just help me out: If I add the nonguix channel during installation after writing my config, it will fail and tell me not enough disk space. Probably because it tries to "guix pull" with the new channel and obviously there isn't the space for that on the installation medium itself.

Or is first time install including nonguix linux kernel etc. really only possible if I have an installation image that comes with a cow-store that has nonguix in it?
Anonymous No.106482984 >>106483187
>>106482176
>guide
https://systemcrafters.net/craft-your-system-with-guix/
https://wiki.systemcrafters.net/guix/nonguix-installation-guide/
>guix installation image
There's this LiveCD (Guix + Nonguix) made by a Guix developer:
https://files.boiledscript.com/livecd/
https://codeberg.org/hako/Testament#headline-7
Or PantherX:
https://www.pantherx.org
Anonymous No.106483187 >>106483616 >>106486114
>>106482984
Thanks for links but that is not my question.
I know how to create a nonguix installation image myself from an already running Guix system and use that to set up a system. And the System Crafters guide to set up a system also depends on a prepared nonguix image.
I do have a running system with nonguix.

My question is specifically whether I can boot an official upstream image without nonguix and during the install make it use the nonguix channel for installation, without downloading a prepared image or preparing one myself beforehand.
As I am running into the mentioned problem trying that.
Anonymous No.106483351 >>106485603
are there any markup languages that wouldn't be better served by being LISPs?
Anonymous No.106483552 >>106485191
ryo-modal or meow if I want to make custom modal keybindings I want a normal mode with hjkl and switch to insert mode and i'll figure out what other keybinds are important later I guess
Anonymous No.106483616 >>106483674
>>106483187
>boot an official upstream image without nonguix and during the install make it use the nonguix channel for installation, without downloading a prepared image
Yeah, if your PC can boot with the upstream image, you just need to add the nonguix channel to ~/.config/guix/channels.scm and run guix pull. But, I think the upstream guix image uses tmpfs as /, so you'll need a considerable amount of RAM (>8 GB) to do this successfully.
Anonymous No.106483674
>>106483616
> tmpfs
> ram
Aah I see haven't thought of that.
Is it possible to just specify another temporary storage for guix pull to use as a buffer or something? Like an external disk for example?
> more than 8 gigs
Guess the requirement goes up more when it clogs up tmpfs ram and in addition tries to compile the linux kernel

Anyway thanks friend, that already helped.
Anonymous No.106485191
>>106483552
https://github.com/meow-edit/meow/blob/master/EXPLANATION.org#ryo-modal
Anonymous No.106485490
TIL how to make eshell batch scripts executable from outside of emacs.
#!/usr/bin/env -S emacs --batch -f eshell-batch-file

(defun hello (name)
(format "Hello, %s!" name)) > /dev/null

(hello "anon")
;; (hello $1)
echo $1

However, there are a few things I don't know how to do.
- How do I get access to $1 and other eshell variables while inside a elisp expression? (I can say `echo $1` but not `(hello $1)`.)
- What major mode should I be in while editing eshell scripts?

https://www.gnu.org/software/emacs/manual/html_node/eshell/Scripts.html (Docs)
;; If gnu.org is unresponsive, read the info manual instead.
(info "(eshell) Scripts")
Anonymous No.106485579 >>106485753 >>106489117
TIL how to make eshell batch scripts executable from outside of Emacs.
#!/usr/bin/env -S emacs --batch -f eshell-batch-file

(defun hello (name)
(format "Hello, %s!" name)) > /dev/null

setq person $1 > /dev/null
(hello (if person person "World"))

Here's how it looks when I run it from outside of Emacs.
/tmp> ./greet.eshell
Hello, World!
/tmp> ./greet.eshell anon
Hello, anon!

Questions:
- What major mode should I be in while editing eshell scripts?
- Is there a designated file extension for eshell scripts? (I'm using .eshell for now.)

https://www.gnu.org/software/emacs/manual/html_node/eshell/Scripts.html
;; If gnu.org is unresponsive, read the info manual instead.
(info "(eshell) Scripts")
Anonymous No.106485603
>>106483351
HTML as sexps might have been interesting, but people might get annoyed when dealing with large strings of prose that needed to be escaped inside double quotes.
Anonymous No.106485753 >>106485811
>>106485579
eshell scripts are sexy. imagine all the geeky powerful shit you can do with them. +1 hacker cred

> Is there a designated file extension for eshell scripts? (I'm using .eshell for now.)
I think I saw .esh being suggested somewhere.
Anonymous No.106485811 >>106485843
>>106485753
>I think I saw .esh being suggested somewhere.
Emacs recognizes it and puts me in emacs-lisp-mode. It's not in auto-mode-alist, so it must be looking at the content of the file to figure this out. However, eshell is an unholy mixture of sexps and shell-like expressions, so it's not quite right. For example, it doesn't recognize "#" as a comment.

Should I just write pure elisp scripts instead?
Anonymous No.106485843 >>106485853
>>106485811
>Should I just write pure elisp scripts instead?
nah.. imo eshell scripts are fascinating. you can always write your elisp inside emacs.
Anonymous No.106485853 >>106485877
>>106485843
I just remembered that eshell lets you omit the outermost parens, so the last line can be written as:
hello (if person person "World")
Anonymous No.106485877
>>106485853
weird as fuck. imagine the confusion of the posix shell plebs when they see this
Anonymous No.106486114 >>106486166
>>106483187
If you read it you would know you can customized the install script before install.
Anonymous No.106486166
>>106486114
What do you mean?
Anonymous No.106486568 >>106486977 >>106488647 >>106495444 >>106498194
(defvar example
`((,(rx "example") . ,(lambda (line) line))
(,(rx line-start "foo") . ,(lambda (line) line)))
"Is there a better way to write an alist where
the keys are regexps and
the values are lambdas?
This works, but I feel like I'm using the comma a lot.")


Is there a better way to write an alist where
the keys are regexps and
the values are lambdas?
This works, but I feel like I'm using the comma a lot.
Anonymous No.106486977 >>106494716
>>106486568
(mapcar (lambda (c) (cons (eval (car c)) (eval (cdr c))))
'(((rx "example") . (lambda (line) line))
((rx line-start "foo") . (lambda (line) line))))
Anonymous No.106487001 >>106496896
Is there any way to get a better debugging experience with Sly? I know I can add break calls, but that doesn't allow me to see returned values from previous statements or inspect all of the local values right in the code buffer.
Anonymous No.106488582 >>106497419
at this rate I'll need to write a sign saying I'll program Common Lisp for food
Anonymous No.106488647 >>106494716
>>106486568
(define (alist . lst)
(unless (= 0 (remainder (length lst) 2))
(error "odd size list provided to alist"))
(unfold
null?
(lambda (rest)
(cons (car rest) (cadr rest)))
cddr
lst))

(define example
(alist
(rx "example") (lambda (line) line)
(rx line-start "foo") (lambda (line) line))

this is cheme id ont know how to wtite cl
Anonymous No.106488983
>>106419122
this is fucking based. thanks.
Anonymous No.106489117 >>106489885 >>106494567
>>106485579
Who is DDoSing gnu.org and why?
Anonymous No.106489885 >>106490817
>>106489117
probably cloudflare since they weren't using their services
Anonymous No.106490817
>>106489885
lol fuck this is a conspiracy theory I can get behind
Anonymous No.106491921 >>106492712
I cannot seem to enable minor-modes via setopt or setq-default. For example abbrev-mode. It does work via custom-set-variables though. Does anyone here have an idea why?
Anonymous No.106492712 >>106492765
>>106491921
Isn't the normal way to enable a mode to call it like a function?
Anonymous No.106492765
>>106492712
I'd have to call it in a hook because it's a non-global minor-mode. You can enable it via customize and it just magically works, and I do not understand why it does not work via setopt
Anonymous No.106493073
How the hell do I magit-bisect properly? It asks for good and bad revision but I only get branches listed, not commits. I want to select by sha
Anonymous No.106494567
>>106489117
>>106473009
Anonymous No.106494716 >>106495192
>>106486977
I can use this one. Thanks.

>>106488647
This is my first time seeing unfold in any language. I'll have to look into it.
Anonymous No.106495192 >>106496464 >>106497948
>>106494716
>I can use this one. Thanks.

That one is terrible. The lambdas wont be byte compiled (and therefore also wont be native compiled). Just using backquote is the best way to do it. If it is really offensive to you you could do something like

(cl-macrolet ((make-alist (&rest pairs)
(cl-loop for (a b) on pairs by #'cddr
collect `(cons ,a ,b) into form
finally return (cons 'list form))))
(make-alist
(rx "example") (lambda (line) line)
(rx line-start "foo") (lambda (line) line)))
Anonymous No.106495444 >>106495799
>>106486568
(defmacro rlist (&rest rows)
`',(cl-loop
for (re . fn) in rows
collect (cons
(rx-to-string re)
`(lambda (line) ,fn))))

(rlist
("a" . line)
("b" . line))

(("a" . (lambda (line) line))
("b" . (lambda (line) line)))
not sure how to splice in re with ,@ correctly
Anonymous No.106495799 >>106495898
>>106495444
This also prevents the lambdas from being byte compiled.
Anonymous No.106495898 >>106496222
>>106495799
which level of quasiquote/unquote to use can be confusing
Anonymous No.106496222
>>106495898
The lambda forms can't be quoted in the macroexpanded form. Which means the macro has to expand into something that looks like:

(list (cons (rx form) (lambda () form))
(cons (rx form) (lambda () form))
...)
Anonymous No.106496464
>>106495192
It's not that offensive. I just wanted to check to see if I was missing something obvious.
Anonymous No.106496896
>>106487001
Bump
Anonymous No.106497035 >>106497157 >>106499635
Who came up with the rx macro for Elisp? The API design is brilliant. I really like how rx-define and rx-let can be used to make regexps more reusable and composable.
Anonymous No.106497157
>>106497035
Looks like it was originally written by Gerd Moellmann. He is currently involved in the new generational garbage collector and terminal child frames (that I know of).
Anonymous No.106497419
>>106488582
I'll feed you in exchange for writing Common Lisp
Anonymous No.106497948
>>106495192
>The lambdas wont be byte compiled
(lambda (c) (cons (eval (car c)) (byte-compile (cdr c))))
Anonymous No.106498194 >>106498643
>>106486568
this makes me wonder how many other anons are writing softcore telemetry software in lisp
what kind of behemoth could we make if we all pooled together?
Anonymous No.106498308 >>106498316 >>106498586
>Developing a Space Flight Simulator in Clojure
https://www.wedesoft.de/software/2025/09/05/clojure-game/
https://store.steampowered.com/app/3687560/sfsim/
https://github.com/wedesoft/sfsim
Anonymous No.106498316
>>106498308
From: https://news.ycombinator.com/item?id=45145794
Anonymous No.106498586
>>106498308
Impressive, very naisu! ( ̄▽ ̄)b
Anonymous No.106498643
>>106498194
Why does that pattern make you think he's writing telemetry software?
Anonymous No.106499635 >>106499733
>>106497035
>rx macro for Elisp?
Where do I begin?
Anonymous No.106499733
>>106499635
C-h f rx

It has a detailed and well-organized docstring. Try doing simple things in the REPL, too. It'll help you get a feel for it.

ELISP> (setq p (rx "#" (group (= 2 hex)) (group (= 2 hex)) (group (= 2 hex))))
"#\\([[:xdigit:]]\\{2\\}\\)\\([[:xdigit:]]\\{2\\}\\)\\([[:xdigit:]]\\{2\\}\\)"

ELISP> (setq s "#655A7C")
"#655A7C"

ELISP> (string-match p s)
0
(#o0, #x0, ?\C-@)
ELISP> (match-string 1 s)
"65"

ELISP> (match-string 2 s)
"5A"

ELISP> (match-string 3 s)
"7C"