←back to thread

511 points mootrichard | 2 comments | | HN request time: 0s | source
Show context
davidkellis ◴[] No.23990278[source]
At some point it makes more sense to switch to Crystal.
replies(4): >>23990354 #>>23990622 #>>23990686 #>>23990838 #
loktarogar ◴[] No.23990838[source]
Crystal is pretty unstable at the moment (in that it changes often). I have a very small project in crystal (discord bot with only a couple of commands that CRUDs a database). Every time I deploy to heroku, if heroku updated crystal, the bot breaks. I have to spend an hour determining what broke. The language changes so often that either I update with heroku or I can't use any newer libraries for development.

And then you get stuck in very opaque error loops with the typing where it's expecting eg. a Number. no, not that number, a different type of number. no, not that type either. no, not that type. Most the code i've written has been typecasting.

Crystal does have some significant benefits over Ruby (which is why i'm using it - better memory use, better for scaling for my purpose) but I just spent time rewriting the non-user facing, non-scaling part of the bot in Ruby so I could actually get stuff done instead of fighting the language.

Of course a lot of this might be my inexperience with Crystal, but as a Ruby dev for 13 years, it's not as easy as just switching over from Ruby to Crystal. I've had this bot running 4 years and it hasn't got any easier for me.

replies(2): >>23991030 #>>23991058 #
kgraves ◴[] No.23991058[source]
> Crystal is pretty unstable at the moment (in that it changes often)

This had never been my experience, I have a server written fully in crystal running in production serving millions upon millions of requests on heroku and crystal doesn't break a sweat.

Quite happy with it so far.

replies(1): >>23992088 #
loktarogar ◴[] No.23992088[source]
I touched on performance later on - and it's the primary reason I use crystal. I mean more than the language's API changes often.
replies(1): >>23992336 #
1. kgraves ◴[] No.23992336{3}[source]
stability of the language is their next goal.
replies(1): >>23992472 #
2. loktarogar ◴[] No.23992472[source]
sure, and I hope it gets there soon, but it's not there yet, which was the real point of my answer to "why not just use Crystal"