(λ) - Lisp General
Anonymous 01/14/25(Tue)10:49:43 | 331 comments | 47 images | 🔒 Locked
SICP
>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://www.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/p3r7/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://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://gitlab.com/nonguix/nonguix
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://paste.textboard.org/52b08691

(set! prev-bread (quote >>103762785))
Anonymous 01/14/25(Tue)10:54:58 No.103891507
>>103891434
>cant learn lisp
no, i just dont want to
>lost in stupid parentheses
Anonymous 01/14/25(Tue)10:55:42 No.103891520
lem
This is how Japanese Emacs looks like:
https://github.com/lem-project/lem
中出し 01/14/25(Tue)11:03:58 No.103891629
(run-gcc)
>>103891507
Even GCC uses S-expressions, now GTFO!
https://gcc.gnu.org/onlinedocs/gccint/RTL.html
Anonymous 01/14/25(Tue)11:07:07 No.103891660
>>103891629
and how does that relate to me having to use em?
if you want me to gtfo dont quote me, tranimeposting retard
lisp is slow and useless
Anonymous 01/14/25(Tue)11:12:43 No.103891713
TRAMP is awesome. Eshell is awesome.
Any hacks/configs you do with these tools, anons?
Anonymous 01/14/25(Tue)11:40:25 No.103891993
1569016242284
Scheme!
Anonymous 01/14/25(Tue)11:48:18 No.103892072
GhOSXPYacAA4djJ
>>103890416
>So, if I understand correctly, once the month passes and it's February I will have to reload the dotfile, but that's it, right?
You just have to run one setq expression. If it were me, I'd just have it running in a timer so that I don't even have to think about it.
(setq t1 (run-with-timer 0 (* 60 60) (lambda () (setq org-agenda-start-day (format-time-string "%Y-%m-01")))))

That sets up a timer that sets org-agenda-start-day once per hour. It's way more than necessary, but when the month rolls over, it'll happen within the hour. If you want to stop the timer, do this:
(cancel-timer t1)


>Have a nice week, anon!
Thank you. I hope your week is wonderful too.
Anonymous 01/14/25(Tue)12:06:45 No.103892256
>>103890416
Actually... in the context of your new special end-of-the-month settings, maybe I wouldn't use a timer, because that would mess up your end-of-the-month settings. Just run this one expression.
(setq org-agenda-start-day (format-time-string "%Y-%m-01"))

Don't reload your whole config just for this.
Anonymous 01/14/25(Tue)12:15:16 No.103892334
>>103892256
You want to get railed in the butt? I have faggot aids and other diseases
Anonymous 01/14/25(Tue)12:23:42 No.103892425
@cxxxr
>>103891520
The main dev of lem is up to something interesting.

Rooms: An Editor-based Social Network
https://github.com/rooms-dev/lem-rooms-client
Anonymous 01/14/25(Tue)13:50:13 No.103893495
>>103891713
eshell is underrated but tramp is kinda ehhhh. it's convenient and unobtrusive but it always feels clunky and laggy to use to me even over a lan.
Anonymous 01/14/25(Tue)13:57:34 No.103893571
>>103891434
The problem is that Lisp is a poor abstraction for a programming language, I mean you are just writing code in AST form and the thing is that most of the complexity of Lisp is not in the parser but in the environment, and parsing a more complex programming language is trivial. So there is no point in using Lisp in 2025.
Anonymous 01/14/25(Tue)13:58:29 No.103893583
>>103893571
>we can and therefore should make things more complex for no added benefit
lole
Anonymous 01/14/25(Tue)13:59:25 No.103893592
>>103893495
i haven't used it yet personally, but apparently controlmaster speeds it up quite a bit?
Anonymous 01/14/25(Tue)14:01:11 No.103893604
>>103893571
you speak as if you're going to implement the environment or the parser yourself
Anonymous 01/14/25(Tue)14:02:29 No.103893612
>>103893604
he speaks as if he has ever implemented anything for a sustained duration of over an hour.
no, he took a look at Lisp and spent 10 mins thinking about it (if even that), not writing it.
Anonymous 01/14/25(Tue)14:02:57 No.103893622
>>103893583
So according to you using a Lisp "replacement" language like Lua, Ruby or Python does't have a benefit?
Anonymous 01/14/25(Tue)14:05:39 No.103893647
>>103893604
I implemented a Lisp parser and them I realized that the parser was the easy part.
Anonymous 01/14/25(Tue)14:07:42 No.103893662
>>103893622
stop moving the anti-lisp goalposts so abruptly you're causing a racket (haha get it)
Anonymous 01/14/25(Tue)14:08:40 No.103893673
>>103893647
ok but thats completely irrelevant to the normal Lisp programmer who just uses an existing implementation
Anonymous 01/14/25(Tue)14:18:09 No.103893766
>>103893571
Wrong, by far the most difficult thing about implementing Lisp is CLOS and If your self-hosting it becomes even more difficult because you have to constantly resist the urge to implement it earlier on in the bootstrapping process but if you did that it would make maintaining everything else much easier, fuck.
Anonymous 01/14/25(Tue)14:37:23 No.103893989
equality is such a mess in Common Lisp
Anonymous 01/14/25(Tue)14:39:47 No.103894026
how the fuck do you come out with 10 different equality operators and not a single one behaves in a sane way
you cant convince me that they weren't laughing their asses off in the CL committee while they were defining this shit, it has to be some kind of elaborate troll
Anonymous 01/14/25(Tue)14:39:57 No.103894029
Does anyone actually like Emacs as a text editor? All I ever hear gnutards rave about is the LispM
Anonymous 01/14/25(Tue)14:42:54 No.103894075
ok i think "equal" is actually the sane one
Anonymous 01/14/25(Tue)14:45:19 No.103894111
asm
>>103891434
Still waiting for a system programming Lisp with performance similar to C/C++.
Bonus points for inline assembly support, and keywords with sane names.

I wish to write a kernel in pure Lisp. Don't judge me.
Anonymous 01/14/25(Tue)14:46:31 No.103894123
>>103894111
whats wrong with Common Lisp
it should be fast enough
Anonymous 01/14/25(Tue)14:46:55 No.103894132
>>103894111
not happening
lisp is incompatibe with fast compute because its high level
or it wont be lisp anymore
Anonymous 01/14/25(Tue)14:47:41 No.103894143
>>103894111
in fact we have an OS written in Common Lisp already
https://github.com/froggey/Mezzano
Anonymous 01/14/25(Tue)14:48:01 No.103894149
If the plan to get emacs to run Guile or CL happens.
Will you rewrite your own code to them? If yes, which?
Anonymous 01/14/25(Tue)14:49:02 No.103894163
>>103894149
isnt Guile already supported? or am i making it up?
Anonymous 01/14/25(Tue)14:49:03 No.103894164
1728075849517943
>>103893571
>>103893647
The environment is just cons, extending the environment for a function ((lambda (x y) ...) 1 2) is just (map cons (x y) (map eval (1 2)))

>>103894111
>I wish to write a kernel in pure Lisp.
This was posted a few threads ago:
https://github.com/udem-dlteam/mimosa
https://www.youtube.com/watch?v=GWr4iQfc0uw
Anonymous 01/14/25(Tue)14:57:18 No.103894249
>>103894143
We've also got Movitz, the developers of PicoLisp also wrote a OS in itself.
Anonymous 01/14/25(Tue)15:00:51 No.103894283
>>103894149
>>103894163
https://lwn.net/Articles/1001645/
This is what it's about.
Anonymous 01/14/25(Tue)15:04:22 No.103894318
>>103893989
in Clojure (any functional, immutable language, really) equality is the most dead simple concept
Anonymous 01/14/25(Tue)15:09:26 No.103894371
What's the point of learning lisp again?
Anonymous 01/14/25(Tue)15:09:50 No.103894374
>>103894318
yeah but in CL they decided to port each and every one of the 5000 equality operators that existed in prehistoric lisps
Anonymous 01/14/25(Tue)15:11:18 No.103894388
>>103894111
sbcl/src/compiler/vop.lisp
Anonymous 01/14/25(Tue)15:12:20 No.103894402
>>103894371
what's the point of doing anything?
just lay down and die.
Anonymous 01/14/25(Tue)15:12:58 No.103894408
>>103894402
I want to job hop
Anonymous 01/14/25(Tue)15:15:20 No.103894431
>>103894408
like all niche languages, lisp is a double edged sword for wagecucking purposes
on one hand, there are not many job opportunities
on the other hand, on the occasion where you find a job opportunity, you're going to be the man for it if you've learned it
Anonymous 01/14/25(Tue)15:34:34 No.103894645
>>103891434
Any lisp with a good native GUI library? I found Ciel but it doesn't work on windows sadly
Anonymous 01/14/25(Tue)15:46:11 No.103894808
>>103894645
how about https://commonqt.common-lisp.dev/
Anonymous 01/14/25(Tue)15:54:16 No.103894893
>>103894123
>whats wrong with Common Lisp
Garbage collection is incompatible with kernel programming. You generally don't want the language to get in the way, which is why C and assembly are the top choices.
Anonymous 01/14/25(Tue)15:57:25 No.103894927
>>103894132
>lisp is incompatibe with fast compute because its high level
Doubt. Current implementations, yes, but theoretically there's nothing stopping someone from making a Lisp with pointers and manual memory management.

It's just that existing implementations have decided to stay at a higher level.
Anonymous 01/14/25(Tue)15:58:08 No.103894939
file
>if you don't have to handle the else case you should use "when" and not "if"
why? i dont get it
it looks the same to me
Anonymous 01/14/25(Tue)16:01:50 No.103894990
file
oh wait now i get it
its because if you use "if" it will interpret the second expression as the else case
with "when" you can run any number of expressions and it will return the last one
Anonymous 01/14/25(Tue)16:03:47 No.103895021
There are like a 100 lisp versions/diaclects. Which one to choose?
Whoch are outdated? Which are still in use? Are some niche?
Anonymous 01/14/25(Tue)16:08:03 No.103895067
>>103895021
hard to say, a lot of them are used to an extent
if we were to list them by active users as of today Clojure would probably lead the way, followed by Common Lisp
Anonymous 01/14/25(Tue)16:09:11 No.103895077
>>103895067
Is common lisp the candela one?
Anonymous 01/14/25(Tue)16:10:42 No.103895095
file
>>103895077
if you're thinking about pic related, it's an implementation of Common Lisp, yes
Anonymous 01/14/25(Tue)16:11:43 No.103895110
actually now that i think about it emacs lisp is probably more used than Clojure and Common Lisp
not sure if its usable as a general purpose language though
Anonymous 01/14/25(Tue)16:13:28 No.103895136
>>103894893
>Garbage collection is incompatible with kernel programming. You generally don't want the language to get in the way,
Lisp machines had garbage collection. Mezzano has a GC and the whole thing is Lisp.

