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


Janitor application acceptance emails are being sent out. Please remember to check your spam box!


[Advertise on 4chan]


File: 1762909652147934.png (1.44 MB, 1125x1125)
1.44 MB
1.44 MB PNG
>Lisp is a family of programming languages with a long history and a distinctive parenthesized prefix notation. There are many dialects of Lisp, including Common Lisp, Scheme, Clojure and Elisp.

>Emacs is an extensible, customizable, self-documenting free/libre text editor and computing environment, with a Lisp interpreter at its core.

>Emacs Resources
https://gnu.org/s/emacs
https://github.com/emacs-tw/awesome-emacs
https://github.com/systemcrafters/crafted-emacs

>Learning Emacs
C-h t (Interactive Tutorial)
https://emacs-config-generator.fly.dev
https://systemcrafters.net/emacs-from-scratch
http://xahlee.info/emacs
https://emacs.tv

>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

previous: >>107162119
>>
File: 1731989351280114.gif (2.83 MB, 640x360)
2.83 MB
2.83 MB GIF
god damn it, I forgot the title
REEEEEEEEEEEEEEEEEEEEEEEEEE
fuck you 4chan thread form that is completely dogshit and forces a complete restart upon making a mistake
>>
>>107244239
>Chat, what do we think about org-social?
>https://org-social.org/

One nice thing about org-social is that org-mode is its native format. In 4g.el, HTML has to be converted to org syntax. The way 4g--orgify-com works is very cool, but not having to do a conversion at all is nice.


(defun 4g--orgify-com (com)
"Convert board-style HTML comment COM into Org markup."
(unless (and com (stringp com))
(signal 'wrong-type-argument (list 'stringp com)))
;; --- order matters! ---
(thread-first com
(4g--replace-regexes
(map-pairs
(list
4g--rx-code "\n#+begin_src elisp<br>\\1<br>#+end_src\n"
4g--rx-quotelink-crossthread "[[elisp:(4g-thread \"\\1\" \\2)][>>\\3 (thread \\2)]]"
4g--rx-quotelink-inpage "[[\\1][>>\\1]]"
4g--rx-greentext "=\\1=")))
(4g--replace-literals 4g--simple-tags)
(4g--replace-literals 4g--html-linebreaks)
(4g--replace-literals 4g--html-literals)))
>>
>>107250617
hey stop looking inside my butthole.
>>
>>107250794
>parsing html with regex
do not do this. use libxml-parse-html-region to generate the dom tree and walk that instead. it is significantly faster and will not break the moment moot's ghost decides to change a span to a div.
also using = for greentext renders it as code/verbatim, which looks like shit for quoted text. just use an actual quote block.
>>
>>107250794
>>107251079
Agreed, you can lookup the way shr.el does it (the eww html parsing backend).

> This package takes a HTML parse tree (as provided by
> libxml-parse-html-region) and renders it in the current buffer. It
> does not do CSS, JavaScript or anything advanced: It's geared
> towards rendering typical short snippets of HTML, like what you'd
> find in HTML email and the like.


https://github.com/emacs-mirror/emacs/blob/master/lisp/net/shr.el
>>
>>107251196
>>107250794
Forgot to mention, another package that does html parsing to org-mode really well is:

https://github.com/alphapapa/org-web-tools

check ~org-web-tools--url-as-readable-org~.
>>
>>107250617
sauce for the pic rel?
>>
File: 1737493029648991.png (1.7 MB, 1024x1024)
1.7 MB
1.7 MB PNG
>>107251425
no clue
>>
M-x rape-mode
>>
M-x bubbles
>>
qutebrowser's avy-like link jump points are better than nyxt's

