This was amusing in a good way. I did write a few parsers in Ruby back in the day, the experience taught me that we already have the best syntax possible at our disposal, why not just lean on it. You get so much more when you don't have to leave Ruby. I find myself reaching for a DSL whenever I have to deal with a lot of less-expressive code / configuration.
I'll write generators that take a DSL as input and spit out the mountain of boring stuff. Last time was to deal with keyd's[1] homegrown syntax, which is powerful, but not expressive. I made a gist for the curious.[2]
Before finding keyd, I also took this approach with Xbindkeys config, and was on my way to wrapping Kubernetes in nice, friendly Ruby before I got canned.
vinceguidry•1h ago
I'll write generators that take a DSL as input and spit out the mountain of boring stuff. Last time was to deal with keyd's[1] homegrown syntax, which is powerful, but not expressive. I made a gist for the curious.[2]
Before finding keyd, I also took this approach with Xbindkeys config, and was on my way to wrapping Kubernetes in nice, friendly Ruby before I got canned.
1. https://github.com/rvaiya/keyd
2. https://gist.github.com/VinceGuidry/e85fa37e3e60f2dcb63c051c...