Does anybody have any experience with running Crystal in production?
I was just looking at Crystal the other day!
I thought this was a pretty good post about it and how it differs to Ruby: http://crystal-lang.org/2013/11/14/good-bye-ruby-thursday.html
I’m also surprised more people are not talking about it - it seems to be the closest thing to Ruby out there (that isn’t an official AltRuby)
If anybody is interested in current state of web frameworks in crystal.
Found these 2:
For the language itself, I think the creators made some benchmarks showing the performance against ruby etc.
The language itself is faster than ruby because it’s compiled.
Also found this benchmark: https://github.com/kostya/benchmarks
For the webframeworks I think manastech (the company behind crystal) is using frank for some of their api’s in production.
Thanks Benny - some interesting results there… Crystal sure is fast!!
Wonder where Elixir would be in it…
Nice one George. There are more differences in the link I posted (in post #2 - though I guess you’ve read it already).
I think it’s definitely worth keeping an eye on
I just watched this.
PolyConf 15: An Introduction to Crystal / Erik Michaels-Ober
I like that it runs/compiles Ruby code. … and it’s faster then ruby considerably.
Great talk that - wonder how it compares to Elixir.
Good to see Soundcloud using it
There are some good comments about Crystal here: https://www.reddit.com/r/programming/comments/30symw/crystal_rubyinspired_compiled_language/
Is this better in performance than Elixir?, besides Elixir compiles to BEAM and Crystal to LLVM, what are other advantages?.
We don’t have benchmarks against Elixir nor Erlang, so I can’t say anything about the performance. But since Crystal compiles to native code and Erlang/Elixir runs in a VM, my guess is that Erlang/Elixir is slower. But this is just a guess, and I’m sure in some benchmarks Erlang/Elixir will win, in others Crystal will win. But benchmarks aren’t very useful, real programs and how they behave is what matters.
One advantage of Crystal is that it is statically compiled. That means that you can’t have type errors. If I write a program 1.length I won’t be able to make an executable out of it, it won’t compile. In Elixir I can have String.length(1) in some part of my code, and I can have that running and as long as that path isn’t visited at runtime everything will be fine. But when it is visited, boom, error.
At least I feel this personally, but when I program in a dynamic language, unless I test everything, everything, I can’t be sure I won’t have an “undefined method ‘x’ for SomeType” at runtime, or some silly mistakes. With Crystal you can’t have these silly mistakes, which gives you a lot of confidence when your program compiles, and makes it easier to refactor your code, even if you don’t have tests for everything. Of course you can have type casts fail at runtime, like in other languages, but these are explicit and less often.
Another advantage is that it doesn’t need a VM. You compile the executable and that’s all you need (plus dynamic libraries if you use them). With Erlang you need to distribute the .BEAM but have the Erlang VM in that machine.
Yet another advantage is that there’s no VM boot time, so Crystal is ideal for writing command-line interfaces.
Of course dynamic languages have advantages too, you have to choose the right tool for the right job
I would love to see some comparable benchmarks with Elixir - could be a huge selling point for either language as I think both languages will appeal most to Rubyists.
Hi! ,I list up where the Crystal communities are, and more information about Crystal Lang
Have fun with Crystal!
Haven’t seen it, but another talk:
I tried the default http server (the API seems awesome and the language feels fast)
the starting time and request per second
i havent watched at the memory and cpu stats but it’s fast
“benchmark” mbp retina
go app in prod with some code in it
crystal default http server
linux ruby 2.1.6 (previous stable)
server puma (I will make a test on 2.2.2 unicorn too)
rack / roda (micro-framework like sinatra, improved routing and as lightweight as a rack app)
sinatra hello world
i don’t want to know - oh my activesupport - rails with actioncontroller::metal as default controller should go faster but not fast enough, you should unload activesupport from rails-api - Lotus maybe?
Hoop - build native Mac apps with Crystal
This video has some good information.
Ary Borenszweig & Juan Wajnerman - Crystal: a programming language for humans & computers - Curry On
This Christmas eve something curious happened: we were happily coding in Crystal when, one moment when we took our eyes away from the screen, a translucid figure appeared nearby. The entity approached and said: “I’m the Ghost of Christmas Past. Come with me.”
We saw ourselves coding a new language that would resemble Ruby but be compiled and type safe. At that moment the language was really like Ruby: to create an empty Array you would write , or Set.new to create an empty set. And we were happy, until we realized compile times were huge, exponential, unbearable, and got sad.
We spent an awful time trying to make it work with no avail. Finally, we decided to make a change: speficy the types of empty generic types, for example  of Int32 or Set(Int32).new. Compile times were back to normal. And we were kind of happy again, but at the same time felt that we were leaving behind some of Ruby’s feeling. The language diverged.
We looked back at the Ghost of Christmas Past to ask him what did all of that mean, but we found a similar but different figure in its place. She said: “I’m the Ghost of Christmas Present. Join me.”
There was a thread some time ago in crystal’s google group regarding it’s usage in production