Hammerspoon maintainer here - I'm enjoying reading all the comments, and hoping that everyone isn't going to be annoyed that I'm mostly working on a v2 atm, which switches from Lua to JavaScript :D
Hammerspoon
141–150 of 154 posts
Re: Hammerspoon
#142Earlier quoted context omitted.
Well, I guess the motivation (use a more easily integrated extension language) makes sense but ugh, Javascript is a dirty sack of sewage. I'd take a minor quibble with one of the Reddit commentators: > "Lua is a language that was built for people that are not programmers, and Hammerspoon (or at least building it's extensions) is targeted specifically at programmers." Hammerspoon[0] isn't targeted at programmers becau…
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…
> 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.
Re: Hammerspoon
#143Earlier quoted context omitted.
make caps lock control on hold, double quote on tap. Make control hyperkey on hold, angle bracket on tap. My keyboard firmware is very odd. This is not easily done with soft remaps to the point that I don't bother trying.
If you're on macOS have you tried Karabiner Elements? It seems to do just fine with software mapping my macbook keyboard.
Re: Hammerspoon
#144Re: Hammerspoon
#145Hammerspoon maintainer here - I'm enjoying reading all the comments, and hoping that everyone isn't going to be annoyed that I'm mostly working on a v2 atm, which switches from Lua to JavaScript :D
Do you plan to keep v1 for a while or to provide a way to translate all the current spoons for v2?
Re: Hammerspoon
#146Earlier quoted context omitted.
How does Hammerspoon help with this? Seems like just AppleScript and bash. Also if I may ask, how do you like Obsidian? I had never heard of it until now. Seems like a competitor to the Notes feature of iOS/macOS, but with its own subscription for syncing independently of iCloud?
I mean, in this case, the Hammerspoon part is really just the hyper keybind and the easy run of AppleScript text inline. But... once you've got some stuff going, it's easier to hook into Hammerspoon as the "frontend" for other things as your systems grow. Obsidian is good! This use of Bases is really my only "proprietary" use of anything Obsidian-specific. The rest is a combo of personal reference, brainstorms, intri…
Re: Hammerspoon
#147Earlier quoted context omitted.
I mean, in this case, the Hammerspoon part is really just the hyper keybind and the easy run of AppleScript text inline. But... once you've got some stuff going, it's easier to hook into Hammerspoon as the "frontend" for other things as your systems grow. Obsidian is good! This use of Bases is really my only "proprietary" use of anything Obsidian-specific. The rest is a combo of personal reference, brainstorms, intri…
Ah. Given the context, I had assumed it relied more on hammerspoon and less on applescript. I'm a bit less excited about it than I was, but I'll still look into doing similar sometime since I'm a habitual tab-opener.
Re: Hammerspoon
#148Hammerspoon maintainer here - I'm enjoying reading all the comments, and hoping that everyone isn't going to be annoyed that I'm mostly working on a v2 atm, which switches from Lua to JavaScript :D
Hmm I already avoid Lua by writing in Fennel, I’ll probably avoid the JS by writing… what Lisp compiles to JS, ClojureScript?
Re: Hammerspoon
#149Hammerspoon maintainer here - I'm enjoying reading all the comments, and hoping that everyone isn't going to be annoyed that I'm mostly working on a v2 atm, which switches from Lua to JavaScript :D
why not both? JS is a pragmatic choice 100x more devs understand though.
Things programmers believe. It's interesting how some knowledge fundamentally assumed by default. For whatever reasons, the notion is widespread. You're a programmer? Therefore you must know JS, SQL, Bash and Python. In practice, what I've found after decades working with various teams - most programmers have pretty inadequate knowledge of any of these things.
Re: Hammerspoon
#150Earlier quoted context omitted.
Hmm I already avoid Lua by writing in Fennel, I’ll probably avoid the JS by writing… what Lisp compiles to JS, ClojureScript?
Cljs setup for this case probably would require a bit of scaffolding. While using https://github.com/squint-cljs/squint perhaps would be pretty straightforward. Albeit you're gonna lose the type-safety guarantees - Clojure is strongly typed, and Clojurescript sometimes emits safer code than Typescript does (TS removes all the type-related data from the compiled .js code, while Cljs keeps the runtime checks in place).…