Hacker News new | ask | show | jobs
by mauricio 2180 days ago
We run it in production. Our apps are mostly Ruby but we have been rewriting services in Crystal. Originally we were attracted by the speed and type checks, but one surprising benefit has also been the reduced memory consumption. It's difficult to compare directly, but in some cases it cosumes 10x less memory and performs around 20-35x better. Even I/O bound services are sped up since we can take advantage of Crystal's concurrent fibers (rumored to come in Ruby 3.0).

The main downside has been the somewhat frequent deprecations of methods and changes to the standard lib. But it's mostly due to the preparation to launch 1.0.

2 comments

Is there any web framework for it, like rails? That's really the main reason I use ruby is because as a single developer it's amazingly fast to set up new apps (admin panels, reporting panels, sales funnels, etc). The out-of-the-box functionality of rails makes this super painless. I'd LOVE to use something faster but I don't really want to have to custom write a lot of things (CSRF, sessions, cookies, blah blah).

Also, how do you handle jobs with Crystal? Sidekiq being the common one for ruby.

Hello! I'm the creator of the Lucky web framework https://luckyframework.org. I've been building it for about 3 years and we've got a number of people using it in production.

It still lacks some features found in bigger frameworks, but is nearing 1.0 and gaining many new contributors that are helping us fill in the gaps.

Feel free to hop on our chatroom to ask questions about it. We try to be super friendly and love answering questions and getting feedback https://gitter.im/luckyframework/Lobby

Awesome, thanks!! What would you say the top 2-3 missing things are currently?
Right now I'd say we need to make it easier to work with nested params so you can easily save Parent + (n) children. Easier handling of uploaded files is another big one. It's being actively worked on right now. There are a few more escape hatches that are needed when you need to break out of the framework. But overall it is fairly full featured.

You can check out our roadmap to 1.0 here: https://docs.google.com/document/d/1EYzx37Kq5h7iLH9SQTFyXNwb...

There are a couple but I think the most Rails-like are Amber or Lucky: https://amberframework.org/ https://luckyframework.org/

There's also sidekiq.cr from the same person who made Sidekiq for Ruby: https://github.com/mperham/sidekiq.cr

I just dont think Amber or Lucky's ORM are anywhere near as good / clear / concise as ActiveRecord.

But both are still very early stage of dev. Is Amber still being developed?

Edit: Looks like Amber had a new release a few days ago, and GitHub got a new design?

author of Lucky here. Would love to hear what you don't like about Lucky's ORM (Avram). It is not quite as feature complete as ActiveRecord, but in some ways it has more features (like being able to do more advanced queries in Crystal `>`, `ILIKE`, etc.
clear is also an ORM you could check out.

https://clear.gitbook.io/project/

Kemal is Sinatra-like: https://kemalcr.com/
I really liked amber, very similar to rails. Lucky is a bit more different so a bigger learning curve coming from raila
Another downside is the long compile times.