
Evolution of Emacs Lisp [pdf] - tarsius
https://www.iro.umontreal.ca/~monnier/hopl-4-emacs-lisp.pdf
======
triska
Elisp is awesome! Emacs is truly an _integrated_ development environment also
thanks to this great extension language.

This paper provides a nice overview of past and also very recent language
developments. For example, support for _bignums_ (Section 7.3) is one of the
most exciting new features.

Thank you very much for putting this together, and for all your work on Emacs!

~~~
stiff
If you are used to any reasonably modern programming language, writing any
serious Elisp is an exercise in frustration, it is hard to even find out at
all how to accomplish basic things, and once you do, there are tons of
pitfalls, it is a legacy platform and it feels like its evolution over time
was largely accidental. I am talking about doing basic things, working with
lists, maps and strings, opening files, running processes, making HTTP
requests, etc.

For example, if you want to use a map, you have three choices: you can use
alists, plists or hash maps. There are no namespaces in Emacs Lisp, so for
each of the three data types you get a bunch of functions with weird names.
For alists get is assoc and set is add-to-list, for hash maps get is gethash
and set is puthash, for plists get is plist-get and set is plist-put. For each
of those types it is easy to find basic use cases that are not covered by the
standard library, plus it is easy to run into performance pitfalls, so you end
up rewriting everything several times to get something working. The experience
is the same across the board, when working with files, working with strings,
running external processes etc. There are 3rd party libraries for all those
things now because using the builtins is so painful. In many ways it feels
like programming some old web browser where you either need to patch the
standard libary with 15 dependencies or learn complicated incantations for
really basic tasks.

The ideas behind emacs and emacs lisp are great, so I really wish someone
succeeded in creating a modern implementation from scratch and it gaining some
traction, basically what Clojure did for Common Lisp. By the way even Common
Lisp is way more modern than Emacs Lisp...

~~~
nemo846
I believe there have been attempts at integrating GNU Guile (enabling the use
of Scheme) into it and replacing ELisp going forward.

The project seem dead in the water though.

~~~
vmsp
AFAIK the point wasn't to replace elisp. It was to replace emacs' interpreter
with guile's which also supports elisp.

------
nickdrozd
Emacs has a function for transforming a window of text under ROT13,
_rot13-other-window_. The Emacs manual [1] says, "For example, a review of a
film might use rot13 to hide important plot points." This example was added in
2012. The source code [2], on the other hand, gives a different use case:
"ROT13 encryption is sometimes used on USENET as a read-at-your-own-risk
wrapper for material some might consider offensive, such as ethnic humor."
This comment was added no later than 1992.

[1]
[https://www.gnu.org/software/emacs/manual/html_node/emacs/Rm...](https://www.gnu.org/software/emacs/manual/html_node/emacs/Rmail-
Rot13.html)

[2] [https://github.com/emacs-
mirror/emacs/blob/master/lisp/rot13...](https://github.com/emacs-
mirror/emacs/blob/master/lisp/rot13.el)

~~~
UncleEntity
Not really sure what your point is...

~~~
civility
I think the implication is that once upon a time, Emacs had a
comment/docstring which wasn't politically correct. Let the shunning or
boycotting begin...

------
DonHopkins
>During the early years of Emacs, the main complaints from users about the
simple mark&sweep algorithm were the GC pauses. These were solved very simply
in Emacs 19.31 by removing the messages that indicated when GC was in
progress. Since then complaints about the performance of the GC have been
rare. Most of them have to do with the amount of time wasted in the GC during
initialization phases, where a lot of data is allocated without generating
much garbage.

At 300 baud, I bet the GC messages took longer to display than the GC itself.

------
wiz21c
If you don't have time, just read the condlusion, it's _very_ inspiring for
all of us who are "individuals who code for the benefit of others"

------
josteink
Does anyone have a non-PDF version of this available?

PDFs are terrible on mobile.

~~~
michaelmrose
Check out moon reader pro which handles mobi/epub/pdfs/etc

------
antoineMoPa
I use emacs all the time, but I don't really extend it. More recent editors
are extensible via web tech such as javascript, which sadly often comes at the
price of having an electron base. Javascript does have the advantage that you
can console.log() everything and discover functions easily for a given object.
I still don't know how to discover stuff when I need it in elisp except M-X
apropos which often fails to find something useful.

~~~
tsuru
Do you use something like `counsel` or `helm`? I personally use `helm` and
have found `helm-apropos` to be a much better experience mainly due to fuzzy
matching. I'm sure there is a counsel analog.

Out of curiosity, do you happen to have an example of a search you've tried
that doesn't produce something useful?

~~~
antoineMoPa
Did not know about helm. I just installed it and I think that this alone might
solve 75% of the problem, thanks!

As an example, let's say I'm new to elisp and I am wondering how to insert a
character to a buffer. `apropos` "insert" just returns too much stuff. `heml-
apropos` seems much better though, with a readable output. However, you still
have to know that the function is named "insert", which you can spend lots of
minutes on. In a Javascript parallel universe, there is a high probability
that I would have done `console.log(buffer)` and I would have found the
`buffer.appendChars()` method in seconds. You can quickly find what you can do
with an object in Js/Python/PHP, but in elisp, I have yet to find.

~~~
dmortin
> Did not know about helm. I just installed it and I think that this alone
> might solve 75% of the problem, thanks!

Helm has a lot of extensions, here are some popular ones: [https://emacs-
helm.github.io/helm/#helm-applications](https://emacs-
helm.github.io/helm/#helm-applications)

> As an example, let's say I'm new to elisp and I am wondering how to insert a
> character to a buffer

You can use google as with any other software. If you search for 'elisp insert
character' with google the first hit is the insertion section of the manual
which tells you the functions:

[https://www.gnu.org/software/emacs/manual/html_node/elisp/In...](https://www.gnu.org/software/emacs/manual/html_node/elisp/Insertion.html)

As with any other software using google you can find things much more
efficiently than with the builtin searching functions.

~~~
antoineMoPa
The fact that google is your goto method shows that the discoverability is
poor. I could code in JS offline for hours if needed, because all the
information is there in the objects, but I would hit a wall in 5 minutes with
elisp because this "object oriented" concept and console.log(anyObject) simply
do not exist.

~~~
dmortin
I use google when coding JS code too, because completing functions of objects
for discovery is useful only in the more trivial cases. For anything non
trivial using google gives much quicker results than browsing any kind of
documentation.

In case of Emacs I use the manual as a reference (looking up things which I
already know about) and I use google for discovery of new elisp concepts.

------
pjmlp
Nice that they go over XEmacs time period, it was my favorite variant, as it
provided better GUI tooling support back then.

