top | item 47016410

(no title)

freedomben | 15 days ago

> That said I'd have preferred something other than Lua if I had the choice.

Same. I know we as a community would never agree on what that language should be, but in my dreams it would have been ruby. Even javascript would have been better for me than Lua.

discuss

order

satvikpendem|15 days ago

Lua, especially with LuaJIT, is nearly as fast as C. I certainly don't want to have to run a slow language like Ruby or especially a full blown JS runtime like V8 just to run Vim, the entire point is speed and keyboard ergonomics, otherwise just use VSCode.

augusto-moura|15 days ago

You don't need V8 for running JS for scripting, you have quickjs[1] or mquickjs[2] for example. You might have problems importing npm packages, but as we can see from lua plugins you don't even need support for package managers. Performance is not as good as luajit, but it is good enough

[1]: https://bellard.org/quickjs/

[2]: https://github.com/bellard/mquickjs

freedomben|15 days ago

Quite a fair point! For intensive plugins and such, this would matter quite a bit.

comex|15 days ago

V8 is faster than LuaJIT. But sure, it has a large binary size.

godelski|14 days ago

  >  a full blown JS runtime
I absolutely hate all the random things that install npm on my machines

user3939382|15 days ago

Babashka! Super fast clojure/lisp.

elros|15 days ago

> Even javascript would have been better for me than Lua.

Why?

freedomben|15 days ago

Because I know javascript a lot more than I know Lua (and I suspect given js popularity, a lot of people are in the same boat). Yes Lua is easy to learn, but it's still different enough that there is friction. The differences also aren't just syntactically, it's also libraries/APIs, and more. I also don't have any need/use for Lua beyond neovim, so it's basically having to learn a language specifically for one tool. It's not ideal for me.

But the people who did the work wanted Lua, and I have no problem with that. That's their privilege as the people doing the work. I'm still free to fork it and make ruby or js or whatever (Elixir would be awesome!) first-class.

jitl|15 days ago

i’ve written probably north of a million lines of production js, maybe around 100,000 lines of production ruby, and about 300 lines of production lua. lua is a fun language and i think a much better fit than JS for technical reasons (who has a js engine that is both fast and embeds well? nobody), but i am certainly more productive in those other languages where i have more experience.

lua array index starting at 1 gets me at least once whenever i sit down to write a library for my nvim or wezterm.

MarsIronPI|15 days ago

Doesn't Vim support extensions written in several languages? Or was that removed in Vim 9?

chrisbra80|15 days ago

It still does, but those only work with a Vim built that has those interfaces compiled in.