>which is why C and assembly are the top choices.
People use assembly because it has all the instructions your processor has, which you need for I/O, setting up paging, switching task state, and a lot of other things an OS has to do. People use C because of shills, baby duck syndrome, and cargo culting. There's nothing special about C at all.
Anonymous 01/14/25(Tue)16:22:49 No.103895246
1692606327338520
>>103894939
>>103894990
It's clearer desu, also in some lisps (if nil nil) is an unspecified value
Anonymous 01/14/25(Tue)16:26:21 No.103895297
>>103895110
Definitely not, they're applications written in CL with more lines of code than the cornucopia of MELPA + GNU Emacs combined.
Anonymous 01/14/25(Tue)16:29:33 No.103895343
>>103894283
People have been talking about guilemacs for ages. I think most people have just stopped caring.
Anonymous 01/14/25(Tue)16:44:23 No.103895511
guilemacs
>>103895343
This guy is single-handedly reviving it from the ashes:
https://codeberg.org/lyrra/guilemacs
Anonymous 01/14/25(Tue)16:52:28 No.103895608
>>103894808
Boy you gave me a scare.
Unfortunately this is Qt4.
I wish we could use Qt6 via Jambi but Jambi itself is not that active.
Anonymous 01/14/25(Tue)16:54:15 No.103895633
>>103895608
there is a qt5 fork too
https://github.com/commonqt/commonqt5
Anonymous 01/14/25(Tue)16:58:59 No.103895681
>>103895633
The last version of Qr4 will reach commercial EOL this may.
I think someone could fork it for Qt6 since it was lass disruptive than 4 to 5.
Anonymous 01/14/25(Tue)17:00:34 No.103895699
>>103895681
>The last version of Qt5
need top stop writing while drunk.
Anonymous 01/14/25(Tue)17:02:45 No.103895728
>>103895681
>>103895699
what does the commercial EOL imply in practice?
Anonymous 01/14/25(Tue)18:02:16 No.103896439
>>103895728
Nothing, the only thing that matters is when/if distros start pulling it (qt4) out of their repos then you'll have to distribute it yourself.
Anonymous 01/14/25(Tue)18:48:16 No.103896978
>>103895343
I am outside this debate but it seems to me that whatever-macs that succeeds should have elisp alongside the other language and *very* slowly detach itself.
Anonymous 01/14/25(Tue)20:16:12 No.103897926
>>103895343
Elisp has been getting faster over the years too.
Anonymous 01/14/25(Tue)21:10:35 No.103898495
#:abcl
#:allegro
#:ccl
#:clasp
#:clisp
#:cmucl
#:cormanlisp
#:ecl
#:gcl
#:lispworks
#:mkcl
#:scl
#:sbcl

choose your fighter
Anonymous 01/14/25(Tue)22:02:24 No.103898930
Anonymous 01/14/25(Tue)22:40:28 No.103899275
>>103895343
>>103897926
I'm more interested in Lem. I wish emacs just used common lisp from the start.

The only thing holding me back from using it more is that I got too used to meow-mode in emacs. It would be great if Lem had something equivalent.
I guess I could try doing it myself if I could figure out how to re-bind keys in Lem's built-in vi mode.
Anonymous 01/14/25(Tue)22:52:51 No.103899357
>>103899275
The last time I looked, it seemed like Lem was architected to allow the existence of more than one style of editing. Currently, there's only emacs and vi, but there's room for more "global" modes.
(lem:current-global-mode)

https://github.com/lem-project/lem/discussions/1532
Anonymous 01/14/25(Tue)23:26:14 No.103899687
>>103899357
Well the point of meow on Emacs was to be a more native modal editing system than evil. And then you're supposed to just re-bind its keys to whatever you want (it doesn't even come with a default, just a "recommended" config you can grab if you want).
But since Lem already has a native modal editing system (its vi mode) I should probably just use that like it's meow, and just re-bind its keys. I just don't know how to do it.

I found the default key binds for vi-mode listed here, so I tried rebinding something using define-key as shown in that link (and put it in my ~/.config/lem/init.lisp), but it doesn't seem to work.
Anonymous 01/14/25(Tue)23:27:34 No.103899700
>>103899687
>I found the default key binds for vi-mode listed here
Forgot the link: https://github.com/lem-project/lem/blob/main/extensions/vi-mode/binds.lisp
Anonymous 01/14/25(Tue)23:31:32 No.103899742
>>103899357
>>103899687
>>103899700
Oh shit, nevermind. I was putting it in my config.lisp instead of init.lisp. I guess config.lisp is where lem stores its own values?
Anyway, this is definitely a good start. I'm going to have to try to re-create my meow setup now with this.
Anonymous 01/15/25(Wed)01:00:51 No.103900319
Was thinking of working through SICP. Whats the easiest way to set it up with neovim ?
Anonymous 01/15/25(Wed)01:42:58 No.103900565
Are there any Lisps that compile a low level executable similar to Rust, C or Zig? I am not interested in Clojure's AoT or Common Lisp's big size image executables but something low level and nice.

Basically, a low level Lisp.
Anonymous 01/15/25(Wed)01:51:55 No.103900616
wizard
>>103900319
Git gud
https://nguyenhuythanh.com/posts/getting-started-with-sicp-in-vim/
https://github.com/Olical/conjure/wiki/Quick-start:-Racket-(stdio)
https://docs.racket-lang.org/sicp-manual/SICP_Language.html
Anonymous 01/15/25(Wed)02:22:22 No.103900789
>>103900565
There are many experiments with it but nothing that got farther than a toy project.
In fact, seems like no lisp got farther than a toy project beyond some a few Scheme dialects, CL and Clojure.
It's funny, I'm also part of the arena fps community and it's constantly the same question there just like here. People keep asking for new arena shooters or different arena shooters and in the end the answer has always been and still is quake/UT because everything else is dead, whether you like it or not.
Anonymous 01/15/25(Wed)02:46:59 No.103900972
>>103900789
Fair enough, why hasn't it picked up? I feel like Lisp is so powerful, simple and easy to implement that I am constantly baffled when new languages like Hare and Zig create their own grammar instead of using the Lisp syntax.
Anonymous 01/15/25(Wed)03:26:46 No.103901222
>>103900972
>Fair enough, why hasn't it picked up?
Most languages don't pick up, even those who are less esoteric than lisps. Scheme and CL come from a different time, when there weren't already 10-15 standardized languages that covered every possible nieche and then some (albeit poorly in many cases).
Clojure could fight past it because it re-uses the JVM. But that as you point out comes with technical limitations.

