Hacker News new | past | comments | ask | show | jobs | submit login

Not at the moment. About a year ago I did a proof of concept that replaced ActiveSupport's Inflector module with a fully working Crystal version, which was then compiled as a native extension. Since then, language changes have broken the way that I had things hooked up, although it was suboptimal anyways.

There is another strategy using macros, which is much better. I wasn't familiar enough with macros when I first tried it, which is why it was a bit hacky.

Crystal's core team has plans for a DSL to do this, so there will surely be something nice in the future. It's definitely feasible, and the performance was decent.

If you're interested (just remember mine's broken with current Crystal), my work is https://github.com/phoffer/crystalized_ruby and a macro approach is demonstrated at https://github.com/spalladino/crystal-ruby_exts




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: