[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 applications are now being accepted. Click here to apply.


[Advertise on 4chan]


File: (john-mccarthy).jpg (60 KB, 600x611)
60 KB
60 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://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

(setf *prev-bread* >>106509032)
>>
File: Ostrich.jpg (177 KB, 494x700)
177 KB
177 KB JPG
>>106588172
https://github.com/trevarj/nostr.el
>>
Anybody tried using org-social here?

>>106591928

https://github.com/tanrax/org-social-preview
>>
File: 旭日.jpg (256 KB, 1400x1435)
256 KB
256 KB JPG
deep learning
https://github.com/hikettei/caten
>>
>>106593523
I can't honestly see why I would. Anything that emulates social media irks me.
>>
>>106594644
but its in org mode tho
>>
File: lisplatte.jpg (446 KB, 1818x2048)
446 KB
446 KB JPG
>>106594260
very nice lisp project
>>
https://www.kyotoprize.org/en/laureates/john_mccarthy/
>>
>>106593472
(defclass generator ()
((val :initarg :val
:initform NIL
:accessor val)
(terminated? :initarg :terminated?
:initform NIL
:accessor terminated?)
(len :initarg :len
:initform 0
:accessor len)
(max-N :initarg :max-N
:initform NIL
:accessor max-N)))

(defclass random-walk (generator)
((volatility :initarg :volatility
:initform 0
:accessor volatility)
(min-val :initarg :min-val
:initform 0.0
:accessor min-val)
(max-val :initarg :max-val
:initform 1.0
:accessor max-val)
(drift :initarg :drift
:initform 0
:accessor drift)
(state :initarg :state
:initform (make-random-state t)
:accessor state)))

(defgeneric next (obj)
)

(defmethod next :before ((gen generator))
(when (and (max-n gen) (>= (len gen) (max-n gen)))
(setf (terminated? gen) T)))

(defmethod next :after ((gen generator))
(unless (terminated? gen)
(incf (len gen))))

(defmethod next ((gen random-walk))
(with-slots (len val terminated? volatility min-val max-val drift state) gen
;; r(n+1) = r(n) + drift + vol * N(0,1)
(unless terminated?
(when (null val)
(setf val (/ (- max-val min-val) 2)))
;; box-muller transform
(let* ((u1 (random 1.0 state))
(u2 (random 1.0 state))
(z0 (* (sqrt (* -2 (log u1))) (cos (* 2 pi u2))))
(change (+ drift (* volatility z0)))
(new-val (max min-val
(min max-val
(+ val change)))))
(setf val new-val)

new-val))))


Shitty generators. Can't seem to think of a way to create generators/iterators like in python.
>>
>>106595098
At least it works.
>>
>>106592230
>how would you convert that array in your example into an alist?
That was a bad example, but it should just be a plain list in that case.
(imaginary-stringify #(null nil t 42 3.14 "Hello, world!"))

Should yield the string:
(null nil t 42 3.14 "Hello, world!")


Maybe I should have asked:
What is the Common Lisp equivalent of Elisp's pp function?
>>
File: hljs-example.png (206 KB, 788x1566)
206 KB
206 KB PNG
I want to shill this one more time, since we post a lot of code here.
http://ggxx.sdf1.org/userscripts/hljs-on-g.user.js

>>106579036
>>
>>106595200
Thats not an alist, thats just a list. You can use COERCE to convert them and then PRINT it.
>>
>>106592434
add this
(defun make-elisp-treesit-parser ()
(treesit-parser-create 'elisp))
(add-hook 'emacs-lisp-mode-hook #'make-elisp-treesit-parser)
(add-hook 'emacs-lisp-mode-hook #'treesit-fold-mode)

and bind treesit-fold-toggle to some key, maybe add some custom folding behavior like i've done for strings (i've used an already existing function, if i got this right one can write their own, traverse a syntax node and match its elements to whatever required pattern), and you should be set.
i mean yeah sure one shouldn't use 3-rd parties when you can do the same with existing tools, and hideshow exists, but it's definition of a block is rigid and it doesn't include a docstring. the alternatives
>https://lists.gnu.org/archive/html/help-gnu-emacs/2018-11/msg00099.html and https://lists.gnu.org/archive/html/help-gnu-emacs/2018-11/msg00115.html, the first is a "write your own parser lol", the second doesn't seem wise in terms of performance
>outline or outshine modes have an entirely different purpose and also pollute the source with their markers
so yeah i think treesit-fold is the better solution for this problem. thanks for reading my blog
>>
>>106595200
>>106595300
To expand on
>What is the Common Lisp equivalent of Elisp's pp function?
FORMAT is the answer you are seeking. Play around with ~A and ~S
>>
File: :-).jpg (137 KB, 500x500)
137 KB
137 KB JPG
>>106589956
>>106590466
Real Lispers use emoticons :-)
>In 1982, I proposed the use of :-) and :-( in posts and Email messages. These are generally regarded as the first internet emoticons, and the text-only ancestors of today’s graphical emojis.
https://www.cs.cmu.edu/~sef/
>>
(thread-empty-p)
t
>>
>>106595098
>Can't seem to think of a way to create generators/iterators like in python.

Just import the appropiate lib...

https://github.com/mabragor/cl-itertools
>>
>>106595887

(push (make-random-topic) *threads*)
>>
>>106595098
https://shinmera.github.io/trivial-extensible-sequences/
>>
>>106596556
>>106596510
I wish I could just use (loop for pee in my-poo-sequence do (poop pee))
>>
File: 1742602102296848.jpg (67 KB, 680x653)
67 KB
67 KB JPG
>>106595200
>What is the Common Lisp equivalent of Elisp's pp function?
pprint, additionally *print-pretty* controls whether the repl's printer calls pretty
https://www.lispworks.com/documentation/HyperSpec/Body/22_b.htm
https://www.lispworks.com/documentation/HyperSpec/Body/v_pr_pre.htm
>>
>>106594953
omedetou john-san
>>
Ocaml's dune use sexp for config.
>>
More CL live programming videos please?
Like https://www.youtube.com/watch?v=CNFr7zIfyeM
>>
TIL prettify-symbols-mode was built-in to Emacs and nothing extra needed to be installed. There's also global-prettify-symbols-mode if you like it so much, you want it on everywhere. (It displays "lambda" as "λ" (in unicode).)

Do you guys use this minor-mode?
>>
>>106597700
>Ocaml's dune use sexp for config.
https://dune.build/
https://github.com/ocaml/dune

dune file
(executable
(name hello_world)
(libraries lwt.unix))

hello_world.ml
Lwt_main.run (Lwt_io.printf "Hello, world!\n")

build
dune build hello_world.exe

https://dune.readthedocs.io/en/latest/quick-start.html
>>
>>106594260
Are you using some of the Racket code I posted a few threads ago to make these backgrounds?
https://desuarchive.org/g/thread/106191893/#106286105
>>
Why doesn't lisp stick with me? I sometimes super get into lisp and end up writing really neat code and really enjoy the language, then life gets in the way and I don't have time for my pet-projects and then I come back some weeks or months later and I don't understand any of it anymore and need to learn from the beginning. Dementia? C brain damage? Help.
>>
Does anyone actually use Guix as their everyday OS?
>>
>>106599566
>and then I come back some weeks or months later and I don't understand any of it anymore
You're just not spending enough time with Lisp to lock it in. This isn't even Lisp-specific. It can go for any kind of skill acquisition. If you take a few months off from anything, I'd be surprised if you DIDN'T forget some things.
>>
>>>/x/41096222
>>
File: racket-con.png (261 KB, 1111x1488)
261 KB
261 KB PNG
https://con.racket-lang.org/
https://time.is/compare/0830AM_4_Oct_2025_in_Boston
>>
>>106594260
Teenagers like this are the reason I’m never going to get a job
>>
File: McCarthy.jpg (3.99 MB, 4000x2533)
3.99 MB
3.99 MB JPG
>>106593472
>>
>>106598722
no, it messes up the alignment of your code
>>
>>106599588
God knows I tried.
>>
>>106598722
no, because I use fill-column at default value, so i need to see exactly how many characters i type in a line.
>inb4 70, really?
tl;dr poorfag cope.
15' laptop monitor, 1920x1080 resolution, no dpi configuration. 120/110 height ttf font. i divide fullscreen emacs evenly while using these settings, and i get exactly 3 windows which fit the code + fringe, line numbers, and a window divider (though 10k+ loc gets out of bounds). which means i can look at fringe without window division and write code so that i can later look at it with 3 windows.
>>
i'm trying to map M-n to a sequence of two commands:
(keymap-global-set
"M-n"
'(lambda ()
(scroll-up-line)
(next-line)))

