[HN Gopher] A rabbit hole full of Lisp
       ___________________________________________________________________
        
       A rabbit hole full of Lisp
        
       Author : mpereira
       Score  : 107 points
       Date   : 2021-01-13 10:43 UTC (12 hours ago)
        
 (HTM) web link (www.murilopereira.com)
 (TXT) w3m dump (www.murilopereira.com)
        
       | jimmyvalmer wrote:
       | tldr -- Author is inexplicably surprised how slow retrieving a
       | directory listing of 70,000 files is over ssh. He installs a fast
       | version of UNIX `find` on remote machine, and writes an elisp
       | wrapper around an rpc to it.
       | 
       | "Rabbit holes" suggest a circuitous journey towards a deceptively
       | simple goal fraught with red herrings and wrong turns. Author
       | appears to be under illusion that reading a play-by-play of that
       | laborious process is somehow entertaining or rewarding.
        
       | edeion wrote:
       | This article can be seen as an introduction to emacs hacking. It
       | features profiling, hooks, advice, and more emacs developer
       | tricks. I haven't read it fully yet but this looks like a nice
       | way to get to know emacs deeper.
        
       | travv0 wrote:
       | I use Emacs pretty casually, so it's cool to see the thought
       | process of someone that actually knows their way around it when
       | customizing it.
        
       | macintux wrote:
       | Extensive discussion about the longer piece of which this is a
       | subset: https://news.ycombinator.com/item?id=25622756
        
       | DDSDev wrote:
       | Learning the concepts and ideas behind lisp really expanded my
       | horizons as a programmer. For me, that all started with emacs.
       | Though elisp isn't very fast and has some pain points, emacs as a
       | whole gave me an extremely established customizable code base
       | that I could play around and learn in.
       | 
       | Though it's cliche and often listed as a negative, emacs really
       | gives the user more than just a program to edit text.
        
         | patrec wrote:
         | > Though it's cliche and often listed as a negative, emacs
         | really gives the user more than just a program to edit text.
         | 
         | I would not recommend emacs as an editor these days to most
         | developers, but it absolutely still remains one of the most
         | visionary and well thought out pieces of software ever written.
         | It is both hilarious and depressing how emacs has been
         | literally decades in the future over all of its 45 years of
         | existence, without even the most obvious clearly superior
         | aspects diffusing into the sea of idiocy surrounding it at a
         | rate faster than one or two decades per feature.
         | 
         | Not everything about emacs is great, or even were great,
         | without downside (for example the extreme malleability and
         | customizable bring a raft of problems as well). But a couple of
         | things really were and in some cases still are just _obviously_
         | , massively, better without the rest of the world being in any
         | seeming hurry to adopt them.
         | 
         | Incremental search is the prime example. It has finally become
         | ubiquitous, and yet Emacs was basically the only thing that had
         | it for well over a quarter century. As Raskin quipped in The
         | Humane Interface (2000), search is either incremental or
         | excremental (unfortunately he seemingly also tried to steal the
         | credit -- he had an interesting mode-less variant of
         | incremental search in Copy Cat which deserves notice, but it
         | still postdated emacs by quite a few years, and I've never seen
         | him acknowledging emacs as prior art). So I would really love
         | to understand why neither netscape or basically anything else
         | in the 90ies had incremental search, despite often being
         | written in large parts in emacs by people living and breathing
         | emacs such as JWZ.
         | 
         | And to this day emacs remains one of very few programs with a
         | proper (i.e. non-linear) undo system or a clipboard not
         | suffering from severe dementia, or the ability to actually ask
         | "what happens when I click here?".
        
         | dmortin wrote:
         | I don't have anything against Lisp, I program Emacs with it,
         | but wouldn't you get mostly the same features if Emacs used
         | Javascript for its programming, for example?
        
           | timonoko wrote:
           | There are plenty of Emacses programmed in C-like languages.
           | Oldest I can remember was Epsilon. "Epsilon was first
           | released in 1984, long before Emacs was available on personal
           | computers, and modestly priced, so it provided an attractive
           | alternative to the usual DOS editors for those accustomed to
           | Emacs."
        
             | timonoko wrote:
             | Correccion:"Programmed" in C, but "programmable" in EEL,
             | simplified C-language.
        
           | Jtsummers wrote:
           | I've been pondering this for a while. I think you _could_
           | have a JS-based editor that approaches or achieves what emacs
           | offers, but I haven 't encountered it. One useful thing about
           | emacs and elisp is that lisp is one of the primary modes of
           | interaction for users, whereas (IME) many JS-based editors
           | seem to hide JavaScript from you to some extent.
           | 
           | Not in the sense that it's not there, or that there's a
           | second language that the JS interprets. But when you open
           | emacs without specifying a file to open you are dropped into
           | a buffer called *scratch* which lets you directly executed
           | elisp code. It really is a central part of the experience of
           | using emacs. Similarly, your configuration file(s) are
           | written in elisp, versus often a subset of JavaScript
           | (perhaps JSON) used in JavaScript-based editors. And you're
           | not just supplying configuration _data_ , but _extending_ the
           | program.
           | 
           | And then there's completeness. While emacs has parts written
           | in C, that portion really exists to enable elisp. Essentially
           | every capability of the editor is directly reachable through
           | lisp. The same doesn't seem (or at least feel) true of
           | JavaScript-based editors I've tried. In those, it often feels
           | more like the creators have selected a portion of the
           | internals to expose to users, but it's more the minimal
           | amount needed rather than the maximal amount possible that
           | emacs strives for.
           | 
           | EDIT: I've finally figured out how to insert an asterisk
           | around a word on HN without needing spaces. Is this
           | documented anywhere? Just use double asterisks on either end
           | like                 **foo**
           | 
           | *foo*
           | 
           | Turns out this is in the FAQ, it's been a while since I
           | looked at the formatting part of that so I guess it changed
           | since 10 years or so ago or I'd forgotten.
        
           | DDSDev wrote:
           | I think this is a good counter point, which is why I made a
           | version of emacs fully scriptable from javascript and
           | typescript [0]
           | 
           | [0] https://github.com/emacs-ng/emacs-ng Disclosure I've
           | posted about this on HN in the past, but I felt it was very
           | relevant to the parent comment.
        
           | codemonkey-zeta wrote:
           | Macros and symbols (even though he technically has Symbols)
           | come to mind as indispensable aspects of elisp which cannot
           | be replicated in JavaScript. Ignoring the fact that Emacs
           | predates JavaScript significantly of course.
        
             | tarruda wrote:
             | Aren't macros a just form of code generation?
        
               | mpereira wrote:
               | Hey Thiago!
               | 
               | You are mentioned in the essay that contains the article
               | in this HN post btw :)
               | 
               | Check out the Neovim section in
               | https://www.murilopereira.com/how-to-open-a-file-in-
               | emacs/#t...
        
       | samstave wrote:
       | Its too bad you didnt title it:
       | 
       | (((a rabbit hole of lisp)))
        
         | jinwoo68 wrote:
         | Rather (of (rabbit hole) lisp) ?
        
           | felixr wrote:
           | I think it should be                  (of lisp (hole rabbit))
        
             | samstave wrote:
             | haha... I havent written any lis since 2000 or so.... so I
             | forgot any proper format...
             | 
             | edit: Why TF was this flagged???
        
               | sidpatil wrote:
               | https://en.wikipedia.org/wiki/Triple_parentheses
        
       ___________________________________________________________________
       (page generated 2021-01-13 23:00 UTC)