Anyone using Crystal in production? What do you use it for?
Crystal 0.25.1 released
31–40 of 154 posts
Re: Crystal 0.25.1 released
#32Earlier quoted context omitted.
Crystal has had concurrency, almost identical to goroutines, for a long time. It's just as if you're always running with GOMAXPROCS=1. And you can still get some excellent performance on IO bound workloads with a single core. The challenge is expanding what crystal is already good at to CPU bound parallelizable workloads by implementing parallelism. This work should be done before 1.0, we have a lot more resources to…
Thanks for the response. I'm no expert but when you have a server, would each request be handled concurrently by a separate thread (/fibre?)? So in that sense would the server's I/O be non-blocking? (I know each thread would be blocked as it waits for the response). Do you have a rough time frame for parallel concurrency? What's your view on the maturity of the language?
Unfortunately, I don't have a timeframe for parallelism, it's not my area of crystal and it's a fairly tricky issue.
My (biased, i'm a core developer) view on Crystal's maturity, after using it in a few of my own side-projects, is that once crystal code compiles, it runs pretty much rock solid in production. Compiler bugs are fairly rare too, although the compiler clearly isn't as mature as gcc. The main issue you face is lack of available libraries, and being forced to make a few changes every couple months when a new release comes out with breaking changes. Depending on the size of your codebase, that could be a big issue or it could be a 5 minute easy commit.
Re: Crystal 0.25.1 released
#33Crystal looks interesting although I decided to learn Golang instead. It's more mature and the WIP features described below made me cautious (i.e. what other features are immature). Anyone know when Crystal will get concurrency-a-la-golang? i.e. running concurrent processes in parallel? At the moment I think it's still single-threaded. https://crystal-lang.org/docs/guides/concurrency.html Still no windows support: ht…
What do you think of Nim?
Re: Crystal 0.25.1 released
#34Earlier quoted context omitted.
We use Crystal at RainforestQA to replace our heavy-load / slowish Ruby microservices. It's been great so far and we love it. We're also increasing the adoption to Crystal inside the organization. Also Crystal has a dedicated a wiki page for production users Used in production: https://github.com/crystal-lang/crystal/wiki/Used-in-product...
What drew you to Crystal? If you'll forgive the snark, you've moved from one obscure language, to an even more obscure language that even fewer developers know. What is it about Crystal that outweighs the very boring practical downsides of production use of obscure and immature languages?
https://medium.com/@yoelblum_45935/demand-for-ruby-on-rails-...
Re: Crystal 0.25.1 released
#35Anyone using Crystal in production? What do you use it for?
I'm not sure why anyone would actually use it in the current state, unstable, lack of libraries, lack of community and the biggest problem no multi-threading / windows support
Edit: Sails is not what it claims to be, and doesn't live up to the dream at all
Re: Crystal 0.25.1 released
#36Earlier quoted context omitted.
Thanks for the response. I'm no expert but when you have a server, would each request be handled concurrently by a separate thread (/fibre?)? So in that sense would the server's I/O be non-blocking? (I know each thread would be blocked as it waits for the response). Do you have a rough time frame for parallel concurrency? What's your view on the maturity of the language?
No, each request is handled concurrently in the same thread using evented IO. You spawn fibers, which are the analogue to go's goroutines, and many of those run in one thread. Just like nodejs (without callbacks/promises/async/await) and similar to go with GOMAXPROCS=1. Unfortunately, I don't have a timeframe for parallelism, it's not my area of crystal and it's a fairly tricky issue. My (biased, i'm a core developer…
I'm somewhat new to this so bear with me. With regards to the I/O, is it like node.js? i.e. all requests are handled inside a single thread (until Crystal gets parallelism) and when the thread waits for an I/O response (i.e. a database call), it will process some of the other requests?
Re: Crystal 0.25.1 released
#37Earlier quoted context omitted.
No, each request is handled concurrently in the same thread using evented IO. You spawn fibers, which are the analogue to go's goroutines, and many of those run in one thread. Just like nodejs (without callbacks/promises/async/await) and similar to go with GOMAXPROCS=1. Unfortunately, I don't have a timeframe for parallelism, it's not my area of crystal and it's a fairly tricky issue. My (biased, i'm a core developer…
Thank you for adding more color around Crystal. I'm somewhat new to this so bear with me. With regards to the I/O, is it like node.js? i.e. all requests are handled inside a single thread (until Crystal gets parallelism) and when the thread waits for an I/O response (i.e. a database call), it will process some of the other requests?
Re: Crystal 0.25.1 released
#38Earlier quoted context omitted.
What drew you to Crystal? If you'll forgive the snark, you've moved from one obscure language, to an even more obscure language that even fewer developers know. What is it about Crystal that outweighs the very boring practical downsides of production use of obscure and immature languages?
Probably because they loved the language. Humans are humans, and not everything is made with a rational financial decision. If you use the language, and like ruby and static typing, you'll find that there's a lot to love.
Humans aren't robots, but one's choice of development tools is steered by real forces, both technical and business. I don't see that whim, unconstrained by such forces, has any place in the decision. Same goes for curiosity.
If it were my decision to choose a language to use in production, I'd want to go with a safe boring choice like Python/Java. Mature and stable on lots of platforms, easy to hire for, plenty of libraries and tooling.
Taking a risk is sometimes the right thing to do, but I don't see choice of programming language as being one of those times.
It's not that I don't like neat languages like Crystal - I really do - and I'm certainly not trying to put them down. I just wouldn't want to try to argue to management that using it is in the company's best interest.
Re: Crystal 0.25.1 released
#39Earlier quoted context omitted.
What drew you to Crystal? If you'll forgive the snark, you've moved from one obscure language, to an even more obscure language that even fewer developers know. What is it about Crystal that outweighs the very boring practical downsides of production use of obscure and immature languages?
How is Ruby an obscure language...? Their developers are already proficient in Ruby. Crystal is a very, very close cousin of Ruby, syntactically and structurally. This isn't like jumping from Java to Haskell.
The 'Boo' language does the same for Python.
Re: Crystal 0.25.1 released
#40Earlier quoted context omitted.
What do you think of Nim?
No opinion as I didn't look at it. I was more focused on more mature languages and Crystal came up on my radar so I read around it.