pressing M-n then gives me this error:
>Wrong type argument: commandp, (lambda nil (scroll-up-line) (next-line))
is it not possible to map keys to functions? only to singular commands?
>>
>>106601682
you don't need to quote lambdas. just add (interactive) after arg-list. flycheck also complains that next-line's only for interactive use, but it works regardless. forward-line does the same, so it doesn't matter.
>>
>>106599588
I do
>>
>>106596886
You can (at least in SBCL):
(loop for pee being the elements of my-poo-sequence do (poop pee))
>>
File: SV-Camel.jpg (1.68 MB, 4500x3500)
1.68 MB
1.68 MB JPG
>>106597700
>>106598788
https://github.com/janestreet/ecaml
>>
>>106595112
apparently I'm broke no matter which way the central bank rates go. fuck capitalism
>>
File: 1738785106806070.png (1.14 MB, 1280x720)
1.14 MB
1.14 MB PNG
Why didn't you guys tell me that Guile has PEGs?
Here I was naively in love with Janet for that specific feature, but turns out Guile had it all along.
>>
>>106602823
Ofc the GNU PEGs.
>>
>>106601026

I see God.
>>
am i going to see the lisp thread get archived 2 times in a single day?
>>
>>106599566
>install termux on phone
>install your favorite lisp
>solve simple programming problems in it daily
that should keep you from forgetting, hopefully.
>>
>>106601652
>>inb4 70, really?
>tl;dr poorfag cope.
i think code is more aesthetically pleasing when it's formatted like that desu
>>
>>106595432
I'm not at all against emoji. I am just cringe at the zoomer usag of them. But to each their own.
In schemebbs there was an anon who made very cool patterns with flower emoji. On the other hand, the lainchan admins are so retarded they can't even add emoji support for their imageboard.
>>
>>106605622
it really is. at least for lisps.
but even emacs lisp source uses 80 characters as a maximum amount of characters per line. so even while just looking through the source of an elisp function which interests me i get screen estate overflow. the aesthetics're lost to the reality of people having pc monitors (and often using 4k resolution as well).
>>106601652
>i can look at fringe
i've meant fill column. damn.
>>
>>106600861
already cons'ed
>>
Opinions on EIEIO

https://www.gnu.org/software/emacs/manual/html_node/eieio/
>>
>>106606332
i haven't ever used it. it mimics cl. afaik it is missing some clos features, which might be frustrating.
emacs already prefers alists instead of structs to hold "object" info, so if i ever find myself writing code for an end-user i would use alists to avoid confusion.
if you write for yourself and are familiar with clos, then why not?
>>
>>106606552
Yeah i also use alists and plists. But I have started implementing transients for my package and it makes heavy use of eieios. And it got me thinking about how it might be nice to have some kind of inheritence in some parts of my package. I prefer to keep it simple but I can see some use cases for myself. On the other hand its kind of ugly.
>>
'(
(
(some internal list)
(another internal list)
(yet another internal list)
(hopefully you get the point)
(it would be a shame if you did not get the point)))

(defun double-the-value (value) (* value 2))

(some-function-call
with
many
non
variadic
arguments
again
you
should
get
the
point
(also an implicit)
(do block))

(some function call with these non variadic arguments
(and an)
(implicit do)
(block that)
(prevents the)
(overarching expression)
(from remaining)
(on a)
(single line))

forced 2-space indentation to allow for non-ambiguous alignment is annoying
>>
File: 『CoD』.jpg (223 KB, 847x1200)
223 KB
223 KB JPG
>>106602823
For me it’s GOOPS
https://www.gnu.org/software/guile/manual/html_node/GOOPS.html
>>
>>106602493
nice
also with fennel
https://andreyor.st/posts/2024-12-20-extending-emacs-with-fennel/
>>
>>106608885
based goops enjoyer
>>
>>106607709
>forced 2-space indentation
- I don't see any 2-space indentation in your post.
- Who or what is forcing it?
>>
>>106602823
You know what else supports PEGs?
Elisp
(info "(elisp) Parsing Expression Grammars")
>>
>>106599588
I use it as my main Linux os, but it's not my main os.
>>
I want to try Common Lisp but I've become too attached to Scheme's recursion. Is there a built-in like Elisp's named-let that would let me use recursion safely?
>>
>>106610518
Worrying about recursion being “safe” in any Lisp is cute but you’re probably thinking of labels
>>
>>106610518
Although Common Lisp doesn't mandate that implementations do tail call optimization, some implementations like SBCL do it anyway.
https://www.youtube.com/watch?v=O82aQd3umBs
>>
(info "(vtable) Top") ; bump
>>
can emacs-lisp land me a job?
>>
>>106612437
No.
>>
>>106612528
>No.
fuck this gay earth
>>
>>106612548
>fuck this gay earth
I've been really warming up to the reincarnation soul trap theory.
>>
>>106612559
>the reincarnation soul trap theory.
The only possible explanation for how shit all the things are.
>>
File: 1729141591863960.gif (88 KB, 467x370)
88 KB
88 KB GIF
>>106599588
I recently switched from nix after years of using that as a daily driver.
While yes Guix has fewer/older packages, it is also a lot easier to just write my own and maintain my own channel.
So guix feels smoother in the long run actually.
Unfortunately that big advantage is exactly the reason why so many packages in the official repo are outdated: people just write their own and are too lazy to contribute them. I am one of those people.
>>
>>106515014
(defun eshell/aacat (file)
"Print FILE to the terminal using the shift-jis-art face."
(let* ((aa (with-temp-buffer
(insert-file file)
(propertize (buffer-string) 'face 'shift-jis-art))))
aa))

