Live data from Hacker News

Embed Crystal code directly in Ruby

github.com

1–10 of 65 posts

Re: Embed Crystal code directly in Ruby

#7
post #6

Everything old is new again… https://github.com/seattlerb/rubyinline (2002)

Yes the idea isn't terribly new, but this implementation is significantly more elegant (and ruby-ish) thanks to what looks to be a great design and the capabilities of Crystal. rubyinline is neat but honestly not something I'd seriously consider using in a production project. I need to try out crystalruby before I have an opinion on that, but it looks very promising!

Re: Embed Crystal code directly in Ruby

#8
post #4

Wonder if it would be possible/useful to have the Ruby interpreter itself identify eligible functions and "crystalize" them automatically

It would definitely be possible, but I would really hate to see coupling like that added to ruby. I also worry that it would make it too magical and difficult to figure out what code is running, where and when. Debugging an issue deep in the bowels of that is a scary thought.

Re: Embed Crystal code directly in Ruby

#9
post #4

Wonder if it would be possible/useful to have the Ruby interpreter itself identify eligible functions and "crystalize" them automatically

It would definitely be possible, but I would really hate to see coupling like that added to ruby. I also worry that it would make it too magical and difficult to figure out what code is running, where and when. Debugging an issue deep in the bowels of that is a scary thought.

> to ruby. I also worry that it would make it too magical and difficult to figure out what code is running, where and when

Coming from both python and statically-typed languages, your description 100% squares up with every experience I've had with ruby

Folks are free to throw stones at the Spring Framework similarly, it's not out of bounds, but ruby seems to embrace the monkeypatch

Post reply on HN