← Home ← Back to /g/

Thread 105652614

320 posts 120 images /g/
Anonymous No.105652614 [Report] >>105655278 >>105662887 >>105690390
(λ) - Lisp General
Lisp Machines™ Edition!

>Lisp is a family of programming languages with a long history and a distinctive parenthesized prefix notation. There are many dialects of Lisp, including Common Lisp, Scheme, Clojure and Elisp.

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

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

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

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

>Elisp
Docs: C-h f [function] C-h v [variable] C-h k [keybinding] C-h m [mode] M-x ielm [REPL]
https://gnu.org/s/emacs/manual/eintr.html
https://gnu.org/s/emacs/manual/elisp.html
https://github.com/emacs-tw/awesome-elisp

>Common Lisp
https://lispcookbook.github.io/cl-cookbook
https://cs.cmu.edu/~dst/LispBook
https://gigamonkeys.com/book
https://lem-project.github.io
https://stumpwm.github.io
https://nyxt-browser.com
https://awesome-cl.com

>Scheme
https://scheme.org
https://try.scheme.org
https://get.scheme.org
https://books.scheme.org
https://standards.scheme.org
https://go.scheme.org/awesome
https://research.scheme.org/lambda-papers

>Clojure
https://clojure.org
https://tryclojure.org
https://clojure-doc.org
https://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://rentry.org/lispresources

(setf *prev-bread* >>105581689)
Anonymous No.105652635 [Report] >>105652687
Symbolics™ or LMI?
https://www.youtube.com/watch?v=sV7C6Ezl35A
Anonymous No.105652687 [Report]
>>105652635
Symbolics
Anonymous No.105652734 [Report] >>105655294 >>105681958
For me it's Interlisp
https://online.interlisp.org
Anonymous No.105652832 [Report] >>105659367 >>105665082 >>105665223 >>105690309
Neat.
https://www.lisppad.app
Anonymous No.105652963 [Report] >>105655116 >>105655438 >>105655438
Is there a more elegant way of doing this?
(define (for-each-break fn lst)
;; fn must accept two arguments
(call/cc
(lambda (break)
(for-each (lambda (item)
(fn item break))
lst))))