Then, in eshell, you can say:
aacat art.txt

...and it'll use the shift-jis-art face to display art.txt.
>>
>>106599566
Always document your code.
>>106599588
I do.
>>
https://sachachua.com/blog/2025/09/2025-09-15-emacs-news/
>>
File: vexil.png (137 KB, 1412x1155)
137 KB
137 KB PNG
>>106614352
I like this guy's org export of his documentation.
https://flandrew.srht.site/listful/sw-emacs-vexil.html
>>
>>106613052
>Unfortunately that big advantage is exactly the reason why so many packages in the official repo are outdated: people just write their own and are too lazy to contribute them. I am one of those people.
Heh, I've kind of suspected this, as I've done the same thing. I just keep thinking someone else will do it better eventually, and they can submit their version.
But I just know one of you faggots has a Ladybird package that you're refusing to share with me
>>
This looks useful for browser automation.
https://github.com/clj-commons/etaoin
https://cljdoc.org/d/etaoin/etaoin/1.1.43/doc/user-guide
(require '[etaoin.api :as e]
'[etaoin.keys :as k]
'[clojure.string :as str])

;; Start WebDriver for Firefox
(def driver (e/firefox)) ;; a Firefox window should appear
(e/driver-type driver)
;; => :firefox

;; let's perform a quick Wiki session

;; navigate to Wikipedia
(e/go driver "https://en.wikipedia.org/")

;; make sure we aren't using a large screen layout
(e/set-window-size driver {:width 1280 :height 800})

;; wait for the search input to load
(e/wait-visible driver [{:tag :input :name :search}])

;; search for something interesting
(e/fill driver {:tag :input :name :search} "Clojure programming language")
(e/wait driver 1)
(e/fill driver {:tag :input :name :search} k/enter)
(e/wait-visible driver {:class :mw-search-results})
>>
>>106614595
>contributors
>alexey, miloslav, maxim
>founder
>ivan grishaev
Thoughts?
>>
>>106616143
Is this a russian thing?
Let me tell you, I know a few russian guys that moved over here (left russia) and they are generally based as hell.
Also, they hate russia with a passion. They won’t shut up about it. They love their race however.
Only thing they hate more than russia is China.
>>
>>106612437
It can help you be mote productive than a moron using, say, vscode or pycharm, and help you *keep* your job though.
>>
>>106614595
https://github.com/clj-commons
This is cool. It's kind of like sharplipsers for Common Lisp
https://github.com/sharplispers/
They both adopt and maintain abandoned but useful libraries.
>>
>>106612437
it certainly didn't work for Prot
>>
>>106618459
> Prot
How is he doing these days?
Last I checked he started looking like a chad
>>
File: prot2025-09-15.jpg (1.02 MB, 2448x2448)
1.02 MB
1.02 MB JPG
>>106618498
guess he's been doing push-ups
>>
File: 1727298847503069.jpg (30 KB, 600x362)
30 KB
30 KB JPG
>>106618564
> go into mountains
> single handedly build your own hut, including plumbing, power
> farm vegetables and fruits
> get fit
> continue to hack on emacs and tinker with mechanical keyboards and philosophy
based emacs chad
>>
File: 1744360596437798.jpg (112 KB, 1014x1500)
112 KB
112 KB JPG
Pic related gud?
>>
>>106618867
Are you trapped in a corner right now?
>>
>>106618957
Not right now, but I am generally not fond of getting trapped in corners and would much prefer to avoid it.
>>
Corners strike fear into my heart
>>
>>106618867
do you have anything to lose by reading educational material written by people better than you will ever be at something you're interested in learning?
>>
>>106618564
average emacs user
>>
File: 1733415928173828.jpg (75 KB, 816x459)
75 KB
75 KB JPG
>>106619085
No. However I read a lot and like working through educational books too, and time is unfortunately limited. So I am forced to discriminate and apply some sieves.
And these kinds of books take a while to work through.
So I find it useful to hear thoughts from other people who might've already worked with or through it. What they gained from it, how it compares to similar books, etc.
>>
TIL Elisp supports big numbers.
ELISP> (expt 2 256)
115792089237316195423570985008687907853269984665640564039457584007913129639936
(#o20000000000000000000000000000000000000000000000000000000000000000000000000000000000000,
#x10000000000000000000000000000000000000000000000000000000000000000)
>>
>>106619776
10,000! is too big for good ol elisp
ELISP> (defun factorial (n)
(named-let factorial-iter ((x n)
(acc 1))
(if (= x 1)
acc
(factorial-iter (1- x) (* acc x)))))
factorial

ELISP> (factorial 1000)
4023872600770937735437024339230039857193748642107146325437999104299385123986290205920442084869694048004799886101971960586316668729948085589013238…
;; too long for 4chan

ELISP> (factorial 10000)
*** Eval error *** Arithmetic overflow error
>>
>>106619885

I thought elisp supported bignums...
>>
>>106618867
You can read it for free online, so you can check it out yourself
>>
File: cap_20250917.17:52:25.png (1.38 MB, 1904x1989)
1.38 MB
1.38 MB PNG
TIL info can display images.
(info "(elisp) Type Hierarchy")

It got in a funk while scrolling, and I had to C-g out of it.
>>
>>106619885
Now I wonder what the maximum bignum in Elisp is.
>>
>>106619885
Yeah, I went to show my kids the power of lisp while discussing the 69! calculator benchmark and it fell flat on it’s face. Sad. Many such cases.
>>
Still seething about CL not following the same naming conventions as Scheme. So close to perfection.
>>
>>106620572
You look retarded saying equal? by raising your voice. It's more tasteful to discreetly say equalp
>>
>>106618564
Is he trying to get some pussy? No modern women is gonna stay the night in his shit shack
>>
>>106620257
If you install the latest casual, its info manual uses a lot of images.
https://kickingvegas.github.io/casual/
>>
>>106618867
> Jay Sussman
Based.
>>
>>106564900
https://www.youtube.com/watch?v=jBBS4FeY7XM
https://lispcookbook.github.io/cl-cookbook/debugging.html

Vindarel uses slime, but practically everything he describes applies to sly as well.
>>
why would someone learn common-lisp when there is emacs-lisp and guile scheme? The latter two completely invalidate the reasons to use common-lisp imo.
>>
>>106622840
The only reason I learned it was because I was hired to do a small CL job once. I ended up appreciating it more than I thought I would. It definitely has its flaws, but it also has some good qualities. Coming from Elisp, it felt familiar at times, but it also felt a little more "industrial strength". Having relatively easy access to real OS-level threads was nice.

The REPL experience with slime or sly is also very good. I think I have to give a lot of credit to sly for making my CL experience a positive one. With a little bit of fine tuning, it can be a tremendously ergonomic development experience.
>>
>>106619885
(calc-eval "1000!")
=> "402387260077093773543702433923003985719...000"
>>
>>106622951
>calc
how do I learn to use this arcane shit
how do I do cool shit with calc
post links and examples
>>
>>106621923
You'd be surprised.
Hot hippie chicks pretend to love that shit. Just not stable long-term.
>>
>>106623011
Start with inputting numbers with units and doing unit conversion.

>List of available units
U V # evil
u V # vanilla


>Input number with unit
' 57 kg


>Convert from kg to lb
U c lb # evil
u c lb # vanilla
>>
>>106623011
You can also input dates and do math on them.

>Input two dates and subtract them
'<2025-12-25>
'<2025-09-18>
-

- That should give you 98 which means Christmas is 98 days away.

>Add the day unit to it via multiplication
'day
*


>Convert to hours
U c hr # evil
u c hr # vanilla
>>
>>106623176
Another really useful unit is hms which breaks a duration into weeks + days + hours + minutes + seconds.
>>
File: 1733942775818278.jpg (56 KB, 686x386)
56 KB
56 KB JPG
>>106623176
>>106623234
>>106623272
Man lisp and emacs are so fucking cool
>>
>>106623011
An important skill to learn is unit simplification.

>Convert fractional days to hms
'6.9 day
U c hms # evil
u c hms # vanilla

That should give you `6 day + 21 hr + 36 min`. However, you can't say `U c day` to turn it back into `6.9 day`.

>Use unit simplification to turn it back into the day unit
U s # evil
u s # vanilla

Now, it should be back to `6.9 day`.

This is important when doing date math, because it just wants a number without a unit that represents days.

>Remove the day unit via division
'day
/


>Push the current datetime and add
t N # works for both vanilla and evil
+


You should now have the datetime that's 6.9 days in the future.
>>
Can your memelang do this?
>The assignment proceeds in two phases. First, the operands of index expressions and pointer indirections (including implicit pointer indirections in selectors) on the left and the expressions on the right are all evaluated in the usual order. Second, the assignments are carried out in left-to-right order.
>>
>>106623594
I wish you would have provided more context. I had to search for that quoted text for clarification.
https://stackoverflow.com/a/48837043
https://go.dev/ref/spec#Assignment_statements
a, b = b, a  // exchange a and b

x := []int{1, 2, 3}
i := 0
i, x[i] = 1, 2 // set i = 1, x[0] = 2

i = 0
x[i], i = 2, 1 // set x[0] = 2, i = 1

x[0], x[0] = 1, 2 // set x[0] = 1, then x[0] = 2 (so x[0] == 2 at end)

x[1], x[3] = 4, 5 // set x[1] = 4, then panic setting x[3] = 5.

type Point struct { x, y int }
var p *Point
x[2], p.x = 6, 7 // set x[2] = 6, then panic setting p.x = 7

i = 2
x = []int{3, 5, 7}
for i, x[i] = range x { // set i, x[2] = 0, x[0]
break
}
// after this loop, i == 0 and x is []int{3, 5, 3}
>>
>>106622840
Here's a guy that likes Scheme, but has to concede the CL has some advantages in interactive development. (However, his preferred Scheme is Chez and not Guile.)
https://elmord.org/blog/?entry=20191114-sbcl-chez
>>
>>106623594
CL has booth setf and psetf.
setf evaluates in order, psetf evaluates in parallel. With psetf the order of assignments does not matter and there is no side effects between them.
In regards to your quote, setf can be extended to support setting all sorts of datatypes, so naturally it can do anything you quote and more.
>>
File: logo.png (537 KB, 798x588)
537 KB
537 KB PNG
GLÖJURE :D :D :D

https://github.com/glojurelang/glojure
>>
File: 1727008236819966.jpg (164 KB, 1280x960)
164 KB
164 KB JPG
>>106622840
Do you prefer your macros washed and clean shaven, or do you prefer them stinky (the good kind) and with a bush?
>>
>>106623867
Another one?
Did the world really need 2 interpreted Clojure implementations in Go?
https://joker-lang.org/
>>
>>106623894
which's elisp one?
>>
>>106624109
a little musky
https://en.wikipedia.org/wiki/Hygienic_macro
>>
>>106620300
>wants to show the power of Lisp
>chooses Emacs lisp instead of Common Lisp for this task

(defparameter *facepalm* T)
>>
>>106622840
>why would someone learn common-lisp when there is emacs-lisp and guile scheme? The latter two completely invalidate the reasons to use common-lisp imo.

Common Lisp is far more powerful than Emacs Lisp.

All schemes are cool, but scheme is not Lisp, scheme is Scheme.
>>
>>106623867
>https://github.com/glojurelang/glojure
>Glojure provides easy access to Go libraries, similar to how Clojure provides easy access to Java frameworks.

Who would really like to have access to libraries on an ecosystem that still has very few libraries compared to Java?
>>
>>106624918
>but scheme is not Lisp
wut
both have insane amount of parens
>>
File: 1754905740110296.png (482 KB, 700x964)
482 KB
482 KB PNG
>>106623867
>>106624922
>>
>>106622840
Common Lisp is more practical. Better OOP, devex, performance, compilers, and ecosystem in general.
>>
>>106621442
But now any predicate that already ends in p has a double p at the end. And what about exclamations? We should use more than just alphanumeric characters in function names, just ! and ? isn't a stretch imo.
>>
>>106624918
> common lisp is far more powerful
It’s difficult to make a general statement like that.
I believe if you added enough stuff to scheme it would, essentially be, common lisp.
In fact, guile can parse and execute e-lisp (which they want as a faster and smaller replacement in emacs)
Other than the function/variable space difference and some slight syntactical differences in defun and let, and predicatep?s — all of which, I think, can be defined out to be like lisp, they’re pretty much the same.

In theoretical computation power, they’re definitely the same.
>>
>>106625078
> equal p vs ?
I don’t spend a lot of time reading scheme to… who???
The ? Is used in other based languages such as APL.
A lot of what you see in common lisp came from random design decisions students literally made in overnight coding sessions in the 70s. Scheme stepped back and fixed a lot of them and removed overlapping and inessential functionality. As one does.
Plan9 and Scheme would be perfect for one another. :-)
>>
>>106622951
(calc-eval "10000!")
=> Working... factorial(5910) = 4858629227136732215939838326908168776414736685495258409321123874720312342961345630725136745069668770…

so 5,910!, a number with 19,726 digits, seems to be the closest factorial to the bignum limit in elisp
>>
>>106625415
thats just by default
you can go higher by increasing integer-width in emacs 27 and higher
>>
>>106625351
I like ? for predicates and ! for mutation even though I don't write much Scheme. It's more aesthetically pleasing.
>>
>>106623688
That was interesting but misguided in that originally in ASCII we had a left arrow to denote what we’re using = for here, but it’s proper to use left arrow. That left arrow character was eliminated in 1964 due to psychology students.
Let me explain. Psych students write copious amounts of worthless bullshit with tons of references. These references were in italic but line printers in psych departments didn’t support italics so they replaced the left arrow character with an underscore character and the line printer backspaced and underlined the reference citation in the APA Style guide. Thanks, fuckers.

I’m still seething over it. However with unicode and good parsers it should have been returned to us by now.
>>
>>106625530
Agreed. I wrote some macros to fix the std library a while back, but there isn't a point if it's not widely adopted as I'd need to basically fix every library I use.
>>
Did you guys know there was an Emacs Carnival going on?
https://www.emacswiki.org/emacs/Carnival

I found out via Sacha.
https://sachachua.com/blog/2025/09/obscure-emacs-package-appreciation-backup-walker/
Apparently, it's been going for a few months. September's theme is obscure packages.
>>
>>106625530
I prefer Elixir's use of ! for functions that will raise an error rather than the non-! variants that will return an error tuple for matching on
>>
>>106614283
[code
When defining an Eshell-specific version of an existing
function, you can give that function a name starting with ‘eshell/’ so
that Eshell knows to use it.
[/code]
interesting, i thought that was just syntactic sugar. also, the manual doesn't seem to mention it, but eshell also treats primitive-functions (i.e. the ones written in C) as commands, so they don't need to be parenthesized either
>>
>>106625209
>It’s difficult to make a general statement like that.
>I believe if you added enough stuff to scheme it would, essentially be, common lisp.

I am referring to the comparison between Emacs Lisp and Common Lisp. Common lisp is far more powerful, and I don't think anybody would disagree.

Regarding Guile, i think he's cool, but I preferred Ryu or Ken.

Regarding Scheme in general, it's a really cool language and I will be the first to admit it has continuations while CL doesn't have true continuations. But, again, Lisp is Lisp, Scheme is Scheme, they are really different languages despite the many things in common. Procedural macros vs hygienic macros being another big difference for example.
>>
>>106625351
>A lot of what you see in common lisp came from random design decisions students literally made in overnight coding sessions in the 70s.

This comment is completely far from the truth and only shows you have zero, absolutely ZERO knowledge on how Common Lisp was created.

Now please, be a decent person and research before posting.

Spoiler: Real programming chads, people who had many years using Lisp for real production-quality, profit-making, even mission-critical stuff, were using different Lisp dialects and implementations so they got together to agree on a common dialect of Lisp which would enable them to adapt their code and keep using them on MISSION CRITICAL, PROFIT MAKING stuff like computer aided design, computer aided modelling, electronic circuit design, simulation, etc.

And that is how Common Lisp was born. Instead of a simple sojak like Matz or Guido van Rossum imagining on "how I think a nice language should be" and then waiting 20 years until their language is tried to be used for real stuff and then realizing all the design mistakes they made, Common Lisp was born through the meeting of people who already had working production code and had a clear idea of what features were needed and what features were not needed. That's why you have things like UNWIND-PROTECT, that were absent from many programming languages for decades, or the option to allocate values on the stack, circunventing the garbage collector, something that very very few garbage-collected languages can do today in year 2025.

So please stop saying bullshit because you're only showing your obvious lack of knowledge.
>>
>>106624991
wonderful
sauce?
>>
>>106625577
I've never heard of this. I searched around too see if I could find more details on this story but I couldn't find any. Do you have any links?
>>
File: file.png (234 KB, 2221x885)
234 KB
234 KB PNG
>>106625984
not sure where he pulled the psych students from, but ascii originally did have left arrow instead of underscore and up arrow instead of caret (^). this was changed in 1965
>>
does anyone here actually like lisp or just use it for emacs?
>>
>>106623935
there's 3

but joker has been obsolete since Borkdude created SCI, and let-go never had a real use.

Getting access to yet another big ecosystem via Clojure is pretty cool.
https://github.com/avelino/awesome-go
>>
>>106624922
for webshitting go's stdlib is pretty much all you need
>>
>>106626209
>does anyone here actually like lisp or just use it for emacs?

I have written Common Lisp code for years and not a single line of Emacs Lisp code. Yet i use Emacs as a Lisp IDE... go figure
>>
>>106626995
>for webshitting go's stdlib is pretty much all you need

My point is, why would a clojure developer need go libraries for web development? Everything is already there in the java ecosystem.

Even the small Common Lisp ecosystem has everything or almost everything you need for webshit development.
>>
What are you guys opinions of Haskell?
Some call it the list that got somewhere.
>>
File: termui.gif (152 KB, 543x374)
152 KB
152 KB GIF
>>106627080
Glojure is interpreted, so it's an alternative to Babashka. Adding Java libraries to Babashka is a pain in the ass and in many cases impossible.
If nothing else, Go has a lot of libraries to make good interactive text interfaces:
https://charm.land/
https://awesome-go.com/advanced-console-uis/
>>
>>106625577
> links?
No, that’s just my recollection of the situation at the time. Not everything is on the internet.

>>106625899
Settle down.
I see you found some page on the internet about the common lisp standards body or something.

What I mean is a lot of the very early lisp, MIT hackers, if you will, made a lot of these random decisions while working on the first lisp machines and on the IBM 704 and some of that became common [get it?] practice and adopted into common lisp. This happens a lot in standards.
CAR and CDR would hardly exist if it weren’t for the random chance that they had the IBM 704 way back when. Were those the best choices? No. Did they get into the CL standards? Absolutely.
Are most other standards like that? Yeah.
>>
>>106623688
any general-purpose lisp dialect which doesn't support this natively can be augmented via macros to support it.
>>
>>106622951
the chad calc
>>106621442
equalpee
or
equalpi
>>
File: workout routine1.png (226 KB, 1080x1301)
226 KB
226 KB PNG
>>106618564
>>106618610
(ngmip "not planning and logging your workouts in org-mode") ; => t
>>
>>106621442
I don't talk about lisp code with others face-to-face. And even then, just say Equal Questionmark
>>
>>106628236
>wear safety glasses
cute
>>
File: emacsconf.cfp.2025.png (41 KB, 572x191)
41 KB
41 KB PNG
https://emacsconf.org/2025/cfp/
The deadline for EmacsConf 2025 talk proposals is September 19, 2025.
For Europe and Asia, that's today.
For Americans, that's tomorrow.
They didn't put a time zone on the deadline date, so I'm not sure if there's a precise cut-off. Perhaps they'll allow a tiny amount of wiggle room.
>>
>>106627563
>I see you found some page on the internet about the common lisp standards body or something.

I have been using Common Lisp for more than 10 years and know perfectly its story.

You, again, don't understand shit about Common Lisp, you are now talking about the IBM 704, and thus the original LISP and LISP 1.5. A total strawman. Now, some things in LISP 1.5 became part of MACLISP parts of MACLISP also entered into the Common Lisp standard, however, your original claim:

"A lot of what you see in common lisp came from random design decisions students literally made in overnight coding sessions in the 70s."

which starts with "A LOT",

is bullshit, because Common Lisp also has influence from INTERLISP, Lisp Machine Lisp, Spice Lisp, NIL (New Implementation Lisp), Connection Machine Lisp (used in supercomputing) and S-1 Lisp. All of which were newer than MACLISP.

Know your history first.
>>
>>106628421
not gonna risk getting blinded to score points with dyels on /g/
>>
File: uniline-mode.png (88 KB, 894x1204)
88 KB
88 KB PNG
https://github.com/tbanel/uniline
>>
>>106625802
>but eshell also treats primitive-functions (i.e. the ones written in C) as commands, so they don't need to be parenthesized either
Yeah, one could use eshell as an elisp REPL.
~/aa $ setq x 10
10
~/aa $ (factorial x)
3628800
~/aa $ factorial $x
3628800

I'm using the factorial function posted by anon earlier in >>106619885.
>>
>>106627481
If you use pico.sh, a lot of their stuff uses the various charm libraries.
https://pico.sh/how-it-works
>>
>>106626209
I've developed a taste for Lisps over the years. My initial experience with Lisp was bad, because it was so foreign to me. However, I like REPLs, and Emacs is really good at interacting with REPLs, so I eventually warmed up to Lisps. Learning to use paredit made it more fun, too.
>>
>>106623731
>However, his preferred Scheme is Chez and not Guile.
Chez is one of the best language implementations in existence. Performant, good tools (profiling is easy, debugging is a little lacking compared to other lisps), easily embeddable in programs (you can choose between if you want the compiler or interpreter chez.boot vs petit.boot or compile your own boot image), but also has good FFI and will easily run standalone.
IMO the only thing holding Chez back is how barebones R6Rs is, specifically just some little QoL improvements nothing major like muh OOP.
>>
Why bother with dialects when you can just extend scheme to do whatever you want?
>>
>>106629045
Chez somehow wound up being owned by Cisco because Kent works there. That’s a problem.
>>
What's the common lisp equivalent of pthread_mutex_setprioceiling ?
>>
>>106629130
Cisco bought his company and for some reason he made them use it in routers. No one knows the specifics.
Racket uses Chez too, there was a recent merge iirc
>>
https://stmx.org/docs/
CL has STM, python still has little done on the subject. good morning sars
>>
>>106625899
Common Lisp was made by a boomer committee with other boomers threatening to pull out if they didn't include their niche bullshit because they had PRODUCTION GRADE BATTLE TESTED CODE NO REWRITES ALLOWED *adds roman numerals*.
>>
>>106629140
>What's the common lisp equivalent of pthread_mutex_setprioceiling ?

You'll need to be more specific on what you want to do.
>>
>>106629570
>if they didn't include their niche bullshit

What was "niche bullshit" in 1981 is what today in 2025 is only doable in the most modern programming languages.

If you don't want any advanced features because you label them as "niche bullshit", then you want Golang. Lisp -in general- is not for you.
>>
>Helix does some basic Org mode highlighting out of the box
Neat.
>>
>>106629130
>get bought by Cisco
>Cisco decides to release it under an open source licence
Sounds like a win to me. Its even Apache licenced so you're free to GPL a fork if you just change the name.

>>106629207
>there was a recent merge iirc
Nope they just target the Chez VM with their own compiler.
>>
>>106625708
So cute



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