Live data from Hacker News

Emacs Is a Lispboard

en.andros.dev

51–60 of 62 posts

Re: Emacs Is a Lispboard

#51
I learned “real” programming in the early 90’s by learning Elisp to customize Emacs. (Before that the only languages I’d written in by choice were C64 Basic and Assembler.) Like the OP, I used Elisp for everything - scripts to bulk-edit files, manage the file system, format posts, etc. etc.

Unlike the OP I hated the scratch buffer for running Elisp, so I created a REPL for Elisp that behaved more (in my naive eyes) as a real language. I was very excited when RMS emailed me to ask to include it in Emacs. Last I checked (a few years ago now) it was still there as M-x ielm (Inferior Emacs Lisp Mode).

Re: Emacs Is a Lispboard

#52
post #46

Earlier quoted context omitted.

Wait, so what is the problem? For me the biggest problem is that CSRF makes it unnecessarily difficult to write a "browser within a browser", which would otherwise not be all that hard

> so what is the problem? That browsers/web tech is moving in the opposite way and blocking various emacs-esque usecases.

There's nobody more interested than me. Which use cases? Blocking how?

Re: Emacs Is a Lispboard

#53

I learned “real” programming in the early 90’s by learning Elisp to customize Emacs. (Before that the only languages I’d written in by choice were C64 Basic and Assembler.) Like the OP, I used Elisp for everything - scripts to bulk-edit files, manage the file system, format posts, etc. etc. Unlike the OP I hated the scratch buffer for running Elisp, so I created a REPL for Elisp that behaved more (in my naive eyes) a…

Very cool story thank you. I still use ielm regularly.

Re: Emacs Is a Lispboard

#54

> Suppose I want to work in a single place for all my contexts, both personal and professional. This has always been my problem with adopting Emacs or Obsidian or any other app that purports to do this. Who are y'all working for that you can bring professional stuff onto the same system as personal stuff? I don't want my personal emails on my work computer, and my boss would be rather upset if I brought work emails o…

You don't have to combine work and personal stuff in Emacs. You can for example set it up to just connect to work email and work jira and work slack and work clankers etc.

Re: Emacs Is a Lispboard

#55

> Suppose I want to work in a single place for all my contexts, both personal and professional. This has always been my problem with adopting Emacs or Obsidian or any other app that purports to do this. Who are y'all working for that you can bring professional stuff onto the same system as personal stuff? I don't want my personal emails on my work computer, and my boss would be rather upset if I brought work emails o…

I assume it was not to use same profile but the same environment of all text related tasks. Like I write blogs and research papers in org mode, and then simply export the necessary file format. I can perform text operations easily in mail, i can have elisp snippets generate mail for me depending on the sender, I can use calc to add numbers inside the buffer, I can have latex previews.

Re: Emacs Is a Lispboard

#56

Earlier quoted context omitted.

