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

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: 1763968550850276.jpg (82 KB, 750x1000)
82 KB
82 KB JPG
>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

>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

previous: >>107691743
>>
>>107778024
why do weebs always find japanese version of everything?
it looks so dumb
>>
File: 1749589663845614.jpg (52 KB, 640x638)
52 KB
52 KB JPG
Clojure, my beloved
>>
>>107778128

there is a reason why the japanese put effort and attention into the translation of specific western books. That is what is being observed.
>>
Discussions of tail call optimization on emacs-devel
https://lists.gnu.org/archive/html/emacs-devel/2026-01/msg00006.html
https://lists.gnu.org/archive/html/emacs-devel/2026-01/msg00121.html
Sounds like TCO is unlikely to get implemented
>>
I moved from claws-mail to notmuch
Thank you emacs GODS
>>
>>107780183
>notmuch
I hate that you cannot move your email to different folders, to different local folders using notmuch.el

Can you move your emails, using notmuch, to a local archive folder, for example?
>>
>>107779119
I don't see the point of these discussions. Tail calls aren't guaranteed to be eliminated in common Lisp but they frequently are anyway. So realistically it's just not a big deal.
>>
>>107780320
You can save searches. That should be enough.
You can tag them instead of putting them in folders.
>>
>>107780854
How do you move deleted emails to IMAP Trash/ folder?
>>
>>107781127
IDK I don't touch the master inbox
>>
>>107781259
How do you move your emails from your imap server to a local archive folder for long term archival storage?
>>
>>107781269
my IMAP mail fetcher has express instructions to not mess with the master inbox. Yes I should use POP but eh whatever
>>
>>107781290
>>107781259
>>107780320
>>107780183
I've been thinking about having email on emacs. Is it possible to set content filters? like performing an action when the contents of an email contains a certain term/subject/sender?
>>
>>107780519
Traditional Chinese? Yes. Simplified Chinese? It looks tacky and cheap.
>>
>>107781390
>t. retard
>>
>>107781367
Yes. Depends on the program you're using, though (notmuch/gnus/mu4e/etc). You can always just write a hook for whatever mail-viewing function your package uses that does the thing that you want.
>>
>>107781290
there's a tool called afew. Have anyone tried it to do simple mail file move operations across Maildir/?

https://packages.debian.org/trixie/afew

Also, I seeing that notmuch supports NNTP spool: https://notmuchmail.org/software/ -- you can pull your newsgroup messages to a local directory, and use notmuch to read it.

Notmuch.el being a better replacement for the old, slow, and arcane gnus (shit)?
>>
>>107781570
Sorry, haven't used that. If you want naive file move by for/to/keywords, you can use the notmuch cli to get the matching file paths and then mv the files to a dir.
The notmuch cli probably supports tagging too.
Didn't know about NNTP, thanks!
>>
>>107782067
>Didn't know about NNTP, thanks!
let me know how it works if you try it. I generally lurk in these threads, so I will probably catch you if you report back over the next 2 weeks.
>>
Since last November, I've migrated my entire workflow to Emacs and things are working extremely well. Besides programming (which isn't my main job), I use it to manage two different knowledge systems using org-publish with a custom publish.el file, client invoices using a small custom management system I've built in Org and, lately, even my agenda using org-agenda (which is seamlessly synchronized to my iOS calendar using beorg).

Coming from vim, I must say that Emacs is incredibly powerful and much easier to set up and learn compared to the entire vim ecosystem.

I just wish I had discovered it sooner.
>>
>>107782458
>I just wish I had discovered it sooner.
Don't worry I'm pretty sure the feeling remains no matter when you start, or at least it changes from "I wish I started using Emacs sooner" to "I wish I discovered this niche functionality that's specifically tailored to my needs sooner".

I wish my job wasn't programming so I could automate it in Emacs, I tried getting my wife to automate parts of hers into org-mode, but she didn't even know the shift key, let alone use Emacs bindings.
>>
Looking into vui.el
>https://github.com/d12frosted/vui.el
>Build reactive UIs in Emacs using familiar patterns from React and other modern UI frameworks

