Hacker News new | ask | show | jobs
by cmsj 94 days ago
I'll happily agree that JavaScript is not a very nice language, but to be honest, I don't think Lua is a very nice language either. It's easy to embed in C though, which is why we were able to do all of the things that Hammerspoon does.

Where JS massively wins here, to my mind, is that there is so much tooling available for it, to the point that I'm already not actually writing my v2 config in JS at all, I'm writing it in TypeScript and compiling it to JS.

1 comments

Firstly, thanks for all the Hammerspoon work - it is a marvellous thing (and I'd love Apple to support something like it as an extension to OSA.)

> Where JS massively wins here, to my mind, is that there is so much tooling available for it

Yeah, I can see that being a big win for development and people already invested in the JS ecosystem.

(I'll stick with Hammerspoon v1 until it breaks and then figure something else out because it'll be a cold day in hell before I subject myself to JS/Node/Typescript again. The trauma runs deep and wide.)

> I'm already not actually writing my v2 config in JS at all, I'm writing it in TypeScript

Will give v2 a go with `lua2js`[0] transliteration and see if that's workable.

[0] https://github.com/xiangnanscu/lua2js