> The JS code won't be able to modify the browser itself, but neither can ELisp modify the actual Emacs binary code. You misunderstood the problem. Remember when Firefox' GUI was made of XUL and that was indeed accessible from JavaScript (before they abandoned add-ons in favor of Google's extensions). Then you had add-ons like Firebug or KeySnail that could indeed take control of the browser's "chrome" (i.e. the visu…

Wait, so what is the problem? For me the biggest problem is that CSRF makes it unnecessarily difficult to write a "browser within a browser", which would otherwise not be all that hard

Basically, the problem is that the Web browser doesn't give enough control to developers to be used as an application platform. Simple things like key bindings are impossible for example (because there are some key bindings that the browser will not let you modify).

Another problem is integration with other desktop applications and system utilities. The browser intentionally removes and restricts this functionality because the browser's model of the users is that users are incompetent bumbling idiots who must be protected from bad choices at the cost of being able to perform useful actions if necessary. Emacs has some safeguards of that sort, but they are intentionally made easy to disable (eg. loading directory-local code).

Emacs itself serves as a communication interface for other programs and uses operating system interfaces to the same effect. It's trivial to run a program from Emacs and feed its output to another program, while displaying the result in Emacs. In the browser, you'd have to arrange for a custom protocol, a server that listens to requests from that protocol, and write wrappers around every utility you want to run so that they can wrap their outputs into messages of that protocol... essentially re-implementing IPC system abilities in browser (but a lot less efficiently).

Re: Emacs Is a Lispboard

#57

> Suppose I want to work in a single place for all my contexts, both personal and professional. This has always been my problem with adopting Emacs or Obsidian or any other app that purports to do this. Who are y'all working for that you can bring professional stuff onto the same system as personal stuff? I don't want my personal emails on my work computer, and my boss would be rather upset if I brought work emails o…

> This has always been my problem with adopting Emacs or Obsidian

That's an orthogonal problem. It's almost trivial to set up Org-mode so all your personal notes are always encrypted on disk.

Re: Emacs Is a Lispboard

#58

Earlier quoted context omitted.

Because you need Lisp. That's the actual "power of Emacs". Emacs is a Lisp-interpreter with a built-in text editor. Everything stems from that. Anyone challenging "the choice" of Lisp as the configuration language for an editor, saying things like: "Why? If X is better - faster, more modern, more popular...", etc., have misunderstanding of what makes Lisp so uniquely powerful. A specific language is not the point - t…

> to implement anything similar to Emacs, you'd need a homoiconic language I've got that. It took 6 years but I developed a comprehensive homoiconic layer for Javascript

I'm sorry, but that's not homoiconicity. I'm not trying to devalue your work (if you're talking about BABLR/CSTML), but you really cannot bolt homoiconicity onto a non-homoiconic language with a layer, because the defining trait is the absence of a layer.

It doesn't look like your real goal was homoiconicity at all, but rather "stay in JS semantics, keep the JS ecosystem, and build structural editing over any language". Homoiconicity is a word you grabbed to borrow from Emacs's fame, but not a requirement you're were ever trying to satisfy. If it was the actual requirement, there are dozens of options that exist already - Squint, cherry, Clojurescript, Scittle, Fennel-to-JS, even Gleam - any of them gives you code-as-data cheaply.

Re: Emacs Is a Lispboard

#59
post #45

Earlier quoted context omitted.

How does that work? Homoiconicity is a property of the language, not something you can develop as a layer.

JS was already pretty close. Babel allows a fantastic degree of power in code transformation, it just doesn't preserve blank space. If I were to use my preferred terminology I would simply call these transform-your-own-code formats "embeddings", and there can be many embeddings for a single language.

> Babel allows a fantastic degree of power in code transformation

That's still not homoiconicity. It reminds me old Stuart Sierra's presentation from Clojure/conj¹. Around 6 minute mark: "Adding eval to a language, even successfully, does not count as homoiconicity"... "and you didn't even succeed at that..."

---

¹ https://www.youtube.com/watch?v=o7zyGMcav3c

Re: Emacs Is a Lispboard

#60

Earlier quoted context omitted.

What do you mean by "richer ecosystem"? Have you ever seen GitHub language stats - there's so much Elisp on GitHub alone, it's absolute bananas. The amount of Elisp in the wild probably surpasses the amount of Clojure, CL and Racket combined. And mind that it isn't "a general use" PL - it exists for one and single purpose. Lem is great and I'm happy there's finally something out there to challenge Emacs' hegemony, ye…

Lem already has a clone of legit. And there's org-mode-alikes, as well. There's very little I miss when I use lem, TBH.

That's plausible and isn't too hard to imagine. The value of Emacs is not the concrete implementation of it - let's be honest, GNU Emacs is not void of enormously annoying warts. The value of Emacs is the nice foundational Lisp layer - something Lem does provide.

One side of me wants to remain skeptical - knowing how much stuff there exists in Org-mode and Magit - piles and piles of different workflows thousands of users had to go through over the years - a bunch of well-trodden paths.

At the same time, I am well-acquainted with the power of Lisp and its communities. Give Lispers a powerful engine, and they'd take it to the moon and beyond. Lem's been steadily developing over the past few years and slowly been adding users, at least I keep hearing of curious people trying it. Meanwhile Org-mode's core feels almost stagnant, and it's one of the "killer apps" of Emacs. Lem might be on the brink of making things so appealing that it would be hard to refuse it. For some lispers that's already the case. I'm wholeheartedly welcome this challenge to Emacs' hegemony. I love Emacs and I hate Emacs, because sadly (or otherwise) I don't see any practical alternative for it - anyone who thinks nvim or vscode are even in the same room are clueless. Perhaps, the time to seriously consider Lem is almost (?), already (?) here.

Post reply on HN