At the bottom you will see the page rendered in 2 - 3ms or sometimes 800µs with Crystal. The page is quite literally bottlenecked by network latency.
Once Crystal Stablise, with Windows Support done and other bits and pieces. I hope the tooling and compiler speed gets more attention. It might became the perfect tools for most things.
I love this language but have never found a production use case for it, versus just using something less obscure like Go. It's the Ruby we wish we had in the 10s.
If you write some script that run for 30 minutes or so then Crystal is a great choice.
before using crystal I mostly used Ruby for scripting, but there were a lot of problems
- the program often crashes after running a while due to typo/nil handling, causing a lot of time wasting
- it was too slow for my case, which involving with dealing with large amount of data
- doing things in parallel (fetching websites, parsing multiple files) is a lot of work, you need to use external gems for the task, and it is not always the way you want it to do
there is a lot of works spent on crystal to make it enjoyable, you almost never need external libraries to do stuffs. the standard library is big and helpful.
I write a lot of Go. It’s great. CGo is also good. But Crystal is even more easily interoperable with C libs and has a slimmer runtime. It’s also even faster in my real world testing. Down sides vs Go are compiler speed and general ecosystem is much smaller. But I’ve written several things in Crystal in prod and it has been very good.
I really like Crystal, but I am too dependent on LSPs and such for productivity, and the Crystal LSP leaves a lot to be desired, even though it is fantastic work for what it is.
Can't rely on AI either, as it constantly confuses it with Ruby.
I did do a few backend/server code challenges and advent code in Crystal. It worked really well and was very powerful.
I would love to write my MMO server in it, but again, tooling is still a sore spot for me.
> I really like Crystal, but I am too dependent on LSPs and such for productivity, and the Crystal LSP leaves a lot to be desired, even though it is fantastic work for what it is. Can't rely on AI either, as it constantly confuses it with Ruby.
My initial thoughts when reading this statement were pretty negative, but thinking about it, you're onto something. If the language doesn't function well with today and tomorrow's prevalent and emerging development trends, it's probably not going to see truly significant momentum.
Nonetheless, I still find Crystal remarkable and elegant, with a great standard library.
Oh, I 100% agree with you. I love the stdlib and the language. Doing the few things I did in Crystal were so pleasant and a joy to work with. Maybe I'm too reliant on the crutches that I am uses to. It's not that I can't work without them, I just feel like why waste the time.
I will say, as a primarily Go dev, I have been really spoiled by the Go toolset and features.
>Can't rely on AI either, as it constantly confuses it with Ruby.
I'm currently using github copilot with claude 3.7, mostly for auto complete, work pretty well although sometimes it does return ruby variant of the code (it call the ruby methods that not existing in crystal)
> gc latency
I don't know, never care much about it, haven't cause any issue the 6 years I run my web services using Crystal.
> long running programs
depends, I write several services that running 24/7. Some runs fine for months, some just refuses to response after a few day. Too busy to track for the cause so I just automatically reset the affected services at 4AM.
I like reading manuals in pdf format here is none. The web documentation is very short, I imagine that when making any project there will be many details I should like to know, and it is very handy to have some pdf with complete documentation to avoid wasting time.
Also, it’s really cool to see them focusing on concurrency and parallelism. I hope some of that inspirations upstreams to Ruby (syntax wise, maybe not semantically).
One thing I really wish they implemented is making it possible for building standalone binaries that can be run cross-platform, or at least cross-compilation. That would be really cool, I would contribute to that issue if I had knowledge!
I used it in production for a client last yr and i compared that with a go implementation. The concurrency support of crystal on a 40 Core machine beast the socks off golang. Crystal both maxes out all the cores to a high degree, on file io and overall speed of execution. The time taken to do the same task Crystal; beats go by a significant margin while being so easy to write. And go is a easy language to write but Crystal is so much more easy to read because of Ruby syntax inheritance.
We use it to generate sitemaps with >30 million entries. Ported a Rails task that took ~9 hours to Crystal, using a library with the same API as the Ruby gem we had used. Essentially a copy-paste-tweak that took a couple hours of effort. Crystal version now runs in prod in about 30 minutes.
Have been using it in production for years for small projects. But also have a current, larger project in it that is going well. A few years ago I built a high throughput (20k shortens/s) link shortener for work, in Go. I later rewrote the main path in Crystal to test it for performance. It was a bit faster than the Go version (22k/s) on the same infrastructure… but running on a single core! We did not finish/ ship it, but it was revealing.
I love Crystal but I’m surprised at how nothing the WASM story is this late in the game. I’d love to run Crystal directly in the browser, especially given how web-focused they seem to be.
Also, windows support has been more or less “done” for a couple of years now, is the “preview” tag still necessary?
Anyone using it successfully on OS-less embedded systems? (microcontrollers or very small SBCs)
Crystal, and Zig for that matter, subsets could be interesting and more performing substitutes for Micropython where speed is vital and one still wants to keep on a higher level than ASM or C, however last time I checked there were only a few isolated experiments.
I implemented support for the `:showdoc:` directive - happy to answer any questions!
https://totalrealreturns.com
At the bottom you will see the page rendered in 2 - 3ms or sometimes 800µs with Crystal. The page is quite literally bottlenecked by network latency.
Once Crystal Stablise, with Windows Support done and other bits and pieces. I hope the tooling and compiler speed gets more attention. It might became the perfect tools for most things.
Really cool to see a language make concurrency and parallelism its primary goal, rather than an afterthought.
(yes I know erlang/elixir exists, but Crystal seems bent on being CPU-fast too!)
Nice to see, considering Crystal 1.0 didn't really have anything in the way of parallelism...
I love this language but have never found a production use case for it, versus just using something less obscure like Go. It's the Ruby we wish we had in the 10s.
If you write some script that run for 30 minutes or so then Crystal is a great choice.
before using crystal I mostly used Ruby for scripting, but there were a lot of problems - the program often crashes after running a while due to typo/nil handling, causing a lot of time wasting - it was too slow for my case, which involving with dealing with large amount of data - doing things in parallel (fetching websites, parsing multiple files) is a lot of work, you need to use external gems for the task, and it is not always the way you want it to do
there is a lot of works spent on crystal to make it enjoyable, you almost never need external libraries to do stuffs. the standard library is big and helpful.
I write a lot of Go. It’s great. CGo is also good. But Crystal is even more easily interoperable with C libs and has a slimmer runtime. It’s also even faster in my real world testing. Down sides vs Go are compiler speed and general ecosystem is much smaller. But I’ve written several things in Crystal in prod and it has been very good.
I really like Crystal, but I am too dependent on LSPs and such for productivity, and the Crystal LSP leaves a lot to be desired, even though it is fantastic work for what it is.
Can't rely on AI either, as it constantly confuses it with Ruby.
I did do a few backend/server code challenges and advent code in Crystal. It worked really well and was very powerful.
I would love to write my MMO server in it, but again, tooling is still a sore spot for me.
Relevant post on why Crystal doesn't have good tooling currently
https://forum.crystal-lang.org/t/why-isnt-there-an-lsp-for-c...
Thank you, I actually am aware of the post and follow all the projects with hope they succeed.
> I really like Crystal, but I am too dependent on LSPs and such for productivity, and the Crystal LSP leaves a lot to be desired, even though it is fantastic work for what it is. Can't rely on AI either, as it constantly confuses it with Ruby.
My initial thoughts when reading this statement were pretty negative, but thinking about it, you're onto something. If the language doesn't function well with today and tomorrow's prevalent and emerging development trends, it's probably not going to see truly significant momentum.
Nonetheless, I still find Crystal remarkable and elegant, with a great standard library.
Oh, I 100% agree with you. I love the stdlib and the language. Doing the few things I did in Crystal were so pleasant and a joy to work with. Maybe I'm too reliant on the crutches that I am uses to. It's not that I can't work without them, I just feel like why waste the time.
I will say, as a primarily Go dev, I have been really spoiled by the Go toolset and features.
>Can't rely on AI either, as it constantly confuses it with Ruby.
I'm currently using github copilot with claude 3.7, mostly for auto complete, work pretty well although sometimes it does return ruby variant of the code (it call the ruby methods that not existing in crystal)
but for my use case, copilot works pretty well.
Questions to anyone using Crystal in production:
* How is the GC latency, considering that Crystal uses the Boehm GC?
* Have you encountered any problems in long running programs due to the conservative nature of Boehm?
We wrote https://github.com/compumike/idle-gc to run GC when the long-running process is otherwise mostly idle. It’s been fine for us.
> gc latency I don't know, never care much about it, haven't cause any issue the 6 years I run my web services using Crystal.
> long running programs depends, I write several services that running 24/7. Some runs fine for months, some just refuses to response after a few day. Too busy to track for the cause so I just automatically reset the affected services at 4AM.
I really love Crystal, but always bummed that its web ecosystem doesn't perform as well as it should on benchmarks: https://www.techempower.com/benchmarks/#section=data-r23
I like reading manuals in pdf format here is none. The web documentation is very short, I imagine that when making any project there will be many details I should like to know, and it is very handy to have some pdf with complete documentation to avoid wasting time.
I couldn’t click on your link in the HN app.
Link to announcement: https://crystal-lang.org/2025/04/09/1.16.0-released
Also, it’s really cool to see them focusing on concurrency and parallelism. I hope some of that inspirations upstreams to Ruby (syntax wise, maybe not semantically).
One thing I really wish they implemented is making it possible for building standalone binaries that can be run cross-platform, or at least cross-compilation. That would be really cool, I would contribute to that issue if I had knowledge!
How has using Crystal been, anyone using it in production?
I used it in production for a client last yr and i compared that with a go implementation. The concurrency support of crystal on a 40 Core machine beast the socks off golang. Crystal both maxes out all the cores to a high degree, on file io and overall speed of execution. The time taken to do the same task Crystal; beats go by a significant margin while being so easy to write. And go is a easy language to write but Crystal is so much more easy to read because of Ruby syntax inheritance.
Can second about the concurrency syntax! Did a small comparison with Go a few years back [1].
I my tests I have got the feeling it is causing a lot less gotchas with blocking go-routines and such. Not sure why that is though.
Surprised to hear about the multi-core performance though! That is super interesting.
[1] https://livesys.se/posts/crystal-concurrency-easier-syntax-t...
What is the reason of such advantage over Go? The latter is known to be geared towards concurrency, and also for having a very fast GC.
My guess is LLVM. Crystal Uses LLVM for code generation while Go has their own compiler backend.
Go can also compile to llvm https://github.com/goplus/llgo Though I am not sure how fast it is.
Doesn't look like it fully supports the language or ecosystem, with partial support for 1.21 version.
It's Ruby like syntax is awesome. It reads like psuedo code.
man, I wish for something like crystal but with a little more golang like syntax.
I hate OOP though, I may be wrong but crystal afaik is OOP. I wish for a non OOP golang-esque crystal alternative.
> something like crystal but with a little more golang like syntax... I wish for a non OOP golang-esque crystal alternative.
I don't understand... Isn't that golang?
Roc?
They're unfortunately in the middle of a compiler rewrite from Rust to Zig right now though
I think V might be what you’re looking for?
We use it to generate sitemaps with >30 million entries. Ported a Rails task that took ~9 hours to Crystal, using a library with the same API as the Ruby gem we had used. Essentially a copy-paste-tweak that took a couple hours of effort. Crystal version now runs in prod in about 30 minutes.
What was the library?
I believe Kagi (https://kagi.com/) uses a lot of it.
Have been using it in production for years for small projects. But also have a current, larger project in it that is going well. A few years ago I built a high throughput (20k shortens/s) link shortener for work, in Go. I later rewrote the main path in Crystal to test it for performance. It was a bit faster than the Go version (22k/s) on the same infrastructure… but running on a single core! We did not finish/ ship it, but it was revealing.
In case anyone asks, yes I did also test the Go version on a single core. It was slower than on multi-core.
Using it extensively in production at https://heiioncall.com/ . It’s a joy to work with. Fast to write AND fast to run. :)
If you're running or using Invidious [1] - a YouTube proxy service - you're running or using Crystal.
[1] https://github.com/iv-org/invidious
I love Crystal but I’m surprised at how nothing the WASM story is this late in the game. I’d love to run Crystal directly in the browser, especially given how web-focused they seem to be.
Also, windows support has been more or less “done” for a couple of years now, is the “preview” tag still necessary?
May be time to dust off that raylib + crystal project and go try a game jam. I think I'll use this wrapper https://github.com/sol-vin/raylib-cr
Anyone using it successfully on OS-less embedded systems? (microcontrollers or very small SBCs) Crystal, and Zig for that matter, subsets could be interesting and more performing substitutes for Micropython where speed is vital and one still wants to keep on a higher level than ASM or C, however last time I checked there were only a few isolated experiments.
OK I have a new project starting and I'll try this for fun instead of the usual rust.
What kind of project do you plan to work on, is it a web app, if so what framework do you use for it in Rust