reddit / emacs

Will there come a time when ELISP is not enough for EMACS

AwesomeGuy1990 · 2022-07-24 18:45
Hi, So I am kind of at a crossroads. I have used doom emacs for a few days and fell in love with emacs. So I decided to try to build the EMACS config from scratch. I also plan to learn elisp. The only worry I have is will there come a time where ELISP is not enough for EMACS and emacs stops being extended or used? **Edit:** Maybe the question should be is there or will there be a limit imposed on the elisp languages' ability to improve EMACS? **Edit2:** A **huge thanks** to all who provided more insight. And I can really just say you made up my mind and I am ready to invest my time and efforts in emacs and elisp. And as I am working on learning it and transitioning to using it as a full IDE I am amazed by the capabilities (I program in python and javascript primarily (Django, vue.js, little react)).
WesOfWaco · 2022-07-24 18:50
No.
EricIO · 2022-07-24 18:51
Why would it? What is the scenario that you are thinking it wouldn't suffice for? It has served us well for ~40 years, I'd bet on it holding on for another good 40 at least.
nv-elisp · 2022-07-24 18:52
You're asking for people to predict the future, which is impossible. There may be a day when the English language falls out of use. Don't let a hypothetical future waste your time.
[deleted] · 2022-07-24 18:59
[deleted]
FluentFelicity · 2022-07-24 19:00
Well, Emacs is an elisp interpreter so...
InitialDorito · 2022-07-24 19:01
Nah, emacs is lindy
AwesomeGuy1990 · 2022-07-24 19:02
Yes, I think you are right maybe I am wasting time on things that won't happen. I just don't want to "waste" my limited lifespan on learning something that will fail on me. Even though emacs has a great previous track record.
mavvam · 2022-07-24 19:30
>I just don't want to "waste" my limited lifespan on learning something that will fail on me. If I applied this to software engineering in general, I would never ever invested in learning anything other than algorithms and data structures. Pretty much everything is guaranteed to go away. Of these things, Emacs served me well for more than 30 years. Now one might say that somebody starting fresh should look at vscode, and maybe so. But the chances of vscode disappearing before Emacs are rather high.
AwesomeGuy1990 · 2022-07-24 19:32
I upvoted this answer. I think it is a wise look on the issue.
AwesomeGuy1990 · 2022-07-24 19:35
Pt3:15 😂.Just joking brother. I guess thats a one way to provide some input.
[deleted] · 2022-07-24 19:40
[removed]
Rimbosity · 2022-07-24 19:42
LISP is, and remains, the most powerful programming language. My favorite essay on the topic is Paul Graham's [Beating the Averages](http://www.paulgraham.com/avg.html). There will be newer languages, and more popular ones, but LISP is never going to be less powerful than those.
WesOfWaco · 2022-07-24 19:47
For a bit more usefulness, I recently watched a System Crafters video where the YouTuber mentioned that there may be an effort to reduce the amount of C code that is the core of emacs. The idea is to rewrite more of the core functionality in elisp to allow more of the system to be modifiable/hackable by end users. This would be a point to elisp remaining around for the long haul.
RecentlyRezzed · 2022-07-24 19:55
Uncle Bob thinks Emacs will stay: [https://www.youtube.com/watch?v=P2yr-3F6PQo&t=1910s](https://www.youtube.com/watch?v=P2yr-3F6PQo&t=1910s).
AwesomeGuy1990 · 2022-07-24 20:00
Thx for the article will read that one.
AwesomeGuy1990 · 2022-07-24 20:10
The man is a legend. Thx for the link.
AwesomeGuy1990 · 2022-07-24 20:13
It would be great to see that. Thx for the additional info.
ambirdsall · 2022-07-24 20:14
No. Not because it's prima facie a silly question, but because of the nature of lisps: they are astonishingly adaptable because macros let you define new syntax that does what you want. For example, take Coalton: it's an ML- or haskell-style static type language embedded in common lisp (not elisp, but its closest cousin). A new fundamental language feature, but it's implemented as a library. If our needs for elisp change, we can change elisp to meet them much more easily than we can make a new language work.
xtifr · 2022-07-24 20:15
The key concept to understand is [Turing completeness](https://en.wikipedia.org/wiki/Turing_completeness). Mathematician and computer pioneer Alan Turing proved that a certain *minimal* level of complexity is required to have a machine that is capable of solving *any computable problem.* Such systems are called "Turing complete". In the real world, we're bound by finite memory sizes, but aside from that, all systems which meet Turing's *other* requirements are functionally equivalent. Elisp is such a system, and can therefore do anything that any other finite Turing system can do, as long as it doesn't bump up against memory limits (which really don't come up very often). So, to summarize, no. :) (ETA: Also, Elisp's memory limits depend on the underlying hardware. A 64-bit Emacs is capable of things a 32-bit Emacs cannot possibly do, but the language is the same. If 128-bit machines come out, Emacs should be able to run on them just fine and take full advantage. So, no, no foreseeable limits on Elisp.)
LordOfSwines · 2022-07-24 20:15
Even if you stopped using Emacs after learning ELisp you would then know Lisp and have the ability to easily pick up any other Lisp such as Common Lisp, Guile, Racket, etc.
00-11 · 2022-07-24 20:19
I'm thinking maybe another 20,000 years. But that's just a guess.
00-11 · 2022-07-24 20:21
Predicting the past is hard enough.
00-11 · 2022-07-24 20:22
Anecdotal evidence from one who's already wasted his limited lifespan on Elisp and Emacs: no regrets. YMMV.
yurikhan · 2022-07-24 20:34
Elisp *has been*, and *is* from time to time insufficient for extending Emacs. One of the recent examples was the JSON parser. It had been implemented in Elisp, and its performance left much to be desired when used in production for LSP. So it got reimplemented in C (actually, by linking in an external library). Another is `line-number-mode` which is implemented within the redisplay engine in C, as opposed to the slower Elisp-based `linum-mode` and `nlinum-mode`. But, for most editing tasks, Elisp is sufficient, and much easier to change, so most of Emacs is still in Elisp.
[deleted] · 2022-07-24 20:40
[deleted]
AwesomeGuy1990 · 2022-07-24 20:42
Indeed its track record is much better then some professionally developed IDE's
AwesomeGuy1990 · 2022-07-24 20:46
Interesting notion. I like the possibility to change the elisp to meet new needs. Did I understand it well, there is generally nothing you can't do with elisp? ( of course with extending it, or writing new libs)
Dom_Q · 2022-07-24 20:48
Turing-completeness is an extremely poor test of a programming language's usefulness. As others have pointed out, EMACS-Lisp, just like all Lisps, is a programmable programming language.
AwesomeGuy1990 · 2022-07-24 20:48
As I know almost nothing about elisp ( a newb of a few days) it is great that you mention the Turing completeness. It indeed signifies the completeness of language and the capacity to do whatever you want. Thx for a really awesome answer and the patience you showed in it.
AwesomeGuy1990 · 2022-07-24 20:50
A really awesome argument for learning elisp. As it doesn't presuppose that you need to stick with EMACS. Thx.
Dom_Q · 2022-07-24 20:50
Came here to say this. Have an upvote, as I'm too penny-pinching for a Reddit award (as I should, as an Emacs denizen)
MrTinyToes · 2022-07-24 20:51
Your own body will fail you, does that mean you should never exercise?
AwesomeGuy1990 · 2022-07-24 20:53
If I understand correctly we can always connect an external library and that one solves our need to extend Emacs. It's a cool little fact. Thx for this one.
Dom_Q · 2022-07-24 20:58
Concur. One could be excused for hating the surface syntax, but LISP macros are the killer feature that no mainstream language can seem to get right after, what, 50 years? This baffles me to no end. As far as essays are concerned, may I add a recommendation for [Lisp is ont an acceptable Lisp](https://steve-yegge.blogspot.com/2006/04/lisp-is-not-acceptable-lisp.html?m=1#:~:text=What%20amazes%20me%20is%20that,d%20all%20be%20using%20it.) by Steve Yegge?
AwesomeGuy1990 · 2022-07-24 21:07
Yes, you should exercise but in moderation, not at the expense of the other more important stuff. It's always the question of limited resources (like time). For example, I could study Vue.js more or some other programming topics instead of spending time with emacs or elisp. As I think studying BASIC programming language could be fun but without a practical outlook.
Rimbosity · 2022-07-24 21:37
Fantastic article.
funkiestj · 2022-07-24 21:44
Emacs is not written only in elisp. Things that need to be fast are written in C. Emacs lisp will never be the limiting factor for emacs. The limiting factor (IMESHO) is nobody wants to solve the **unsexy problem of package dependency hell**. Emacs lisp has plenty of legs. Package management his hard. anecdotes * I was using `magit`. I loved it. I moved to a new company and had to set it up again and I could not get it working. Magit is complex and depends on several other packages. Presumably I was getting the wrong versions of supporting packages * I wanted to use `gopls` \+ `lsp-mode` (and other related packages). I co worker gave me his working .emacs but again, lsp-mode (or one of the related packages like company for completion?) did not work In both the cases above I wasted a few hours debugging but was not able to get things working. If emacs loses market share (user base) it will because things like VSCode + the Golang plugin just work
[deleted] · 2022-07-24 21:51
[deleted]
janoc · 2022-07-24 22:19
Indeed. A Turing machine is also Turing complete (by definition) - and nobody sane would want to use a language like that. COBOL, Fortran and assembly language are also Turing complete. Turing completeness is the necessary condition for language usefulness (if it is not Turing complete it can't be used to solve certain types of problems) but by far not a sufficient one.
AuroraDraco · 2022-07-24 22:28
Heavily doubt it. The emacs user base really wouldn't like this and since Emacs is maintained mostly by the community it would be hard to do such a thing. Also, how many other editors do you know that have been around for 40 years. Not that many I suppose. And since Emacs survived 40 with elisp, it's not farfetched to assume that it will survive another 40 with the same
AuroraDraco · 2022-07-24 22:29
I get your point, but if one piece of software is very likely to not fail you, its Emacs. Its been around longer than most.
Uncle_DirtNap · 2022-07-25 01:19
Correct
HM0880 · 2022-07-25 01:52
Off-topic, but have you tried the built-in `vc-mode` for version control? The command `vc-dir` opens a Magit-like buffer.
funkiestj · 2022-07-25 03:16
I used a few commands from `vc-mode` (diff, annotate) but I haven't really dug in.
Schievel1 · 2022-07-25 04:16
Hm maybe yes. But only for a few edge cases. You clearly gotta ask if eMacs is extending into that direction anyway. Take https://github.com/org-roam/org-roam-ui for example. They made a graphical frontend with physics effects, 3D and everything. Anything is possible in elisp, it’s Turing complete after all. But I don’t think it’s easily possible like it is in JavaScript. So no 3D Games on emacs anytime soon. I can live with that.
Schievel1 · 2022-07-25 04:38
Almost every programming language today is Turing complete.
RecentlyRezzed · 2022-07-25 04:41
org-roam-ui indeed looks very nice. I hope someone will make it work with org-brain.
Schievel1 · 2022-07-25 04:44
Turing completeness doesn’t mean much when it comes to programming languages. Almost every language is Turing complete, so if you can simulate one with the other, why are there programming languages at all? Why are there computers and not just Turing machines? Or tunnels with crabs that are programmed with pictures of birds? (Sic, there is a paper proving that this is Turing complete) The answer is because you can *theoretically* do anything in any Turing complete language. But some languages are better to do a certain task than others. You don’t want to emulate classes and objects in a non OOP language for example. Sure it’s possible, but it’s not very practical. / here’s a link to said paper https://wpmedia.wolfram.com/uploads/sites/13/2019/01/20-2-2.pdf
nv-elisp · 2022-07-25 05:20
What package manager were you using?
perkinslr · 2022-07-25 07:09
To your edit: No. Elisp is a proper lisp. It is what other languages are transpiled into (the abstract syntax tree) before they are evaluated or compiled. There may come a time when the current implementation is too slow, and effort to speed it up is worthwhile. We see this in the gccjit work that compiles elisp to native code. There may be a time when emacs's elisp implementation must learn to *use* TCO. But none of those changes will break existing code.
Connect_Ad9657 · 2022-07-25 08:53
I think that learning a new programming language is not only giving you a new tool under your belt, but also is good "workout". The ability to learn new stuff needs to be maintained and this will do that. I also think that learning a new language will practice your general "programming knowledge". So even if you stop part way through and do not learn everything I think it will benefit you by broaden your view on programming and languages. With that said, your question I still valid since the spare time can be quite limited.
deaddyfreddy · 2022-07-25 13:15
> by Steve Yegge? the fun thing is Steve doesn't write in Lisp anymore
volhodav · 2022-07-25 13:36
No… Man, heck no! … I do believe you get your ass kicked for saying something like that! (Office Space, 1999)
funkiestj · 2022-07-25 16:42
nothing beyond the built in M-x list-packages `;;;; 2018-10-22, it has been a pain getting melpa-stable` `;;;; online. Looking at *Messages* I can see the gnu site is` `;;;; successfully accessed via the HTTP proxy but melpa-stable was` `;;;; not. The fix? Switch from using HTTPS to HTTP. NOTE the "gnu"` `;;;; repo has always been using HTTP.` `(require 'package)` `(add-to-list 'package-archives` `;'("melpa-stable" . "http://stable.melpa.org/packages/") t)` `; '("melpa" . "http://melpa.milkbox.net/packages/") t)` `;;; melpa.milkbox.net failed DNS today. reddit says they changed` `;;; it to melpa.org --abc 2020/08/17, 09:31` `'("melpa" . "http://melpa.org/packages/") t)` `;;;; melpa vs melpa-stable` `;; fred using milkbox.net/packages. His comment is` `;; "many packages won't show if using stable". Magit wont install` `;; from stable because stable only has let-alist-1.0.4 and magit on` `;; stable requires 1.0.5. Now magit (milbox.net) installs but doesn't` `;; actually work. All the functions error out. --abc 2020/07/20, 14:23` `(package-initialize)`
cerka · 2022-07-25 20:04
LaTeX is Turing complete too. But I’d rather not use a text editor written in LaTeX.
janoc · 2022-07-25 21:24
OTOH, writing a text editor (as opposed to a document) in LaTeX would certainly be an impressive achievement. (In other words - I am not quite sure what your point is ...)
cerka · 2022-07-25 22:31
My point is the same as yours. Turing completeness is not what makes Elisp good. Edit: But also yes, that would be impressive. My current favorite is the Mars rover written in TeX ([described from page 5 here](https://catonmat.net/ftp/typeclassopedia.pdf)).
Fun_Republic_1882 · 2022-07-25 23:59
Yes. Yuri already explained how C is used. But also take a look at EAF, emacs-ng, Guile Emacs, remacs. People began these projects because Elisp is not enough.