I don't like having fn taking 2 arguments.
Anonymous No.105653822 [Report]
>>105647435
>What was hard about it? I literally just changed c-mode to c-ts-mode in my config.
One of the main things I wanted was to have function calls be highlighted in the same color as function definitions/declarations. I don't know if this is changed, but the documentation for treesitter at least when I last monkeyed with it was very inconvenient to find.
Something else I've wanted to do is be able to use ctags to track macro definitions as opposed to function definitions and highlight them appropriately, but I gave up.
Anonymous No.105655065 [Report]
>>105651172
>Emacs written in Forth when?
Here you go: https://github.com/larsbrinkhoff/fmacs
This line deserves mention:
https://github.com/larsbrinkhoff/fmacs/blob/master/src/text.fth#L12
Anonymous No.105655116 [Report]
>>105652963
You can pass it implicitly by breaking hygiene with syntax-case macro (like anaphoric macros in CL). Of course, there will be issues of scoping (if you make two nested loops, you can break only from the inner one).
Anonymous No.105655187 [Report] >>105655302 >>105655313 >>105655392 >>105657747
Real men only program in C
Anonymous No.105655231 [Report] >>105674998
Okay guys, I think I'll try dabbling into The Little Typer to better understand low-level Coq aspects. Hopefully 400 pages will worth it.
What's the best way to use racket (specifically one of its languages) in Emacs? racket-mode? Just plain vanilla scheme-mode? geiser? LSP?
Anonymous No.105655278 [Report] >>105656528
>>105652614 (OP)
How would I go about implementing arbitrary combinations of car and cdr? Like I want to be able to write caddaaddadddaaddddr, and it'll automatically expand to
(car (cdr (cdr (car (car (cdr (cdr (car ....

Possible to do without a reader macro?
Anonymous No.105655294 [Report]
>>105652734
>PARC aesthetic
they stole it from Douglas Engelbart.
Anonymous No.105655302 [Report]
>>105655187
Clojure, indeed.
Anonymous No.105655313 [Report] >>105655355
>>105655187
what is more impressive, a retard nesting for loops and deferencing null pointers or a literate mastering design patterns and functional applications?
Anonymous No.105655355 [Report] >>105655571
>>105655313
i mean the former is concrete but total failure, the latter is buzzwords and faffery to shave yaks. they both fail.
Anonymous No.105655392 [Report]
>>105655187
>Dennis Ritchie: I have to admire languages like Lisp (http://www.gotw.ca/publications/c_family_interview.htm)
Based & LISPilled Dennis Ritchie
Anonymous No.105655438 [Report] >>105655536
>>105652963
>Is there a more elegant way of doing this? I don't like having fn taking 2 arguments.
Adding an implicit parameter like that sounds like a monad, (guix monads) might have something, other alternatives are cons-stream (where take acts as break) or fn returning thunks that for-each evaluates

>>105652963
>How would I go about implementing arbitrary combinations of car and cdr? Like I want to be able to write caddaaddadddaaddddr, Possible to do without a reader macro?
(symbol-name 'caddaaddadddaaddddr), then traverse the string emitting car/cdr in a macro until r
Anonymous No.105655536 [Report] >>105655602
>>105655438
>symbol-name
oh shit. i guess a reader macro is inevitable if i wanted to invoke it as a normal function with normal syntax. thanks anon
Anonymous No.105655571 [Report]
>>105655355
it's only a buzzword to the PLT illiterate.
Anonymous No.105655602 [Report]
>>105655536
If you don't mind autocomplete stalling on caddaaddadddaadddd you could just generate them all
(loop for ca/dr in (all-permutations-of-ca/dr) do
(make-cudder ca/dr))
Anonymous No.105655617 [Report] >>105656201
Helix + Steel lookin' promising
https://github.com/helix-editor/helix/pull/8675#issuecomment-2982160168
Anonymous No.105656201 [Report]
>>105655617
I use GhostText with Emacs a lot. It's good to hear that Helix just got this too.
https://github.com/alpha22jp/atomic-chrome
https://github.com/fregante/GhostText
Anonymous No.105656528 [Report] >>105657713 >>105661489
>>105655278
You're insane for actually wanting that, it's a much better idea to just make a function/macro that takes a list/string argument to do that like clojure does.
However, if you just want to do it for fun you'd need a reader macro since there'd be no way to actually call your macro without some kind of initial identification. You could do it with a prefix, but just plain text is impossible.
At best you could just write a macro to define every possible variation as a function.
Anonymous No.105657713 [Report]
>>105656528
>You're insane for actually wanting that
There are some crazy people in computing.
Anonymous No.105657747 [Report] >>105659867
>>105655187
You stole that from what people said about FORTRAN. C programmers have no creativity or originality, just like their language.
Anonymous No.105659337 [Report]
A couple of threads ago there was a small discussion of Linear Lisp.
This approach seems to have similar asymptotics but the internals are different:
https://github.com/dkopko/klox
Anonymous No.105659367 [Report] >>105662857 >>105679195
>>105652832
Funfact: Apple uses TinyScheme for sandboxing!
>Sandbox policies are written in a dialect of Scheme known as SBPL. The policies are interpreted via an interpreter within libsandbox, based on TinyScheme, which generates a compiled representation of the policy that it passes to the Sandbox kernel extension.
https://bdash.net.nz/posts/sandboxing-on-macos/
Also emac keybindings too!
>These standard bindings include a large number of Emacs-compatible control key bindings, all the various arrow key bindings, bindings for making field editors and some keyboard UI work, and backstop bindings for many function keys.
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/EventOverview/TextDefaultsBindings/TextDefaultsBindings.html
Anonymous No.105659867 [Report] >>105659954 >>105659969 >>105660106 >>105665366
Is verbosity a good thing here?
I'm seriously considering writing a LISP compiler to C now and I wonder if ~a ^ b should be (^ (~ a) b) or (binary-xor (binary-not a) b)
>>105657747
>C programmers have no creativity or originality, just like their language.
And?
Anonymous No.105659954 [Report] >>105659973
>>105659867
why not both
Anonymous No.105659969 [Report] >>105659973
>>105659867
>I'm seriously considering writing a LISP compiler to C now
I just finished something similar by coincidence
I don't think it really matters and would depend a lot on what the big picture of your approach is.
Anonymous No.105659973 [Report] >>105659982
>>105659954
Because I'm trying to improve things, not make them shittier.
>>105659969
Writing C code in LISP syntax.
Anonymous No.105659982 [Report] >>105659991
>>105659973
>Writing C code in LISP syntax.
Yeah but that's not really sufficient for a complete description. For example, is this going to just generate a string automatically, or does it go through an intermediate representation first, do you analyse the IR to optimise the code, etc.
Anonymous No.105659991 [Report] >>105660020 >>105660086
>>105659982
Writing C code in LISP syntax. Why would I optimize when C compilers exist? It's just C, with different syntax, code will be identical.
Anonymous No.105660020 [Report] >>105660033
>>105659991
If you can't even describe your idea of how the "compiler" is going to work, then how do you expect your question to be answered, much less make any sense?
A compiler by definition outputs a different language, I know that. You posted the question and now you're being a brick wall when I'm trying to actually help with an answer.
Anonymous No.105660033 [Report] >>105660106
>>105660020
I don't need to, because it's self evident, sorry but I don't get paid to educate special needs.
Anonymous No.105660086 [Report] >>105660100
>>105659991
how would that even work? sexprs are the polar opposite of C syntax.
if i can't do insane bullshit like duff's device it's not C, simple as
Anonymous No.105660100 [Report] >>105660787
>>105660086
(switch
; implementation left as an exercise for the reader
)
Anonymous No.105660106 [Report] >>105660116
>>105660033
You aren't "seriously considering" writing a compiler. You have a vague notion of something that seems to you like a compiler.
If you can't describe how it will work, then what you're doing is simple string output, and there is absolutely no point whatsoever with examples like >>105659867 because the answer is nobody will bother. They'll write it in C.
If you have a "serious" idea to write a compiler, then you need to non-trivially manipulate the code. Which means you need some idea of a strategy and then you might have some idea like using a macro to manipulate binary operations in some way, in which case the latter example is better. But since you can't describe any actual steps of what it is you want to do while insisting you've got it all figured out, the answer is, it doesn't matter, and you should just write C because this whole project is pointless and can be trivially done in a day or two by an undergrad, because it's not worth actually doing. That's fine though, because you clearly don't actually have a serious idea of what to do.
Anonymous No.105660116 [Report] >>105660139
>>105660106
I'm not going to read your niggerbabble, go check a dictionary definition of compiler and report back once you edificate yourself, because I don't get paid to.
Anonymous No.105660139 [Report] >>105660153
>>105660116
Yeah if you're this stuck up about answering simple questions about how any of this will be executed you're not gonna make it.
It's no skin off my back, I've actually done what you're about to fail at, so have fun lashing out when people just ask a basic question so they can help you. I'm sure you'll go far.
Anonymous No.105660153 [Report] >>105660753
>>105660139
I already told you that my compiler would target C, if you don't know what this means, then you have nothing to tell me that I didn't already know.
Anonymous No.105660382 [Report] >>105660689 >>105662402
https://writewithharper.com/docs/integrations/emacs
A new spell checker just dropped.
Anonymous No.105660689 [Report]
>>105660382
strange that they use eglot as an example considering it still doesn't support multiplexing, so you won't be able to use this on anything other than pure writing modes
Anonymous No.105660753 [Report] >>105660790
>>105660153
You have no implementation plan. There's nothing to talk about. It's completely trivial.
Anonymous No.105660787 [Report] >>105660796
>>105660100
that's not a description of how you'll make it work, and you seem pretty reluctant to actually describe any details
if you're just writing functions which don't actually do anything other than pretty printing C then there's not really any challenge
Anonymous No.105660790 [Report]
>>105660753
won't need one either, because I just got reminded
Anonymous No.105660796 [Report]
>>105660787
It's obvious how it would work. Which is why the only question I had was about syntax and not implementation, your worthless input wasn't asked for by anybody.
Anonymous No.105660888 [Report]
Please go to /ancsg/ - annoying no coder schizo general
Anonymous No.105661489 [Report]
LISP (Lots of Isolated Silly Parentheses)
( > ' ' )>

>>105656528
> you are insane for actually wanting that
You are a poser. No Lisp programmer would ever say something like that.
Anonymous No.105661955 [Report]
(define (parse-char char)
;; matches single character
(lambda (input)
(if (and input
(> (string-length input) 0)
(char=? char (string-ref input 0)))
(list `(CHAR ,char) (string-drop input 1))
#f)))

(define (parse-any-char)
;; matches any char
(lambda (input)
(if (and input
(> (string-length input) 0)
(char? (string-ref input 0)))
(list `(CHAR ,(string-ref input 0)) (string-drop input 1))
#f)))

(define (parse-string str)
;; matches string str of #f
(lambda (input)
(if input
(let ((input-len (string-length input))
(str-len (string-length str)))
(if (and
(>= input-len str-len)
(string-prefix? str input))
(list `(STRING ,str) (string-drop input str-len))
#f))
#f)))


(define (parse-or lst)
;; return the first matching parser result or #f
(lambda (input)
(if (and input lst)
(or-map (lambda (parser) (parser input))) lst)))


(define (parse-sequence lst)
;; matches all parsers in sequence or #f
(lambda (input)
(if (and input lst)
(let loop ((acc '())
(str input)
(parsers lst))
(if (null? parsers)
(list (reverse acc) str)
(let ((result ((car parsers) str)))
(if result
(loop (cons (car result) acc ) (cadr result) (cdr parsers))
#f)))))))
Anonymous No.105662046 [Report] >>105662235 >>105662448 >>105662864 >>105663426 >>105667335 >>105682027
Which dialect should I start with? Here's what I want:
> minimal to no "standard"
> the programmer creates problem-specific vocabulary (or syntax) by extending the language to solve the problem
> advance metaprogramming capabilities both at the macro level and the introspection/analysis
Anonymous No.105662235 [Report] >>105662263
>>105662046
LFE
Anonymous No.105662263 [Report] >>105662287 >>105662440
>>105662235
> picrel
> the programmer creates problem-specific vocabulary
What if the things in picrel are the best way to tackle a problem? This retardation is the reason nobody uses lisp.
Anonymous No.105662287 [Report]
>>105662263
NGMI
Anonymous No.105662402 [Report]
>>105660382
>using LSP for a spell checker
extremely grim
Anonymous No.105662440 [Report] >>105662505
>>105662263
- You'll get used to managing state inside tail-recursive functions.
- A younger me would have balked at this.
- However, for a long-lived server, it leads to a very solid system.
- You can still have state, but state changes are managed very deliberately this way.
Anonymous No.105662448 [Report] >>105662462 >>105662505
>>105662046
>common lisp (and clojure) has big standard
>scheme has shit macro system
Emacs Lisp is your best bet. Saved for its text editing and manipulating functions, you have very little library to use.
Anonymous No.105662462 [Report]
>>105662448
Emacs Lisp is probably the best Lisp to start with, because it's going to keep you inside Emacs which is the gateway drug to every other Lisp.
Anonymous No.105662505 [Report] >>105662532
>>105662440
Again, I am more interested in problem-oriented programming. I want Lisp to act as a baseline, on which I can "explore" the problem as freely as possible. Globals/States are really good when you are solving a problem.
>>105662448
I don't care about macro "that" much. Is scheme good?
Anonymous No.105662532 [Report]
>>105662505
Scheme is good. R5RS spec, pick an implementation, and off you go.
Anonymous No.105662559 [Report]
>I am more interested in problem-oriented programming.
>Is scheme good?
lol
Anonymous No.105662857 [Report]
>>105659367
>much of the implementation and resulting behavior are shared with Apple's other platforms (iOS, iPadOS, tvOS, etc)
This makes TinyScheme the most widespread and widely used Lisp.
Schemechads we won.
Anonymous No.105662864 [Report]
>>105662046
Why would you want this type of autism, you sound like a CL programmer before you even touched a lisp. This is very concerning Anon.
Anonymous No.105662875 [Report] >>105662884 >>105689166
It's just as good as lisp. It IS!
Anonymous No.105662884 [Report] >>105663426
>>105662875
Actors are inferior to functional programming when the goal is not async programming.
Anonymous No.105662887 [Report]
>>105652614 (OP)
let syaro out!!!
Anonymous No.105663321 [Report] >>105663431 >>105663448 >>105663616 >>105664567 >>105664811
XAH TRVTHNVKE just dropped on the HN frontpage
https://news.ycombinator.com/item?id=44310996
Anonymous No.105663426 [Report]
>>105662046
https://picolisp.com/

>>105662884
actors and smalltalk objects are not the same thing. The actor model is a whole computing model and an alternative to the turing machine or lambda calculus.
Anonymous No.105663431 [Report] >>105663854
>>105663321
>>Lisp is not, nor has it ever been, a functional programming language.
HNigger deboonked by John McCarthy
>LISP has a partially justified reputation of being more based on theory than most computer languages, presumably stemming from its FUNCTIONAL form, its use of lambda notation and basing the interpreter on a universal function.
>As a programming language, LISP is characterized by the following ideas:
>5. Composition of functions as a tool for forming more complex functions.
>6. The use of conditional expressions for getting branching into function definitions.
>7. The recursive use of conditional expressions as a sufficient tool for building computable functions.
>8. The use of λ-expressions for naming functions.
>12. The LISP function eval that serves both as a formal definition of the language and as an interpreter.
https://www-formal.stanford.edu/jmc/lisp20th.pdf
Anonymous No.105663448 [Report]
>>105663321
I don't really agree with all of this but Clojure does implement this in a very nice way. Even if I think CL remains better overall.
Anonymous No.105663616 [Report]
>>105663321
That "gisp" argument is literally the most retarded thing I have ever read.
Anonymous No.105663854 [Report]
>>105663431
i remember McCarthy saying that he only took the λ syntax from church and nothing more because he couldn't understand λcalculus.
Anonymous No.105664194 [Report]
>start emacs after a few months
>doom emacs install broke and won't initialize properly
?????????????????????
Anonymous No.105664567 [Report] >>105664803 >>105664811
>>105663321
>> Lisp (as well as Prolog, Haskell, ML, etc.) programmers won't be persuaded to abandon cons cells or lists as they find them extremely useful.

>Who said anything about abandoning lists? The argument appears to be that lists don't need to be built up out of two-element cells (i.e cons cells), and that Lisp, by enforcing `cons` cells as a way to construct lists, is seeing some limitations.
>DESU, I agree a little that that PoV - there is no need for exposing the implementation of the list to the programmer, much less forcing the programmer into using the implementation.
>The other problem with enforcing lists to be constructed of cons cells is one of performance; the default list in Lisp is a cache-invalidating monster.
I wholeheartedly agree with this. There's no need to expose the implementation of the list as cons cells like most Lisp dialects do. It would be much more elegant and more performant if the implementation details were abstracted away from the user, allowing Lisp to use a more efficient representation of a list internally.

Cons cells worked well back in the 60s when CPUs didn't have caches. Accessing an array sequentially wasn't that much faster than pointer chasing back then. Nowadays a cons cell in a cache-invalidating performance-destroying monster.
Anonymous No.105664699 [Report]
Not trolling, but what are the applications of LISP machines in 2025?
Anonymous No.105664803 [Report] >>105664924 >>105665130 >>105665281
>>105664567
The reason this argument always falls flat is that cons cells, and lists by extension AREN'T LISTS AT ALL! They're TREES!
Any replacement to cons cells is going to need to be a flexible branching data structure, which basically means indirection anyway.
Yes in theory you can transparently implement all this with arrays, but it's not quite a straight forward as it's implied to be and not as massive of a performance win.

The biggest issue is that lispers like making their own custom data structures(probably because they're not enough of them implemented in the standard) and cons cells are ideal for that, they're not very efficient but extremely flexible and easy to use. Any possible replacement is going to have to lose that flexibility and simplicity to function properly.

And this doesn't even touch on the fact that LISP HAS ARRAYS! They're right there, you can use them anytime you want more performance! Removing cons cells for no reason just to force people to use arrays against their will is retarded. I'll use lists and dynamic typing as much as I want, and if it's too slow I can type hint everything and use fixed size arrays. Why is this a bad thing?
Anonymous No.105664811 [Report]
>>105663321
>>105664567
>Everything in Lisp is beautifully elegant and uniformly abstracted away
>Except the exposed low-level implementation details of the cons cells
It's surprising it too this long for someone to mention that design flaw.
Anonymous No.105664830 [Report]
>LISt Processing
>it's not about lists
smartest HN poster
Anonymous No.105664924 [Report] >>105665048 >>105665057
>>105664803
The argument isn't that we need to replace cons cells, but that we don't need to expose the implementation to the user.
That is completely correct. It's inelegant. It's an implementation detail. The user doesn't need to know that lists are implemented as cons cells. The user also shouldn't be mutating the underlying cells directly without going through a uniform collection interface like the one Clojure has.

The point is that this allows the compiler/interpreter to optimize the code into an array, or some other structure, if there's nothing in there that requires the usage of cons cells. Exposing the implementation means the compiler can't use anything other than cons cells EVERYWHERE, which is pretty awful for performance.

Also...
>and lists by extension AREN'T LISTS AT ALL! They're TREES!
It's not called Trep. it's called Lisp, for Lisp Processor. The whole language is based around the concept of LISTS, not trees.
You can represent trees with cons cells, but only because the implementation details are exposed and can be abused by the user to create linked list-based trees.
As mentioned above, that's not a good thing, the implementation details should be abstracted away from the user to prevent this type of abuse that makes optimization harder than it needs to be.
Anonymous No.105665048 [Report] >>105665143
>>105664924
Not that anon, but how can you have that kind of optimization while still allowing lisp to evaluate itself.
I mean, maybe at the moment there is no code that does anything fancy to the list so you can optimize it as an array. But lisp allows the user to later define a function that might destroy that assumption, and then what happens, does the compiler have to automatically remake the array into a normal list?
Anonymous No.105665057 [Report] >>105665081
>>105664924
Optimization is pointless 99% of the time, all that matters is being able to do what you want as simply as possible, cons cells are that.
You still have no argument about arrays already existing, and people not using them because they prefer cons cells.

>we HAVE TO hide this away from the programmer
>he can't be trusted with control of the code!
Insane ramblings of a psychotic. What's next, removing structs because they can be turned into cons cells? No more memory allocation, it all has to be declared at compile time? Cant do recursion anymore, think of the stack size! What's that you want to use arbitrary precision? Sorry, that's an anti-pattern, everything is now a 32 bit integer fixnum.
Anonymous No.105665081 [Report] >>105665122 >>105698621
>>105665057
>Optimization is pointless 99% of the time
>Hiding implementation details is bad
Let me guess, you're unemployed?
Anonymous No.105665082 [Report]
>>105652832
now I can channel my autism on my old iPhone
Anonymous No.105665122 [Report]
>>105665081
Let me guess, you're indian?
The only reason to hide things from the programmer and focus on "compiler optimization" is because your programmers suck and are impossible to educate and you're desperately trying to salvage their shit code by offloading all of it to compiler devs instead.
Anonymous No.105665130 [Report]
>>105664803
>They're TREES!
the abstract types list and tree have a different interface. for example, a list has only one tail, a tree has multiple leafs/nodes/children. no offense dude, but i had to learn that during the first semester of cs.
Anonymous No.105665143 [Report] >>105665360
>>105665048
>But lisp allows the user to later define a function that might destroy that assumption
This isn't an inherent feature of the Lisp-family that every dialect has to support. It's only a feature of SOME dialects.
In that case you've cornered yourself into requiring a linked list representation of source code to allow for runtime mutation, that should be considered a design flaw.

Statically compiled Lisps don't have to adhere to this limitation. Clojure can be compiled into JVM bytecode just fine without requiring all the source code to be represented as cons cells. GOAL could compiled into PS2 machine code without such limitation as well.
Anonymous No.105665223 [Report]
>>105652832
Anything similar for android?
Anonymous No.105665281 [Report] >>105665341
>>105664803
lists are just unary trees :^)
really tho these discussions are always pointless because they always boil down to "lisp would be better if it wasn't lisp"
Anonymous No.105665341 [Report] >>105687547
>>105665281
>"lisp would be better if it wasn't lisp"
Actually, Lisp would be better if it was mostly Scheme (R6RS) with some Clojure (no cons cells).
Anonymous No.105665360 [Report]
>>105665143
>to allow for runtime mutation, that should be considered a design flaw.
Maybe from the point of view of wanting an extremely performant low level lisp language. But not every program needs extreme performance, and having runtime mutation is more of a _feature_ in many cases.

I think it would be best to try and have both. Disabling the possibility of runtime mutation should itself be considered an optimization. And it's up to the programmer to use it or not.
Anonymous No.105665366 [Report]
>>105659867
If you don't mind non-ascii chars, using the modern/old logic symbols for boolean/binary operators respectively frees up ^ for exponentiation like
(match node
((^ a b) (emit "pow(a, b)")))
Anonymous No.105665930 [Report] >>105665940 >>105666028
WHY WON'T CIDER PROMPT ME FOR A FUCKING SHADOW-CLJS BUILD LIKE THE DOCS SAY?? AHHHHHHHHHH
Anonymous No.105665940 [Report] >>105665948
>>105665930
BECAUSE I NEED TO SET THE DEFAULT REPL TO shadow-select
AHHHHHHHHHHHHHHHH
Anonymous No.105665948 [Report]
>>105665940
BUT THAT DOESN'T START A WATCH AUTOMATICALLY
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
Anonymous No.105666028 [Report] >>105666060
>>105665930
>SHADOW-CLJS
Such is the way of the dark arts
Anonymous No.105666060 [Report] >>105666100 >>105666158
>>105666028
WHAT THE FUCK DOES THIS MEAN
The required namespace "snabbdom" is not available, it was required by "dumdom/core.cljs".

IM SEETHING RN
Anonymous No.105666100 [Report]
>>105666060
snabbdom wasn't in scope when dumdom looked for it, presumably because it's either missing or been renamed
Anonymous No.105666158 [Report]
>>105666060
>snabbdom dumdom
Anonymous No.105666322 [Report] >>105667904 >>105671011
in scheme, is using values instead of a list to return multiple values more performant than building/passing lists around?
Anonymous No.105666823 [Report] >>105674834
Does anyone recognize the font used in the endatabas demo video?
https://www.youtube.com/watch?v=oDHGjUMqPvI
https://www.endatabas.com/
Anonymous No.105666962 [Report] >>105667008 >>105671467 >>105671485 >>105673640
what's lisp general's opinion on Haskell?
Anonymous No.105667008 [Report] >>105667255
>>105666962
https://coalton-lang.github.io/
Anonymous No.105667247 [Report]
Recursion is useful.
Anonymous No.105667255 [Report] >>105667577
>>105667008
I want to give this a try, but I'm not sure what kind of project it would be good for.
Anonymous No.105667335 [Report] >>105667348
>>105662046
Have you taken a look at Janet?
https://janet-lang.org/ (Janet Website)
https://janet-lang.org/docs/index.html (Official Janet Docs)
https://janetdocs.com/ (User Contributed Janet Docs)
https://janet.guide/ (Janet for Mortals Book)
https://janet.zulipchat.com/ (Janet Zulip Chat)

I just added an entry for them in:
https://rentry.org/lispresources#janet-lisp1
Anonymous No.105667348 [Report]
>>105667335
Tangent: Can you believe rentry's monthly costs? $5K/month sounds way too high when catbox.moe gets by on $1490/month.
Anonymous No.105667577 [Report]
>>105667255
All of them.
Anonymous No.105667641 [Report]
where can I buy a lisp machine?
Anonymous No.105667689 [Report]
>elisp for configuring Emacs
>CL for FFI/performance sensitive & systems applications
>Clojure(Script) for everything else
simple as
Anonymous No.105667837 [Report] >>105670743 >>105677355
>Wanna fall for the babashka shilling i've read these last months
>Needs to install Maven and some JDK shitware to install decent database bindings
Not sure how to feel about that, if it's worth without using any external dependency. Binary is on the bloat-ish side.
Anonymous No.105667904 [Report]
>>105666322
Depending on the implementation.
Anonymous No.105668231 [Report] >>105668752
I love you guys. I hope the world lets me sit quietly and write Lisp. I don't want to fight another war.
Anonymous No.105668300 [Report] >>105668752 >>105670174
What's a good dark theme for emacs that's not too black, I prefer maybe a very dark blue or something instead.
Anonymous No.105668752 [Report]
>>105668300
adwaita maybe
>>105668231
yeah i haven't heard from one of my former (Iranian) colleagues and good friends at all since last week, pretty sure his family is trapped there right now
can't tell you how antisemitic i feel right now desu
Anonymous No.105668767 [Report] >>105668777 >>105668824
> Emacs is getting slower every release.
> M-x org-mode takes ~5 seconds
> Download a 5 year old version
> it's lightning fast
What gives?
Anonymous No.105668777 [Report] >>105668805
>>105668767
works on my machine.
Anonymous No.105668805 [Report] >>105668808 >>105668824
>>105668777
> works on my machine
Invalid argument. I have a 10 year old machine for playing classic windows games. And the editor is actively getting slower every release. You can prove it yourself if you actually "benchmark" two different version of emacs and actually compare the cycle count.
It is wasting important CPU cycles that should be used on code that is written by user to extend emacs.
Anonymous No.105668808 [Report] >>105668824
>>105668805
Just for comparison, Visual studio 6.0 can compile the entire Jagged Alliance 2 source code and execute it, while emacs is still initializing org-mode.
Anonymous No.105668824 [Report] >>105668836 >>105668880
>>105668767
>>105668805
>>105668808
Is this with emacs -Q? I just ran
>emacs -Q
>M-x eval-expression
>(benchmark 1 (org-mode))
And it was like 0.000001s or something insignificant like that, and my pc is 7 years old.
Anonymous No.105668836 [Report]
>>105668824
That's printing out some other internal clock time. Let me share a webm.
Anonymous No.105668880 [Report] >>105668890 >>105668923 >>105673110 >>105690343
>>105668824
Could this be Window's Defender scanning every single generated file?
Anonymous No.105668890 [Report] >>105668923 >>105671108 >>105673110
>>105668880
Nope, it still stalls. Disabling defender does nothing.
Anonymous No.105668899 [Report] >>105668980 >>105669155
Disorganized guy here. If you don't recall I wrote my note-taking app in ClojureDart.
I'll give you guys lifetime premium if you want to try it.

Download the Disorganized app (android/ios), register a proper account, go to settings -> copy user id, then send it to me an email at support AT getdisorganized.com and I'll give you lifetime premium. And if you give feedback I'll give you premium for two lifetimes.

THANKS FOR READING THIS AD.
Anonymous No.105668923 [Report]
>>105668880
>>105668890
Aha, windows user. I've heard of performance issues with Windows before and that's probably what's going wrong. Sorry man, I'm not sure there's a officially certified solution to this, maybe you can find tips and tricks online to speed up the windows build.
I also couldn't tell you what changed between new builds and old, beyond that it's not like this on Linux.
Anonymous No.105668980 [Report] >>105669076
>>105668899
sent :^)
thanks
Anonymous No.105669076 [Report] >>105669157
>>105668980
Damn, already my first qt jap user. 4chan is incredible.
Anonymous No.105669142 [Report]
>tfw Lisp never got me a crumb of pussy
maybe I should've picked Clojure
Anonymous No.105669155 [Report] >>105669195
>>105668899
1. Fdroid
2. Accrescent
3. XMR payments for premium
Anonymous No.105669157 [Report] >>105669195
>>105669076
you have just insulted the entire korean peoples, apologize and acknowledge that dokdo is korean
Anonymous No.105669195 [Report]
>>105669155
I will consider all feedback except this guy's.

>>105669157
Clearly my racism needs work, I will go apologize in /pol/
Anonymous No.105669666 [Report] >>105669679
In my chase to make the computational implementation of the Wallis method (via an SICP problem) as simple as possible, I derived a completely tortured and ridiculously opaque permutation of the Wallis thing. It's fucking stupid and completely worthless, but I had fun and it appears to be novel by virtue of obscurity.

(define (pi-est n)
(let ((scalar (/ (sqrt (+ (* 4 n) 8))
(+ (* 2 n) 3))))
(square (* scalar
(product (lambda (x) (+ 1 (/ 1 (+ (* 2 x) 3))))
0
(lambda (x) (+ 1 x))
n)))))

(define (product term a next b)
(if (> a b)
1
(* (term a)
(product term (next a) next b))))

Picrel is an informal outline of the math behind it. Sorry for the handwriting, I'm a lefty
Anonymous No.105669679 [Report] >>105669696
>>105669666
this is extremely unlikely to be novel since by shifting indices and some simple manipulation you should recover the standard expression
Anonymous No.105669696 [Report] >>105670618
>>105669679
It's not novel in any significant way. Its novelty (if extant; not attached to that in any way) is purely in its obtusity. I couldn't find any other record of a solution which utilizes this scalar, but there have been literal decades of people working through SICP so it's more likely that no one had the shamelessness to record it.
Anonymous No.105670174 [Report] >>105670847
>>105668300
>What's a good dark theme for emacs that's not too black, I prefer maybe a very dark blue or something instead.
https://github.com/catppuccin/emacs
Anonymous No.105670618 [Report]
>>105669696
the point is that it is equivalent to the typical Wallis product and therefore it has been recorded centuries ago
Anonymous No.105670743 [Report] >>105670758 >>105671320
>>105667837
Java of all things probably has all the database drivers in existence.
Anonymous No.105670758 [Report] >>105670795
>>105670743
CL is definitely lacking in this area. It's got the major open source ones covered, but if you're trying to use anything obscure, you're on your own.
Anonymous No.105670795 [Report] >>105671320 >>105671384
>>105670758
Le what? We have some weird fukamachi package, postmodern, CL-SQL (dead and rotten) and what else?

The only half-decent one is postmodern.
Anonymous No.105670847 [Report] >>105671625
>>105670174
Gruber Darker
Anonymous No.105671011 [Report] >>105671371
>>105666322
>in scheme, is using values instead of a list to return multiple values more performant than building/passing lists around?
* (define (f x y) (values x y))
* (define (g x y) (list x y))
* ,x f
Disassembly of #<procedure f (x y)> at #x2313030:

0 (instrument-entry 54)
2 (assert-nargs-ee/locals 3 0) ;; 3 slots (2 args)
3 (mov 2 1)
4 (mov 1 0)
5 (reset-frame 2) ;; 2 slots
6 (handle-interrupts)
7 (return-values)
* ,x g
Disassembly of #<procedure g (x y)> at #x23146f8:

0 (instrument-entry 60)
2 (assert-nargs-ee/locals 3 1) ;; 4 slots (2 args)
3 (make-immediate 3 772) ;; ()
4 (allocate-words/immediate 0 2)
5 (scm-set!/immediate 0 0 1)
6 (scm-set!/immediate 0 1 3)
7 (allocate-words/immediate 3 2)
8 (scm-set!/immediate 3 0 2)
9 (scm-set!/immediate 3 1 0)
10 (reset-frame 1) ;; 1 slot
11 (handle-interrupts)
12 (return-values)
At least in guile it looks like f just shuffles its arguments while g allocates, both functions use return-values (guile uses a simple template-jit for native code gen, so shorter bytecode should correspond to fewer instructions)
Anonymous No.105671108 [Report]
>>105668890
i use org mode on portable emacs on my work pc, for me it's unusably slow because everything syncs though onedrive, even though it's set to always be kept on my computer
Anonymous No.105671320 [Report] >>105671394
>>105670743
This babashka crap was supposed to come with a kitchen sink built-in cause is a self contained binary. I wasn't expecting to need to install Java shitware for aditional dependencies. Might as well write Clojure. Guess it's time for Racket.
>>105670795
Well at least CL has bindings for other programming languages.
Anonymous No.105671371 [Report] >>105671385 >>105671417
>>105671011
> more performant
You are in lisp bro. The only thing you should be thinking about is algorithmic performance, anything below that is violating Lisp restrictions.
Anonymous No.105671384 [Report]
>>105670795
The fukamachi stuff worked OK in my experience. It could use a little more documentation, but considering he isn't a native English speaker, I cut him a little slack.

The fukamachi database stack is:
cl-dbi - database driver abstraction
sxql - query DSL
mito - ORM

https://github.com/fukamachi/mito
Anonymous No.105671385 [Report] >>105671427
>>105671371
Depending on the implementation you can increase performance by orders of magnitude by doing stuff like that.
Specially with the "numerical tower" which is not very good for performance. Numerical type checking (with a simple if) can show the compiler that it will never have to do certain stuff for example.
Anonymous No.105671394 [Report] >>105677453
>>105671320
You need to either implement the 'wire' protocol used by your flavor of DB or get it from somewhere else.
Anonymous No.105671417 [Report] >>105671443 >>105677355
>>105671371
>You are in lisp bro. The only thing you should be thinking about is algorithmic performance, anything below that is violating Lisp restrictions.
If you have an hour to spare, you have to see what's possible. People are sleeping on what sbcl is capable of.
https://x.com/killian_arts/status/1925029797438333420
Anonymous No.105671427 [Report] >>105671583 >>105672157
>>105671385
> Depending on the implementation
Implementation details are hidden for a reason anon. When it matters, you are supposed to roll your own implementation.

So essentially you write the entire program without worrying about implementation details. And then you either roll your own lisp, or modify the source code of the interpreter to allow "fast returning of multiple values".
Anonymous No.105671443 [Report] >>105671583
>>105671417
That's exactly my point. You are "not" supposed to "care" about "implementation performance" when programming in Lisp. You focus on the problem and the algorithmic performance. And when the program is finished, you can either switch to a different interpreter or roll your own that is specific to your problem.
Anonymous No.105671467 [Report]
>>105666962
>what's lisp general's opinion on Haskell?
I've never given Haskell a proper try, but I'm willing to try Coalton.
Anonymous No.105671485 [Report] >>105675341 >>105709742
>>105666962
Practical Programming Language:
>C/C++
Enlightened Equivalent of Programming
> Lisp and Forth
Garbage
> Haskell,Java, every other programming language
Anonymous No.105671583 [Report] >>105671631 >>105671919
>>105671427
>>105671443
>This Stack Overflow post points out an obscure and undocumented weakness in Intel’s implementation of the POPCNT instruction [...] GCC, clang and MSVC all fail to take this issue into account.
>Until a new patched version of my favourite C compiler is released, there aren’t many workarounds for this performance bug. I’d have to switch to inline asm [...]
>SBCL easily supports this use case, without having to re-release or even recompile the implementation: VOPs (virtual operations) execute arbitrary CL code during code generation and they can be defined at runtime.
>The first step is to make sure that SBCL’s assembler knows how to emit popcnt: the assembler can also be extended at runtime [...] We define VOPs via define-vop, a macro that exposes many options.
https://pvk.ca/Blog/2014/08/16/how-to-define-new-intrinsics-in-sbcl/
https://www.pvk.ca/Blog/2014/03/15/sbcl-the-ultimate-assembly-code-breadboard/

From memory this is how cl-simd added simd intrinsics for vectors and matrices, it's just a library that extends the assembler with new instructions
Anonymous No.105671625 [Report] >>105671640
>>105670847
>Gruber Darker
It has a few problems that need fixing.
https://github.com/rexim/gruber-darker-theme
Anonymous No.105671631 [Report] >>105671706
>>105671583
What's the point?
I wrote C/C++ professionally at my day job. And it's common knowledge, to "not" trust the compiler. Compiler's can't even do basic things like inlining reliably. In C/C++ you are supposed to ignore the "instruction" level details and instead focus on memory, caches, accessing schemes, etc. Then you actually benchmark your code, and then you start looking at assembly.
I can guarantee you that every single AAA game that uses an in house engine, has inline assembly "hacks" to deal with stupid compiler bugs.

And you should never compare Lisp with C, never. Any performance gained by a lisp interpreter at instruction level does not matter if you are using a general purpose off the shelf interpreter. It's such a stupid way to phrase an argument.
Anonymous No.105671640 [Report] >>105671677
>>105671625
It's a emacs 24 scheme, which is fine for me since I don't use newer emacs releases.
Anonymous No.105671677 [Report] >>105671993
>>105671640
>I don't use newer emacs releases.
I'm at a point where I require 29+, because I love the --init-directory option so much. I also really appreciate native compilation for Elisp (which came in 28 but it keeps improving with every major release).

May I ask what version you're on, and why you chose to stay at that version?
Anonymous No.105671706 [Report] >>105671817
>>105671631
>What's the point?
It permits the code generator to be extended as an isa is extended, so users don't have to wait for a new release to take advantage of new hardware
Anonymous No.105671817 [Report] >>105671919
>>105671706
> It permits the code generator to be extended
Wait so I can actually change the code generator within the language itself? Now that sounds interesting.
Anonymous No.105671919 [Report]
>>105671817
Sure, the first link in >>105671583 writes about adding new instrinics, or for a real world implementation: https://github.com/marcoheisig/sb-simd/blob/master/code/instruction-sets/avx2.lisp
Anonymous No.105671993 [Report] >>105672077
>>105671677
> May I ask what version you're on?
I just install the oldest version supported on a specific platform. So any v26+ release is fine for me.
> Why you chose to stay at that version?
I want my text editor to be invisible. I just have a single init.el file, that is guaranteed to work everywhere. Also, I don't trust open source developers. Case in point, indenting a 2000+ line source file takes an eternity to complete, macros take even longer. Guess what, the entire editor is bottlenecked by language modes. Just switching to fundamental or text-mode and then applying a macro, gives you a 50x speed up. It's insane how bad the developers are. However, I switch back to an older release and its works fine.
And I actually reached out to the developers to report the issue. Their response was:
>It's reasonable to lag when applying a complex macro across an entire file
Anonymous No.105672077 [Report] >>105672148
>>105671993
>Case in point, indenting a 2000+ line source file takes an eternity to complete, macros take even longer. Guess what, the entire editor is bottlenecked by language modes. Just switching to fundamental or text-mode and then applying a macro, gives you a 50x speed up.
nta but I've also experienced that, I think it's because stuff like buffer text properties and highlighting are applied with regexes
Anonymous No.105672148 [Report] >>105672266
>>105672077
Even if we ignore that. I can compile entire programs and execute them within a second, we have games that run at 240FPS, and these people still can't process a file within a second let alone milliseconds.
Anonymous No.105672157 [Report] >>105672278
>>105671427
this is language wankery like the C schizo.
Squeezing performance relies on stuff like this.
knowing what wastes GC time, what uses heap space etc is important.
Anonymous No.105672266 [Report]
>>105672148
Yep, it's pretty wild, it can likely be refactored to run normally without breaking compatibility but it would require a deepdive into emac buffer internals which is beyond me
Anonymous No.105672278 [Report]
>>105672157
> knowing what wastes GC time, what uses heap space etc is important.
Not in lisp. I have never seen a enterprise Lisp product that actually pushes the hardware enough for that to matter.
Anonymous No.105673018 [Report] >>105673051 >>105673060 >>105673076
Lisp machines seem like a retarded idea honestly. Why would you prefer it over a general purpose computer?
Anonymous No.105673051 [Report]
>>105673018
>Why would you prefer it over a general purpose computer?
Nobody does.
Anonymous No.105673060 [Report] >>105673101
>>105673018
they made a lot more sense back when computers were so slow that specialized hardware made more sense. now the industry uses languages that are so slow that lisp is reasonably fast in comparison
Anonymous No.105673076 [Report] >>105673101
>>105673018
Lisp machines are a general purpose computer. They supported more programming languages than Unix and DOS did.
Anonymous No.105673101 [Report]
>>105673060
>>105673076
That's enough 4chan for today.
Anonymous No.105673110 [Report] >>105690343
>>105668880
>>105668890
unironically install WSL2 and set up emacs in that, it will be very snappy. the native wangblows version of emacs has always been dogshit.
i can't remember why cause it's been a problem since forever but it's pretty much never gonna be fixed
Anonymous No.105673623 [Report] >>105673640 >>105674326
I have an irrational fear of Dired. I worry that if I do something slightly wrong, I'll delete an entire folder. I have the wastebasket thing enabled, but I still don't know how safe it is to be a fool in Dired. What safeguards are in place?
Anonymous No.105673640 [Report] >>105673643
>>105666962
I prefer OCaml for practical programming and Coq for messing with cool type stuff (though I'm still relatively inexperienced there).
>>105673623
You should have backups. And test them regularly.
Anonymous No.105673643 [Report] >>105673713
>>105673640
I do have backups, but I'm obviously only opening Emacs for things that I'm working on right now. My PC isn't a fucking SQL database. I'm not running backups every minute.
Anonymous No.105673670 [Report] >>105673677 >>105673750 >>105673860 >>105673929
why is it that I don't miss types in Lisp? Every time I try to program in a dynamically typed language I just desist and go back to something with static types, but with lisp it just makes sense somehow
Anonymous No.105673677 [Report]
>>105673670
You don't write Enterprise Software (tm) in Lisp.
Anonymous No.105673713 [Report]
>>105673643
I mean, losing several hours of work is usually not a huge problem, often you can recreate it in 30 minutes (unless it's something very tedious and not intellectual).
By default Dired asks you on file deletion, showing a file or a list of files that are affected, and forces you to type full yes/no answer. I prefer just y/n and still can't remember deleting anything by mistake.
Anonymous No.105673750 [Report]
>>105673670
The only really good thing about static types is that you can make compilers scream by changing the type of something while you're refactoring. This makes those refactorings easier.
Anonymous No.105673860 [Report] >>105673929
>>105673670
I have the exact same experience. Not sure exactly what does it. Clojure is just good because it's always a map, number, string, vector, or nil. And it's pretty rare that I mix them up. And nils tend to fall through naturally.
Anonymous No.105673929 [Report]
>>105673670
>>105673860
the moment you work with other shitters that don't follow the guidelines or write schemas (or god forbid, write wrong schemas without testing and end up breaking CI on every other project that depends on it) this falls apart
t. clojure job
i hate being a wagie so much it's unreal
Anonymous No.105674326 [Report]
>>105673623
I've been using Dired regularly for like two years and I've never deleted anything "by accident". It literally asks you to confirm every time you try to delete something, so I don't understand your fear at all.
Anonymous No.105674817 [Report] >>105676344 >>105676403 >>105676552
I made this script for helping with window and buffer management, it's the first meaningful attempt I've made at writing elisp, and I was hoping to get some feedback, as I'm still learning and this was a lot of trial and error.

It:
- Allows you to do a depth first search of the windows and splits
- Linearize a buffer list with optional dupe checking
- destroy your current windows and have them reopen either horizontally or vertically
- cycle the current windows forward or backward 1
- swap the current buffer with another

Honestly I'm happy with how it feels to use, but I wouldn't mind some appropriate flaming of my lisp.

Script is too long for post:
https://pastebin.com/nsmmvTat

Something else I want to add is a fan function that allows you to specify a number of windows per row and column, and it'll mosaic them
Anonymous No.105674834 [Report] >>105676145
>>105666823
Looks like OCR-A
Anonymous No.105674998 [Report] >>105675281
>>105655231
Okay, racket-mode is good enough so far. Pie's type inference is annoyingly weak. Also, it's weird with currying: both ((fst 5) 7) and (fst 5 7) in picrel work fine, but adding dummy parens like ((((fst) 5)) 7) doesn't work, even though IMO supporting that would be more consistent.
Anonymous No.105675281 [Report]
>>105674998
racket mode or geiser. Geiser feels like getting a kick in the nuts after you use sly/slime, but its what schemers got.
Anonymous No.105675335 [Report] >>105683270
>https://github.com/opencog
giant hyperautistic scheme project. Why is it unknown?
Anonymous No.105675341 [Report]
>>105671485
>Practical Programming Language for hackers to exploit
>>C/C++
>Enlightened Equivalent of Programming
>> Lisp and Forth
>Garbage collection made useful
>> Haskell,Java, every other programming language
Anonymous No.105675485 [Report]
>>10566632
values should be faster since they are only passed to the outer expression, unlike a list which is a full object being tracked by the garbage collector.
Anonymous No.105676145 [Report]
>>105674834
>OCR-A
similar but not quite
https://fonts.adobe.com/fonts/ocr-a
Anonymous No.105676344 [Report] >>105676425
>>105674817
Quick comments: If you're going to use :keyword arguments a lot, I'd look into cl-defun.
;; https://www.gnu.org/software/emacs/manual/html_node/cl/Argument-Lists.html
(info "(cl) Argument Lists")

It'll give you an &key that'll do the plist-get calls for you.

It otherwise looks like it was written by an experienced programmer even if Elisp is still relatively new to you. It's good to see docstrings on every function. One little thing you might not know is that there's a way to quote symbols in docstrings such that they become clickable when viewed via `C-h f`.

(defun my/print-window-tree ()
"Prints the window tree layout using `my/descend-window-tree'."
(interactive)
)


Notice how `my/descent-window-tree' is wrapped in a backtick ` and a single quote '. Emacs will try to turn that into a clickable link when viewed via the help system. I wanted to link to the docs for this quoting notation, but I couldn't find it. I was hoping it was somehwere under here.

;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation.html
(info "(elisp) Documentation")
Anonymous No.105676403 [Report] >>105676425
>>105674817
Run M-x checkdoc on your code and fix it.
Anonymous No.105676425 [Report] >>105676472
>>105676344
>>105676403
Thanks guys, I appreciate the input, I admittedly got lazy on the docs, the checkdocs thing is kinda spooky, I wish this was more common in other languages.
Anonymous No.105676472 [Report] >>105676481
>>105676425
Emacs and Elisp documentation culture, while not perfect, is pretty strong. There are a lot of conventions in place that are worth learning and following. It's not just the core but the whole ecosystem is pretty thoroughly documented, and I've come to really appreciate that.
Anonymous No.105676481 [Report]
>>105676472
Nah that's actually really nice, I doubt it would hurt me as well as I learn to be meticulous. Most of my functional programming experience has been with typed ocaml, and type systems are a solid guardrail.
Anonymous No.105676552 [Report] >>105676557
>>105674817
I just gave my/fan-windows-x and my/fan-windows-y a try, and they both worked perfectly. I've wanted functions like this in the past, but it's not easy to write so I never got around to doing it myself. Very nice work.
Anonymous No.105676557 [Report] >>105676629
>>105676552
Thanks!
Just FYI, the swap buffers one is a little goofy if you have the same buffer in multiple windows, I haven't figured out the specifics of why, but it can feel a bit random
Anonymous No.105676629 [Report]
>>105676557
My goto solution for swapping windows is
https://melpa.org/#/ace-window

M-x ace-window
and then hit ? to see the one letter commands. If you already know them by heart, just type your command.
M-x ace-window command number
M-x ace-window number

I also have ace-window bound to M-o as recommended. If you play with it for a little, you'll get it.
Anonymous No.105677355 [Report] >>105677363 >>105677453
>>105667837
>wants the extra bells and whistles of a proper programming language in a stripped down easy to deploy hosted environment
>complains about having to pull dependencies the stripped down hosted environment obviously doesn't bother to bundle
You're asking too much to a fancier bash with better defaults, i don't even like Clojure but dunno what did you expect. It's exactly the same shit with every other programming language. Even Python, the poster child only supports SQlite in any useful fashion by default, the rest needs more robust modules. Do you think AWK is shit because it doesn't come with taylib bindings or something retarded like that? Do you think nu-shell or fish come with the ability to query databases OOB as language features? Go bitch to GraalVM's issue tracker for spitting crap binaries if you care this much about muh bloated size.
>>105671417
You don't even need the JVM to run (most) libraries with Babashka, Maven is just a piece of shit that can't be self-hosted and also the only option you have to download Clojure dependencies in general. Everything uses it under the hood.
Anonymous No.105677363 [Report] >>105677453
>>105677355
>Do you think AWK is shit because it doesn't come with taylib bindings or something retarded like that?
AWK is shit no matter what it comes with or doesn't come with.
Anonymous No.105677453 [Report]
>>105671394
Meant this >>105677355
>>105677363
It's nice to script some tasks inside an Alpine container
Anonymous No.105677677 [Report] >>105685217
I got the tiling version of the window thing working but good fucking god it took too long.
I had to prototype this in python to even articulate what needed to happen and that took longer than I'd have liked. You can see my sanity slowly erode as well as me try the cl- stuff through this.
>inb4 docs
tomorrow, plz, otherwise by all means let me know where I fucked up

https://pastebin.com/rgMtnRhd
Anonymous No.105679195 [Report]
>>105659367
>SBPL (Sandbox Profile Language)
Interesting ( ˙꒳˙ )
https://8ksec.io/reading-ios-sandbox-profiles/
Anonymous No.105679393 [Report] >>105682010
Lisp DSLs for HTML are the best, because they can use kebab-case which maps directly to HTML attributes that are also in kebab-case. In languages that don't use kebab-case, their DSLs are in a tough spot and end up looking ugly or weird.

I wish mixing languages were easier.
Anonymous No.105680700 [Report] >>105680822 >>105680846 >>105685142
I'm struggling on picrel. What I have is as such:
(define (cont-frac n d k)
(define (inv x) (/ 1 x))
(if (= k 1)
(n k)
(* (n (- k 1))
(inv (+ (d (- k 1))
(cont-frac n d (- k 1)))))))

Which... works. But it's omitting the final, terminating d.k at the end. I'm trying to implement this procedure precisely as directed, with no inner helper functions or inherited state. I'm trying to direct it entirely with control flow alone, in other words -- just raw computational, structural direction where control flow is a function of the shape of the problem rather than anything explicit (other than the unavoidable base case).

The problem here is that the final term, n.k / d.k, is the final term in the mathematical sequence but by necessity the not the base case because under these constraints I can't create an iterator variable or otherwise alter the function signature. Is it possible to insert this final term in front while maintaining my current constraints?

The iterative implementation is trivial, I know, but I'm trying to do it all by the book. Not looking for an answer or solution, just some food for thought.
Anonymous No.105680822 [Report] >>105680839
>>105680700
Wait... is it really as simple as
(if (= k 1)
(/ (n k) (d k)???

That really doesn't match my mental model of where the program is going
Anonymous No.105680839 [Report]
>>105680822
No, it isn't. Sorry, not gonna clog up the thread with more self-responses. Just needed to self-correct.
Anonymous No.105680846 [Report] >>105681026
>>105680700
Isn't your index kind of going backwards? Meaning that your most deeply nested fraction is k=1 instead of the max value.
Anonymous No.105681026 [Report] >>105683295
>>105680846
Yeah, that's a constraint of sticking with the given signature. It's the crux of the difficulty (maybe impossibility) of solving the problem the way I'm trying to. If I could follow the shape of the sequence itself, it would probably be trivial. But given a literal interpretation of the problem as formulated, the shape of the computation has to be the inverse of the shape of the problem.
Anonymous No.105681958 [Report]
>>105652734
I'd love to use it if I could actually do anything with it lol. No quicklisp last time I checked and I couldn't figure out how to interact with the host os filesystem.
Anonymous No.105682010 [Report] >>105684915
>>105679393
examples?
Anonymous No.105682027 [Report]
>>105662046
Why do you care about there being a standard? Just use cl anon
Anonymous No.105683270 [Report] >>105683507
>>105675335
>https://github.com/opencog
AGI written in Scheme? Beautiful.
Anonymous No.105683295 [Report] >>105688742
>>105681026
Well sure, but I'm not talking about the implementation, I'm talking about the result.
For example, if you write out the equation your function is producing, say for k=4, it would look like this: N3/(D3+N2/(D2+N1/(D1+N1))), which is totally backwards.
Not sure how to fix it using your constraints though. But I'm just pointing out that your problem is more than just the last term.
Anonymous No.105683507 [Report] >>105683684
>>105683270
Played a bit with atomspace in 2021. Nowdays I think that this is mostly just schizo crap.
Anonymous No.105683684 [Report]
>>105683507
reading the atomspace readme makes me want to ask the dev irl what i would actually use it for. either i would learn something new or laugh my ass off
Anonymous No.105683999 [Report] >>105684072 >>105684409 >>105690612
Adds typechecking in your path
(use-modules (ice-9 match))

(define (lookup symbol table)
(cdr (assoc symbol table)))

(define-syntax check
(syntax-rules ()
[(_ program)
(test 'program '())]))

(define (test term table)
(match term
[('let (bind value) body)
(test body (cons (cons bind (test value table)) table))]
[('lambda (bind ': type) body)
(list type '-> (test body (cons (cons bind type) table)))]
[(f x)
(match (list (lookup f table) (test x table))
[((a '-> b) c)
(if (eq? a c)
b
(begin (format #t "type mismatch: ((~a -> ~a) ~a)~%" a b c) #f))])]
[('+ x y)
(match (list (test x table) (test y table))
[('Int 'Int) 'Int]
[('Real 'Real) 'Real]
[(a b) (format #t "type error: (+ ~a ~a)~%" a b) #f])]
[(? boolean?) 'Bool]
[(and (? number?) (? exact?)) 'Int]
[(and (? number?) (? inexact?)) 'Real]
[symbol (lookup symbol table)]))
(check 1) ;=> Int

(check (+ 1 #t)) ;=> type error: (+ Int Bool)

(check (+ 1.0 2.0)) ;=> Real

(check (lambda (x : Int) x)) ;=> (Int -> Int)
(check
(let (id (lambda (x : Int) x))
(id 2.0)))
;=> type mismatch: ((Int -> Int) Real)

(check
(let (x 1)
(let (y 2)
(let (double (lambda (x : Int) (+ x x)))
(+ x (double y))))))
;=> Int
Anonymous No.105684072 [Report]
>>105683999
now make @ a reader macro and add that as a decorator.
Anonymous No.105684409 [Report] >>105690612
>>105683999
You may enjoy this paper:
http://www.ccs.neu.edu/home/stchang/pubs/ckg-popl2017.pdf
Their typechecker is implemented via racket macros (macroexpanding into code without type annotations and producing an error if ill-typed) and they implement different typesystem features up to System Fω.
Anonymous No.105684915 [Report] >>105684942 >>105685170
>>105682010
>Good:
https://github.com/ruricolist/spinneret
https://github.com/skyizwhite/hsx
For CL, I think these two are the best HTML DSLs. If I were doing more webdev in CL, I'd use one of these, because the code you write with them looks so nice.

>Bad:
https://github.com/JuliaWeb/Hyperscript.jl
I was a little bummed last night thinking there might not be anything better in Julia for HTML DSLs. The really unfortunate thing about Hyperscript.jl is that any attributes have to be passed in at the end following Julia's keyword passing conventions. That's normally not a problem, but for HTML, it looks weird and backwards. For example, Look at where the id="a" is in the code versus where it's rendered.
julia> div(div("bar"; id="b", hxMethod="PUT"); id="a")
<div id="a"><div hx-method="PUT" id="b">bar</div></div>

To me, this is intolerable. I looked for others, but I just kept finding libraries that forced me to write ugly things.

>More Bad:
https://github.com/JunoLab/Hiccup.jl
Hiccup in Clojure is alright, but in Julia, the code you have to write is not pretty.

>Maybe Good:
https://michaelhatherly.github.io/HypertextTemplates.jl/stable/
Fortunately, I just found something that I might find tolerable, but it's very obscure. On the bright side, it has seen some development in 2025 and looks maintained which is good. This is the first DSL for HTML in Julia that I've found that I don't think is ugly.
Anonymous No.105684942 [Report] >>105685011 >>105688619
>>105684915
so many html generators but CL has little HTML parsers and other web dev tools.
Anonymous No.105685011 [Report] >>105698887
>>105684942
On the topic of parsers, the org-mode parser situation in CL is not good.
- There are two libraries with the exact same name written by two different people.
- https://github.com/deepfire/cl-org-mode (relatively newer)
- https://cl-org-mode.common-lisp.dev/ (oldest)
- They're both old and unmaintained.
- The one in quicklisp is the oldest one.
Anonymous No.105685142 [Report] >>105685159
>>105680700
I've got a solution, but it's kinda retarded
(define (cont-frac n d k)
(if (= k 0) 0
(/ (n k)
(+ (d k)
(cont-frac
(lambda (x) (n (+ 1 x)))
(lambda (y) (d (+ 1 y)))
(- k 1))))))
Anonymous No.105685159 [Report] >>105688829
>>105685142
Sorry, it should be
(define (cont-frac n d k)
(if (= k 0) 0
(/ (n 1.0)
(+ (d 1.0)
(cont-frac
(lambda (x) (n (+ 1.0 x)))
(lambda (y) (d (+ 1.0 y)))
(- k 1))))))
Anonymous No.105685170 [Report] >>105685392
>>105684915
everyone I have ever met who uses julia says it has one of the worst ecosystems ever
Anonymous No.105685217 [Report] >>105685490
>>105677677
It worked. What I realized after running it is that this will let me manage a lot more windows than I previously could. I would have never tried to open this many windows (or more) in the past, but I can now.
Anonymous No.105685392 [Report] >>105685406
>>105685170
I don't think that's fair. Julia's ecosystem is very different from any other ecosystem I've previously encountered, because it's dominated by scientific computing. You're going to find things in the Julia ecosystem that you might not find anywhere else. Browse through this to see the kinds of libraries people are writing with Julia.
https://github.com/JuliaRegistries/General/pulls

^-- This also gives you a glimpse into how packages are published in the Julia ecosystem. It's very streamlined and easy for developers. Whenever you want to make a release, pick a commit and attach a comment to it like:
@JuliaRegistrator register()

...and the JuliaRegistrator bot will get the process started. Your new release will be tagged and available to the general public in a few minutes. I think they did this part very well.

The downside that I feel the most in Julia is that the community isn't the biggest. That can be good too, but the bad side is that you won't always be able to find what you're looking for or if you do, sometimes it's unmaintained for a few years. This isn't a problem that's unique to Julia, but I will admit that you feel that more when you're in a smaller community. If anything, the various Lisp communities might feel this pain worse.
Anonymous No.105685406 [Report]
>>105685392
>https://github.com/JuliaRegistries/General/pulls
It might be better to looked at the closed pull requests, because the open ones are either very new or have issues that prevent merging and releasing.
https://github.com/JuliaRegistries/General/pulls?q=is%3Apr+is%3Aclosed
Anonymous No.105685490 [Report] >>105685766
>>105685217
Glad to hear it, I got tired of hitting C-x 1 and reorganizing things manually.
Just a note, after using this more, minibuffers get really weird sometimes
Anonymous No.105685766 [Report] >>105686034
>>105685490
>Just a note, after using this more, minibuffers get really weird sometimes
I haven't encountered that yet, but I'll say something if it becomes a major problem.
Anonymous No.105686034 [Report] >>105688341
>>105685766
I was testing out treemacs and it had an aneurysm
Anonymous No.105687547 [Report]
>>105665341
>Lokke intends to provide a full dialect of Clojure for Guile. It also consists of a set of Guile modules providing some of Clojure's functionality in two different guises.
https://github.com/lokke-org/lokke
Anonymous No.105688341 [Report] >>105688456 >>105689404 >>105698152
>>105686034
>treemacs
These days, I just use dired + dired-subtree.
(use-package nerd-icons-dired
:ensure t
:hook
(dired-mode . nerd-icons-dired-mode))

(use-package dired
:ensure nil
:commands (dired)
:hook
((dired-mode . dired-hide-details-mode)
(dired-mode . hl-line-mode))
:config
(setq dired-recursive-copies 'always)
(setq dired-recursive-deletes 'always)
(setq delete-by-moving-to-trash t)
(setq dired-dwim-target t)
(setq dired-mouse-drag-files t))

(use-package dired-subtree
:ensure t
:after dired
:bind
( :map dired-mode-map
("<tab>" . dired-subtree-toggle)
("TAB" . dired-subtree-toggle)
("<backtab>" . dired-subtree-remove)
("S-TAB" . dired-subtree-remove))
:config
(setq dired-subtree-use-backgrounds nil))

(use-package trashed
:ensure t
:commands (trashed)
:config
(setq trashed-action-confirmer 'y-or-n-p)
(setq trashed-use-header-line t)
(setq trashed-sort-key '("Date deleted" . t))
(setq trashed-date-format "%Y-%m-%d %H:%M:%S"))
Anonymous No.105688456 [Report] >>105698152
>>105688341
Credit to prot for this dired config. All the dired parts are from here:
https://protesilaos.com/codelog/2024-11-28-basic-emacs-configuration/
Anonymous No.105688619 [Report] >>105698887
>>105684942
There is plump, it works well.
Anonymous No.105688742 [Report] >>105688829 >>105689065
>>105683295
You're totally right. Not sure what I was thinking yesterday -- I think I just needed to know that the (putatively) most elegant solution was either impossible or required holding in my head a structure too big to fit in said head. I gave up and wrote the next-most elegant solution, which starts at the innermost n.k/d.k term and recursively "encloses" itself until it hits k=1:

(define (cont-frac2 n d k)
(define (enclose term k)
(let ((this (/ (n k) (+ (d k) term))))
(if (= k 1)
(/ (n k) term)
(enclose this (- k 1)))))
(enclose (/ (n k) (d k)) (- k 1)))

This is much more elegant than what would have resulted from the other approach and I think I'm satisfied with it. I'm a little proud of it, even.
Anonymous No.105688829 [Report] >>105688877
>>105688742
I actually initially tried to do it the way you did but couldn't wrap my head around getting the terms in the right order, so I did >>105685159 instead.

I'm not really sure what the point of either of these methods would be, using a normal reduction would be massively simpler, more intuitive, AND would avoid the pileup of stack space holding the extra state. I can't really think of any situation where you'd specifically want to do it like this aside from as a puzzle/exercise.
Anonymous No.105688877 [Report] >>105689065
>>105688829
Yeah the space complexity is definitely much worse with my algorithm, and as far as I can tell the time complexity is similar or functionally the same (but I'm still fairly fuzzy on complexity analysis... I first gave it a real shot, well, a chapter of SICP ago). I think there's a semantic elegance to it and it tweaks my autism for sure, but beyond that... you're probably right. At the same time, it was a pretty novel shape to me and I feel like I've intuitively learned something about computation in the process of struggling through this. Since SICP seems so far to be as much a kind of "philosophy of computation" as much as it's anything else... maybe there was value to the process?

Or maybe I wasted three or four hours on a pointless puzzle. I dunno.
Anonymous No.105688996 [Report]
(unbind-key "C-x C-c")
Anonymous No.105689065 [Report] >>105689139
>>105688742
>>105688877
Good morning sars, read on named let sir
Anonymous No.105689139 [Report] >>105689392
>>105689065
We find have named let yet at that point in the book. There are many ways to trivialize the problem (eval comes to mind). The point is to work within the constraints.
Anonymous No.105689166 [Report]
>>105662875
Smalltalk gets a lot of praise but does it do anything better than lisp? I heard the IDE is "more interactive" whatever that means.
Anonymous No.105689221 [Report]
how to compile s7 in windows
Anonymous No.105689392 [Report] >>105689412 >>105689626
>>105689139
You can be your own named-let:
;; cont-frac = n1/(d1+(n2/(d2+n3/d3 + ... (dk-1 + nk/dk)))
(define (cont-frac d n k)
(define (aux k acc)
(if (= k 1)
acc
(aux (- k 1) (+ (d (- k 1)) (/ (n (- k 1)) acc)))))
(aux k (/ (n k) (d k))))

In this case I start from the last value then build it by accumulating the denominator sums. GOod morning sar.
Anonymous No.105689404 [Report] >>105689438
>>105688341
Having comments in a "handwriting" font is a nice touch.
Anonymous No.105689412 [Report] >>105689516
>>105689392
Forgot the resullt:
scheme@(guile-user)> (cont-frac (lambda (i) 1.0) (lambda (i) 1.0) 50)
$9 = 1.618033988749895
Anonymous No.105689438 [Report] >>105696332
>>105689404
>Having comments in a "handwriting" font is a nice touch.
Using VictorMono Nerd Font is like using two fonts in one. There were a handful of paid fonts that do this too, but I forgot what they were called. There's a guy in #emacs who goes by SummerEmacs who is quite a font aficionado. He showed me the paid ones.
Anonymous No.105689516 [Report]
>>105689412
Oops, my code gets stuck if k = 0... This fixes it.
(define (cont-frac d n k)
(define (aux k acc)
(if (<= k 1)
acc
(aux (- k 1) (+ (d (- k 1)) (/ (n (- k 1)) acc)))))
(aux k (/ (n k) (d k))))



(do ((i 1 (+ 1 i)))
((>= i 30) i)
(display (cont-frac (lambda (i) 1.0) (lambda (i) 1.0) i))
(display "\n"))

=> 30

1.0
2.0
1.5
1.6666666666666665
1.6
1.625
1.6153846153846154
1.619047619047619
1.6176470588235294
1.6181818181818182
1.6179775280898876
1.6180555555555556
1.6180257510729614
1.6180371352785146
1.6180327868852458
1.618034447821682
1.618033813400125
1.6180340557275543
1.6180339631667064
1.6180339985218035
1.618033985017358
1.6180339901755971
1.6180339882053252
1.6180339889579018
1.6180339886704433
1.6180339887802426
1.618033988738303
1.6180339887543225
1.6180339887482038
Anonymous No.105689626 [Report] >>105690139 >>105690162
>>105689392
>GOod morning sar.
I'm not Indian. I'm just trying to work hard from first principles.
Anonymous No.105690139 [Report] >>105690162 >>105690218
>>105689626
sar, please respect me I am trying to do the needful and help
Anonymous No.105690162 [Report] >>105690218
>>105689626
>>105690139
jokes aside, using a auxiliary function(s) that are called recursively is such a common idiom in scheme that the named let was created. Similar things happen in other functional langs like haskell, but in haskell you can use where in the end instead of a let or define at the beginning.
Anonymous No.105690218 [Report] >>105694954
>>105690139
>>105690162
Sorry. I'm autistic and very prickly sometimes. So if I understand what you're saying, the pattern I derived naively from the problem is one that's common enough that named let was developed as a formal idiom. I'll keep that in mind... it'll make it easier to make that connection when I'm assuming it comes up later in the book.

Ty saar and gm
Anonymous No.105690309 [Report]
>>105652832
Why are not only the title bars differing in height, but also the close, minimize and maximize buttons of different sizes across the two windows on the sides?
Anonymous No.105690343 [Report]
>>105668880
>>105673110
Accessing files from WSL that are outside WSL and vice versa adds a noticeable delay to every read and write. It's a pain.
Anonymous No.105690390 [Report]
>>105652614 (OP)
Anybody here ever use IPL? Proto-Lisp sounds cool
Anonymous No.105690612 [Report]
>>105684409
Thanks anon that was fun to read (the latter half was kinda complicated), I was wondering about lambda without type annotations (like s3.3 in the pdf) and it looks like that's addressed in s5 (with subst)

With these changes to >>105683999 lambda can be written without type annotations
(define (update bind type table)
(set-cdr! (assoc bind table) type)
type)

[('lambda bind body)
(set! table (cons (cons bind 'a) table))
(let ([type (test body table)])
(list (lookup bind table) '-> type))]
[(f x)
(match (list (test f table) (test x table))
...]
[('+ x y)
(match (list (test x table) (test y table))
[('Int 'Int) 'Int]
[('Real 'Real) 'Real]
[('a 'Int) (update x 'Int table)]
[('a 'Real) (update x 'Real table)]
[('Int 'a) (update y 'Int table)]
[('Real 'a) (update y 'Real table)]
[(a b) (format #t "type error: (+ ~a ~a)~%" a b) #f])]
with the limitation that most polymorphic terms don't check
(check (lambda x (+ x 1))) ;=> (Int -> Int)
(check ((lambda x (+ x 1)) 1)) ;=> Int

(check (lambda x x)) ;=> (a -> a)
(check ((lambda x x) 1)) ;=> type mismatch: ((a -> a) Int)
(check (lambda x (+ x x))) ;=> type error: (+ a a)
Anonymous No.105691512 [Report] >>105691871
'Luv me Lisp.
'Ate imperatives.
Simple as.
Anonymous No.105691871 [Report]
>>105691512
why did you eat the imperatives
Anonymous No.105692024 [Report] >>105692184 >>105692837 >>105697968
>literally just realised setq and setf are not the same
this is the last time i listen to people on the internet, i'm going back to reading actual books to learn
Anonymous No.105692184 [Report] >>105692837
>>105692024
setf is wild.
Anonymous No.105692766 [Report]
ngl, you guys giving me some good feedback on my window script is a really nice feeling, I appreciate it
Anonymous No.105692837 [Report]
>>105692024
>>105692184
yeah there is the whole "Place" idea. Big brain stuff.
Anonymous No.105694085 [Report] >>105694385
gnus makes me feel stupid
Anonymous No.105694385 [Report]
>>105694085
Agreed, I tried it yesterday and I've been completely and totally filtered
Anonymous No.105694954 [Report]
>>105690218
(define (my-func)
(let name ((var init))
... do stuff))

====> is almost like this

(define (my-func)
(let ((name (lambda (var) (... do stuff))))
(name init)
Anonymous No.105696212 [Report]
I took a nap and slept right through the lispy gopher show. feels bad, man.
https://gamerplus.org/@screwlisp
https://archives.anonradio.net/202506250000_screwtape.mp3
telnet lambda.moo.mud.org 8888
Anonymous No.105696332 [Report]
>>105689438
Interesting, I'll have to look into that. Never really had occurred to me that such existed.
Anonymous No.105696372 [Report] >>105696437 >>105699672 >>105706173
is there a way to see what percentage of the way you're into an entire info mode manual? Not just the current section
Anonymous No.105696437 [Report]
>>105696372
Conceptually,
- you'd have to flatten the info node tree into a flat linear sequence;
- you'd have to find where in that sequence the current node is;
- then you can do some simple math to derive a percentage.
Anonymous No.105696538 [Report] >>105698171 >>105702984 >>105703021 >>105707477
What is your (emacs-init-time)?

ELISP> (emacs-init-time)
"1.966295 seconds"
Anonymous No.105697968 [Report]
>>105692024
I’ve also seen a lot on people saying they’re the same
Anonymous No.105698027 [Report] >>105698034 >>105698073 >>105698160
people say that emacs isn't a text editor it is an environment for doing all sorts of things. but it seems like it was designed to be a text editor. are there any attempts to intentionally design something like emacs?
Anonymous No.105698034 [Report]
>>105698027
Emacs isn’t just a text editor it’s more like an attempt to recreate a Lisp machine inside your modern OS
Anonymous No.105698073 [Report]
>>105698027
emacs is super duper mega text editor 64
emacs takes text editing and applies it to many things beyond just changing the contents of text files
Anonymous No.105698152 [Report]
>>105688341
>>105688456

thanks!
Anonymous No.105698160 [Report]
>>105698027
GToolkit? https://github.com/leoshimo/vrs?
Anonymous No.105698171 [Report]
>>105696538
Welcome to the Emacs shell

~ $
emacs-init-time
3.257864 seconds
~ $
wc -l ~/.config/emacs/README.el
2542 /home/ANON/.config/emacs/README.el
~ $
[\code]
Anonymous No.105698621 [Report]
>>105665081
>hiding implementation details is bad
I mean yeah, lisp is about power to the programmer. You should be able to move through the different levels of abstraction in a program and dive into the implementation details when the abstraction isn't working anymore.
Anonymous No.105698887 [Report]
>>105688619
>>105685011
I think it is because writing a HTML parsers is not easy because html "in the wild" is a shitshow, since CL's ecosystem is kinda dead people don't even bother.
Anonymous No.105699142 [Report] >>105710121
Attention TRAMP users:
https://coredumped.dev/2025/06/18/making-tramp-go-brrrr./
Anonymous No.105699175 [Report] >>105699237
Rate my LISP machine
Anonymous No.105699237 [Report]
>>105699175
you have a huge foot
Anonymous No.105699247 [Report]
BORN TO RECURSE
WORLD IS A CLOSURE
鬼神 Anonymize Em All 1989
I am lambda man
410,757,864,530 GARBAGE COLLECTED VARIABLES
Anonymous No.105699305 [Report] >>105711261
Am I retard or gpt.el is actually hard to be configured? Like, why is it hard to check multiple API keys, switch it? Why am I struggle? Btw I've been using emacs for a month
Anonymous No.105699672 [Report] >>105702273 >>105705809 >>105706200
>>105696372
info_line_percentage ()
{
manual=$1
search=${*:2}

info --subnodes $manual -o /tmp/info.txt

lines=$(wc -l /tmp/info.txt | cut -d' ' -f1)
match=$(grep -nm1 "$search" /tmp/info.txt | cut -d: -f1)

percent=$(sbcl --noinform --eval "(format t \"~a~%\" (* (/ $match $lines) 100.0))" --quit)

echo $percent% in $manual
}

$ info_line_percentage libc "POSIX says that simple calendar times do not include leap seconds"
50.98632% in libc
an elispgod will rewrite this abomination
Anonymous No.105700280 [Report] >>105704531
The quarter is ending so it's time keep myself accountable. While not all of this was directly working on SICP... everything from a month and a half or so ago was. I stopped all my projects and started working exclusively on SICP. My goal was a conservative 2 hours a day for five days a week. My plan on July 1st is to kick that up to three hours a day. I've got one problem left in chapter 1, after which I'll have read every word and done every exercise in said chapter. By this time next year, I hope to be done with both the wizard book and the dragon book and to start on some similarly foundational book on data structures. After that, I have no fucking clue what I'll do. Maybe start posting in /utw/ because who the FUCK is going to hire me?
Anonymous No.105700621 [Report] >>105700708
really dumb newbie question but how do i make emacs close parenthesis automatically?
Anonymous No.105700708 [Report]
>>105700621
electric-pair-mode
Anonymous No.105701479 [Report] >>105702335
I'm having issues with elfeed, mainly with morss and... ssl handshakes. All I'm getting from the log is picrel.
The links do work properly if I open them up on my browser, and they were working until not too long ago.
Anonymous No.105702086 [Report]
Anyone read the art of the metaobject protocol? These ideas seem like actual wizard-tier programming. Unbelievable the level of difference in sophistication between C++ style OOP and Lisp's version. Feels like the future is in the past.
Anonymous No.105702273 [Report] >>105702805 >>105703030
>>105699672
Normal people:
>I'll write a program that does something
Unix trannies:
>I'll use 7 programs that don't do what I want and glue them together to get a program that does 80% of something in a fragile buggy way
Anonymous No.105702335 [Report] >>105702402
>>105701479
It somehow works on my phone but not on my PC (WIndows).
What the fuck, doesn't it just call curl??
Anonymous No.105702402 [Report]
>>105702335
Nevermind I'm severely retarded and should immediately commit suicide.
Anonymous No.105702805 [Report] >>105707215
>>105702273
>normal person: nothing after anon asked for help 14 hours ago
>unix tranny: working if brittle solution
Anonymous No.105702984 [Report]
>>105696538
λ emacs-init-time
2.706442 seconds

I'm running exwm btw
Anonymous No.105703021 [Report]
>>105696538
0.207875 seconds
Anonymous No.105703030 [Report] >>105703645
>>105702273
Unix trannies:
>I'll use 7 programs that don't do what I want and glue them together to get a program that does 80% of something in a fragile buggy way
Normal people:
>don't do anything because there's not an app for it
Anonymous No.105703645 [Report] >>105703959
>>105703030
Genera is dead, unix won
Anonymous No.105703959 [Report]
>>105703645
>unix won
GNO.
GNU (GNU's Not Unix) won.
Anonymous No.105704531 [Report] >>105705755
>>105700280
its not a bible, just do whatever man. Its an intro to CS, a good one. but just that.
Anonymous No.105705755 [Report]
>>105704531
I disagree, but I'm willing to agree to disagree.
Anonymous No.105705809 [Report]
>>105699672
just use less sir
Anonymous No.105706173 [Report]
>>105696372
>is there a way to see what percentage of the way you're into an entire info mode manual? Not just the current section

(defun Info-percent ()
"Return what percentage of the way you're into the current info manual.

Examples:

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


Examples:
ELISP> (with-current-buffer "*info*" (Info-percent))
(current-line 77 total-lines 2569 percent 2.997275204359673)

ELISP> (plist-get (with-current-buffer "*info*" (Info-percent)) 'percent)
2.997275204359673
Anonymous No.105706200 [Report]
>>105699672
This reminded me that the info viewer in Emacs just narrows the buffer when it moves between sections of an info manual. An info manual is all in one file. That's what let me write a simple interactive Elisp function.
Anonymous No.105706222 [Report]
You know what I'm a little surprised by?
Imenu doesn't work for info manuals.
I feel like it would make info manual navigation really nice in Emacs if it did work.
Anonymous No.105707215 [Report]
>>105702805
I don't use brain damage like "info" or "man" pages.
Anonymous No.105707477 [Report]
>>105696538
5.007982 seconds
Anonymous No.105707820 [Report] >>105707866
Racket has the most unique features of any Lisp
>muh educational language
absolute fucking BULLSHIT!
literally one of the most advanced languages that I've seen (ignoring experiments with type systems)
>sandboxed evaluation
>contracts
>weak maps
>insane metaprogramming capabilities
I even think "places" are separately garbage collected like in Erlang/Elixir.
Anonymous No.105707866 [Report] >>105709242
>>105707820
That's the reason I can't stand it. it makes my head hurt knowing everything I'm doing is ontop of a dozen layers of complicated shit. The more I learned the more anxious I got while using it. Probably you can just ignore/forget about that stuff but I keep thinking about it and it's distracting.
It's kinda ironic that I prefer emacs over vim since it's kinda the same "I thought this was a text editor not a bottomless pit"
Anonymous No.105709242 [Report] >>105709513
>>105707866
I find it hard to wrap my head around any recommending emacs to you and describing it unironically as just a text editor, that's basically a form of animal cruelty
Anonymous No.105709513 [Report]
>>105709242
I only warmed up to it after years of using vim. Initially, not knowing the possibilities, I couldn't stand emacs bloat. But after finally mastering vim and more and more frequently looking up "how to do X" and having the answer be "you can't" or "here's some incredibly convulted hack to do it" and then by contrast see people dumping custom elisp code to do LITERALLY FUCKING ANYTHING YOU WANT I switched.

Racket might be the same, until you reach the limits and WANT some capability you don't have the additional overhead is just a burden. I just look at all those features and think "wow that's neat but when would I ever want to use any of this shit?" and so far I can't figure out an answer, CL seems to be able to do pretty much everything I want so far, I've literally not once run into something I couldn't do.
Anonymous No.105709742 [Report]
>>105671485
Thoughts on Prolog?
Anonymous No.105710090 [Report] >>105710210
anyone knows how to disable size display in dired? i think this might slow down Tramp when is enabled (its enabled even with emacs -Q, using emacs 30.1.50)
Anonymous No.105710121 [Report]
>>105699142
thank you big sir
Anonymous No.105710210 [Report] >>105710401
>>105710090
(setq dired-free-space nil)
Anonymous No.105710401 [Report]
>>105710210
thank you, i was searching with keyword available :/
Anonymous No.105711000 [Report] >>105711534
I would like to use AI to guide me through customizing emacs just the way I want it.
Last time I tried this with ChatGPT, it was a mess of hallucinated elisp and configuration options.
What's a good model that will know how to answer my questions about emacs configuration so I can learn the ins and outs more efficiently than just stumbling through the documentation?
I don't want to have chatgpt do it for me, but to act as an emacs expert who can point me to the right settings and functions to use.
Anonymous No.105711261 [Report]
>>105699305
>Why am I struggle
Because you rely on ChatGPT too much.
Anonymous No.105711534 [Report]
>>105711000
i find deepseek is unironically better at lisp and emacs for some reason
but they're all terrible
Anonymous No.105711987 [Report]
new bread
>>105711980
>>105711980
>>105711980
>>105711980