>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 Resourceshttps://gnu.org/s/emacs
https://github.com/emacs-tw/awesome-emacs
https://github.com/systemcrafters/crafted-emacs
>Learning EmacsC-h t (Interactive Tutorial)
https://emacs.amodernist.com
https://systemcrafters.net/emacs-from-scratch
http://xahlee.info/emacs
https://emacs.tv
>Emacs Distroshttps://spacemacs.org
https://doomemacs.org
>ElispDocs: 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 Lisphttps://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
>Schemehttps://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
>Clojurehttps://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
>Otherhttps://github.com/dundalek/awesome-lisp-languages
>Guixhttps://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/HtDPhttps://web.mit.edu/6.001/6.037/sicp.pdf
https://htdp.org
>More Lisp Resourceshttps://rentry.org/lispresources
(set! prev-bread (quote
>>105819961))
Been looking at Christian Schafmeister's talks recently. He's using Lisp to program the construction of molecules.
https://www.youtube.com/watch?v=mbdXeRBbgDM
https://www.youtube.com/watch?v=fytGL8vzGeQ
Hope you find it interesting too.
Interesting
>The Dam: a Guix public access server
https://the-dam.org
>Guix hosting
https://guix-hosting.com
Why does it use the HalfLife logo?
>>105917608Read SICP, Dr. Freeman.
https://docs.scheme.org/sicp/
https://youtu.be/RhSwBgF-g4I
>>105917608halflife was made in lisp bungie sayd so
https://blog.cloudflare.com/topaz-policy-engine-design/
>Whenever an engineer changes one of these programs, we run all the programs through our custom model checker (written in Racket + Rosette) to check for certain bugs (e.g., one program overshadowing another) before the programs are deployed.
Rosette? Beautiful.
https://emina.github.io/rosette/
https://github.com/emina/rosette
Is javascript a good lisp to learn?
>>105918273Via ClojureScript? Yes.
See:
https://github.com/squint-cljs/squint
>>105918273JavaScript is not a lisp, but there's value in learning it due to how much reach it can give you. However, there are many lisps that can compile to JavaScript.
https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile-to-JS#lisp-scheme
>>105918415It was going to be a lisp until some corporate middle management nigger stuck their nose in and ruined it.
nose
md5: d69c1bd984394ad93fe3378b322bb2de
๐
>>105918472True.
From Brendan Eich:
>I met John McCarthy in 1977. In college, a professor (Ruth Davis, I think; SCU EECS department) brought in someone who taught Friedman's "The Little LISPer". By the time I got to Netscape, I had read SICP. I knew enough about LISP to be dangerous.>But as I've said many times, and Netscape principals have confirmed, the reason JS isn't Scheme is because Netscape did the Java deal with Sun by the time I hired on (after I was recruited with "come and do Scheme in the browser"), and that meant the "sidekick language" had to "look like Java".https://news.ycombinator.com/item?id=13149123
>>105917285 (OP)I have given up on Lisp. I mean, I know Lisp well enough and I think it still has a place as an extension language or similar, but as far as Common Lisp, and doing "real" things, it's just all so tiresome. Never ever works right and for all the talk of being a "finished" language the odds of any random CL program actually working right are like 1/10 at best. Any large program just feels like such a brittle, janky pile of shit heaped upon other shit. Even using quicklisp it feels like there's a 90% chance of failure to even install anything, much less have it be functional after installing.
Thank you for your attention to this matter.
>>105894319Could some kind of automated security audit be performed?
>>105918412What's wrong with original ClojureSript?
>>105918775The README says:
>## Why Squint>Squint lets you write CLJS syntax but emits small JS output, while still having parts of the CLJS standard library available (ported to mutable data structures, so with caveats). This may work especially well for projects e.g. that you'd like to deploy on CloudFlare workers, node scripts, Github actions, etc. that need the extra performance, startup time and/or small bundle size.
>>105918560>we were robbed of a universe where webdevs instead learned a lispBrb getting a stiff drink
>>105918472Imagine if modern web used Scheme or CL. Rants about sites with 20mb of scheme frameworks. Lisps being considered badly-designed (rightfully, IMO). All the elitist contrarians avoiding S-expressions like plague.
>>105918415> compile to javascriptThat is a worthless and inefficient exercise.
Instead, it should use or output to the V9 โjitโ using the tokens of the intermediate (and probably webasm-like) primitives directly.
Another, superior, option would be the luajit back-end. Iโve heard that is extremely good.
Processors should have (or maybe we can find) best-case just in time x86 and arm snippets for doing car and cdr etc.
>>105918560Sure, I was there, and I believe that. But from the beginning, it was designed to be extensible vis
<script type="text/javascript"> and guile or whatever never took off.
I had perl registered there for a while and played around with it. The basic bindings werenโt that sophisticated. visual basic was popular.
Obviously, youโd have to install perl or guile (like flash players to make it work).
Obviously Windows/Active X objects made the most implementation sense, the unixes had nothing there though.
Nowadays everything is built in, with no modularity whatsoever.
https://github.com/mbrock/wisp
>>105919219> 20mb of scheme frameworksYes, that can give languages a bad rep.
Needing to download npm-like packages every day for left trim functions that should have been built in.
Iโve studied the frameworks quite a bit. I believe the complexity is intentional to hide (in plain sight) what theyโre doing there as it pertains to advertising, drm, exfiltration, tracking, etc.
One I broke into the javascript debugger inside about 200 levels of nested function calls, and half of these calls were dynamically generated on-the-fly so thereโs โsource codeโ you can even inspect on the static minified javascript blob.
>>105919394>That is a worthless and inefficient exercise.How else were languages going to get inside the browser in the pre-WASM days?
>>105918415I'm glad normies couldn't shit up Lisp.
Have any of you guys written a lisp interpreter before?
>>105919723very simple ones yes.
>>105919644> how get inside browserFair point.
I thought wasm was basically flash (and it is) and the point was to stop delivering inspectable source code onto browsers. And it probably is.
Then I realized itโs not much different from the way commodore basic worked back in the day.
Assuming itโs decompileable.
I doubt that web assembly has primitives befitting lisp though.
Like the fundamental premise of the jvm was always a non-starterโฆ running a stack-based โmachineโ on register-based hardware.
They did throw enough monkeys at the probem to make it superficially workable though.
https://gamerplus.org/@screwlisp/114854530571949655
https://anonradio.net/
starting in about 20 minutes
telnet lambda.moo.mud.org 8888
connect Guest
YES
@join screwtape
>>105918472sad truth is that the middle manager corpo cunt was right. even back then people were extremely accustomed to C-like syntax and went "ew parens icky" when they saw lisp code. they needed the language to be palatable to midwit devs and other corpo cunts which is why they named it javascript to begin with.
https://www.jwz.org/blog/2022/08/lucid-emacs-was-released-30-years-ago/
https://www.youtube.com/watch?v=yLZwLSzkH3E
>>105917458>sucAwesome. I had an idea like this a while back. Using multi-user features of Linux itself to act as a bulletin board system.
But I couldn't figure out how to ensure that each line appended to the file was actually from the user it says. I guess they solved it with suid.
Is it really ok to have a bunch of people just sitting in ssh all day though? I wonder how well that scales up, like if you could have 10,000 people just idling on ssh tailing various files
>>105921233A new release of XEmacs came out last month.
https://www.xemacs.org/
https://www.xemacs.org/Releases/21.5.36.html
mercurial repo
https://foss.heptapod.net/xemacs/xemacs
I compiled it out of curiosity, and I was surprised by the absence of:
- ielm
- calc
- dired
- org-mode
It seems like there's a way to get calc and dired installed via `M-x package-get` (not package-install) but I haven't been successful with that yet.
ielm
md5: 18d0b6b681e0f25d6a343f15af74de87
๐
I found the author of ielm.
https://news.ycombinator.com/item?id=35498514
Thoughts on CLOG? It's made by a rabbi.
https://github.com/rabbibotton/clog
>>105917285 (OP)Do Aider, Gptel, and other AI assistants offer comprehensive features comparable to those of Cursor?
>>105922583(((Kosherware)))
>>105922681https://github.com/MatthewZMD/aidermacs
>>105922133In the early 90s we had (like three) hundreds of users logged in doing shit (I was running framemaker over X to an X terminal) on a single AIX machine (single core) running at 50 MHz or thereabouts.
Computers today are about 10,000 times more capable, so yes, it seems reasonable.
>>105922148I thought Xemacs was rolled into Emacs already?
>>105922148what's the font? it's pretty
>>105920281> doubt that web assembly has primitives befitting lisp thoughIt has shit from lua, like tables. Probably stolen from luajit and laundered.
It it has list processing primitives, Iโd be excited.
>>105917346>scifagFuck off nobody cares
>>105917346Actually very interesting.
>>105922148I had no idea this existed. Why this exists?
>>105922148Holy shit, it doesn't even have a *Messages* buffer.
>>105922835(setq *f* (face-font 'default))
(insert (concat "\n" (prin1-to-string *f*)))
#<font-specifier global=((custom) . "-*-Clean-medium-r-*-*-*-120-*-*-*-*-*-*") fallback=(((tty) . "normal") ((x) . "-*-lucidatypewriter-medium-r-*-*-*-120-*-*-m-*-*-*") ((x) . "-*-*-medium-r-*-*-*-120-*-*-c-*-*-*") ((x jit-charset initial x-coverage-instantiator) . "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1") ((x two-dimensional initial) . "-*-*-medium-r-*-*-*-150-*-*-c-*-*-*") ((x two-dimensional initial) . "-*-*-medium-r-*-*-*-160-*-*-c-*-*-*") ((x two-dimensional initial) . "-*-*-medium-r-*-*-*-170-*-*-c-*-*-*") ((x one-dimensional final x-coverage-instantiator) . "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1") ((x two-dimensional final x-coverage-instantiator) . "-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1") ((x) . "*")) 0x47>
>>105924231It's a long story.
https://www.jwz.org/doc/lemacs.html
tl;dr - Back in the early 1990s, GNU was really slow at releasing Emacs 19, and Lucid had a commercial interest in getting the promised features sooner, so they decided to fork Emacs to get those features sooner.
>>105922148Holy shit, it doesn't even have a *Messages* buffer.
>>105922835(setq *f* (face-font 'default))
(insert (concat "\n" (prin1-to-string *f*)))
;; I had to reformat this, because it was one long line
((custom) . "-*-Clean-medium-r-*-*-*-120-*-*-*-*-*-*")
(((tty) . "normal")
((x) . "-*-lucidatypewriter-medium-r-*-*-*-120-*-*-m-*-*-*")
((x) . "-*-*-medium-r-*-*-*-120-*-*-c-*-*-*")
((x jit-charset initial x-coverage-instantiator)
. "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")
((x two-dimensional initial) . "-*-*-medium-r-*-*-*-150-*-*-c-*-*-*")
((x two-dimensional initial) . "-*-*-medium-r-*-*-*-160-*-*-c-*-*-*")
((x two-dimensional initial) . "-*-*-medium-r-*-*-*-170-*-*-c-*-*-*")
((x one-dimensional final x-coverage-instantiator)
. "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")
((x two-dimensional final x-coverage-instantiator)
. "-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1")
((x) . "*"))
>>105924231It's a long story.
https://www.jwz.org/doc/lemacs.html
tl;dr - Back in the early 1990s, GNU was really slow at releasing Emacs 19, and Lucid had a commercial interest in getting the promised features sooner, so they decided to fork Emacs to get those features sooner.
>>105924383Xemacs seems a waste of time? WHy not just focus the effort on emacs, considering we are in 1990.
>>105924418Did you at least skim the beginning of the long story? They tried that. Lucid gave a lot of money to the FSF to get Emacs 19 released sooner, but it didn't work.
>>105924430Considering we are not in 1990*.
I'm talking about now, why keep making an emacs fork that works just about the same but with less people.
>>105924480Somebody probably got nostalgic.
>>105924383Fonts were so hard to work with in this era.
https://wiki.archlinux.org/title/X_Logical_Font_Description
>>105924383I recompiled it --with-xft to get TrueType font support. That let me read the message in the scratch buffer, and I learned a new keybinding.
- C-j is bound to eval-print-last-sexp.
- That's way more useful than C-x C-e .
- In an era before ielm, eval-print-last-sexp makes the scratch buffer a lot more useful for Elisp development.
> inserts mainline IV into neck
> begins injecting melpa packages into brain blood flow
> becomes emacs-human cyborg lisp machine
Sorry kid..
is there any gacha emacs games? I need some me time at work, but I want to go in stealth mode style...
>>105922148Back then, they made you get the sumo tarball that was filled with elisp packages.
https://www.xemacs.org/Documentation/packageGuide.html#The_Sumo_Tarball
>>105922148you are living in the past, dude.
>>105925481I'm just looking out of curiosity. After I installed the sumo tarball, I got calc and dired, but still no org-mode. Considering how popular org-mode has become in the Emacs community, it's weird to imagine a time before Emacs had org-mode. It's like Italy before tomatoes.
>>105925557It is almost like there is a version number, and a version history with features and when they were added to the program...
>>105920281>>105922838>The textual format for WebAssembly modules is a rendering of their abstract syntax into S-expressions.https://webassembly.github.io/spec/core/text/conventions.html
https://developer.mozilla.org/en-US/docs/WebAssembly/Guides/Understanding_the_text_format
>>105922838>>105926412Coincidentally this came up in my recs yesterday https://www.youtube.com/watch?v=d2t4ohikLa4
He covers mapping lisp to wasm primitives
what does M-x spook mean?
> Hezbollah DRM Blackout LRTS Power outage Biological FBIS Peering Echelon 64
> Vauxhall Cross GEO stakeout Chelsea black-bag IACIS
>>105927324it means "random" tsa anal probes for you for the rest of your life.
>>105927344I interviewed for a security clearance and no one asked me about /pol/ or 4chan at all. It was very suspicious.
>>105927324It's not spicy enough.
>>105927324anti-glownigger feature
>The idea behind this feature is the suspicion that the NSA and other intelligence agencies snoop on all electronic mail messages that contain keywords suggesting they might find them interesting. (The agencies say that they donโt, but thatโs what they would say.) The idea is that if lots of people add suspicious words to their messages, the agencies will get so busy with spurious input that they will have to give up reading it all. Whether or not this is true, it at least amuses some people.https://www.gnu.org/software/emacs/manual/html_node/emacs/Mail-Amusements.html
>>105927512isn't the government already going to label GNU developers as communists and watch list them for copy-left law litigation, let alone shilling radical right bad words?
>>105927558https://www.gnu.org/philosophy/bill-gates-and-other-communists.html
What is the recommended lisp to pick up for someone who is competent in C/Go/<Insert C styled lang here>?
>>105927635too bad RMS talk all about software freedoms, but not the affect of shilling freedom in the american corporate life. It seems dank that everyone talks about FOSS but not how much capitalism hates it.
>>105927787racket, common lisp, clojure.
Dealers choice. Each one has tutorials, it just depends which eco-system you like.
we should be take care of the fact that obsidian lads are making those kinds of kino apps everyday while org chuds are getting behind
https://github.com/callumalpass/tasknotes
>>105924383>"-*-Clean-medium-r-*-*-*-120-*-*-*-*-*-*"this is the font i was looking for, thanks. turns out i already had it installed on my system, the full name is Schumacher Clean
>>105925123https://melpa.org/#/minesweeper
Alright, started reading SICP today. No Lisp experience, what am I in for? Wanted to get into functional programming and see why this book is such a meme. Not very far in, all the talk about wizards, okay... The idea of naming almost every line of code and putting functions inside functions is interesting. Which Scheme interpreter should I use, MIT/GNU Scheme or something else? I'm on Arch Linux. Also, is there any benefit to using Emacs, or can I stick with nvim?
>>105928516>The idea of naming almost every line of code and putting functions inside functions is interestinghave you actually never encountered modularity and abstraction before?
i don't mean that as a hostile question but yeah that's certainly surprising
>>105928516>Which Scheme interpreter should I use, MIT/GNU Scheme or something else?set up racket in #lang sicp mode
>>105928516whatever scheme implementation you use, you should also get the geiser package for emacs
>>105928553My experience is that functions are often not atomic and do multiple things. For example, in a Python script, you would probably not always put every trivial thing behind it's own function, like:
def read_file(filename):
with open(filename) as f:
return f.read()
def main():
content = read_file(sys.argv[1])
Also, not every language supports nested functions, and even in languages that do support them, I cannot remember any code that actually used this. Most of the time it's functions in some library, and then another module uses these functions.
>>105928669>My experience is that functions are often not atomic and do multiple things.then yes, SICP will definitely try to disabuse you of that habit, because what the book is really about has very little to do with functional programming, it's a book about languages themselves
>>105917285 (OP)city is unfunny garbage
>>105928669>even in languages that do support them, I cannot remember any code that actually used thisit is unbelievably hard to imagine you have never seen this
>>105928516At this level any scheme implementation will get the job done. I recommend racket because it comes with a lot of convenient and useful stuff on top of the base language and it has its own editor which is easier to use than emacs but has a slow startup unfortunately. The lectures are very educational. Even if you don't end up using lisp you will learn a lot about how computers work, how interpreters work, how many approaches there are to solve the same problem and how real programming is an art of expressing your intentions as clearly as possible.
>>105928669>Also, not every language supports nested functions, and even in languages that do support them, I cannot remember any code that actually used thisHow can you actually write anything serious without doing this? You just wrote an example of this. The alternative is writing a single main function which handles literally everything.
>>105917458the cat is sniffing where you rubbed your cock earlier
>>105928695>SICP will definitely try to disabuse you of that habitlooking forward to it. Hard to imagine that code doesn't look like a complete mess if I try to refactor it to make everything atomic, but maybe I'm wrong. Sometimes a function that contains a screen full of code is better readable than if I have to constantly jump in the source file.
>>105928718Of the languages that I know, only Rust and Python allow this (or I don't know that other languages allow this as well because I've never seen it). I haven't read too much Rust code, but I have seen a couple of Python scripts, both from Humans and LLMs, and I can't remember any occurrence of
def f:
def g:
...
return g() + 1
What I see often is:
from lib import g
def f:
return g() + 1
And to me, this does make sense, as it's easier to test the g function if it's in a separate module, than it is as a nested function.
>>105928773In my example there were no nested function definitions, but the book introduced them at page twenty-something, so I thought it's a common thing in Lisp.
>>105928757thanks for the suggestion.
>real programming is an art of expressing your intentions as clearly as possibleI think this is something that I often overlook, and try to make the computer do something, instead of creating a document for other humans (or myself in the future) to read.
When people joke about deleting a line in Emacs, why don't emacsers reply with C-a C-k? Is this the joke? That no single command does it like dd in vim?
>>105928953"putting functions inside functions" was very vague, if you mean "defining functions inside functions" then that makes more sense to me
as for this, this is strictly a local definition (in common lisp this would use the labels or flet keyword rather than define), so it's just a temporary assignment of some definition to a symbol in the body of that function, so there is no harm in doing this because it's legitimately a part of the definition of the outermost function, and shouldn't affect readability at all
also,
>Hard to imagine that code doesn't look like a complete mess if I try to refactor it to make everything atomic, but maybe I'm wrong. Sometimes a function that contains a screen full of code is better readable than if I have to constantly jump in the source file.SICP is entirely unconcerned with things like "best practices" - as in another post above, it's a book about languages itself, although that won't be too explicit until the later chapters.
It's doing this because it's an extremely opinionated text, which wants to emphasise to you the art of thinking about actual structure of languages. Lisp just so happens to be the best tool to show you the point. But the point is really to get you to think of these functions like actual language elements themselves and connect them together as if defining grammatical rules on these individual words, so to speak. It gets quite explicit about this once you get on to the interpreter sections. The entire point of why they stress modularity and the importance of abstraction becomes clearer later on once they actually tell you that the book is about languages (somehow, the title seems to not be taken literally by most readers until that point).
>>105929295how is dd a single command? C-a C-k is arguably faster since you have to double press a key with dd
>>105927512Everybody has to use it though.
I do.
Itโs good for poisoning AI as well.
Nowadays you can make it in white text or 1pt font too.
It still wonโt be enough, but itโs a start. Do it now.
>>105928615> SICPWhy not just built-in e-lisp or almost-built-in hpguike
>>105929836>e-lisptry it and get back to us
>>105929295You could easily make a dd command in emacs if you wanted.
Vi is a class of editors derived from โedโ
On windows there was edlin.
On as/400 weโd mark lines with commands like D and submit.
Emacs came from word processors, like Wordstar, and those were used in popular products like Turbo Pascal and Turbo C.
(Imagine if we had turbo lisp back in the day, eh? Weโd probably be living in a different world)
VI is the odd one out, unfortunately.
>>105929295>That no single command does it like dd in vim?There literally is one though, C-S-backspace.
When using tramp are there any downsides with using sshx/scpx over ssh/scp?
Tramp doesn't play well with fish shell, which I have on most of my remote machines and shit doesn't work otherwise.
Does anyone here uses emacs for calorie counting? There are some posts on the web but they are very complicated.
I'm stuck on creating a searchable database/table .
>>105930236>emacs for calorie countingsounds kinda tedious, tbqh
I use fitbook on android. It's free and on fdroid and can scan barcodes with integration to some online database thing.
>>105930153Been using emacs since 1987.
Never knew that.
Itโs going to be heavily used when working on zoomer code.
>>105917285 (OP)>xahis live now
https://www.youtube.com/watch?v=xNsmzsYBYrU
Has anyone here tried using Guix on top of Debian?
I have been fascinated by lisp for a long time but the REPL style of development does not click for me. I'm used to a C style of write-compile-run, and if you want output then print something to stdout. What am I supposed to do with the REPL? Write code into it? But then how do I save it from there? I define a few functions in there then forget their actual definitions so I can't even write them in a file later. Why not just write them in a file to begin with? What am I missing here bros?
>>105933387You write the functions in a file and evaluate them in the repl by loading it.
Basically you're just partially recompiling the program while it runs, just like normal.
The difference is all the state stays the same, think of it as programming something while in the debugger so you can interactively check things as you go without having to wait.
>>105933409Man a lot of people talk about the REPL like it's where you actually do the programming which has never made sense to me. Well I've installed sbcl and got slime up and running so I'll see if I like it better.
>>105933436It is and it isn't. The repl is great for fucking around trying things out and testing ideas, but realistically you do all the work in actual files and just use the repl to interactively compile/load/debug them. It's basically just equivalent to using a terminal to control C code, just faster and more integrated.
>>105933387>Compile code>it has an error>look through traceback >get idea>redefine part of the code>compile the snippet>ask REPL to try continue >it gives you new result
>>105930153Thanks anon, but it joins the following line to the deleted line. It's functionally different than S or D or dd in vim or C-a C-k in emacs
>>105929295Sorry, apparently the joke was "how to duplicate a line in emacs"
>>105929295>C-a C-k?lel, i always did: end, shift+home, delete
it works with every editors.
>>105929836>e-lisp or almost-built-in hpguikewhat?
GBA
md5: 479524be6d81b68405016bf14033f4fa
๐
Clojure++
https://clojure.org/news/2025/07/14/deref
>https://jank-lang.org/blog/2025-07-11-jank-is-cpp/
>>105922148is there a way to install that exact theme (colours, icons, font) on gnu emacs?
>>105938430https://emacsthemes.com/themes/xemacs-theme.html
Any of you have a dockerfile to setup a ClojureDart dev environment? Or is easier to just modifying a Flutter one?
>>105938321>Going forward, jank will add support for #cpp reader macros, as an easy way to get C++ literals, similar to #js in ClojureScript and #dart in ClojureDart.Very nice! (๏ฟฃโฝ๏ฟฃ)b
>>105938430The icons are in the /etc/toolbar directory of the source code
http://ftp.xemacs.org/pub/xemacs/stable/
There's probably a way to make Emacs use those icons instead of the default ones
Have you ever mostly liked a theme except for a few things? This is the solution I just came up with for that problem.
(defvar my/theme-tweaks
`((kanagawa-wave . ,(lambda ()
(set-face-attribute 'org-document-title nil :foreground "#89b4fa"))))
"This is an alist that defines theme-specific changes.
The keys are theme names and the values are functions that apply these changes."
)
(defun i/tweak-themes (theme &optional no-confirm no-enable)
"Apply custom theme modifications as defined in `my/theme-tweaks'.
THEME is the main parameter I care about.
NO-CONFIRM doesn't matter to this.
NO-ENABLE might though. Maybe don't do anything if NO-ENABLE is true."
(message "theme: %s, no-confirm: %s, no-enable: %s" theme no-confirm no-enable)
(if-let* ((enabled (not no-enable))
(tweak (alist-get theme my/theme-tweaks)))
(funcall tweak)))
(advice-add 'load-theme :after 'i/tweak-themes)
- Define whatever tweaks you want in my/theme-tweaks.
- The advice will run i/tweak-themes after load-theme runs.
>>105933387I used the oracle repl for java all the time.
C interpreters exist with which you could easily build a REPL.
It would be very handy for testing complicated pointer math on multidimensional arrays and whatnot.
>>105936786> hoguikeI meant guile. Sorry.
So far Iโve tested fib(30) on minischeme, tinyscheme and xscheme and guile. So far I think
minischeme (from the 80s) is the fastest.
It seems that, primarily, people should be targeting R5RS features, and only creep into anything else when all other options are exhausted.
Also, Iโve still never used โhygienic macrosโ anywhere but there must be a reason why theyโre so hard to implement.
racket is a fucking behemoth, I think it has chez scheme built into it or something?
>>105936786> hoguikeI meant guile. Sorry.
So far Iโve tested fib(30) on minischeme, tinyscheme and xscheme and guile. So far I think
minischeme (from the 80s) is the fastest.
It seems that, primarily, people should be targeting R3RS features, and only creep into anything else when all other options are exhausted.
Also, Iโve still never used โhygienic macrosโ anywhere but there must be a reason why theyโre so hard to implement.
racket is a fucking behemoth, I think it has chez scheme built into it or something?
>>105940248https://docs.racket-lang.org/reference/implementations.html
> Racket currently has two main implementations:> The CS implementation is the default implementation as of Racket version 8.0. This variant is called โCSโ because it uses Chez Scheme as its core compiler and runtime system.> The BC implementation was the default implementation up until version 7.9. The โBCโ label stands for โbefore Chezโ or โbytecode.โ
Excuse me for the off-topic, but what's the preferred Japanese IME on GNU/Linux? I've tried fcitx some years ago but it didn't work in emacs at all. What do lisp anons use for their JP needs?
>>105940248>Also, Iโve still never used โhygienic macrosโ anywhere but there must be a reason why theyโre so hard to implement.Here's the original paper on it https://prl.khoury.northeastern.edu/img/kffd-tr-1986.pdf
>>105940497>it didn't work in emacswhy not just use toggle-input-method in emacs and fcitx everywhere else
>>105940497>What do lisp anons use for their JP needs?C-u C-\ japanese desu, your kkcrc gets tuned to you over time
>>105940693> hygienic macros in 1986Iโm beginning to think lisp is the progenitor of almost all programming language concepts
Is this gonna just werk?
(define pool-scrubber
#~(job (lambda (time)
(let loop ((t (next-month-from time)))
(if (= (modulo (tm:mon (localtime t)) 2) 0) ; even months: 0, 2, 4...
t
(loop (next-month-from t)))))
(lambda _
(format #t "Scrubbing ZFS pool 'data'...~%")
(zero? (system "zpool scrub data > /dev/null 2>&1")))
"pool-scrubber"))
>>105940731>>105940724That solves it with emacs then. Does it matter if I get fcitx mozc or anthy? I'm running Plasma with Goyland.
Emacs has a lot of color- functions, but it's missing a few that would be really useful. Here are my rough drafts.
(defun color-hex-to-rgb (color)
"Transform a hex encoded COLOR to individual RGB components."
(let* ((_ (string-match (rx "#"
(group (= 2 hex-digit))
(group (= 2 hex-digit))
(group (= 2 hex-digit)))
color))
(r (cl-parse-integer (match-string 1 color) :radix 16))
(g (cl-parse-integer (match-string 2 color) :radix 16))
(b (cl-parse-integer (match-string 3 color) :radix 16)))
(mapcar (lambda (n) (/ n 255.0)) `(,r ,g ,b))))
(defun color-lighten-hex (color percent)
"Make a COLOR lighter by the specified PERCENT."
(let* ((rgb (color-hex-to-rgb color))
(hsl (apply #'color-rgb-to-hsl rgb))
(hsl-light (apply #'color-lighten-hsl (append hsl `(,percent))))
(rgb-light (apply #'color-hsl-to-rgb hsl-light))
(rgb-normal (mapcar (lambda (n) (* n 255.0)) rgb-light)))
(apply #'format (cons "#%02x%02x%02x" rgb-normal))))
(defun color-darken-hex (color percent)
"Make a COLOR darker by the specified PERCENT."
(color-lighten-hex color (- percent)))
Example
ELISP> (color-darken-hex "#ffffff" 50)
"#7f7f7f"
ELISP> (color-darken-hex "#faf020" 50)
"#898303"
ELISP> (color-darken-hex "#faf020" 10)
"#f8ed05"
ELISP> (color-lighten-hex "#7f7f7f" 100)
"#fefefe"
ELISP> (color-lighten-hex "#7f7f7f" 105)
"#ffffff"
They're imperfect, but better than nothing.
>>105939982>C REPLTempleOS is basically a Lisp machine in HolyC
> python is a lisp
raku is more of a lisp than python will ever be. Even with perl4 and 5 their primary data structure is a list.
standard lisp fibonacci:
(define (fib n)
(if (< n 2)
n
(+ (fib (- n 1))
(fib (- n 2)))))
In raku:
sub fib($n) {
(($n < 2) ??
$n !!
([+](fib($n - 1),
fib($n - 2))))
}
>>105929855> get back to usSo, following the fib() example
>>105943506 in e-lisp, you need to use "defun" instead of "define"
it's also ridiculously fast.
>>105938430--with-graphical-toolkit=motif
>>105943757I actually don't have motif on my system. After I ran ./configure for xemacs, this is what it printed at the end.
https://pastebin.com/aX2Y9cZM
The relevant parts are:
Window System:
Compiling in support for the X window system:
- X Windows headers location:
- X Windows libraries location:
- Handling WM_COMMAND properly.
- Using fontconfig to manage fonts.
- Compiling in support for Xft antialiased fonts (EXPERIMENTAL).
Compiling in support for the Athena widget set:
- Athena headers location: X11/Xaw
- Athena library to link: Xaw
Using Lucid menubars.
Using Lucid scrollbars.
Using Athena dialog boxes.
Using Athena native widgets.
>>105943899I wish there were an easier way to see what the different GNUEmacs graphical toolkits look like. I wonder if toolkit=lucidor toolkit=athena would look closer to XEmacs. It looks really pleasant.
>>105943624>it's also ridiculously fast.it's pretty slow compared to guile
ELISP> (require 'benchmark)
benchmark
ELISP> (benchmark-elapse (fib 30))
1.775375206
scheme@(guile-user)> ,time (fib 30)
$6 = 832040
;; 0.034521s real time, 0.034220s run time. 0.000000s spent in GC.
>>105944259Now try this and rerun the benchmark.
(native-compile #'fib)
>>105944560still slower but the improvement is huge
ELISP> (native-compile #'fib)
#<subr fib>
ELISP> (benchmark-elapse (fib 30))
0.072731274
>>105944585>huge1.77 -> 0.07 is about 25x
Elisp has gotten a lot faster.
I feel like I should use native-compilation more. I think package installation automatically does this with recent recent versions of Emacs, but some of my custom code might benefit from a little native compilation here and there.
>>105933165Yep. I use it to manage my emac packages.
https://guix.gnu.org/manual/devel/en/html_node/Binary-Installation.html
https://guix.gnu.org/manual/devel/en/html_node/The-Perfect-Setup.html
The best thing I've ever done with Emacs
(global-set-key (kbd "C-l") 'forward-char)
(global-set-key (kbd "C-h") 'backward-char)
(global-set-key (kbd "M-l") 'forward-word)
(global-set-key (kbd "M-h") 'backward-word)
(global-set-key (kbd "C-j") 'next-line)
(global-set-key (kbd "C-k") 'previous-line)
The default shit is one of the most absurd things I've ever seen. The more I explore keybindings, the more I appreciate the hjkl method for the ergonomic reasons.
I gotta punch whoever made the default emacs keybindings
>>105947112I love emacs though. Vim is shitty editor and I don't like the modal editing in gneral
>>105946926Overriding C-h is a bad idea. There are so many help commands that start with C-h.
I don't really use most of them these days thanks to gpt.el
>>105946926jesus anon at least use the windows key for this
the guy that maintains eglot is an asshat and his flymake integration is a mess.
>>105946926what keys do you use for recenter-top-bottom and kill-line?
>>105947520Well, help-map is still bound to F1. I also bind it to C-?.
Someone explain to me why Clojure devs seem so weirdly hostile to other Lisps on this board.
>>105949366they are java sirs and work for a south american cartel/bank
>>105949366I never got that impression. They seemed chill to me.
>>105949366>>105949366It's just one clojo schizo
>>105933387That is the reason why Emacs is almost always used with lisp.
I do this myself, even though I use vi for most everything else.
Because you open your lisp code in a buffer, run a lisp repl on the other, and then you press C-x C-e and your code gets sent to the repl.
It's convenient because you don't have to load a whole file at once when you do this.
Otherwise, you can write your functions in the REPL and then copy them into the file or vice-verse, whichever suits you best.
But generally emacs is the way to go. Alternatives that work this way are racket and lem. You can also use slimv in vim, but it has some weird ass constraints about compiling vim with python support for a specific version, something like that. You can do that if you don't mind adhering to those weird constraints, It's probably nothing too difficult, I just hate such kinds of constraints.
>>105948122don't sway and i3 by default occupy those bindings with that key?
>>105951526Not that anon, but your are correct. I leave the windows (or Super) key to i3 and sway while I let Emacs have the Alt (or Meta) key.
100.0% Scheme
https://github.com/thomasschafer/smooth-scroll.hx
>>105953018Impressive, very nice.
Also, that reminds me of this nice emac package:
https://github.com/jdtsmith/ultra-scroll
>>105953545I can finally scroll buffers with tall images in them in a non-janky way. Thank you.
>>105944585> (native-compile #'fib)Get out... This thing has like godbolt built in with (disassemble ...)
It's almost like this is fast enough to be viable for real work. Frightening.
Only other thing I know that casually does this is julia.
> AT&T SyntaxCan't have everything
>>105951526>>105952139You can "just" use EXWM
>>105954385>disassembleThat's cool.
>It's almost like this is fast enough to be viable for real work. Frightening.That's the feeling I got too after seeing the native-compile results. Elisp has quietly leveled up.
>>105939868I made an updated version that supports regexps in the alist in addition to symbols.
(defun match-symbol-or-regexp (given test)
"See if the GIVEN symbol matches the TEST pattern.
The TEST pattern may be a symbol or a regexp."
(if (symbolp test)
(eq given test)
(let* ((s (format "%s" given)))
(string-match-p test s))))
(defun i/tweak-themes (theme &optional no-confirm no-enable)
"Apply custom theme modifications as defined in `my/theme-tweaks'.
THEME is the main parameter I care about.
NO-CONFIRM doesn't matter to this.
NO-ENABLE might though. Maybe don't do anything if NO-ENABLE is true."
(message "theme: %s, no-confirm: %s, no-enable: %s" theme no-confirm no-enable)
(if-let* ((enabled (not no-enable))
(tweaks (mapcar #'cdr (cl-remove-if-not
(lambda (test.fn)
(match-symbol-or-regexp theme (car test.fn)))
my/theme-tweaks))))
(progn
(message "tweaks: %s" tweaks)
(cl-loop for th in tweaks
do (funcall th)))))
(advice-add 'load-theme :after 'i/tweak-themes)
>>105956698My config looks like this.
(defvar my/theme-tweaks
`((kanagawa-wave
. ,(lambda ()
(my/tab-bar :background "#0d1b1e" :foreground "#c5e99b")
(set-face-attribute 'org-document-title nil :foreground "#89b4fa")
(set-face-attribute 'org-block nil :background "#242024")
(set-face-attribute 'comint-highlight-prompt nil :background 'unspecified :foreground "#89b4fa")))
(kanagawa-dragon
. ,(lambda ()
(my/tab-bar :background "#0d1b1e" :foreground "#c5e99b")
(set-face-attribute 'org-document-title nil :foreground "#ade25d")
(set-face-attribute 'org-block nil :background "#242024")
(set-face-attribute 'comint-highlight-prompt nil :background 'unspecified :foreground "#ade25d")))
;; Apply to all kanagawa- themes.
("^kanagawa-"
. ,(lambda ()
(set-face-italic 'font-lock-keyword-face nil)))
(uwu
. ,(lambda ()
(my/org-faces)
(my/shr-faces)))
(south
. ,(lambda ()
(my/tab-bar :background "#7798aB" :foreground "#0d1b1e")
(my/org-faces)
(highlight-indent-guides-mode -1)
))
;; Apply to all ef- themes.
("^ef-"
. ,(lambda ()
(my/org-faces)
(my/shr-faces)
(my/info-faces)))
(ef-dream
. ,(lambda ()
(set-face-attribute 'org-done nil :foreground "#7777bb")))
;; Apply to all kaolin- themes.
("^kaolin-"
. ,(lambda ()
(my/org-faces)
(my/shr-faces)
(my/info-faces)))
(catppuccin
. ,(lambda ()
(my/org-faces))))
"This is an alist that defines theme-specific changes.
The keys are theme names, and
the values are functions that apply these changes.")
I'm retrieving some api call with URL and displaying them in a new window or buffer. I'm still a noob but how do I make it so I can bury it with q and reuse the buffer if it is already created?
(defun myquery ()
(let ((url-request-method "GET"))
(url-retrieve my-url
(lambda (status)
(let ((result-buffer (current-buffer))
(new-buffer (generate-new-buffer "*My Query Result*")))
(with-current-buffer new-buffer
(insert-buffer-substring result-buffer)
(read-only-mode 1)) ; Ensure it's marked as read-only
(switch-to-buffer-other-window new-buffer))))))
Its hard knowing lisp but lacking even the grammar to think about how to program emacs.
>>105956866>how do I make it so I can bury it with q One quick and easy way to do that is to use a major-mode that already has that behavior like help-mode.
>and reuse the buffer if it is already created?get-buffer-create
Revised Version:
(defvar my-url "http://httpbin.org/robots.txt"
"A URL to fetch with `my-query'")
(defun my-query ()
"Fetch `my-url' and display its contents in `*My Query Result*'."
(interactive)
(let ((url-request-method "GET"))
(url-retrieve my-url
(lambda (status)
(let ((result-buffer (current-buffer))
(new-buffer (get-buffer-create "*My Query Result*")))
(with-current-buffer new-buffer
(read-only-mode 0)
(erase-buffer)
(insert-buffer-substring result-buffer)
(help-mode)
(read-only-mode 1)) ; Ensure it's marked as read-only
(switch-to-buffer-other-window new-buffer))))))
I added (interactive) so that you can `M-x my-query`.
>>105957039good morning sir, many thanks. This will help me greatly at my <job> because I need to query this bullshit service every 5 minutes to copy something or check if some data is valid.
>>105957092Now I will figure out a way of using emacs to access the secret tokens without me copy-pasting them every time. Maybe I can convince some coworkers to switch from VScode lmao.
>>105957102The standard way to work with secrets in Emacs is to use the auth-source library.
C-h R auth
Typically, you store your secrets in ~/.authinfo.gpg.
It's a file where each line contains some kind of secret, typically for login somewhere.
machine localhost login root password super-secret
It's kind of like a plist where it's a series of key value key value key value...
The file format may be simple, but getting at it via Elisp is a slight pain in the ass, because they hide the password inside a function that you have to call.
ELISP> (auth-source-search :host "localhost")
((:host "localhost" :user "root" :secret
#f(compiled-function () #<bytecode -0x87afdcead852dac>)))
ELISP> (funcall (plist-get (car *) :secret))
"super-secret"
>>105954385>godbolthttps://godbolt.org/
I didn't have fancy web sites like this back when I learned assembly.
>>105956698Something else that's important to prevent themes from bleeding through onto each other is to unload them.
(defun i/disable-loaded-themes (theme &optional no-confirm no-enable)
"Disable any loaded themes before enabling a new THEME.
This prevents overlapping themes; something I would rarely want.
THEME, NO-CONFIRM, and NO-ENABLE are ignored in this advice function."
(dolist (theme custom-enabled-themes)
(disable-theme theme)))
(advice-add 'load-theme :before 'i/disable-loaded-themes)
>>105954385>> AT&T Syntax>Can't have everythingdisassemble-internal contains:
(call-process "objdump" nil (current-buffer) t "-S"
(native-comp-unit-file (subr-native-comp-unit obj)))
where we want to inject "-Mintel" to emit intel instead of at&t syntax, we could in theory use:
(defun emit-intel (f &rest x)
(cl-flet ((call-process (a b c d e f)
(call-process a b c d "-Mintel" e f)))
(apply f x)))
(advice-add #'disassemble-internal :around #'emit-intel)
but unfortunately disassemble-internal is compiled so can't be advised this way, you can however copy disassemble-internal with "-Mintel" included and it works
>>105957092Are the secret tokes something you already have, or are they coming in brand new from the URL you're hitting.
- If you already have them, use auth-source like
>>105957241 suggests.
- If they're coming in new, you can use clipboard-kill-region or kill-new.
Somewhat unintuitively, kill doesn't delete anything. It just copies so you can paste later.
>>105957888>>105957241its a secret api key used by the team for the enviroments, one for each. should be send in a header. I will look into authinfo.
The day ends with me a billion times better at elisp than before, since I had never written anything but my config lel.
>>105958029This may help a little bit.
https://www.masteringemacs.org/article/keeping-secrets-in-emacs-gnupg-auth-sources
>>105917285 (OP)How does MAPFUNC work in make-shared-array in Guile?
make-shared-array oldarray mapfunc bound โฆUp until this point, the reference manual has made sense to me. It's explanation of MAPFUNC being affine linear and the addition of integer multiples, etc. has me lost as a mathlet though: mapfunc must be affine linear, meaning that each oldarray index must be formed by adding integer multiples (possibly negative) of some or all of newidx1 etc, plus a possible integer offset. The multiples and offset must be the same in each call. I don't understand how more complex mapfunc, like the one for adding dimensions, gets the results it does:
(make-shared-array #1(a b c d e f g h i j k l)
(lambda (i j) (list (+ (* i 3) j)))
4 3)
#2((a b c) (d e f) (g h i) (j k l))
I don't understand how adding and muliplying the integers to get one value each time produces indices corresponding to either array. I thought with the earlier examples, like getting diagonals, that the lambda procedure was returning index coordinates as values through list mapping or recursion (ie (0 0) for a, (1 1) for e, (2 2) for i):
(make-shared-array #2((a b c) (d e f) (g h i))
(lambda (i) (list i i))
'(0 2))
#1(a e i)
This tells me I don't actually understand how MAPFUNC works. So what am I misunderstanding? Sorry if this is all a stupid question. It's just I'm (perhaps mistakenly) attempting to learn guile as my first programming language, since I was interested in learning linux, lisp and using guix as my OS, and thought learning guile was the right move.
Documentation: https://www.gnu.org/software/guile//manual/html_node/Shared-Arrays.html
>>105958484Fuck I butchered that. I'll try reformatting.
How does MAPFUNC work in make-shared-array in Guile?
make-shared-array oldarray mapfunc bound โฆ
Up until this point, the reference manual has made sense to me. It's explanation of MAPFUNC being affine linear and the addition of integer multiples, etc. has me lost as a mathlet though: mapfunc must be affine linear, meaning that each oldarray index must be formed by adding integer multiples (possibly negative) of some or all of newidx1 etc, plus a possible integer offset. The multiples and offset must be the same in each call. I don't understand how more complex mapfunc, like the one for adding dimensions, gets the results it does:
(make-shared-array #1(a b c d e f g h i j k l)
(lambda (i j) (list (+ (* i 3) j)))
4 3)
#2((a b c) (d e f) (g h i) (j k l))
I don't understand how adding and muliplying the integers to get one value each time produces indices corresponding to either array. I thought with the earlier examples, like getting diagonals, that the lambda procedure was returning index coordinates as values through list mapping or recursion (ie (0 0) for a, (1 1) for e, (2 2) for i):
(make-shared-array #2((a b c) (d e f) (g h i))
(lambda (i) (list i i))
'(0 2))
#1(a e i)
This tells me I don't actually understand how MAPFUNC works. So what am I misunderstanding? Sorry if this is all a stupid question. It's just I'm (perhaps mistakenly) attempting to learn guile as my first programming language, since I was interested in learning linux, lisp and using guix as my OS, and thought learning guile was the right move.
Documentation: https://www.gnu.org/software/guile//manual/html_node/Shared-Arrays.html
>>105958521Linear transformations are things that scale stuff or rotate them, but not offset them.
Affine things have scaling and rotations and also offset stuff.
>I don't understand how adding and muliplying the integers to get one value each time produces indices corresponding to either array. That lambda must result the index list of the NEW ARRAY based on the ones of the OLD ONE.
Think about the simplest case, the one of a identity transformation (lambda (x y ...) (list x y ...)), do you understand what it is doing?
>>105958955Sorry, I've explained it wrong. It does the inverse of that per the manual:
>mapfunc translates coordinates from the new array to the oldarray.
Is ClojureDart any good? Trusting anything relying on Google feels mushy.
>>105949366Only places i see people talking about Clojure in this site are here and the ocassional ridiculously obvious flamebait thread. Though i won't deny your claim, there's a delirious retard for everything in 4chan.
>>105959053>Is ClojureDart any good? Trusting anything relying on Google feels mushy.I'm doing my app Disorganized in ClojureDart and I enjoy the development experience. Flutter is open-source and popular, even if Google stop maintaining it there will be many large companies to pick up the slack.
>>105958955>do you understand what it is doing?I'm not confident I truly understand it is doing since I'm not understanding the mathematical part of it. The logic breaks down once it gets more complex.
The way I understand (lambda (x y) (list x y) 3 2)) as mapfunc for example, is that that since the lower bound is not provided, by default the dimensions are zero origin offset by 1: '(0 2) and '(0 1). They are mapped through returning #2((a b) (d e) (g h)). That makes sense to me since I think it's returning indices for every position (ie (0 0) for a, (0 1) for b, etc.) I don't understand though how when only value is returned in the later examples that it corresponds to any of the indices. The problem here is that I furthest I went in math is trigonometry, and I haven't had to do anything beyond arithmetic in over a decade. So this linear algebra is total esoteric wizardry to me.
>>105958521>I don't understand how adding and muliplying the integers to get one value each time produces indices corresponding to either array. I thought with the earlier examples, like getting diagonals, that the lambda procedure was returning index coordinates as values through list mapping or recursion (ie (0 0) for a, (1 1) for e, (2 2) for i):I think you're right on that. It may help to think of the arrays as functions, say you had two arrays a and b:
a = [a, b, c, d]
b = [[a, b],
[c, d]]
They could be written as functions:
a(0) = a
a(1) = b
a(2) = c
a(3) = d
b(0, 0) = a
b(1, 0) = b
b(0, 1) = c
b(1, 1) = d
You could write b in terms of a like:
b(x, y) = a(x + y * 2)
b(0, 0) = a(0)
b(1, 0) = a(1)
b(0, 1) = a(2)
b(1, 1) = a(3)
As a shorthand maybe you could define b as b = f(a, (x + y * 2), (1, 1)), where f is a function that generates each of b's 4 cases up to the bounds (1, 1). f would have the same meaning as make-shared-array
Why does the body of b, (x + y * 2), have to use whole number integers like 2? If it didn't and b computed 1.5, our function a isn't defined for a(1.5)
>>105957651> disassemble-internal is compiledThanks for this.
It just so happens I just upgraded emacs (first time in 10 years or so) just to see this native-compile shit.
btw, it needs libgccjit-11, not the latest, 12, to get this stuff going.
Anyway, iโll just hack it in and recompile/re-install.
Watching it do all the ELN generation is pretty satisfying, and the result is noticeably faster.
Unfortunately, this is going to crush the emacs/guile team.
>>105946926I don't use the keys either, but I mapped the same thing with super keys. I mapped arrows keys on hjkl and it's super comfy
I don't use vim and evil btw
>>105959813>It just so happens I just upgraded emacs (first time in 10 years or so) just to see this native-compile shit.Congrats. Native compilation is worth it. It's not just a little faster. You can really feel the difference.
>>105959813>Unfortunately, this is going to crush the emacs/guile team.It definitely became less compelling.
A while ago someone posted some guile init files that made it usable (the repl). Care to share again? I think it made the debugger less of a pain and configured some quality of life things.
>>105958521Maybe flatting one will hlep you understand sir
(define A #2((a b c ) (d e f)))
(make-shared-array A (lambda (i) (list (quotient i 3) (remainder i 3))) 6)
It's a bit tricky.
I've used autolisp at my current work, it was my (odd) introduction to lisp. Honestly I enjoyed it, despite the autolisp implementation's shortcomings, and would like to use more lisp in my free time.
What are my options if I want to produce binaries for different platforms? I'd like to develop utilities (console and GUI) that could be useful to normalfags.
>>105960670https://desuarchive.org/g/thread/105711980/#105733875
Possibly this?
>>105960902common-lisp, clojure, guile
>>105960902>consolebabashka
>GUIclojuredart for cross-platform
Did you know that emacs has a shitton of faces? And 3rd party themes dont redefine a lot of them (because covering everything's a pain), instead relying on inheritance. Except it's inconsistent. You want to disable underline globally? Too bad, eww has its own face which uses :underline t, not :inherit underline, so you get nothing. Something something old code. Fucking pisses me off.
Gods bless the fact that defface demands a group, I can use customize-group to see all the faces.
>>105961379>Did you know that emacs has a shitton of faces? And 3rd party themes dont redefine a lot of themBeing an Emacs theme author is hard. Some themes have better face coverage than others, but it's hell as a theme developer.
>Gods bless the fact that defface demands a group, I can use customize-group to see all the faces.How does that work?
>>105946070Did you install Emacs with Guix? I tried that but I couldn't get it to recognize the fonts I installed outside Guix, even though I did add a Home service like in the manual
https://guix.gnu.org/manual/devel/en/html_node/Fonts-Home-Services.html
>>105961654> Being an Emacs theme author is hard. Some themes have better face coverage than others, but it's hell as a theme developer.As someone who've very recently started an effort of making blackboard-theme usable, I agree. I do not blame people for limiting themselves only to what mostly works along with their personal preferences.
> How does that work?m-x customize-group something gives you all the vars which belong to something group + its subgroups. I use it as a grep. If it misses something, I'll write a grepping function to apply all over my /usr/share/emacs. I dunno, I found this way accidently and think it's cool.
So, Emacs has a faces group. As of packages, well, defface needs to be in a group, I can just collect all the group names and get their custom faces that way, I think.
>>105962222>As someone who've very recently started an effort of making blackboard-theme usable ...- First, nice digits.
- Second, I wonder what flaws you saw in blackboard-theme.
- Personally, the two things I notice most often in themes of this older era are 1) fringe not being defined and making olivetti-mode look ugly and 2) tab-bar-* faces not being defined.
- For fringe, the fix is to make the background the same as the default face's background.
- For the tab-bar-* faces, if it's a light theme, they can leave it as-is, but if it's a dark theme, some customization to make the tabs also have a dark background really improve the look of the theme.
I use tab-bar-mode and olivetti-mode all the time, so I notice these often in older themes like blackboard.
https://github.com/don9z/blackboard-theme
>>105961379It might help if there was some tool/script/function that could scan your theme for issues and make suggestions.
I've created my own Emacs theme but I'm afraid to even try releasing it publicly because I'm certain there's probably tons of little compatibility things that I've just never thought about.
In my theme I'm also not inheriting underline, simply because I wasn't aware of that being a thing until just now. But I completely understand what that would be a better practice.
I bet there's a hundred more little things like this that I'm not accounting for, how am I supposed to know? Some kind of a theme-checker would really help
>>105953545>https://github.com/jdtsmith/ultra-scrollNeat
>>105964890Honestly that cursor would drive me crazy.
Needs a high-persistence phosphor mode that has fading lines follow the cursor like tracer bullets.
Then we could draw vectors and stuff with tektronix termcap commands.
After reading a few Lisp books over the past month or so, I'm no longer able to understand the objection "but functional programming isn't how hardware works!"
Especially SICP and Let over Lambda really seem to rubbish this whole objection. When you can create stateful with a trivial lexical closure it's hard to see why this complaint has stuck around.
>>105965805Correct. Lesson learned: People who don't like functional programming are stupid.
>>105965805>Let over Lambdaone thing that's funny about that book is Doug Hoyte shits on other languages throughout the book yet if you look at his github he has not a single Lisp project in any dialect.
>>105965805But implementing closures "in hardware" (well, with current architectures) isn't trivial. Basically, you can't just store variables on stack, you have to make environment copies, and making them cheap isn't easy. At least that's what my impression is from skimming papers about abstract machines for eager functional languages (CAM, ZINC). I'm not sure I fully understand your point though.
>>105922148old war stories
http://www.xemacs.org/Documentation/21.5/html/internals_4.html
backtracking and other searches sirs.
(defun tree-search (init goal? generator sort-next-state &optional (max-iter 1000) (collect? nil))
(loop for state-space = init then (funcall sort-next-state (funcall generator
(car state-space))
(cdr state-space))
for i from 0 upto max-iter
while state-space
if (funcall goal? (car state-space))
collect (car state-space) into solutions
when (and solutions (not collect?))
do (return solutions)
finally (return solutions)))
>>105966624Strongest C++oid.
>>105967123N-queens. Loop chads stay winning.
(defun print-n-queens (board)
;; board is a list of row positions, the index is the column
(let* ((n (length board))
)
(loop for el in board
do (let ((row (make-string n :initial-element #\.)))
(setf (char row el) #\Q)
(format t "~a~%" row)))))
(defun valid-board? (board)
(loop for i below (length board)
never (conflict? i board)))
(defun conflict? (row board)
(let ((column (nth row board)))
(loop for c in board
for r from 0
thereis
(and
(not (= r row))
(or
(= c column)
(= (abs (- column c))
(abs (- row r))))))))
(defun generate-board (board n)
(if (= (length board) n)
NIL
(loop for i from 0 below n
for next-state = (cons i board)
if (valid-board? next-state)
collect next-state)))
(defun solve-n-queens-dfs (n &key (max-iter 1000) (collect? NIL) (init '(())))
(let ((solution (tree-search init
(lambda (board) (= (length board) n))
(lambda (board) (generate-board board n))
(lambda (x y) (append x y)) :collect? collect? :max-iter max-iter)))
solution))
It starts shitting the bed with 20. Next solver is a min-conflict one, I've managed to do 5000-queens in my shitty laptop with it in a couple minutes.
CL-USER> (time (solve-n-queens-dfs 5 :collect? T :max-iter 1000000))
Evaluation took:
0.000 seconds of real time
0.000023 seconds of total run time (0.000023 user, 0.000000 system)
100.00% CPU
81,092 processor cycles
0 bytes consed
((3 1 4 2 0) (2 4 1 3 0) (4 2 0 3 1) (3 0 2 4 1) (4 1 3 0 2) (0 3 1 4 2)
(1 4 2 0 3) (0 2 4 1 3) (2 0 3 1 4) (1 3 0 2 4))
>>105967196you can get better performance by just halving the board because you can rotate the board into equivalent positions, you can also discard the corner
>>105967230I'm using N-queens as a base-case for comparison between methods, so I don't really want to waste much time on it.
>>105967754you will waste less time on it by noting that approx. 80% of the time in the example you posted was wasted computation
>>105967943Yes, but the asymptotic behavior of each solving method does not care for that if all of them solve the same stupid problem. Holy mother of pedantism.
>>105963014>what flaws you saw in blackboard-themeIt's nothing really criminal, really. Tab-bar and tab-line, mode-line, window-divider, pop-ups are light colored, which could be okay, except you can't use both tab-bar and tab-line with two vertically split panes.
Show-paren's highlight is so bright that I can't see the paren itself.
The theme didn't bother with term color at all, which means one of vterm's blue colors somewhat melds in with the background.
Elisp/d, the /d is this ugly color which doesn't suit modeline colors at all.
It does try to do the underline trick, unaware of eww's treachery. Without the ability to turn it off and make rgrep look nicer, of course.
Secondary selection could be better... Little things.
Plus the theme itself by my own opinion is not ideal, DarkOrange for font-lock-variable-name-face on a dark blue background doesn't look good.
And I could, theoretically, just use (custom-set-faces), but I don't want to pollute my init.el, so I've decide to write a separate theme. Except I have a lot of free time and don't mind going through the entire codebase of Emacs to hunt down every visual inconsistency, so who knows what it's gonna end up looking like.
>>105968023I don't understand the point of posting code if you want people to just look at it and say nothing (except praise, presumably). It's a common problem and a common technique. What else can be said and what else could be the point of posting it?
>>105920510>All DJs on aNONradio.net are members of the SDF Public Access UNIX System Community.Nothing but SJW faggots. Dropped.
>>105968696How do you know?
>an empty list is both a list and an atom
what the fuck
>>105969253because it's also used to denote falsity
>other programs feel unusable without emacs keys
>emacs feels unusable without vim keys
how do i treat this brainrot
What keyboard do (You) use?
>>105965805> isn't how hardware worksLisp literally came about and was co-emergent with hardware designed to run it. Symbolics Lisp Machine, TI Explorer, etc.
The the problem is, commodity CPUs today were based off of what was needed for calculators (which are simple stack-based machines) but don't need to do so very quickly for a typical calculator. Or terminals (another originating use-case).
Things went downhill rapidly from that.
So, like Sun who tried to make a Pico processor that could execute JVM bytecode more quickly than traditional processors, there is probably room to make a processor that can efficiently process lisp and scheme. Or at least a co-processor.
One thing that lisp does, however, as we saw in this thread about n queens, is improve the algorithms themselves! Even though it's because lisp is not great at everything performance-wise. Some of the best algorithms we know of came from India when computers were scarce.
>>105971306I was always down on functional programming, especially as a tool for computer science instruction.
But I realized, I was always kind of a proponent after thinking about it. In many languages I developed, I always admired things like the IIF() statement in dbase (or DECODE in Oracle's SQL) and almost always implemented it before formal if-statements proper.
Then you realize if you just allow arbitrary expressions in if statements, you don't need an if-statement structure and associated blocks.
Then you realize you don't need statements and blocks and you can write everything as an expression.
congratulations. You've just re-invented lisp.
>>105971306>One thing that lisp does, however, as we saw in this thread about n queens, is improve the algorithms themselvesBut it doesn't because you never should have searched the entire board. Only your first two results were required. Even better than Lisp's ability to "improve" the algorithm (which it did not do) is to just apply your brain to not calculate useless things 4 more times than necessary and wonder why things seem to take so long when n = 20.
>>105971306 (You)
I was always down on functional programming, especially as a tool for computer science instruction.
But I realized, I was always kind of a proponent after thinking about it. In many languages I developed, I always admired things like the IIF() function in dbase (or the DECODE() function in Oracle's SQL which is like a CASE statement) and almost always implemented "if" as a function before formal if-statements proper.
Then you realize if you just allow arbitrary expressions in if functions you don't need an if-statement structure at all, or the associated blocks.
Then you realize you don't need statements and blocks and you can write everything as an expression consisting of functions.
Congratulations. You've just re-invented lisp.
>>105971424I'm the n-queens guy, not the functional schizo. I don't see how lisp benefited me. I could've just as badly done it in python.
>>105971424>apply your brainSure, in an ideal world.
I'm old, and I guarantee you that most people in software today don't apply their brains.
They need a stick. And even then, that usually doesn't work.
>>105971459> how could it benefit?We had a theory at several places that I worked. The theory was that developers should test their code on the shittiest laptops we had stored in old file cabinets for 10 years. In fact, *work* on those laptops as their day-to-day drivers.
Only then would they bother to care about performance.
I realize your case is mostly to test the relative performance of something doing computations of some kind, and that's totally valid.
My point was sometimes you need something that shows the weakness of an algorithm rather than someone not knowing about their latest check-ins O(n^n) performance testing it once and it's 10ms instead of 1ms and they don't notice, it moves to AWS and we scramble to add $1M/month in extra hardware to support it.
>>105971495I'm non-ironically that guy. Company gave me a windows laptop, I begged the logistics/security people to let me use my own with linux so I just formatted a t440 and I work with that. Two cores lmao.
>>105971434accept haskell into your life already
>>105970668Filco majestouch (i kinda hate it)
>>105971629picrel is probably the keyboard you need to fully reap the benefits
>>105971817I want to hit hyper-infinity
>>105970668zsa voyager
i like it a lot, but in hindsight i should have built my own
any split keyboard with thumb cluster works extremely well with the default emacs bindings
>>105969253People in the past had much less experience designing programming languages.
>>105970668My thinkpad's keyboard (with very heavy xkb-based remapping).
>>105971817>>105971959https://www.youtube.com/watch?v=PdU7GRf_nMg
>>105972532Kinda cool, like
>>105972406 wrote a custom split space cadet would combine the old and new meta
>>105967119Once upon a time, there was a version of Xanadu implemented in Emacs Lisp.
https://www.jwz.org/blog/2024/01/hypertext-emerges-from-his-well-to-shame-the-tech-industry/
https://xanadu.com/xUniverse-D6
Young Ted Nelson in 1984
https://www.youtube.com/watch?v=p0pFpG3Jq2A
This browser extension has been very good to me the past few months.
https://github.com/kuanyui/copy-as-org-mode
https://github.com/yibie/Copy-as-org-mode-chrome
It's great for copying text from web pages into org documents. I love it.
Ok you fags made me want to finish the dactyl manuform project I've been sitting on for over 2 years. Thanks.
>>105973214>https://github.com/kuanyui/copy-as-org-mode>https://github.com/yibie/Copy-as-org-mode-chromePretty nice
file
md5: 92c9dd671b6b9d07df478b536ffe2734
๐
>>105917285 (OP)tourist here, qrd on lisp? why does this shit has a general? why is there a japanese visual novel about characters of Mahou Shoujo Lyrical Nanoha teaching lisp to the player?
i'm so confused
>>105975858https://lyrical.zick.run/
https://github.com/zick/Magical-Language-Lyrical-Lisp/
SICP
md5: c1d551adee16064d6fc0a87ccd9a9c81
๐
>>105975858Read SICP and achieve satori.
https://archive.tinychan.net/read/prog/1383357224
>>105975858>qrd on lisp?White man's programming language(s). All others are made by, and for, niggers.
>>105975858Because Lisp is the initiate's traditional guide on the secret path to sorcery.
>>105953018interesting
https://github.com/thomasschafer/smooth-scroll.hx/blob/main/smooth-scroll.scm
>>105917346Thank you, I found it very interesting. Don't like the whole "playing God with molecules and stopping aging" thing, but the actual Lisp/C++ thing was nice.
>>105969225Everyone knows this.
>>105977190>don't like stopping agingcringe take desu, getting to 80 and having no health related issues like busted joints and a fucked up heart would be incredible, eliminating age is a noble goal
Is there a way to create a Windows notification once emacs' daemon has fully loaded and BEFORE a frame has been created?
I use runemacs.exe and my only shortcut, when a daemon is not (fully) loaded it just runs it normally instead of waiting for the daemon, that is intentional as sometimes I want a standalone client instead but it can sometimes be quite annoying as I'll just open Emacs too fast and end up never loading the daemon (I think the daemon creation stops when you launch emacs "normally" or something).
This snippet here works on scratch
(let ((id (w32-notification-notify
:level 'info
:title "Emacs"
:body "Emacs has been loaded.")))
(run-at-time 5 nil #'w32-notification-close id))
But when I hook it to after-init or emacs-startup it doesn't work at all, funnily enough it does work when I hook it to server-after-make-frame but that's not what I want, as if I loaded the goddamn frame i'd already know that the daemon has loaded.
All I want is: my service runs runemacs.exe --daemon > emacs fully loads in the background > i get a popup saying it has loaded > popup closes in 5 seconds.
>>105977649I have those at 25
>>105977667Couldn't you just put that let expression at the end of your init.el? I tried something similar with notifications-notify and notifications-close-notification, and it seemed to do what you want.
I ran `emacs --daemon` and the notification popped up and then closed after a few seconds. No frames popped up due to the --daemon.
>>105977041Helix really needs a Steel REPL like Emacs' ielm. They currenly have :evalp and :eval-buffer which have to be loaded before use. It's better than nothing, but it's not ergonomic.
https://github.com/mattwparas/helix/discussions/47
;; Add this to ~/.config/helix/init.scm.
(require (only-in "helix/ext.scm" evalp eval-buffer))
>>105978753Were you using windows? the wiki tells me to use w32-notification-notify instead but I'm not sure if that's deprecated or what.
>put that let expression at the end of your initFirst thing I tried, also tried wrapping it into a function then just calling it and it also did not work.
The only way the notification is currently showing up is when i add it to server-after-make-frame-hook, which is uh... not useful.
>>105978966No, I'm using Linux.
>>105966624He knows the pain of using blub langs more than anyone
>>105978791>-p notation in Scheme
>>105975858>why does this shit has a general?It looks very attractive to contrarians
>>105959812This didn't make sense to me, but I am a mathlet after all.
>>105960721This made sense to me. The parameter value being outside the bounds of any one cell forced me to plug in each element and cell index. The example list 3 2 game me the impression mapping automatically happened based off providing the dimension bounds.
>>105958955Now I understand what the simplest case is doing. I already knew it was an abstraction of the plain list function, but I did not understand that that it was "plugging in" values just the same as above.
>>105924873>C-j is bound to eval-print-last-sexpThis is useful for when an expression returns a data structure that's too big for the echo area.
>>105977649Why do you want to be that old? Seriously, what do you think is worth doing at that age?
>>105928196>obsidian lads are making those kinds of kino apps everydayI wondered what allowed Obsidian to be extended like this, and it seems they get access to a full browser engine. That makes it easier to build out nice UIs in JavaScript.
https://docs.obsidian.md/Plugins/Getting+started/Build+a+plugin
URL library sucks balls. Really low quality docs in comparison with the rest of emacs.
>>105982049I was expecting much worse, but it seems decent to me. What's lacking?
https://www.gnu.org/software/emacs/manual/html_mono/url.html
>>105982234try looking at url-http
>>105982348I just looked at it. My issue with this library without having used it before is that it conflates URL parsing with URL retrieval. It's a client library when it doesn't have to be. If such a library were made today, it would just offer a URL data structure and functions that manipulate it and stop right there.
I tried parsing a URL:
ELISP> (url-generic-parse-url "https://somehwere.com/foo/bar?a=1&b=2#heading")
#s(url :type "https" :user nil :password nil :host "somehwere.com" :portspec
nil :filename "/foo/bar?a=1&b=2" :target "heading" :attributes nil
:fullness t :silent nil :use-cookies t :asynchronous t)
- It gets the basics, but it could do a little more.
- :filename could be split into :path and :query such that...
- :path would be /foo/bar and
- :query would be a=1&b=2
- For extra credit, :query could be turned into an alist like ((a . 1) (b . 2))
As a URL parser, it could be better, but I could still work with this. Tell me what I'm missing.
>>105982348It doesn't document the accessors and hopes the reader knows about `C-h o` so that they can look at the docstrings. They could do better there.
I did find the "little more" that I was looking for though.
ELISP> (setq *u *)
#s(url :type "https" :user nil :password nil :host "somehwere.com" :portspec
nil :filename "/foo/bar?a=1&b=2" :target "heading" :attributes nil
:fullness t :silent nil :use-cookies t :asynchronous t)
ELISP> (url-type *u)
"https"
ELISP> (url-filename *u)
"/foo/bar?a=1&b=2"
ELISP> (url-path-and-query *u)
("/foo/bar" . "a=1&b=2")
ELISP> (url-parse-query-string "a=1&b=2")
(("b" "2") ("a" "1"))
I can work with this.
>>105981613My C++ code is littered with random lisp comments doing math and whatnot.
https://sachachua.com/blog/2025/07/2025-07-21-emacs-news/
>>105981644If you are 80 and in good health you can choose what you want to do. If you are being destroyed by ageing then you have strictly worse choices. If you feel 80 years is too much for you then you can always kill yourself.
>>105917285 (OP)I still have my copy of SICP, although I don't remember reading any of it. But I absolutely do remember taking Scheme as the intro to programming in college (we're talking early 90s here), and that shit was fucking -illuminating-. It demystified recursive thinking and made it feel completely natural. I have no doubt it made a big difference in my career.
Lem made a release recently. It's been a while.
https://github.com/lem-project/lem/releases/tag/v2.3.0
>>105982492> It's a client library when it doesn't have to be.I think thats the only way for emacs to do requests natively is it not?
>>105984024I would WMAF Sacha Chua so hard
at first I didn't really see a point in using Clerk, but it's actually very fun to work with.
>>105981650Fair.
>>105984649>If you are 80 and in good health you can choose what you want to doYou didn't understand what I meant.
>you can always kill yourselfYou can't always kill yourself.
>>105987578I hope you donโt mean some magic idea that weโre just mystically meant to die at a certain amount of time. Age isnโt a nice thing, itโs brutal and cruel.
This is driving me insane.
Laptop with Ubuntu 22 gnome, compiled from source. Fullscreen on my secondary screen (a monitor) emacs seems just a tad to big and crops the echo area.
All other apps work correctly, and it works fine on the small laptop screen.
How can I even start debugging this?
If I just mirror the screens it also works fine, but the dpi is fucked (thanks gnome)
>>105987947>some magic idea that weโre just mystically meant to die at a certain amount of timeIt isn't a magic idea... It's just life. People get old. I won't spend more time explaining this, haha.
>Age isnโt a nice thing, itโs brutal and cruel.Get used to it, man...
>>105988317>It's just lifeyeah but you literally just watched a video of a guy explaining how you can actually change it, it's just very cringe to be so attached to some notion you see a guy with an objectively cool idea but you don't like it because there's some magic law of the universe that means he shouldn't stop you being a decrepit husk after 60 years
>>105988288this is unlikely to fix the problem, but does it change anything if you set frame-resize-pixelwise to t? describe-variable says this:
With some window managers you may have to set this to non-nil in order
to set the size of a frame in pixels, to maximize frames or to make them
fullscreen. To resize your initial frame pixelwise, set this option to
a non-nil value in your init file.
>>105989695I just gave up and added some vertical off-set in the monitor configuration
>>105986326>I think thats the only way for emacs to do requests natively is it not?I'm not against the idea of there being an HTTP client library in Emacs. What I'm against is making it part of the URL library. Look at some of the things they put inside the URL struct. There's stuff for cookies in there. That has nothing to do with a URL. That's HTTP client related data and belongs somewhere else. What they have now is bad struct design.
>>105985132Lem, Helix, Emacs...
The future is very LISPy.
How do you respond to this without sounding mad?
>>105985132does lem have a C-h t? last time i tried it well over a year ago it just dropped you into a scratch buffer and i had to fumble my way through by trying various emacs-y bindings to see what was there and what wasn't
p.s.
if lem wants to be an editor anyone other than its developers uses, they need to do tutorials make shit easy to start doing, otherwise it'll just remain a lesser emacs for the even weirder weirdos than the ones who go to emacs instead of intelliJ shit or vscode or vim even
>>105992066They're called arrays.
>>105972532I hate the sound so much it's unreal it's so cringe.
I will never understand the mechanical keyboard manias
>>105992030Ed(ward) is the standard text editor.
http://wiki.call-cc.org/eggref/5/edward
>>105992111>does lem have a C-h t?no
>>105922583>CLOG uses the browser to render a Lisp program, your app is not an html and js program not even is spirit - its a Lisp soul in a browser window :)woah this actually looks really good.... maybe i'll give it a shot. I've always wanted to write a gui program in lisp but native gui frameworks are all just miserable a webapp in lisp *without* having to even deal with js nonsense sounds really appealing. I wonder how flexible it is in terms of styling and what kinds of guis you can actually make
>>105992216hmm that one sounds pretty bad, is it even mechanical? or some sort of buckling spring thing? anyway i like the sound of linears, just the deep clack of the keycaps bottoming out and no clicks from the switches.
>>105972799I have a lily58 pro myself. it's pretty alright, but lately I've been considering going the other direction and keymaxxing to just have a bunch of macro keys for absolutely everything. All this time i've been trying to minimize the amount my hands have to move from the home row (so, less keys and more layers) which makes sense for the really common keys like letters and numbers (stuff on the top 2 layers), but then everything else becomes harder to get to and I find myself having to hit crazy 5-key finger twister combos to do basic stuff like ctrl-alt-delete. maybe the best solution is to get a big ass keyboard, do some basic layering for letters and numbers to keep those near the home row, but then setup all the other keys so that complex combos become a single keypress. since I don't use them as often, moving my hands away for a bit shouldn't be an issue, but actually might end up being quicker and more ergonomic because I'm eliminating the crazy layer combos. I was looking at a keyboard like picrel, the only issue is that it's not actually split, and i really like being able to move each half independently to whatever angles i want. Maybe the real solution is a split keyboard with thumb clusters and f-keys plus a macropad between the two halves (or beside or below or whatever) to both keymaxx AND have comfortable wrists
I haven't used Clojure in years. Is leiningen still used or did everyone switch to the built-in deps.edn shit now?
>>105992066Well I dont know much. But aint a list a chain which branches out into other chains, which do the same ad infinitum till their last link is nil? So, the descriptive "terms" in question are just what link breaches out where. They aren't actually stored metadata. If you need them to be (to jump around like a maniac), me thinks you're doing it wrong, use a different data structure.
>install nyxt
>literally just an unresponsive black window
>>105988288emacs -nw
solves this (and many other problems)
>>105996192>did everyone switch to the built-in deps.edn shit now?most new projects use deps.edn.
I use neil, which makes it more intuitive to use:
https://blog.michielborkent.nl/new-clojure-project-quickstart.html
>>105996298>Wanting disgusting side effectsNot cut out to be a Haskeller
>>105992030https://mattwparas.github.io/steel/book/builtins/steel_base.html?highlight=thread#spawn-native-thread
Helix is going to get the feature that has eluded Emacs forever.
(define thread (spawn-native-thread (lambda () (displayln "Hello world!"))))
LGTM
md5: 88df93e3f5335d867f183009d6f5d945
๐
helix is looking pretty tempting bros
anyone here given it a serious try yet?
I finally got around to installing lem! I can stop using emacs now!
I was now years old when I discovered that with STARTUP in org mode, I can highlight certain terms
#+STARTUP: fontify
# Local Variables:
# eval: (font-lock-add-keywords nil '(("\\<\\([Ss]truct\\|[Ee]num\\|[Uu]nion\\)s?\\>" 1 'font-lock-keyword-face t)))
# eval: (font-lock-add-keywords nil '(("\\<\\(typedef\\)\\(?:s\\|'[ds]\\)?\\>" 1 'font-lock-keyword-face t)))
# eval: (font-lock-add-keywords nil '(("\\<[a-zA-Z_][a-zA-Z0-9_]*\\.h\\>" 0 'font-lock-string-face t)))
# End:
I'm writing notes on a project, and having C terms not stand out was throwing me off
>>106001098>#+STARTUP: fontifyI found out the other day that I could hit TAB while my cursor is after the : on the STARTUP line to get a list of completions on what options are available. (If TAB doesn't work, M-x completion-on-tab instead)
(info "(org) In-buffer Settings")
https://orgmode.org/manual/In_002dbuffer-Settings.html
>>105979633>-p notation in SchemeIn this case, I think it's "p" as in prompt instead of "p" as in predicate.
;;@doc
;; Eval prompt
(define (evalp)
(push-component! (prompt "" (lambda (expr) (set-status! (eval-string expr))))))
Trying to do something like fiddle but for emacs. Of course it'll be slow and shitty but it'll force me to learn elisp.
I already know elisp, but rarely used elisp and emacs specific stuff. Seems so daunting.
>>105992030Some people are getting filtered already.
https://github.com/helix-editor/helix/discussions/13464
>>106003662>I don't have to explain why Lisp dialect is much more confusing and alien to most peoplei don't get it, what's so confusing and alien about it? lisp seems very simple and straightforward
>>106003581>fiddleAs in jsfiddle or something else?
https://jsfiddle.net/
>>106003662this dude is genuinely seething lmao
>>106003721it's strange how many developers there are that are completely resistant to different looking languages
you'd think those kinds of people would be underrepresented considering how many different things they have to learn on a regular basis if they're a half decent dev
the ones that claim it's too many parens are the most idiotic. it's literally the same amount of parens
>>106003725>>106003581fiddler*
>https://www.telerik.com/fiddlerJust a proxy between something where you can inspect and maybe modify traffic.
>>106003721Familiar
foo(bar, baz)
Confusing and Alien
(foo bar baz)
Seriously though, I think what irks people more than that is how mutation is not obvious. People are used to being able to autovivify variables and mutate them with =. You can still do similar things, but you have to use things like let, define, set!, and so on.
Someone should write a doc titled:
>Scheme Is Not That HardIt should aim to ease the early pain points of non-Lisp developers. I write a decent amount of lisp in various dialects now, but I remember the initial shock of my first encounter with lisps.
>>105917285 (OP)Can someone explain lexical scoping? I've implemented my own lisp, but it uses dynamic scope, and I don't quite understand how lexical scope works on the level of implementation.
>>106004188https://courses.cs.washington.edu/courses/cse341/14wi/general-concepts/scoping.html