So a new language, on a new ecosystem? You're climbing uphill. Make it a lisp? Double uphill.
Anonymous 01/15/25(Wed)03:56:38 No.103901418
>>103900565
Just so you know Common Lisp does compile to low level instructions like in C. You can even print out the actual assembly code for any function. For example:
(defun f (x y) (declare (optimize (speed 3) (safety 0) (debug 0))) (+ x y))
(disassemble #'f)

The only reason it has to create large executables is because Lisp inherently allows code to modify itself or define new code even at runtime. So it has to include the whole compiler.

So the only way you could make a Lisp that can compile to tiny executables like C is if you get rid of one of the coolest things about Lisp. In particular you'd have to get rid of 'eval' from the final product.
I think I actually read somewhere that you can create stripped down versions of Lisp executables by removing unnecessary stuff like 'eval'. I haven't tried it though so I can't say if it gets as small as a C program. Probably not.
Anonymous 01/15/25(Wed)04:21:22 No.103901567
loosh
http://www.whale.to/c/loosh.pdf
Anonymous 01/15/25(Wed)04:42:21 No.103901722
>>103901567
>blue on blue
Why are autists like this
Anonymous 01/15/25(Wed)05:07:46 No.103901852
1718763802020789
only when programming in scheme can you look up an error and get something like this. grim
Anonymous 01/15/25(Wed)05:43:21 No.103902089
>>103901418
I am aware of this feature but I still feel like Common Lisp is a bloated mess because it includes the Lisp runtime with it.

As for removing unnecessary stuff like 'eval', can't the compiler detect if 'eval' is used explicitly and if it is, import it...

I say that because I know compilers like Zig have the ability to detect runtime types in compile time.

You can have a Zig's anytype as a function parameter and if the function is used, it will check how the anytype was used.

For example, if you had a sum function for integers and floats, if you used a string for the anytype, it'd given an error. But, if you give two numbers or two floats, it wouldn't error out.

This is completely different to Go where you have to define interfaces and interface checking can be done in runtime.

I also feel like since Common Lisp was created and today's day in age, there has been a plethora of compiler research and compiler optimizations to the point where the features we ask for should be trivial to implement.
Anonymous 01/15/25(Wed)05:58:11 No.103902201
technology
>>103901567
>No HTTPS in 2025
Into the trash it goes.
Anonymous 01/15/25(Wed)06:01:43 No.103902219
>>103902089
>>103901418
>>103900565
for what its worth i remember reading that LispWorks' implementation solved the issue of big executables
Anonymous 01/15/25(Wed)06:03:21 No.103902235
>>103901722
>blue monochrome
Because it looks nice.
Anonymous 01/15/25(Wed)06:14:36 No.103902301
>>103902089
>As for removing unnecessary stuff like 'eval'
It can, you don't even have to depend on the compiler, you can go HAM on a image with MAKUNBOUND until it's rendered completely inoperable but small.
Anonymous 01/15/25(Wed)09:11:01 No.103903612
Anonymous 01/15/25(Wed)10:53:51 No.103904544
https://melpa.org/#/isend-mode

This is a wonderful and generalized solution for adding REPL support to anything that takes terminal input.
Anonymous 01/15/25(Wed)11:02:31 No.103904628
>>103902089
>I am aware of this feature but I still feel like Common Lisp is a bloated mess because it includes the Lisp runtime with it.
You aren't wrong, It is bloated but it isn't nearly as bad as it appears on face value; CL doesn't typically utilize dynamic libraries, when you run a program written in C your bringing in a surprisingly large run-time environment with it, libc6 alone can reach a quarter of the size of the CL runtime environment.
Anonymous 01/15/25(Wed)12:39:28 No.103905748
>>103904544
isnt this feature buildin to emacs?
Anonymous 01/15/25(Wed)12:56:35 No.103905993
>case uses eql and not equal in Common Lisp
meh, that's not so great
Anonymous 01/15/25(Wed)13:03:18 No.103906097
apparently you can configure Alexandria's switch to use equal

(switch ("XY" :test 'equal)
("XY" "an X and a Y")
("AB" "an A and a B"))
Anonymous 01/15/25(Wed)13:19:26 No.103906312
file
thanks google, very cool
Anonymous 01/15/25(Wed)13:34:23 No.103906513
is it true that you shouldn't mutate lists that you create with quote, like
'(1,2,3)
?
i think i've read it somewhere but it doesnt seem right, i see people doing it all the time in examples on the internet
Anonymous 01/15/25(Wed)13:38:45 No.103906567
i meant
'(1 2 3)
of course
fucking muscle memory
Anonymous 01/15/25(Wed)13:50:18 No.103906711
>this thing actually compiles
what were they thinking? leftist meme tier
(loop for x being the element of #(1 3 5)
do (print x))
Anonymous 01/15/25(Wed)13:54:22 No.103906767
so even though it's retarded and arbitrary i've taken to the philosophy of 'how retarded is it to count to 10' as a means of measuring a language. and by that metric lisp is king

lisp:
(dotimes (i 10)
(print (1+ i)))


python:
for i in range(1, 11):
print(i)


C:
#include <stdio.h>

int main() {
for (int i = 1; i <= 10; i++) {
printf("%d\n", i);
}
return 0;
}


Rust:

fn main() {
for i in 1..=10 {
println!("{}", i);
}
}


Go

package main

import "fmt"

func main() {
for i := 1; i <= 10; i++ {
fmt.Println(i)
}
}
Anonymous 01/15/25(Wed)14:06:22 No.103906921
>>103906513
If I'm remembering correctly this is only applicable to Emacs Lisp because you couldn't be sure the interpreter wouldn't run a train on self-evaluating forms.
Anonymous 01/15/25(Wed)14:26:24 No.103907186
this loop shit in Common Lisp is so gay
they basically made up their own language inside of the language, this shit ain't lispy in the slightest
Anonymous 01/15/25(Wed)14:30:20 No.103907238
>>103907186
https://iterate.common-lisp.dev/
Anonymous 01/15/25(Wed)17:01:12 No.103909124
>>103906513
>>103906567
From https://www.gnu.org/software/emacs/manual/html_node/elisp/Modifying-Lists.html
>You can modify the CAR and CDR contents of a cons cell with the primitives setcar and setcdr. These are destructive operations because they change existing list structure. Destructive operations should be applied only to mutable lists, that is, lists constructed via cons, list or similar operations. Lists created by quoting are part of the program and should not be changed by destructive operations.
>For example, the Lisp expression "aaa" yields a string, but you should not change its contents. [...] When similar constants occur as parts of a program, the Lisp interpreter might save time or space by reusing existing constants or their components. For example, (eq "abc" "abc") returns t if the interpreter creates only one instance of the string literal "abc", and returns nil if it creates two instances. Lisp programs should be written so that they work regardless of whether this optimization is in use.
I think this is specifically for elisp from how the interpreter optimizes constants
Anonymous 01/15/25(Wed)17:41:06 No.103909538
1706410092298416
>>103909124
ok i did some research and apparently it applies to Common Lisp as well.
i mean i can get over the quoted list part, using
(list ...)
is not the end of the world. but "arrays, strings, structures, instances" too? whats the point of letting me mutate anything at this point if the compiler can fuck it all up?
Anonymous 01/15/25(Wed)17:42:32 No.103909554
im starting to think that the people behind Common Lisp were deeply retarded
so much dumb shit
Anonymous 01/15/25(Wed)17:45:59 No.103909573
>>103906767
there are probably 100 different ways of doing that in the loop macro
Anonymous 01/15/25(Wed)17:54:20 No.103909640
>>103909538
Interesting. In the case of arrays they are mutated frequently in sbcl's own implementation (e.g. https://raw.githubusercontent.com/sbcl/sbcl/refs/heads/master/src/code/reader.lisp), a literal array must be when you write #(1 2 3) directly
Anonymous 01/15/25(Wed)18:10:40 No.103909838
Untitled
>>103909640
The compiler also emits a warning (with citation) when a literal array is mutated
Anonymous 01/15/25(Wed)18:16:17 No.103909910
>>103909838
it's nice that at least it detects it for you ig
Anonymous 01/15/25(Wed)18:31:04 No.103910052
>>103909538
>>103909838
This is a known problem across all dynamic languages, you can't avoid it, Common Lisp is simply being honest and forthcoming.
Anonymous 01/15/25(Wed)18:47:38 No.103910200
>>103909538
I just get annoyed by compiler warnings so I just do not have this problem. Maybe you should use rust.
Anonymous 01/15/25(Wed)18:53:56 No.103910254
>>103910052
>This is a known problem across all dynamic languages
this is obviously false
such a problem doesn't exist in, say, python, ruby or PHP
Anonymous 01/15/25(Wed)19:03:39 No.103910337
>>103910200
>you dislike an absolutely retarded decision that betrays the users and the ergonomics of the language to allow for unimportant micro optimizations?
>heh, maybe you should use the forbidden r-word
we're reaching levels of Cnility that shouldn't even be possible here
Anonymous 01/15/25(Wed)19:26:54 No.103910581
>>103910337
>you shouldn't mutate this
>ok
>does not mutate thing
>move on
literally just use (list pee poo paa) or (vector pee niss pus sy) what is the problem
Anonymous 01/15/25(Wed)19:58:45 No.103910961
>>103910337
Xah? you accidentally revealed you already knew exactly why this error is emitted.
Anonymous 01/15/25(Wed)20:04:41 No.103911015
>>103910337
>do stupid thing
>language tells you that you did a stupid thing
literally what is the problem
Anonymous 01/15/25(Wed)22:30:24 No.103912473
>>103907186
>use a language that you can easily make your own language via macros
>nooo don't make another language with the language
(loop (seething))
Anonymous 01/16/25(Thu)01:48:40 No.103914045
$100
>rich
https://github.com/clojure/core.async/commit/03b97e0
Anonymous 01/16/25(Thu)02:44:36 No.103914419
>>103914045
I don't know how many people will need this capability, but the few that will may be very grateful for this. Having a system for multiple async threads of execution to talk to each other is not the easiest problem to solve. I like that Rich sees that the flow of communication might be organized into a Graphs and that feedback loops are a possibility.
Anonymous 01/16/25(Thu)02:45:36 No.103914424
>>103914419
s/a Graphs/graphs/;
Anonymous 01/16/25(Thu)06:17:06 No.103915685
electric3-explainer
https://github.com/hyperfiddle/electric
Anonymous 01/16/25(Thu)09:23:48 No.103917301
>>103906767
In Haskell you get "mapM_ print [1..10]" and you could argue that "1+9" does the same thing in APL.
>>103907186
The lession of Lisp for me is that programming is more often than not a matter of creating a language to describe your problem. It is a reasonable point that it is not transparently composable, but I wouldn't dismiss it entierly.
>>103909554
Keep in mind that CL didn't want to create a entirely new language, but was interested in backwards compatibility to the existing Lisp traditions.
>>103895021
There are many Lisp dialects, but you can disregard most of them. Scheme is neat, but if you want to learn Lisp, you learn (Common) Lisp.
>>103894029
It is not a Lisp Machine, it is a neat Un*x shell.
Anonymous 01/16/25(Thu)12:33:22 No.103919520
>>103910961
faaakhead
Anonymous 01/16/25(Thu)13:05:28 No.103919932
>>103914419
After writing lots of core.async code I'm convinced if application level code touches channels the code is poorly structured. Rich's flow ns solves this problem.
>>103915685
Can't get over the insane brain power in the Clojure world
Honorable mention of this new library, I bet the flow ns can be ported to it
https://git.sr.ht/~hiredman/machinate/
Anonymous 01/16/25(Thu)14:34:25 No.103921126
>>103910581
>>103911015
there is nothing intrinsically "stupid" about mutating a literal, this is something that is completely normal in every language on earth. again, this is a betrayal of users to achieve unimportant micro optimizations.
but lets say that you really want to go this way, you should just forbid mutation of literals. if you mutate a literal, the compiler refuses to compile. this "undefined behavior" bullshit is beyond stupid and unreasonable, there is no way around it.
>>103910961
im not xah and the guy who knew about this issue in elisp was not me
Anonymous 01/16/25(Thu)14:37:19 No.103921162
>>103912473
you're completely missing the point
loop goes completely against the "lisp way", it sticks out like a sore thumb
such a thing should have never had a place in the language itself
Anonymous 01/16/25(Thu)15:23:50 No.103921657
>>103921126
>the compiler should stop me from doing silly billy things instead of just calling me a retard for it
Why do you hate fun?
Regardless, SBCL can trivially be set to throw an error here, and in elisp it's technically harmless to do this, just unwise.
Anonymous 01/16/25(Thu)15:46:32 No.103921921
>>103921657
>SBCL can trivially be set to throw an error here
how? i googled for it and couldnt find anything
Anonymous 01/16/25(Thu)16:02:17 No.103922097
whats the difference between returning a sharp quoted function and a lambda? seems like the same thing to me
Anonymous 01/16/25(Thu)16:18:23 No.103922258
>>103902089
>Common Lisp is a bloated mess because it includes the Lisp runtime with it.
is that even a negative? i've seen people patch binaries without having the source code, imo it's an advantage that you can modify and patch the program logic after compilation.
Anonymous 01/16/25(Thu)17:03:17 No.103922653
i dont understand why we have to define setter functions in Common Lisp
why isnt the language handling such a basic thing?
Anonymous 01/16/25(Thu)17:13:52 No.103922750
>>103922653
lispy oop brain damage is still oop brain damage
Anonymous 01/16/25(Thu)17:16:45 No.103922788
>>103922750
such brain damage is nowhere to be found in OOP languages though
Anonymous 01/16/25(Thu)17:24:37 No.103922863
>>103922788
java saar
Anonymous 01/16/25(Thu)17:26:22 No.103922880
>>103922863
you dont have to define setters in java though
you can do it but it's not imposed upon you
Anonymous 01/16/25(Thu)17:30:08 No.103922933
>>103921921
increase the safety setting probably. Read the manual?
>>103922880
le what? Unless you use that canerous thing called lombok, how do you avoid it?
>uhhh what if we had macros
>but they are in your editor
>and they break
Anonymous 01/16/25(Thu)17:31:22 No.103922949
>>103922933
>le what? Unless you use that canerous thing called lombok, how do you avoid it?
MyObject myObj = new MyObject();
myObj.Field = "fieldValue";
Anonymous 01/16/25(Thu)17:53:03 No.103923172
>>103922949
private fields sir good morning. And list doesn't need that either.

obj.field is actually field(obj)
Anonymous 01/16/25(Thu)18:07:13 No.103923324
Why is loop not lispy?
Isn't the purpose of Lisp to define a language to solve every problem domain?
Anonymous 01/16/25(Thu)18:32:45 No.103923549
>>103923172
can you show me a snippet of code where you set a field's value without a setter?
maybe you're right im still learning, but i couldn't find it
Anonymous 01/16/25(Thu)18:34:03 No.103923558
>>103923324
even if that's true, there is a difference between a third party implementing it and having that shit in the language itself
it's just out of place
Anonymous 01/16/25(Thu)18:42:05 No.103923618
>>103923324
Most Lisp DSLs don't feel like entirely different languages crammed between two parens.
LOOP is rather over-hated though.
Anonymous 01/16/25(Thu)18:42:59 No.103923626
>>103923558
How come? Loop is the prime example of Lisp's powerful macro. If anything, loop is the most lispy thing in Common Lisp.
Anonymous 01/16/25(Thu)18:50:13 No.103923685
>>103923549
What I am saying is that the syntax
obj.field is actually a setter with name "field" with that specific object instance as argument. Exactly like lisp. But lisp has all the innards open so you can do whatever, have both the setter and getter with the same name, or not, or just have none at all.

In lisp, slot-value always work so
(slot-value my-penis 'erect-size) => "15 cm"
(setf (slot-value penis 'erect-size) 5)
;; if you had an accessor named erect-size
(erect-size my-penis) => "5 cm"
(setf (erect-size my-penis) "40 cm")
(erect-size my-penis) => "40 cm"
You can of course make your own getters, and for settings stuff you need to make new setf expander/method for that class.
As I said, lisp just makes it explicit that Obj.field is actually (field obj)
Anonymous 01/16/25(Thu)20:49:50 No.103924706
(One of the best things Julia did was completely reject OO.)
Anonymous 01/16/25(Thu)22:23:12 No.103925458
>>103924706
yeah too bad the ecosystem is the software equivalent of a garage sale
Anonymous 01/16/25(Thu)23:36:33 No.103925891
Does anybody know why tab completion in emacs evil-mode when using : is inconsistent with M-x? For example when I type :customize-v I can't autocomplete to :customize-variable but I can autocomplete to M-x customize-variable with M-x customize-v.
Anonymous 01/17/25(Fri)00:17:50 No.103926112
appt.el is a little built-in package that I have seen no one mention before.
Simply use M-x appt-add to make Emacs warn you with a message at a specific time.
Anonymous 01/17/25(Fri)01:06:43 No.103926444
>>103924706
I don't understand the view of totally rejecting OO. I can understand not using it as the framework of the entire program (i.e. that every component of the program is an object and all functions belong to some class).

But isn't OO still very useful if the thing you're modelling is a collection of objects? Like say I'm making a physics simulation, which requires a hierarchy of different types of objects and properties.
Some objects may be solid, some may be fluid. I could then make 2 parent classes for each and have child classes like "rock" and "water" that inherit those properties and such.
Or the classic example of animal classes which inherit the "mammal" or "reptile" class or something.

What better way to model those than by using OO?
I guess the takeaway of what I'm saying is that it makes sense to not use OO for the structure of code itself (like making parts of the program be objects), but if the actual data being modeled by the program is a collection of objects then isn't OO the best choice for that?
Anonymous 01/17/25(Fri)01:54:14 No.103926832
>>103926444
>I don't understand the view of totally rejecting OO
That must be because you're a mediocre programmer.
Anonymous 01/17/25(Fri)02:02:30 No.103926874
>>103926444
>>103926832
As a more productive comment, your examples are silly because we non-object oriented programmers don't even get these "problems" in the first place. In Clojure it is perfectly natural to have a map that is named rock that contains some data, which we can enforce with Malli/spec.
And if you're in a statically typed language you can have a struct that implements an interface, which is what even hardcore java programmers recommend nowadays.

The marketing genius of object oriented programmers have been to make up a bunch of problems that sounds as if they're solved perfectly by oop. But the trick is that they weren't problems until you started doing oop.
Anonymous 01/17/25(Fri)02:08:05 No.103926911
>>103926874
>you can have a struct that implements an interface
Is that not OO?
Anonymous 01/17/25(Fri)02:13:56 No.103926933
>>103926444
>>103926832
>>103926874
and as a THIRD BONUS COMMENT, if you're doing a physics simulation then often an object oriented style will be useless because oop is killing your cache.
Let's say you have thousands of objects falling down against earth, so you want to apply some -dy operation on every object.
If you want to do this efficiently then you should have the y coordinate of each object saved in an array so that you utilize the cache efficiently.
#Instead of 
[{"rock": {"y": 5, "x": 3}}, {"stick": {"y": 10, "x": 2}}]

#You have
names = ["rock", "stick"]
ys = [5, 10]
xs = [3 2]


This is one (of many) reasons why mathematical languages (like julia) just do plain matrices - they have superior cache performance to the alternatives.

>>103926911
>Is that not OO?
No, it's "just" data that has some properties. Mathematicians have been doing that for... centuries? "All whole numbers that are less than 100". "All whole numbers that are divisible by x".
Anonymous 01/17/25(Fri)02:47:41 No.103927112
>>103926112
I had no idea that existed, but that's very useful. How did you find it?
Anonymous 01/17/25(Fri)02:51:34 No.103927131
>>103925458
>software equivalent of a garage sale
plot twist: the garage is on the property of a mad professor.
https://github.com/JuliaRegistries/General/pulls
Anonymous 01/17/25(Fri)02:52:59 No.103927138
Give me your craziest hacks with eshell
Anonymous 01/17/25(Fri)03:14:25 No.103927264
>>103926832
Keep your insecurities to yourself.
Anonymous 01/17/25(Fri)03:25:26 No.103927340
>>103927112
Wandering around in emacs directory after seeing the source of `sunrise-sunset'.
Anonymous 01/17/25(Fri)03:46:13 No.103927425
>>103927264
Sir this is a 4chan
Anonymous 01/17/25(Fri)04:13:34 No.103927595
>>103926444
Julia rejected OO, but they still have tons of polymorphism via type-based dispatch. It's like Common Lisp's defgeneric/defmethod is used by default with a more expressive type system.
https://www.youtube.com/watch?v=kc9HwsxE1OY

https://lispcookbook.github.io/cl-cookbook/type.html
https://docs.julialang.org/en/v1/manual/types/
Anonymous 01/17/25(Fri)04:39:33 No.103927755
>>103926874
why should I use Malli? :pre and :post conditions on functions are already a stable thing in the language. I can define a function that checks the integrity of values based on our assumptions of them, then put this function into the :post condition of any function that produces or modifies those values. I can use a macro to run my checks, and raise an error containing the code of the check that failed, alongside the variables at the time of the check, preventing any ceremony regarding error messages and shit. the error messages are just code.
Anonymous 01/17/25(Fri)04:44:02 No.103927783
>>103927755
one could also imagine a function that wraps the checking function and only runs the check every n times, where n grows larger the longer that the program runs. this would allow you to validate state on programs that have been running potentially for years, but not do it so often that runtime is too slow.
Anonymous 01/17/25(Fri)05:08:18 No.103927924
file
>>103927755
If you're happy with that solution then go for it, I'm not going to force you or even insist that you use Malli. That said, the features you posted is not everything that Malli can do. But if you don't care about those features then nothing lost.
Anonymous 01/17/25(Fri)08:08:08 No.103928980
>>103926911
What's hilarious is that technically CLOS Isn't OO either because it doesn't support encapsulation or information hiding.
Anonymous 01/17/25(Fri)08:30:39 No.103929127
How do I become as powerful as Tarsius?
>Find random Emacs repo
>Aggressively refactor and rewrite anything you find disagreeable
>Make PR
>On to the next repo
He's an elisp machine and I actually thinks he just opens the source code of packages to and starts refactoring before even trying them out.
Anonymous 01/17/25(Fri)08:40:38 No.103929192
>>103929127
Have protestant work ethic and be paid full-time to work on Emacs.
Anonymous 01/17/25(Fri)09:04:19 No.103929389
35d3df2716066e417c9783b5943396f5
>>103927138
I used this eshell abomination for archiving audio
for f in $*(:r) {
(format "%s %s.mp3 -> tmp.flac" (format-time-string "%T") f)
ffmpeg -hide_banner -loglevel warning -y -i $f.mp3 -vn -c:a flac tmp.flac

(format "%s tmp.flac -> %s.opus" (format-time-string "%T") f)
opusenc --bitrate 32 tmp.flac $f.opus

(when nil
(delete-file (format "%s.mp3" f))
(format "%s deleted %s.mp3" (format-time-string "%T") f))
}

(when (file-exists-p "tmp.flac")
(delete-file "tmp.flac")
(format "%s deleted tmp.flac" (format-time-string "%T")))
Anonymous 01/17/25(Fri)11:02:48 No.103930522
>>103921657
There's nothing silly about it, the idea that every literal must also be a constant is bizarre
Anonymous 01/17/25(Fri)11:44:41 No.103930941
>>103909838
* (defun f () '(1 2 3))
* (defvar a (f))
* (setf (nth 1 a) 0)
* a
(1 0 3)
* (f)
(1 0 3)

Haha holy shit what. Going to definitely start using (list) more
Anonymous 01/17/25(Fri)12:12:40 No.103931195
1719101551970223
>>103930522
nta but this is what the spec says:
>All conforming programs must obey the following constraints, which are designed to minimize the observable differences between compiled and interpreted programs:
>The definition of a function that is defined and declared inline in the compilation environment must be the same at run time.
>Within a function named F, the compiler may (but is not required to) assume that an apparent recursive call to a function named F refers to the same definition of F, unless that function has been declared notinline.
>The argument syntax and number of return values for all functions whose ftype is declared at compile time must remain the same at run time.
>Constant variables defined in the compilation environment must have a similar value at run time. A reference to a constant variable in source code is equivalent to a reference to a literal object that is the value of the constant variable.
http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-2-2-3.html
I don't know the rationale, but at a guess it's so stuff can be statically allocated once and left alone by gc

It's similar in C, where a literal array or string is placed in .data, so mutating it mutates everything (even outside lexical scope):
char *f()
{
return "damn";
}

int main()
{
printf("%s\n", f());
f()[0] = 'z';
printf("%s\n", f());
return 0;
}

$ tcc test.c
$ ./a.out
damn
zamn
Anonymous 01/17/25(Fri)12:34:12 No.103931375
>>103900565
Jank may cover this gap.
Anonymous 01/17/25(Fri)13:12:52 No.103931789
>>103931195
My bad. I didn't know it was normal in old-school programming.
Anonymous 01/17/25(Fri)14:08:53 No.103932474
>>103931789
np, I hadn't seen this stuff before you or the other anon discovered it either
Anonymous 01/17/25(Fri)14:23:48 No.103932649
>>103931195
Wait, couldn't this potentially cause compiled code to append/rewrite a list instead of prepending? that would be horrible for performance.
Anonymous 01/17/25(Fri)14:25:32 No.103932664
vito
So I have two devices, my laptop and my desktop:

If on my laptop, I create a new file using for example
M-x org-roam-node-find

And I place a * TODO item, and then check org-agenda, the item is automatically shown in the agenda for current week or day.

But it is not on my dekstop. This is the current configuration I'm trying to test on both devices:

;; Org-Roam configuration
(after! org
(setq org-roam-directory "~/Notes/")
(setq org-roam-index-file "~/Notes/inbox.org")
(org-roam-db-autosync-mode)
(setq org-hide-emphasis-markers t))


The ironic thing is that the device that is working as expected, DOES NOT have any org-agenda configuration set anywhere. And I was trying to set something like

;; ;; (setq org-agenda-files (directory-files-recursively "~/Notes" "\\.org$"))
;; or
;; (setq org-agenda-files '("~/Notes/"
;; "~/Notes/daily/"))


In my desktop.
The only difference I can notice is that on my laptop, I have (org) enabled in init.el and roam (roam1) was installed by package-install, I think. While on my desktop I placed (org + roam2).

Anyone has any idea what is going on?
Anonymous 01/17/25(Fri)14:37:01 No.103932792
>>103932649
I'm not sure what you're thinking, but you could test your theory with sb-kernel:get-lisp-obj-address before/after making a change
Anonymous 01/17/25(Fri)15:05:34 No.103933063
1715542733510932
good morning saars, in common lisp for writing a file how can i get the current directory then concatenate the name of the file to write? using something like this dosent seem right:
(concatenate 'string (write-to-string (truename ".")) "file.txt")
-> "#p\"/home/user/currentdir/\"file.txt"

the library im using needs either pathname or string type so either would work but concatenate dosen't accept the 'pathname type
Anonymous 01/17/25(Fri)15:13:31 No.103933150
>>103933063
nevermind i found (merge-pathnames) after googling once
(merge-pathnames (truename ".") #P"file.txt")

but in that case if the user inputs "/dir/file.txt" instead of "./file.txt" or just "file.txt" should i check for if "/" is the first character or is there a standard for this? i think a path like /home/user/blah/blah/blah/../../file.txt" is acceptable so i can just use the standard (merge-pathname) if "." is the first character then?
Anonymous 01/17/25(Fri)15:33:28 No.103933332
d836ee5a3f7f27c4a79c10692a1cabf4
>>103927138
cw: this is some pretty crazy, high-level emacs hacking.
i change the font:
(add-hook 'eshell-mode-hook
(lambda () (buffer-face-set :family "IosevkaComfyWideFixed")))

and put this in my sway config:
bindsym $mod+Return exec emacsclient -c -n -e '(eshell)'
Anonymous 01/17/25(Fri)16:25:49 No.103933906
c28658718a2f762b01719876de3045d1
>>103933063
>>103933150
You could always expand user input with sb-unix:unix-realpath, so "./file", "../d/file", etc, is always the same. Also this function checks if a path exists and whether it's a file or directory (if it's helpful)
(defun path-kind (path)
(multiple-value-bind (exists error ino mode)
(sb-unix:unix-lstat path)
(declare (ignore error ino))
(when exists
(case (logand mode sb-unix:s-ifmt)
(#.sb-unix:s-ifreg :file)
(#.sb-unix:s-ifdir :directory)))))

* (path-kind ".")
:directory
* (path-kind "./init.el")
:file

(stolen from https://github.com/sbcl/sbcl/blob/master/src/code/filesys.lisp#L270)
Anonymous 01/17/25(Fri)16:29:31 No.103933944
>>103933332
For your sway config, does that give you the same eshell instance every time or does it create multiple eshell instances?

>>103933333 (curious who got it)
Anonymous 01/17/25(Fri)16:47:46 No.103934107
>windmove bindings conflict with org
>no idea for good alternative bindings
I think I will just kms
Anonymous 01/17/25(Fri)16:55:21 No.103934175
>>103934107
What are the bindings in question?
Anonymous 01/17/25(Fri)16:55:36 No.103934178
>>103934107
>want to switch windows with ctrl+hjkl (evilshart)
>already using ctrl+hl for paredit barf and slurp
it's over
Anonymous 01/17/25(Fri)16:57:27 No.103934193
>>103934178
Switch to ace-window for your window switching. Bind M-o to ace-window. M-o is unbound by default, and that'll free up C-h, C-j, C-k, C-l.
Anonymous 01/17/25(Fri)17:03:44 No.103934280
>>103933906
thank you this is nice, i didnt think of what would happen if the user input a directory
Anonymous 01/17/25(Fri)17:25:02 No.103934506
this package and system stuff in Common Lisp seems like a mess
Anonymous 01/17/25(Fri)17:34:25 No.103934613
>>103934178
Can you use super, like s-hjkl? It might conflict with your WM though (unless you use EXWM/StumpWM/Ratpoison).
Anonymous 01/17/25(Fri)18:12:27 No.103935032
>>103934613
Not that anon, but I let i3wm have Super and Emacs have Meta. They're setup by default that way, and I think it's good to maintain that boundary.
Anonymous 01/17/25(Fri)18:50:33 No.103935524
>>103934506
I thought so too when I first encountered it, but now I really love it. I think it seems like a mess for historic reasons, but asdf is basically the standard now I think.
And like most things in Lisp you have to just think about it differently. It's almost like it's a part of the program at runtime, and can be manipulated by the code itself, rather than something that just gets imposed at compile time.
For example you can actually run (in-package) inside functions, and have a single function that defines things in multiple different packages.
Anonymous 01/17/25(Fri)19:48:54 No.103936192
>>103931195
Do not do this.
https://wiki.sei.cmu.edu/confluence/display/c/STR30-C.+Do+not+attempt+to+modify+string+literals
Do this:
char a[] = "damn";

char *f()
{
return a;
}

int main()
{
printf("%s\n", f());
f()[0] = 'z';
printf("%s\n", f());
return 0;
}
Anonymous 01/17/25(Fri)23:32:47 No.103938685
>>103933944
same every time which is usually enough for just running shell commands.
Anonymous 01/18/25(Sat)02:14:34 No.103939984
>Four young women found out I was in Customer Service, cornered me, and talked for fifteen minutes about how much they missed Mailman and Emacs, and how Arizona (the JSP replacement we'd spent years developing) still just wasn't doing it for them.
https://sites.google.com/site/steveyegge2/tour-de-babel
Anonymous 01/18/25(Sat)03:03:30 No.103940335
have officially gotten to the point where my emacs config is mostly ancient shit i am afraid to touch
Anonymous 01/18/25(Sat)03:29:29 No.103940468
skeem
Anonymous 01/18/25(Sat)03:53:10 No.103940619
Anonymous 01/18/25(Sat)04:01:31 No.103940660
sikim
Anonymous 01/18/25(Sat)05:15:27 No.103941053
>>103926112
Here's another useful thing I just discovered that comes with stock emacs.
M-x world-clock
Anonymous 01/18/25(Sat)05:36:33 No.103941182
>>103934175
Shift-arrows to move between split windows.
Anonymous 01/18/25(Sat)05:59:50 No.103941353
>>103941182
This is going to conflict with a few org bindings.
Anonymous 01/18/25(Sat)06:28:54 No.103941594
>>103939984
A surprising amount of companies ran important systems on Emacs including Airbus who famously ran a message broker for air traffic control written entirely in elisp.
Anonymous 01/18/25(Sat)06:51:36 No.103941772
>>103941182
org squats on quite a few premium arrow key bindings. It's a bit unfortunate.
Anonymous 01/18/25(Sat)07:44:18 No.103942157
video-+19-74077
Learn about org-agenda from Professor Prot.
https://www.youtube.com/watch?v=L0EJeN1fCYw
https://protesilaos.com/codelog/2025-01-16-emacs-org-todo-agenda-basics/
Anonymous 01/18/25(Sat)09:01:21 No.103942654
>>103941594
I think it is actually worse?
>A week later - I helped out finishing the 4GL UI in the meantime and completed the messaging protocol - he called me in, quite happy. He showed me the code - page after page of Emacs Lisp, with exactly zero comments “because Lisp is self-documenting”. I got scared, it was an air traffic control system after all, but I was no Herr Doktor so I whipped up the DCE native code for Emacs, made a hack to have it start headless in message router server mode, and we got messages to flow. I did a code hand-over, and drove back home a couple of days later. The “self-documenting” code, as far as I know, landed in production so at least for a while, all ATC message routing in Germany was done through Emacs.

https://www.emacswiki.org/emacs/EmacsStories
Anonymous 01/18/25(Sat)09:27:57 No.103942874
1727702147471491
>>103936192
Personally I wouldn't do either (it was just a demo). Translated to lambdas the first breaks equational reasoning, the second introduces a suspended variable
Anonymous 01/18/25(Sat)09:38:12 No.103942956
>>103941772
>>103941353
Yeah, I use emacs for many more other things other than org, but org is convenient sometimes. I rather move windows without pain than use org without some discomfort, but I wish I could do both.
C-x-o does not cut it at all
Anonymous 01/18/25(Sat)10:03:20 No.103943178
sometimes using destructive functions is useful, but typically mutating variables in lisp is not necessary.
the garbage collector will free a variable that is no longer referenced, so making a modified copy of said variable and passing it to a function typically has little (memory) overhead.
Anonymous 01/18/25(Sat)10:19:38 No.103943311
>>103942956
How about using C-S-<arrowkey>?

(keymap-global-set "C-S-<up>" 'windmove-up)
(keymap-global-set "C-S-<down>" 'windmove-down)
(keymap-global-set "C-S-<left>" 'windmove-left)
(keymap-global-set "C-S-<right>" 'windmove-right)

(keymap-set org-mode-map "C-S-<up>" 'windmove-up)
(keymap-set org-mode-map "C-S-<down>" 'windmove-down)
(keymap-set org-mode-map "C-S-<left>" 'windmove-left)
(keymap-set org-mode-map "C-S-<right>" 'windmove-right)


Org has C-S-<arrowkey> bindings, but I never use them, so I don't miss not having them whereas I *do* use the S-<arrowkey> bindings in org quite a bit, so I want to keep those around.

C-S-<arrowkey> feels similar enough to S-<arrowkey> to me. How does it feel to you?
Anonymous 01/18/25(Sat)10:20:34 No.103943322
working on a Kotlin and Clojure inspired non-JVM language, and I'm going to implement the loop-recur pattern, as well as a bunch of other Clojure-esque features.

What would you want to see in this type of language? Already working on adding proper macros/metaprogramming

pic related

fun main() {
fun factorial(n: Integer) = loop iter(k = n, total = 1) {
if (k <= 1) {
total
} else {
recur@iter(k - 1, k * total)
}
}
println("Hello, again!")
}
Anonymous 01/18/25(Sat)10:34:09 No.103943462
>>103943322
literally why? what does your new language excel in that lisp/scheme does not?
The syntax appears less consistent and uses extraneous symbols. In fact it looks more or less like C.
There is no point inventing an inferior language.
Anonymous 01/18/25(Sat)10:38:08 No.103943504
>>103943322
>non-JVM [... ] loop-recur pattern
recur is a product of sitting on the jvm tho, to stop blowing up the vm's stack. I'd be curious to see how you approach macros however
Anonymous 01/18/25(Sat)10:41:06 No.103943531
>>103943462
properly statically typed with a Martin-Löf type system, this language would basically designed to be a more Kotlin/Lisp like version of Rust but without the autism thereof.

In general Kotlin is pretty comfy and has a lot of merits (this current syntax can basically be compiled to kotlin more or less), and it also incorporates a lot of the usual memes like "being able to write your own DSLs" using extension functions and trailing lambdas.
Anonymous 01/18/25(Sat)10:49:30 No.103943615
>>103943531
>properly statically typed with a Martin-Löf type system
Presumably gradually typed, k, total, main, and factorial are inferred in the sample you posted. Only n has a type
Anonymous 01/18/25(Sat)10:55:07 No.103943677
>>103943615
>gradually typed
yeah you're right actually, the point is that the compiler would be able to infer and evaluate algebraic data types in compile time.

Already have a lot of this prototyped in ANTLR4 and can already run some toy examples.

Once an upcoming project presentation at work is finally over, I'm going to find some more time and try to make the base compiler self-hosted.
Anonymous 01/18/25(Sat)11:05:50 No.103943784
1732834127205172
>>103943677
I haven't thought about inferring adts, I'd guess you'd have to assume the first instance of each is valid?

For example with Cons(1, Cons(2, Nil)) the inferred List type is Nil + Cons(Integer, List), but would that make a later occurrence of Cons(Nil, Nil) invalid? I'm not sure
Anonymous 01/18/25(Sat)12:16:42 No.103944530
>>103943311
That might actually work. Sometimes I use to navigate paragraphs but just sometimes.
Anonymous 01/18/25(Sat)13:19:38 No.103945235
Is there a decent material for people who use other languages professionaly to get into clojure?
I'm a python dev for some time now. Took a peek at Clojure for the brave and it is not really worth it for me.

Some stuff on the web seems to be directed towards Java users with 50 years of experience.
Anonymous 01/18/25(Sat)13:30:06 No.103945374
>>103945235
honestly i was like you but then i realized: Lisp is not really any different than any other language. you can learn it, you dont need any material tailored for retards. once you stop getting tricked by this scary feeling you get and actually start learning and playing with it, you'll realize there is nothing "mystical" about it.
Anonymous 01/18/25(Sat)13:35:49 No.103945468
>>103945235
>Some stuff on the web seems to be directed towards Java users with 50 years of experience.
That's the intended demographic, interop with the Java "ecosystem" is supposed to be part of the attraction for grumpy Java devs stuck in enterprise but want a saner lang
Anonymous 01/18/25(Sat)13:58:45 No.103945713
>>103945235
Clojure's intended target audience IS grumpy seniors.
My recommendation:
- Figure out how to get an editor connected to your REPL
- Go through official language guide: https://clojure.org/guides/learn/clojure
- Clone 4clojure and clojure koans and go through them locally with a connected editor: https://github.com/PEZ/rich4clojure https://github.com/functional-koans/clojure-koans
- Do some AoC
- Build something you like

Most important part of learning Clojure is learning how to get to work properly with a connected REPL and put aside practices which were developed to mitigate the disaster of modern software development. Don't reach for classes, interfaces etc until you really need them.
Anonymous 01/18/25(Sat)14:06:33 No.103945790
>>103945235
>Some stuff on the web seems to be directed towards Java users
You have Java things like interfaces and stacktraces in Clojure.
Java is not hard anyways.
Anonymous 01/18/25(Sat)14:19:06 No.103945916
>>103945713
>>103945468
I use emacs to program in python and R (for some years now). Barely touched elisp, but its nice sometimes.
Anonymous 01/18/25(Sat)14:20:43 No.103945932
>>103945916
>>103945713
>- Build something you like
How about something I need kek? Is there a de fato way of building rest apis in clojure?

I'd like to compare it with fastapi.
Anonymous 01/18/25(Sat)14:56:50 No.103946362
f30ceadcf6cbd87026a3481d857f13d6f58620e2
>>103945916
>I use emacs to program in python
>Barely touched elisp
I started using Emacs to write other languages and now all I do is write Elisp. At some point I used Emacs to work on other projects but now Emacs is the only project.
Anonymous 01/18/25(Sat)15:05:48 No.103946454
>>103946362
If elisp code gets in production I'll be fired, or worse, never get fired and be the only person that can maintain whatever I work on.
Anonymous 01/18/25(Sat)15:08:13 No.103946477
>>103945916
CIDER is the best Clojure IDE imo so you're on the right track
>>103945932
Today -
use the metosin stack for routing, content negotiation and coercion (e.g. reitit + malli + jsonista + muuntaja, all will be pulled in with reitit)
use jetty or http kit for server.
In Clojure you won't find a framework, just a bunch of libraries that work well together.
An example of how you could put them together is Caveman, but it's just an opinion https://caveman.mccue.dev/
Anonymous 01/18/25(Sat)15:12:29 No.103946511
>>103946454
Funny anedocte
>presidents need to register gifts they receive
>become too bothersome to keep all the paperwork, commission the "system that keeps tracks of presidential gifts (SKTPG)"
>Construction lands on some guy and his team
>used his favorite language (probably perl and C)
>most of the team moves on, changes jobs/departments/dies
>guy in charge of SKTPG is one of the few people that knows whatever stack he used way back then
>stuck maintaining his own steaming pile of legacy bullshit
>government will never pay for an update because it "works"
>Has to keep maintaining the project because god forbids someone misplaces the festive plastic pen from some bullshit municipality in bumfuck nowhere
>every presidential election said dude has to physically set up a computer solely to do this, running on some old windows version and legacy hardware
>last year they finally pulled the plug on the software towards a simple web app
I've never seen a happier person, almost as if he was cast out of hell due to some paperwork mishap on satan's part.


Maybe doing it in emacs would've been better (>>103942654) kek
Anonymous 01/18/25(Sat)15:28:37 No.103946629
>>103946454
as the old addage goes: "nobody ever got fired for using gnu emacs"
Anonymous 01/18/25(Sat)15:48:54 No.103946807
>>103893622
definitely not syntax-related
coming from python it feels like a breath of fresh air
Anonymous 01/18/25(Sat)15:52:42 No.103946844
>>103894927
at that point it's just syntax then, look at something like Carp. you'll lose all the cool shit like interactive editing. just use assembly/pooling/arenas where you need them like you already can with sbcl
Anonymous 01/18/25(Sat)15:54:08 No.103946860
>>103894893
>>103894927
I think more interesting would be a nonstop GC, like with Erlang
Anonymous 01/18/25(Sat)15:55:36 No.103946881
>>103902089
just use ECL if what you want are tiny binaries.
Anonymous 01/18/25(Sat)15:59:39 No.103946931
>>103909538
why do you need to modify constants? I use quoted lists all the time when passing arguments to functions (read-only) because it doesn't generate any garbage. making them mutable would just be the same as generating a normal list, not sure why you would want this behaviour.
Anonymous 01/18/25(Sat)16:00:50 No.103946944
>>103924706
how did Julia reject oo when it has CLOS-lite
Anonymous 01/18/25(Sat)16:09:50 No.103947042
should I run emacs on dwm
Anonymous 01/18/25(Sat)16:16:54 No.103947100
>>103947042
you should always be running emacs
Anonymous 01/18/25(Sat)16:18:15 No.103947115
>he isn't running the emacs daemon on his headless servers
shiggy
Anonymous 01/18/25(Sat)16:19:07 No.103947128
should i learn lisp? i live in poverty and work a intensive manual labor job
Anonymous 01/18/25(Sat)16:23:19 No.103947172
>>103947115
if you aren't using exwm on your main machine and using vterm buffers to ssh into your servers and run emacs within emacs what are you even doing
Anonymous 01/18/25(Sat)16:34:07 No.103947281
>>103947128
>should i learn lisp?
>i live in poverty
you're already halfway there.
Anonymous 01/18/25(Sat)16:42:34 No.103947360
dekinai
>>103947128
>should i learn lisp?
It's IMPOSSIBLE to learn lisp (https://youtu.be/-J_xL4IGhJA&t=1808)
Anonymous 01/18/25(Sat)16:51:26 No.103947443
>>103947128
Lisp isn't the way out of poverty, learn Java for that. Like somebody said in a earlier thread a well-paying Lisp job requires a extremely high-level expertise in a limited set of fields all of which are mathematically intense.
Anonymous 01/18/25(Sat)16:55:18 No.103947467
>>103947443
i learned java to a decent degree but was unable to wrap my head around annotations and then i looked into spring/boot and there was so much magic and complexity i wasnt able to understand anything, currently learning django and the js browser api to enhance the UI
Anonymous 01/18/25(Sat)17:22:29 No.103947711
>>103947467
You've gotta ignore "I won't use use anything I don't understand" voice (every programmer has it) because enterprise software is so inhumanly complicated you simply can't wrap your head around it; enterprise programming is primary just continually making small incremental improvements on codebases you don't really understand. Python is another great choice, keep it up Anon.
Anonymous 01/18/25(Sat)17:24:57 No.103947741
>>103947467
>there was so much magic and complexity i wasnt able to understand anything
well yeah it's a java project
Anonymous 01/18/25(Sat)18:45:20 No.103948595
>>103946931
>why do you need to modify constants?
because literals are not constants
Anonymous 01/18/25(Sat)18:47:34 No.103948616
>>103947128
definitely not, learn a normal language
>>103947467
you are not supposed to understand how the magic works. that's literally the entire purpose of abstractions, the magic is there so that you have one less thing to worry about.
Anonymous 01/18/25(Sat)18:58:17 No.103948723
>>103948616
yeah until that specific annonation breaks something and no one knows why, and you don't even know where the code is even executed because everythin is nested in 20 folder deep structures.

I not even am the guy who asked.
Anonymous 01/18/25(Sat)18:58:59 No.103948731
>>103946944
It kept polymorphism with type-based dispatch, but it ditched classes. There's no such thing as a class with methods. There are just types and generic methods.
Anonymous 01/18/25(Sat)19:10:09 No.103948842
>>103948723
for most practical purposes it doesnt matter
there are times where you have to understand what is going on to understand tricky bugs, but worrying about it before it happens is plain retarded
being able to get into a "leap of faith" mentality is much of what makes a good programmer
Anonymous 01/18/25(Sat)19:27:52 No.103949011
Emacs client for simplex.chat?
Anonymous 01/18/25(Sat)19:31:09 No.103949042
>>103947467
Annotations are no different than globals in Lisp that are used to adjust runtime behaviour.
The complexity is there, regardless. Tomcat can't just load your HttpServlet classes, oyu need to specify an address.
Anonymous 01/18/25(Sat)19:33:35 No.103949069
>>103949011
https://simplex.chat/
Anonymous 01/18/25(Sat)21:12:32 No.103950010
I know it's a petty thing to get uppity about, but "-p" for predicates is beyond fucktarded.
Anonymous 01/18/25(Sat)21:58:05 No.103950403
>>103950010
scheme-fag?
Anonymous 01/19/25(Sun)00:56:35 No.103951886
>>103947128
hello prot
Anonymous 01/19/25(Sun)01:52:07 No.103952307
1727828650541121
>>103947443
>tfw $300k starting Lisp job
Anonymous 01/19/25(Sun)01:55:32 No.103952337
>>103950010
"?" as a suffix is the best for predicates. If you want to stay alphanumeric, an "is" prefix is the most readable.
Anonymous 01/19/25(Sun)03:37:11 No.103952907
>>103950010
>it's a petty thing to get uppity
That's what we do here
Anonymous 01/19/25(Sun)05:23:13 No.103953534
richhickey
>>103914045
https://old.reddit.com/r/Clojure/comments/1i27n1k/rich_introduces_new_namespace_in_coreasync_flow/

Rationale:
https://github.com/clojure/core.async/blob/master/doc/flow.md
Anonymous 01/19/25(Sun)06:10:56 No.103953814
In elisp, is there an easy way to create a file if it doesn't already exist? I have this in my .emacs file.
(setq custom-file "~/.custom.el")
(load custom-file)

I'd like to make sure ~/.custom.el always exists before I load it.
Anonymous 01/19/25(Sun)06:11:31 No.103953820
>>103950010
i just use ? anyways
Anonymous 01/19/25(Sun)06:14:39 No.103953836
>>103891434
What an ugly pic.
Anonymous 01/19/25(Sun)07:05:35 No.103954190
>>103953814
(defun ensure-file-exist (name)
"Create a file NAME if it doesn't exist."
(unless (file-exists-p name)
(write-region "" nil name)))
Anonymous 01/19/25(Sun)07:21:11 No.103954284
>>103950403
NTA but I prefer ? for predicates & also prefer Common Lisp
Anonymous 01/19/25(Sun)07:44:23 No.103954427
is there really no SoC lisp machine yet even when china has been pumping out low power RISC-V and ARM chips for single board computers and microcontrollers? it seems like they would be nice for data processing from sensors
Anonymous 01/19/25(Sun)10:38:35 No.103955767
>>103946477
>cider
Ok. I have installed this.
Now it seems because it is a Java-sir language, there is some project management bullshit I need to do right? There is a leinsomething and deps.edn.
Whats the deal with that?
Anonymous 01/19/25(Sun)11:33:36 No.103956225
>>103950010
>>103952337
At least in logic predicate symbols are A-Z (with subscripts if you run out), but I doubt anyone wants to write (F x)

>>103953814
(load file :missing-ok) is also ok
Anonymous 01/19/25(Sun)11:38:37 No.103956281
>>103954190
Perfect. Thank you.

>>103956225
>(load file :missing-ok) is also ok
I didn't know load could do that. In my particular case, I want to force the file to exist, but this could be handy in other cases.
Anonymous 01/19/25(Sun)11:50:20 No.103956391
>>103947443
I'm a failed mathematician trying to learn programming, so this sounds right up my alley, what sort of stuff can you do with lisp?
Anonymous 01/19/25(Sun)12:19:18 No.103956645
>>103956391
Well an anon 2 threads ago shared part of a program for evaluating derivatives: https://desuarchive.org/g/thread/103642917/#q103686014

In Paradigms of Artificial Intelligence Programming there are a few Lisp programs for translating word problems to algebraic equations, then solving them. Lisp was popular during the first generation of deductive AI and theorem provers, maybe from having good primitives for traversing trees/lists

The most pertinent thing for a failed mathematician though is proper support for rational, complex, and infinite precision integers without any extra libraries
* (sqrt -1)
#C(0.0 1.0)
* (expt 2 256)
115792089237316195423570985008687907853269984665640564039457584007913129639936
* (+ 1/3 1/3 1/3)
1
Anonymous 01/19/25(Sun)12:40:25 No.103956890
>>103956391
I'm a failed person trying to learn math AND programming and I can't wait to fail at both
Anonymous 01/19/25(Sun)13:33:13 No.103957572
>>103955767
You don't need lein at all.
Install the Clojure CLI
To make a Project:
> mkdir booba
> cd booba
> echo {} > deps.edn
That's it. There is very little javasir-ing about. You can even add dependencies dynamically.
Adding source paths might require a REPL restart but other than that you can start a bare REPL even without a project and add all your deps after you start it with https://clojure.github.io/clojure/clojure.repl-api.html#clojure.repl.deps/add-libs
You can do all your work in a single file:
(add-libs {,,,})
(require ,,,)
then your code
Anonymous 01/19/25(Sun)13:46:34 No.103957770
>>103946454
I got fired for writing a Scheme script at my old job. I'm much happier now
Anonymous 01/19/25(Sun)16:27:06 No.103959618
>>103943311
>>103944530
I've wanted something like this in the past, but I didn't know how to make it happen back then. I've started using these myself. I have so many different ways to move between windows now, but this one is maybe the fastest way in certain situations. ace-window is still nice in multi-frame+multi-window situations though.
Anonymous 01/19/25(Sun)16:52:21 No.103959897
>>103957572
Thanks, I will try this tonight
Anonymous 01/19/25(Sun)16:55:48 No.103959934
>>103950010
it annoys me more that in CL its not even used in the standard forms, scheme's (null?) is much more readable than CL's (null) but why isnt it (null-p) instead then?
Anonymous 01/19/25(Sun)17:16:07 No.103960114
>>103956391
A lot of processing/analyse software and surprisingly modelling software is written in CL. We still own the Expert System domain but that field is locked down and sucks balls.
Anonymous 01/19/25(Sun)17:25:39 No.103960214
1726097678617390
>>103959934
>scheme's (null?) is much more readable than CL's (null) but why isnt it (null-p) instead then?
I agree, maybe the reason is null, atom, equal, and eq are functions from the Lisp 1 and 1.5 manuals, I think they just never changed them since like the 1960s

https://archive.org/details/bitsavers_mitrlelispualMar60_8319739
https://archive.org/details/bitsavers_mitrlelisprammersManual2ed1985_9279667
Anonymous 01/19/25(Sun)17:53:56 No.103960523
what's the difference between symbols and keywords?
Anonymous 01/19/25(Sun)18:11:22 No.103960700
>>103960523
If the symbol abc has no value then it's treated as an unbound variable at toplevel, but :abc is self-evaluating. Interestingly (defun :f (x) x) is valid, but (defun 'f (x) x) isn't, so I'm guessing they are handled differently during macro expansion
Anonymous 01/19/25(Sun)18:33:42 No.103960933
>>103960523
Technically none, keywords are just symbols held within the keyword package, symbols held within the keyword package are automatically exported, ":" just instructs the listener to look at the keyword package. Basically syntax sugar.
Anonymous 01/19/25(Sun)18:51:30 No.103961093
>>103959897
Tried, it seems cool and somewhat ergonomic, but it seems a lot of stuff is outsourced to java, so I have to learn java std libs by proxy, which kinda sucks.
Anonymous 01/19/25(Sun)19:13:47 No.103961277
>>103961093
Java lacks the quality without name.
Clojures also lacks it, because Clojure and Java are one but divided.
sad!
Anonymous 01/19/25(Sun)19:56:59 No.103961662
>>103960700
>>103960933
this is very confusing to me
like why do some functions accept
symbol

while others accept
'symbol

and others
:symbol


maybe im just dumb and clueless but it all seems so redundant
Anonymous 01/20/25(Mon)00:05:05 No.103963764
just found out about midnight-mode there's no end to the amount of things i didn't know emacs could do.
Anonymous 01/20/25(Mon)00:18:05 No.103963851
>>103961662
Keywords aren't strictly necessary, but they are convenient and make your code's intent much clearer. Think of it as a superior alternative in cases where other languages might use string literals.
Anonymous 01/20/25(Mon)00:23:36 No.103963897
>>103961093
What did you find was being outsourced to Java?
not that the stdlib is terrible. Learning a bit of java.io won't kill ya
Anonymous 01/20/25(Mon)04:11:46 No.103965460
>>103961662
I think the most practical difference is that 'symbol is interned in the package it's defined in, while :symbol is not (it's interned in the keyword package).
So if you try to pass the symbol 'foo to a function in another package which is checking if the argument you passed is equal to 'foo it will actually fail the test.
Because what you're actually passing is 'this-package:foo and the symbol the function is comparing it to is 'some-other-package:foo.
So you'd have to manually write 'some-other-package:foo as the argument to the function in order for it to work.

And using a lot of the same symbol name but in different packages will result in the same symbol being defined in multiple packages, polluting the namespace.

However, if you use keyword symbols then that doesn't happen. Writing :foo is shorthand for keyword:foo so no matter which package you use it in the symbol is referring to the same one in the special keyword package.

There's a few other differences I think, like 'foo evaluates to foo while :foo evaluates to itself :foo. But I think what I wrote above is the most interesting difference.
Anonymous 01/20/25(Mon)05:07:11 No.103965751
What is the point of dired-kill-line?
Anonymous 01/20/25(Mon)05:22:14 No.103965855
>>103961662
>>103965460
Also in case you didn't know 'symbol is shorthand for (quote symbol). And to answer your first question why some functions will accept "symbol" (without anything in front of it), is that usually it's actually a macro and not a function. Macros can re-write code and so it probably gets re-written as 'symbol in the end. The macro just lets you write it as "symbol" for convenience.
Technically a symbol (without anything in front) is the same symbol as the one in 'symbol, it's just quoted.
Anonymous 01/20/25(Mon)08:57:38 No.103967533
SUPER_FRIEREN_BROS
good luck janksir
>I quit my job to work on my programming language (https://jank-lang.org/blog/2025-01-10-i-quit-my-job/)
https://clojure.org/news/2025/01/17/deref
Anonymous 01/20/25(Mon)09:01:48 No.103967567
>>103891434
It'll take me the whole year to read Emacs manual at this pace.
Anyway, this is the first note for interesting bits I found.
Chapter 7 Existing Emacs
>Set =confirm-kill-processes= to nil to kill processes when you exist Emacs.
Chapter 8 Basic editing commands
>=C-x C-n= calls =set-goal-column=. This will make =C-n= (=next-line=), =C-p= (=previous-line=), =<prior>=, and =<next>= to move to this column or as close as possible. To disable it, do =C-u C-x C-n=.
>If you set =next-line-add-newline= to non-nil, cursor will create newline at the end of buffer and move there.
>If you set fill prefix, =C-o= at the beginning of a line will add the fill prefix to the the line.
>=C-u= means "4 times." =C-u C-u= means "16 times." Each =C-u= multiply the value by 4.
>=C-x z= (=repeat=) repeats the previous Emas command with the same argument. Once you do =C-x z=, just do =z= to keep repeating.
Chapter 9 Minibuffer
>=max-mini-window-height= controls the maximum height for resizing the minibuffer window.
>=minibuffer-depth-indicate-mode= shows the recursion depth of the minibuffer you are in.
>=completion-styles= tells Emacs how to complete a word/symbol. =completion-category-overrides= allows you to use different completion style on different situations (filename, word, etc.)
>=completion-ignored-extensions= tells Emasc what filename extensions to ignore when completing for a filename.
>=history-length= is how long can the minibuffer history be. =history-delete-duplicates= does what
the name says.
Chapter 10 Running command by name
>=M-x= ignores obsolete commands.
>=suggest-key-bindings= tells Emasc to show you how to run a command via a keybind if you use =M-x= version of it.
>=extended-command-suggest-shorter= likewise tells you how to type =M-x= with less typing.

Right now I'm at chapter 16, so if anyone want to read along or found anything interesting, please share.
Anonymous 01/20/25(Mon)09:01:58 No.103967571
>>103965751
I think it's there if you want to perform batch operations on the directory and want to exclude files.
Anonymous 01/20/25(Mon)09:02:54 No.103967580
>>103967567
>It'll take me the whole year to read Emacs manual at this pace.
You crazy motherfucker
Anonymous 01/20/25(Mon)09:16:06 No.103967697
>>103967567
https://files.catbox.moe/3lrlb0.zip
btw, this zip file contains Emacs manual, Elisp manual, and Introduction to programming in Elisp as azw3 files to put on a Kindle if you use one.
I converted them from official html files, so you may download and convert them to other format for your e-reader.
>>103967580
It's like how Muslims have to go to Mecca to Hajj, if you are an Emacs user, you are supposed to read them at some point.
Anonymous 01/20/25(Mon)09:21:03 No.103967739
>>103967697
>It's like how Muslims have to go to Mecca to Hajj, if you are an Emacs user, you are supposed to read them at some point.
You misunderstand, according to the prophet Stallman the rite is to sexually harass female colleagues.
Anonymous 01/20/25(Mon)10:17:21 No.103968274
1735681774888084
>>103965460
>So if you try to pass the symbol 'foo to a function in another package which is checking if the argument you passed is equal to 'foo it will actually fail the test.
>Because what you're actually passing is 'this-package:foo and the symbol the function is comparing it to is 'some-other-package:foo.
>And using a lot of the same symbol name but in different packages will result in the same symbol being defined in multiple packages, polluting the namespace.
That makes sense actually, ty. I remember one of badger's streams he said keywords were preferable for fewer interns, but didn't understand it at the time

>>103967739
He was a real one
Anonymous 01/20/25(Mon)14:33:29 No.103970846
GNU
>>103967739
GNU/Based
Anonymous 01/20/25(Mon)14:43:17 No.103970925
>>103967739
basado
>>103967697
>It's like how Muslims have to go to Mecca to Hajj, if you are an Emacs user, you are supposed to read them at some point.
that would be more like SICP (t. recently fell for the meme)
emacs users just read bits and pieces of docs on a whim since that's how the help system works
Anonymous 01/20/25(Mon)16:02:37 No.103971634
>>103967567
btw don't assume that just reading the emacs manual is enough because some built in features have their own manuals like erc, auth sources, org, etc... i read the whole emacs manual before i realized that
Anonymous 01/20/25(Mon)16:42:15 No.103972038
CLOS is so bloated
im not some anti OOP fanatic but they really overdid it, you dont need half of this shit
Anonymous 01/20/25(Mon)16:53:39 No.103972155
>>103972038
You don't, I don't but the people who designed CL did, they were working on complicated codebases with millions of lines of code with strict SoC requirements.
Anonymous 01/20/25(Mon)17:00:04 No.103972212
>>103972038
wonder what a good ~OS that isn't too limited or two bloated looks like
https://dthompson.us/posts/issues-with-object-oriented-programming-in-guile.html
Anonymous 01/20/25(Mon)17:01:50 No.103972232
1731197434161-0
>>103965460
>>103965855
this makes a lot of sense, thanks
Anonymous 01/20/25(Mon)17:59:35 No.103972768
>>103968274
kiwi sex
Anonymous 01/20/25(Mon)18:31:37 No.103973069
I was really impressed by the Wolfram examples in the beginning.
https://www.youtube.com/watch?v=HFQWNhtPbOo
https://github.com/scicloj/wolframite
Anonymous 01/20/25(Mon)23:52:10 No.103975964
fantastic
>>103973069
M-x xah-wolfram-mode
Anonymous 01/21/25(Tue)01:03:45 No.103976594
>>103967533
I really hope he can pull it off, it would make Clojure viable for gamedev.

Sure you can make games with JS/JVM but it ain't optimal.
Anonymous 01/21/25(Tue)01:17:28 No.103976710
Hey anons. I was thinking about learning lisp or whatever. where do I start? I have no clue
Anonymous 01/21/25(Tue)01:20:19 No.103976729
is fennel any good or should i just learn common lisp
Anonymous 01/21/25(Tue)01:25:32 No.103976771
>>103976710
Rice your emacs
Anonymous 01/21/25(Tue)01:28:42 No.103976791
>>103976771
wait thats actually good advice. thanks
Anonymous 01/21/25(Tue)01:41:55 No.103976899
>>103976791
Elisp has become one of the most practical and battle tested lisps.
Anonymous 01/21/25(Tue)02:31:48 No.103977285
Clojure's style guide regarding indentation is perfect.
Anonymous 01/21/25(Tue)02:43:30 No.103977359
>>103976710
>where do I start?
What do you want to do and what do you already know?
Anonymous 01/21/25(Tue)02:44:01 No.103977364
>>103977285
I wish lisp standard indentation were four spaces.
Anonymous 01/21/25(Tue)02:45:03 No.103977374
>>103977364
then you would introduce ambiguity regarding implicit bodies
Anonymous 01/21/25(Tue)02:45:23 No.103977376
>>103977374
plz explain
Anonymous 01/21/25(Tue)02:50:56 No.103977423
>>103977376
[:this :is :a :list]
[:this
:is
:a
:very
:long
:list] ; Note the singular space as indentation.
(defn some-function-name [arg1 arg2 arg3]
(println arg1)
(println arg2)
(println arg3)) ; Note the PRINTLN calls are indented by two spaces, they form the function's body.
(defn some-function-name
"Some documentation."
[arg1 arg2 arg3] ; Note the six spaces forming the non-body arguments of the function.
(println arg1)
(println arg2)
(println arg3))


Because idenfitiers must be at least one character long, then the minimum number of spaces used for indenting non-body arguments must be 3 spaces.
Anonymous 01/21/25(Tue)03:50:12 No.103977916
>>103977423
>then the minimum number of spaces used for indenting non-body arguments must be 3 spaces.
I was with you until this point. Please explain like I'm retarded (I am).
Anonymous 01/21/25(Tue)03:54:29 No.103977949
fennel
>>103976729
Fennel is for when you want to create something in the Lua ecosystem with a Lisp. If you want to create something with:
- Love2D
- mpv
- neovim

...Fennel might be for you.
https://fennel-lang.org/
Anonymous 01/21/25(Tue)03:56:25 No.103977958
GhuXeruaEAAHZpI
Anonymous 01/21/25(Tue)04:10:06 No.103978066
`M-x check-parens` just saved me.
Anonymous 01/21/25(Tue)04:25:27 No.103978162
file
>>103976710
Practical Common Lisp is considered the classic introductory book to Common Lisp.
the Common Lisp Cookbook is a great resource too https://lispcookbook.github.io/cl-cookbook/
Anonymous 01/21/25(Tue)05:03:40 No.103978363
Common-LISP-Touretzky
>>103976710
If your new to programming, go with this, it'll probably irritate you if you aren't though, It's very gentle.
Anonymous 01/21/25(Tue)05:06:22 No.103978376
>>103978162
>Practical Common Lisp is considered the classic introductory book to Common Lisp.
It also sucks. Pages upon pages of meandering and getting nothing good done.
I've said it before and I'll say it again: The CL community have no good learning resources.
Anonymous 01/21/25(Tue)05:12:53 No.103978422
>>103978376
that's why i linked the CL Cookbook too, it's more "straight to the point". depending on the reader's tastes both are valid.
Anonymous 01/21/25(Tue)05:47:47 No.103978644
>>103978422
Back when I was playing with Lem, I kept finding myself referring back to the cookbook. It did a good job of answering my beginner-level CL questions.
https://lispcookbook.github.io/cl-cookbook/
Anonymous 01/21/25(Tue)06:58:57 No.103979038
>>103978376
A Well known problem with languages that are both consistent and minimal syntactically is the difficulty of teaching it, additionally with how far removed we are from hardware and how inclusive operating systems have become whole categories of teaching exercises have vanished.
Anonymous 01/21/25(Tue)08:18:13 No.103979568
Anonymous 01/21/25(Tue)08:27:35 No.103979641
new bread baked -> >>103979637