5 ms·
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
by sdogruyol 8y ago
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-production https://github.com/crystal-lang/crystal/wiki/Used-in-product...
- abritinthebay 8y agoInteresting! I’m surprised you didn’t move to Elixir given the syntax similarities to Ruby
- RussianCow 8y agoElixir would probably not have been a huge improvement over Ruby if they switched languages for performance reasons. Elixir is great for many things, but raw number-crunching performance is not one of them.
- RX14 8y agoWhile elixir's syntax is inspired by ruby, the semantics are vastly different. That change in semantics is really good for elixir, because it means it can take advantage of the unique properties of the erlang vm, but it's worth noting that crystal is far far closer to ruby than elixir. For better and for worse.
- pmontra 8y agoThe syntax similarities between Elixir and Ruby stop as soon as one moves on from reading short blog post to writing real code. They are extremely different languages. Knowing Ruby helps only to remember the names of some standard library modules and functions, which were designed on purpose to match the name of the corresponding Ruby modules and methods, but not all of them. A vanilla example: $ iex > "1 2 3" |> String.split |> Enum.map(fn x -> String.to_integer(x) * 2 end) [2, 4, 6] $ irb > "1 2 3".split.map {|x| x.to_i * 2} [2, 4, 6] which by the way highlights the extra verbosity of Elixir compared to Ruby. It's less verbose on more complex examples, mainly because of pattern matching, but the proof would be too long for this reply.
- andyfleming 8y agoKotlin syntax: "1 2 3".split(' ').map { it.toInt() }
- yxhuvud 8y agoYour example doesn't do the same thing. The same as grandparent, in crystal: "1 2 3".split.map &.to_i.*(2)
- andyfleming 8y agoWhoops, you're right. "1 2 3".split(' ').map { it.toInt() * 2 }
- pmontra 8y agoI believe that Ruby also has that & shortcut (or similar) but it's totally unreadable. I never used it and I don't even want to check the exact syntax. Is it the only way it works in Crystal?
- yxhuvud 8y agoIt being readable is a matter of getting used to it. I find it more readable than the block version as there is less syntactic boilerplate. YMMV. Ruby has a similar version using colon instead of dot but that version isn't chainable and doesn't take arguments so it can't do the *2. And no, you can write out the full block just as you did in the Ruby version.
- abritinthebay 8y agoI hear this a lot but I keep seeing more and more Ruby devs moving to it trivially and as someone who reads-not-writes Ruby code I find it just as trivial to grok it. So I think the differences are there but they’re being overstated from a transfer of skills standpoint.
- pmontra 8y ago
- MaxBarraclough 8y agoWhat 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?
- nlh 8y agoI think many tens-of-thousands of developers would not agree that Ruby is obscure.
- rhencke 8y agoHow 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.
- MaxBarraclough 8y agoI didn't know it was that similar. Neat idea for a language. The 'Boo' language does the same for Python.
- AsyncAwait 8y agoI'd say Nim is for Python what Crystal is for Ruby.
- MaxBarraclough 8y agoOn closer inspection I agree - hadn't realised Boo uses the Common Language Infrastructure.
- RX14 8y agoProbably 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.