from Hacker News

TimL: Clojure-like Lisp dialect that runs on and compiles down to Vimscript

by asimjalis on 5/26/23, 7:21 AM with 39 comments

  • by capableweb on 5/27/23, 12:06 PM

    Something similar: Fennel (https://fennel-lang.org/) is a lisp that compiles into Lua, which neovim can use as plugins, so you can write neovim plugins in a lisp. Aniseed (https://github.com/Olical/aniseed) makes this really easy.

    Aniseed is also used by Conjure (Interactive development environment for neovim, used for evaluating Fennel code inside of neovim), which is also made by the same author. Really great plugin for doing Clojure development with neovim. https://github.com/Olical/conjure

  • by obiefernandez on 5/27/23, 2:23 PM

    For maximum effect, read the following in Tim’s distinctive voice:

    “Is this a joke?

    If you mean the 6,000 lines of working code, then no, I poured hundreds upon hundreds of very serious hours into that. But if you're referring to the fact it's woefully underdocumented, adds considerable overhead to an already slow host platform, and ultimately unlikely to gain any traction, then yeah, probably.”

  • by EuAndreh on 5/27/23, 12:46 PM

    Any sufficiently complicated Vim configuration contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Emacs.
  • by imran-iq on 5/27/23, 1:13 PM

    This reminds me of a vim koan[0]:

    > Master Pope once dreamt he was an Emacs user. When he awoke, he exclaimed:

    > “I do not know if I am Tim Pope dreaming I am an Emacs user, or an Emacs user dreaming I am Tim Pope!”

    ---

    0: https://blog.sanctum.geek.nz/vim-koans/

  • by ykonstant on 5/27/23, 12:35 PM

    Is there anything like this on the works for Vimscript 9?

    Tangentially related: asking around in fora and in person, I was surprised to see that many plugin writers have had very good experience with the new Vimscript, and even prefer it to the more general purpose Lua (I was expecting the opposite). I myself have not used any Vimscript, but I am tempted to take a look at the new language.

  • by omoikane on 5/27/23, 8:00 PM

    ELVM might be a related project, which takes C code and compiles to various languages, including VIM.

    https://github.com/shinh/elvm

  • by ducktective on 5/27/23, 1:00 PM

    How difficult is it to write an "Emacs Lisp" interpreter in a foreign framwork like neovim? Wouldn't this basically convert any IDE into Emacs if the user wants it?

    I mean, I know elisp is not the most efficient of Lisp compilers but doing so for a new IDE opens the door for all available codes and plugins people have written for emacs throughout the years.

  • by ReleaseCandidat on 5/27/23, 12:39 PM

    There are things I'll never understand. Why would anybody do this? Why Clojure and not Emacs Lisp?
  • by edoloughlin on 5/27/23, 1:17 PM

    Can anyone see how to start the repl?
  • by msla on 5/27/23, 11:42 PM

    If we implement TECO in this, do we break the Matrix?