you usually only need 2 keys and links in the middle of the screen are easiest to type and usually only need 1 key
>>
Is there a GUIX way to manage flatpaks?
>>
>>107244788
>C-x C-j
damn i've been using dired for a few years and i had no idea this existed
>>
Does anyone here know what happened to SchemeBBS aka textboard dot org?
>>
File: 1758653709174228.jpg (47 KB, 460x522)
47 KB
47 KB JPG
>>107254018
The admin closed it down, but left up some archives
https://web.archive.org/web/20250121130109/https://textboard.org/
>>
>>107251564
>not the minor mode
>>
EYE OF THE ANUS
>>
TIL Emacs has its own AI text generator:
C-x 8 _ m
>>
>>107253415
I use C-x C-j a lot.
>>
File: kys.png (276 KB, 1735x1459)
276 KB
276 KB PNG
To whomever this was: go fuck yourself
>>
>>107250794
>https://org-social.org
Interesting
>>
>>107258774
>>https://org-social.org
can it be made peer to peer with hyperdrive.el, or can it be hosted on tor onion hidden servers? How about Monero (XMR) tipping features on org-social?
>>
what an ugly fucking language
>>
>>107258910
pee pee your poo poo
>>
>>107258910
If only I could reach you.
Whoever has the eyes, let him see.
>>
>>107250617
How come there are so many Gnostic-themed posts on the Lisp general?
>>
>>107259951
schizo bot
>>
>>107259951
Lisp has always been occult/spiritual by affiliation.
>>
>>107260409
how do I use org-roam? For me it is very underwhelming.
>>
>>107260492
I just use it for interlinked notetaking, personal wiki, knowledge base, etc.. It plays nicely with and complements org mode, org agenda, etc.
>>
>>107260527
yeah how I do that
>>
>>107259951
The demiurge may have hacked together the universe in Perl, but the language of the Pleroma is Lisp.
>>
File: 1739681940413595.jpg (66 KB, 512x512)
66 KB
66 KB JPG
Where can I find elisp jobs?
>>
>>107260635
German aerospace industry
>>
>>107260306
>>107260409
>>107260557
Based
>>107259960
Not based
>>
>>107260885
>>107260635
>>
>>107254557
Sad. It was a good website
>>
richard stallman pls give me the strength to read the manual non-stop all day so I can make my common lisp game, all hail gnu.
>>
>>107258910
I see window I want to paint it black.
>>
>>107251529
dolphins are known to be at least somewhat in touch with higher dimensions but this looks more like a seal which dont have anything special about them
>>
>>107262532
I thought it was a snake
>>
I bought a refurbished mac because it was a great deal but now I'm struggling to find a use for it. Maybe I can turn it into a comfy programming machine? How usable is emacs on macos? On Windows it made me want to kill myself.
>>
>>107260306
How come? When I learned common lisp for the first time I had a lot of dreams about how lisp somehow mimicked some essential structure of reality and taught my brain how to think in ways that made me more in touch with that, but I thought they were just dreams.
What are the spiritual "affiliations" to lisp?
>>
File: 1741306725851996.png (453 KB, 436x442)
453 KB
453 KB PNG
>>107259951
This thread has been infiltrated by heretics. We need to pull an Albigensian Crusade to save Emacsendom.
>>
First time requesting adding a package to melpa. Was 10 times easier than I ever thought, why was I postponing it so fukcing much.
>>
File: file.png (223 KB, 1410x1510)
223 KB
223 KB PNG
Noob here. Am I doing this right?
Should lines be that long? I think I read someone else mention that these lines should be formatted as paragraphs or something, not sure. I'm not really a writer. Is this the correct use of quotes? Is it correct to use italics inside the quote?
>>
>>107264178
You can use M-x fill-paragraph to split a line into multiple lines of a given lenght you can set the char lenght by setting the fill-column var, the default is 80 I believe.

(setq fill-column 70)


>am i doing this right?
Depens on the person, some like hardcoding line breaks, others just wrap lines.