I've got a nagging suspicion that this could be used alongside taxy.el to make some really cool shit, I just don't know what yet.
>https://github.com/alphapapa/taxy.el
>>
>>107782818
>>https://github.com/d12frosted/vui.el
Is this really required? Doesn't Hyperbole solve 90% of use cases?
>>
>>107777140
because capturing user scope by default aligns with my usage of macros
>>
>>107782923
>Hyperbole
Another thing I've been wanting to learn, whats the rundown on Hyperbole? To me it feels like gnus, possibly great but too difficult to grasp.
>>
Did anyone ever learn Gnus for email
>>
>>107783197
it essentially turns things in your buffer into "buttons" or hyperlinks regardless of major mode, for example a path like ~/.emacs.d/init.el:5 is an implicit button that will take you to the 5th line of your init file when you press the action key (M-RET or S-<mouse-2>). but it does so much more. i've been using hyperbole for a few months and i've probably only used like 10% of its features. it's like a little emacs inside of emacs
>>
>>107782637
>I wish my job wasn't programming so I could automate it in Emacs
It's not just about what you do but rather who you are working for. In my case, I work by myself so I can manage my workflow however I want. The only obligation I have is towards my country's revenue service but besides that, I have complete freedom. But if I were an employee, I doubt they would permit me to use anything else besides VisualStudio/Outlook/Excel.
>>
>>107783842
>Gnus for email
Gnus is too arcane at this point. It has lots of "gotchas" and is capricious. You gotta spend lots of lines of elisp to make it work as you expect it to.

I am eyeing the possibilty of turning notmuch into my "gnus".
>>107781570 .
>>
>>107767581
check out flowstorm so you can hate all other debuggers, too
https://www.flow-storm.org/
>>
I'm having trouble with python, eglot, pylsp and mypy. Mypy always breaks at the first line of every file:
    1   0 error    e-f-b    mypy: usage: mypy [-h] [-v] [-V] [more options; see below]


I'm using pet-mode, but that seems unrelated.
>>
>>107787438
Pylsp and the other linters work alright.
>>
Tried vc-dir, thinking it'll be like magit just with less functions.

It is horrible. Using raw git commands in fish is much nicer and less likely to result in undesired consequences.
>>
How do people manage their tabs in emacs?
Are tabs even a good way to keep track of buffers?
When I'm working on a project where I need to have a bunch of files open I just make a tab for each file buffer
>>
>>107788707
There is tab-line for just-buffers as well, tab-bar is more if you want to keep window configuration as well
>>
>>107788822
This is great, thanks, I didn't know about it. I was looking for an easy way to group tabs and this works out
>>
External GPUs for Linux-libre on Guix so I don't have to compile mainline from Nonguix?
>>
Frieren would have told Fern to just learn Lisp.
You know it works.
>>
>>107789669
>compile
doesn't nonguix have substitutes?
>>
>>107789752
Yes, for some packages but not for the Linux kernel.
>>
File: 1738656143359166.jpg (33 KB, 500x500)
33 KB
33 KB JPG
>>107786228
very interesting.
I like how it is editor agnostic.
will check out soon
>>
a Clojure function I wrote because I often want to do something different to the final element of a lazy sequence
(defn
map-differentiating-last
[f last-f s]
(let
[sigil
(Object.)]
(->>
(concat
s
[sigil])
(partition 2 1)
(map
(fn
[[a b]]
(if
(identical? sigil b)
(last-f a)
(f a)))))))
>>
emac lip
>>
https://sachachua.com/blog/2026/01/2026-01-05-emacs-news/
>>
>>107778024
well, reposting
>>107793957
anyone got emacs working in wayland without switching to emacs-pgtk? last time I used it, the popups for completion where malfunctioning. Deciding if it is worth switching to it(wayland & emacs-pgtk) or not. I am on x11 right now
>>
>>107790189
Are you working with 40 col width or something? why make this shit so thin.
>>
Eglot takes a billion years (like minutes) to open a empty python file on one computer, works fine on the other with the same os and init.el
I hate lsps so much bros

How do I even debug this?
>>
>>107794465
I have a very strict style guide that I impose on myself. it makes moving code around trivial.
I refuse to perform alignment of arguments, because of my preference for longer names.
>>
>>107790189
>>107795616
looks really weird, especially the defun and the if, but hey at least you're consistent
>>
>>107794807
take the lsp-mode pill
>>
>>107794807
eglot is honestly the worst solution for lsps ive used across any editor
just use lsp-mode instead
>>
>>107798677
>>107796892
it sucks so much bros.
>>
>>107799849
>have to M-x eglot-reconnect deveral times so it can talk to mypy
like an old mower
>>
>finally get interview
>get asked fluff question: what language do you like the most
>know I should say C++ or Python
>fuck it, i'm already blackpilled, just go for honesty and say Lisp
>interviewer (old white guy) is actually an ancient SICPbro, fully Emacspilled too
>completely changes questions and starts asking me about Lisp dialects instead
feels good man
>>
>>107800166
You should never say c++ or python anyways, being interested in some out-of-the-way niche will look better to most interviewers if they're technical. Not only is it less interesting since it's what everyone is gonna answer, but it shows you care about the craft/profession outside of getting a job.
>t. conducts interviews
>>
Not disagreeing with this post but I can definitely confirm some places actually have openly said they dinged me for not answering Python or Java
you can say those places are likely to be shithouse and I agree, but I can see why some people also feel like there's an economic pressure to make yourself look like another sloplang drone
>>
>>107800166
did you get the j*b?
>>
I can't code without copilot nowdays, how do I do this in Emacs?
>>
>>107800181
Thanks, I'll try doing it more if I'm asked then
>>107800793
I dunno but I made the guy smile at least, so it's all good
>>
>>107796034
clojure people—who’s major accomplishment was to inconsistently and randomly use square brackets because they were unwilling or unable to follow or use established lisp syntax—should not worry you. As further proof, I think they’re also Java/JVM zealots.
Since they missed the whole point of lisp, they should probably just get their name de-listed from the lisp languages list.
>>
>>107800166
> what language do you like the most
The correct answer is “for what?”
For productivity, probably Raku. For speed, machine language. For databases, SQL, for working with ancient shit written in COBOL then COBOL, if you’re outputting shit on a laser printer, then postscript.
(showpage)
>>
File: 1734144366708231.jpg (43 KB, 750x583)
43 KB
43 KB JPG
>noooooo you can't just use the extra wrapping characters on ASCII keyboards
btw I cannot figure out how to get this macro working
(defmacro
verify
[form]
`(when-not
~form
(throw
(ex-info
~@(let
[known-symbol-to-value#
(volatile! {})]
(c.walk/postwalk
#(do
(println "LOL" %)
(when
(and
(symbol? %)
(contains? &env %)
(not
(contains? @known-symbol-to-value# %)))
(vswap! known-symbol-to-value# assoc % %))
%)
form)
[(pr-str form)
@known-symbol-to-value#])))))
>>
>>107801399
woops meant to reply to
>>107801290
fuckin' fag boy
>>
>>107801399
when people say lisp is unreadable i'm guessing this is what they envision
>>
>>107794396
> wayland without switching to emacs-pgtk?
What is XWayland?
… it just works.
What toolkit did you compile emacs with?
>>
>>107801412
> lisp
That’s not lisp. We’re not sure exactly what it is though. The only thing we do know is that it can be safely ignored.
>>
>>107801447
>What toolkit did you compile emacs with?
lucid is the most based
>>
>>107801098
gptel/gptel-agent or agent-shell. If you mean code completion, I don't really know.
>>
>>107801447
okay I will try with xwayland
>What toolkit did you compile emacs with?
M-x emacs-version
GNU Emacs 30.2 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.4, Xaw3d scroll bars)

X toolkit ig
>>
>>107801399
got it working
because who wants to write error messages anyway?
(defmacro
verify
[form]
`(when-not
~form
(throw
(ex-info
~@(let
[known-symbol-to-value#
(volatile! {})]
(c.walk/postwalk
#(do
(when
(and
(symbol? %)
(contains? &env %)
(not
(contains? @known-symbol-to-value# %)))
(vswap!
known-symbol-to-value#
assoc
`(quote ~%)
%))
%)
form)
[(pr-str form)
@known-symbol-to-value#])))))
>>
>>107800166
congrats anon, you won.
>>
>>107790189
Here's my take on it:
(defn map-differentiating-last
[f last-f s]
(->> s
(partitionv-all 2 1)
(map (fn [part]
(let [x (part 0)]
(if (= 2 (count part))
(f x)
(last-f x)))))))

(map-differentiating-last
(fn double [x] (* 2 x))
(fn triple [x] (* 3 x))
[1 2 3 4 5])

;; => (2 4 6 8 15)
>>
>>107803524
actually, the threading macro feels like overkill when it's just two calls:
(defn map-differentiating-last
[f last-f s]
(map (fn [part]
(let [x (part 0)]
(if (= 2 (count part))
(f x)
(last-f x))))
(partitionv-all 2 1 s)))
>>
>>107803544
one more nitpick, using case makes it clear what the anon function expects `part` to be:
(defn map-differentiating-last
[f last-f s]
(map (fn [part]
(let [x (part 0)]
(case (count part)
2 (f x)
1 (last-f x))))
(partitionv-all 2 1 s)))

;; some edge cases:

(map-differentiating-last
(fn double [x] (* 2 x))
(fn triple [x] (* 3 x))
[])
;; => ()

(map-differentiating-last
(fn double [x] (* 2 x))
(fn triple [x] (* 3 x))
[100])
;; => (300)
>>
>>107803668
>>107790189
you could also make the function return a transducer, if you steal the ~sliding~ function from https://bsless.github.io/fast-and-elegant-clojure/
>>
>>107803524
>>107803544
very cool, I did not know of `partitionv`.
>>107803668
I think the edge cases are perfectly sensible. there is nothing to do with an empty sequence and a sequence of length 1 still has a "last" element.
I also wrote
(defn
map-with-terminus
[f terminus-f s]
(let
[sigil
(Object.)]
(->>
(concat
s
[sigil])
(map
#(if
(identical? sigil %)
(terminus-f)
(f %))))))

in order to do things like "update the state of an asymmetric signer using the sequence's elements during a map and then finish the sequence with the generated signature"
>>
>>107805890
that sounds more like a use case for transduce
>>
>>107805342
>>107805992
interesting, I need to learn about transducers.
Clojure has so many tools bros
>>
sexmacs
>>
>>107778894
because japs are westaboo
okay, next question
>>
>>107778024
Oh my Dawkins, is that book in heckin Nihongo?
>>
>>107801894
I added some test helpers
(defn
is-thrown-ex-info-of-form
[form f]
(try
(f)
(c.test/is false "`f` did not throw.")
(catch
ExceptionInfo
e
(c.test/is
(=
(pr-str form)
(ex-message e))))))

(defn
is-thrown-ex-info-of-form-with-data
[form data f]
(try
(f)
(c.test/is false "`f` did not throw.")
(catch
ExceptionInfo
e
(c.test/is
(=
(pr-str form)
(ex-message e)))
(c.test/is
(=
(ex-data e)
data)))))

so that tests are easy
(c.test/deftest
test-new-spec
(c.me.t-helpers/is-thrown-ex-info-of-form
'(>= x 2)
#(c.me.bxty-encoding/new-spec 1 1))
(c.me.t-helpers/is-thrown-ex-info-of-form-with-data
'(>= y 2)
{'y 1}
#(c.me.bxty-encoding/new-spec 2 1)))



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.