markdown guide
 

I've been working with Ruby for about 15 years now (since before Rails) and I'm really excited about Crystal. I've been playing with it for a while now to try to understand tradeoffs in static vs dynamic types a bit more. Having such a similar syntax and core/standard library allows for more direct comparisons than, say, comparing static types in Java vs dynamic types in Ruby.

After seeing how much more performant certain things can be in Crystal with drastically reduced memory usage, it's been making me want to port all my Ruby services to it. 😂

Another thing that I love in Crystal that I've been wishing for in Ruby for so long is spawn. Being able to spin off an async block that will clean itself up is just amazing.

 

I used Crystal in a small side project, in which I needed CPU intensive work to be done. I wrote my script as a Rake task in Ruby, then wrote my CPU intensive task in Crystal, compiled it, called it through Ruby's system call, using a library for parallelism called Parallel, since Crystal is still not able to do that (yet). all this while writing almost in the same language (syntax).

I would say it's a great combination, and would definitely migrate that side project completely to Crystal, once I can figure out a solution for parallelism (using all CPU cores at once).

 

i have already converted my old nodejs gameserver to crystal. now, i'm continuously adding more features which is a breeze. it's definitely worth it, and the community support is great too. if you ever run into an issue, there are so many channels to receive help. some are: gitter, official forum, dev.to, github, SO, etc. your question will basically never go unanswered or "unseen"! IMO, you got nothing to lose, give it a shot!

also, since you are a rubyist, you might find this helpful:

crystalforrubyists.com/

see you around!

Classic DEV Post from Dec 21 '18

What is the hardest thing about learning to code?

Coding is hard. I struggled to learn for the first several years because I wasn't active within the dev community. What was the hardest thing you've experienced on your coding journey?

Farhad Eyvazli profile image
Rubyist