If you dont want to use fill paragraph you can use olivetti (https://github.com/rnkn/olivetti) to center the buffer text and control the width of it without having to open other windows and move them around to control the width of your buffer.
>>
>>107264281
>olivetti
Oh this is great. Thank you!
>>
File: 1748563006869068.png (21 KB, 607x537)
21 KB
21 KB PNG
>>107264178
>Should lines be that long?
you should turn on auto-fill-mode
>Is it correct to use italics inside the quote?
that's fine if it's an inline quote, but since the quote is its own block it shouldn't be italicized imo. personally i set it to a different font, picrel
>>
>>107264508
Solid. Thanks.
>>
>>107259951
Does Lisp make schizos or does it attract them?
I can testify to the latter because I was already an /x/tard. I was drawn to computer science when I went beyond "mind/soul affects/is reality" to realizing the action of mind is computation. Idealists tend towards abstract, high level programming languages and Lisp is the one of the highest and abstract.
>>
>>107263894
there's Aquamacs. A lot of Clojure programmers use it.
>>
>>107259951
It’s closely related to the insight which gives spiritual awakening. Using lisp enough it will click that all syntax is arbitrary, you no longer think in terms of specific languages and cling to them like a life raft, you just fashion what is needed directly from the void yourself.
>>
>>107265145
I was a /g/ guy first and later got into New thought (Mostly Neville at first), Astral projections, Hermetics, Free masonry (although that's not really as /x/ as the other things) and other things.
I knew a bit about this stuff when I originally got into lisp.
So in my case I guess it was a natural thing.
Do you think that there might be the highest intersection of /x/ users in lisp compared to other langs?
>>
>>107260557
Few get this
>>
>>107264178
>Should lines be that long?
In the past, I used to manually wrap lines, but these days, I just use olivetti-mode and let the lines flow long. The benefit of letting it flow long is that the text will look good at any window width whether it be narrow or wide. If you manually wrap, it'll start looking bad when the window width becomes narrower than the wrap width.
>>
>>107258910
>what an ugly fucking language
But enough about Rust
>>
(Experimenting to see how this looks in 4g org reader vs the web.)

- scr :: SCreen Record
- Select a portion of the screen and start a screen recording.
- C-c to stop recording.

#+begin_src bash :tangle ~/.local/bin/scr
#!/bin/bash
slop=$(slop -f "%x %y %w %h %g %i") || exit 1
read -r X Y W H G ID <<< $slop
ffmpeg -f x11grab -s "$W"x"$H" -i :0.0+$X,$Y $@
#+end_src

>Usage
scr foo.webm
# select region with mouse
# record
# C-c to stop
>>
File: file.png (63 KB, 717x583)
63 KB
63 KB PNG
>>107266209
I like being able to specify the language of code blocks.
>>
>>107264001
which package?
>>
>>107265310
>Do you think that there might be the highest intersection of /x/ users in lisp compared to other langs?
I would say so, if only because Lisp culture has a lot of religious/spiritual imagery (SICP, Knights of the Lambda Calculus, Church of Emacs, etc.) that anyone that was religious/spiritual would be drawn to it.
Do I think Lisp is THE /x/ language beyond the memes? Honestly, no. That title would probably go to APL, for multiple reasons. Each APL symbol maps to an entire concept, or two complementary concepts; they are basically sigils. While there is control flow, most of the time you don't need it. You don't iterate, functions just act on the entire (nth dimensional array) at the scalar, vector, matrix level, to the effect that functions are the intuitive transformations of data you would make in your head. Rotating matrices instead of APpLes.
It isn't commonly talked about that a lot of occult sigils are constructed from matrices, either by following numbers in order (e.g. Saturn's sigil, trace out the path from 1 to 9 on the magic square) or its showing displacements of number (e.g. Mercury's sigil.) Every secret name of a spirit is an array of numbers and the sigil of a spirit is often just tracing out those numbers on a (often unknown) matrix. If you wondered the difference between old sigils and the random scribble sigils of chaos magick its mostly that.
>>
>>107266537
https://github.com/gggion/ob-duckdb
>>
File: file.png (922 KB, 625x621)
922 KB
922 KB PNG
>>107266581
>>107265310
It's what recursion does to mf
>>
>>107263921
I had similar dreams the other night. God was showing me how s-expressions could be used to model the fundamental structures of the universe. (He also used hashmaps over structs for most things). This must be a common experience for writers of lisp.
>>
>>107266660
That's a really nice README.org. I didn't know you could do admonitions in org-mode. I thought you needed to use markdown for that.
https://github.com/orgs/community/discussions/16925
I looked to see how you did it.
#+begin_quote
[!IMPORTANT]
Version 2.0.0 Released!
#+end_quote

https://raw.githubusercontent.com/gggion/ob-duckdb/refs/heads/master/README.org
>>
>>107263921
>What are the spiritual "affiliations" to lisp?
half the people at MIT's AI lab were kabbalists or hermeticists of some kind.
Marvin Minsky was an advisor to Kubrick on the movie 2001: Space Oddyssey, the entirety of which is a kabbalistic metaphor, see:
https://odysee.com/@CJBbooks.com:8/Stanley-Kubrick2:f

The two wizards on the cover of SICP are Hermes Trismegistus and Ramon Llull. The book itself and the recorded lectures are full of references to Jewish esotericism.
>>
If I wanted to add images to my notes, should I just create a directory and sync the entire images directory?
>>
>>107266878
Yeah I went hard on the html blocks. Most org-mode packages use begin_example or verbatim to include the headers as source code, but leaves you no syntax highlight on the code inside, which ends up looking too flat in my opinion.

>admonitions
oh yeah I spent a lot of time testing the readme on a private repo to see how much I could get away with in an org file, you can check these for reference too:

https://github.com/novoid/github-orgmode-tests
https://github.com/lifeparticle/Markdown-Cheatsheet

You can even use latex to color text, which works directly on the org file too: https://github.com/orgs/community/discussions/31570

Also, If you want to highlight the admonitions on your org buffers you can use https://github.com/egregius313/gfm-alerts.el.
>>
>>107267091
Wow, thanks for the info. I learned a lot today.
>>
>>107266998
I do that, I added an images folder to my org root, added it to .gitignore and use syncthing to sync my entire org folder across devices.
>>
>>107267124
Thanks anon
>>
This is starting to look better.
>>
>>107266581
I want to like APL more than I do, but it lack a certain level of mathematical rigor and elegance of construction.
In other words it seems so arbitrary and complex in it's implementation compared to lisp and it's eval/apply being so simple you can hand code an interpreter as a school project and even an amatuer can reasonably read and understand it's source code.

Whereas with APL I have no idea how exactly it functions or why, and even decoding the meaning of certain statements has hidden complex syntax(right to left but also arrays transparently add together into vectors and operators consume functions, and variables are named left to right, and then there's magic numbers, and etc...)

Forth has a similar problem. It's seemingly simple "everything is just pushed onto a stack" but then certain things are automatically evaluated and executed and other things aren't, and there's a second hidden stack, and then there's heap memory somewhere else too...

I'd like it if someone combined them a little, took lisps elegant recursive definition and applied it to forth's far simpler step by step processing or APLs parallel matrix operations.
My one complaint about lisp is how verbose it is, a simple program often takes up an unpleasant amount of screen real estate, especially when you get into nested indentation.
>>
>>107267655
I have literally never had an issue with Lisp programs taking up too much space. They’re shorter than programs I write in any other language by far.
>>
>>107266581
APL is just a lisp DSL
>>
>>107268385
(with-input-from-file filename (lambda () (with-output-to-string (lambda () (display (u8->string (bytevector-get-all (current-input-port))))))
>>
>>107268604
I maintain what I said. I’ve never had these issues. Almost all the functions I write in any Lisp program are 10 lines or shorter. If you do this that frequently then just define some useful abstractions
>>
>>107268612
I'm just saying they're verbose compared to apl, everything is verbose compared to apl(it also gets kinda shitty once you introduce too many user definitions).
It's possible to cut back with macros and shit but then you inevitably trade lines for length and in the end it's the same amount of area.
I just want to fit the entire program on my screen, and usually all I can fit is a single function definition.
>>
Nobody but hobbists use lisp, why is that?
>>
>>107268867
it's like the bell curve meme, on the left are hobbyists not subject to commercial pressure, the midwits are the mass of developers in industry, the right are compiler engineers for niche hardware and new domains.
left and right use lisp, the middle uses rust, python, java or whatever bounded slop
>>
>>107268904
What is some lisp software except for emacs?
>>
>>107268920
hacker news
>>
>>107268920
there is none
>>
>>107268920
Autocad
Dax and Jakster
Checkpoint firewall1 rule stateful inspection rules
>>
>>107251425
pretty sure its from the law of attraction thread in /x/
>>
>>107267655
Conceptually APL is like “cisc” and lisp/forth are like risc… if they were processors.

APL is like that because if you shelled out for some vector processing cards, it just uses that instead of grinding away, iteratively, on each array element.

There’s no reason lisp can’t do that too, but traditionally, it didn’t although there was transputer-like lisp machine hardware that accelerated things, but not in the same directions as APL did.
>>
(defun i/set-frame-font (&optional font size)
"Set the FONT and SIZE for the current frame.
If C-u is given, change the font for all frames."
(interactive (list
(completing-read
"font: " (process-lines "fc-list" "--format=%{family[0]}\n"))
(completing-read
"size: " (mapcar (lambda (n) (format "%d" n)) (number-sequence 9 24 1)))))
(set-frame-font (concat font " " size)
nil
(pcase current-prefix-arg
(`nil nil) ; default: modify current frame only
(`(4) t)) ; C-u : all frames
))


I use this function as an alternative to `M-x menu-set-font`. It has an external dependency on fc-list, so it'll probably only work for the Linux and *BSD guys here. I was looking through a thread about fonts, and it came to mind.
>>107240339
>>
I've been re-reading about LAST/LDNA/LATS/SALT and comparing/contrasting it to Forsp and I really see some potential here.
It shows you can cleanly represent lisp/forth/lambda calculus as a turing machine composed of two stacks and a finite state machine, and alos kind of how that's already how they're implemented and it's just hidden in the program structure.

Like how the AST in lisp is actually in reality not a tree at all, but a stack, the environment is another stack, and eval/apply actually MUST be two separate functions because they implicitly manipulate the two stacks which are required for universal computation.

The main gain is that without using the implicit evaluation strategy of eval/apply and instead using explicit stacks, you can entirely avoid lazy/strict evaluation and can freely swap between them at will, effectively unifying functions and macros.

The only thing I still don't like is that, while there's great simplicity and purity here, the shape is extremely different from an actual computer, having no mechanism for addressing beyond linear variable lookup.
It would be interesting to take another step and transform the turing machine into a RAM machine to see if it's possible to mathematically derive an exact equivalent form of lambda calculus running on registers instead of lists.
>>
>>107266209
it's nice but the 4ch web version should at least have a
 block to be a good guest
>>
>>107269718
I think adding the code block around the org src block might mess things up on the 4g side.

#+begin_src elisp
(font-lock-add-keywords
nil
'(("^>.*$" . 'nerd-icons-green)))
#+end_src
>>
File: code-blocks.png (31 KB, 768x392)
31 KB
31 KB PNG
>>107269718
Here's how it ends up looking in 4g.
>>
>>107269681
Hey, that stuff is awesome, I suggest indeed making it into LATS cuz it has sane symbol set of LAST and the superior application order of LDNA.
But what's SALT?
>>107269799
Ah, it has broken syntax highlighting in web.
It's over if that can't be disabled.
>>
Is there a LISP variant that looks something like Python? I want to give it a try but I don't like how it looks
>>
File: file.png (87 KB, 821x734)
87 KB
87 KB PNG
>>107269832
>Ah, it has broken syntax highlighting in web.
The web side is supplemented with hljs on my side.
http://ggxx.sdf1.org/userscripts/hljs-on-g.user.js

>>107269850
>Is there a LISP variant that looks something like Python? I want to give it a try but I don't like how it looks
I wouldn't call this a lisp, but it's built on top of Racket.
https://rhombus-lang.org/
>>
>>107269718
>>107269799
>>107269824
> reading 4chan on an org document
Sounds cool, but is org mode document the correct thing for this? Isn't imageboard stuff more akin to newsgroups, so, wouldn't Gnus be better at this? nnfourchan backend for Gnus wen
>>
>>107269885
An nnfourchan backend for gnus would be cool, but I also like org-mode as a UI. I find it faster to navigate and manipulate.
>>
How will org tables look in web vs 4g?

| link | city | district | type | nearest | built | cost |
|---------+--------------+-----------------------+-----------------+---------+-------+---------|
| [[https://realestate.co.jp/en/rent/view/1202593][1202593]] | Mitaka-shi | Shimorenjaku | 1K Apartment | nil | 2007 | 205200 |
| [[https://realestate.co.jp/en/rent/view/1043309][1043309]] | Suginami-ku | Horinochi | 1SLDK Apartment | nil | 2022 | 222600 |
| [[https://realestate.co.jp/en/rent/view/1232639][1232639]] | Suginami-ku | Kugayama | 1R Apartment | 1 | 2000 | 106200 |
| [[https://realestate.co.jp/en/rent/view/1158074][1158074]] | Sumida-ku | Yahiro | 1K Apartment | 1 | 2024 | 129000 |
| [[https://realestate.co.jp/en/rent/view/916191][916191]] | Sumida-ku | Azumabashi | 1R Apartment | 1 | 2004 | 178500 |
>>
I like this peak autismo
>>
The problem with 4chan is that it's not org native like org-social.
>>
how's that codeberg repo coming along for the 4g.el anon?



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