Most active commenters

    ←back to thread

    Crystal 1.16.0

    (crystal-lang.org)
    131 points ksec | 19 comments | | HN request time: 0.208s | source | bottom
    1. satvikpendem ◴[] No.43650003[source]
    How has using Crystal been, anyone using it in production?
    replies(6): >>43650049 #>>43650404 #>>43650442 #>>43650678 #>>43651362 #>>43656180 #
    2. willmeyers ◴[] No.43650049[source]
    I believe Kagi (https://kagi.com/) uses a lot of it.
    3. pankajdoharey ◴[] No.43650404[source]
    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.
    replies(2): >>43650501 #>>43650603 #
    4. prh8 ◴[] No.43650442[source]
    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.
    replies(1): >>43650477 #
    5. rookderby ◴[] No.43650477[source]
    What was the library?
    6. nine_k ◴[] No.43650501[source]
    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.
    replies(3): >>43650521 #>>43650623 #>>43650647 #
    7. bendangelo ◴[] No.43650521{3}[source]
    It's Ruby like syntax is awesome. It reads like psuedo code.
    8. samuell ◴[] No.43650603[source]
    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...

    9. pankajdoharey ◴[] No.43650623{3}[source]
    My guess is LLVM. Crystal Uses LLVM for code generation while Go has their own compiler backend.
    replies(1): >>43650640 #
    10. Imustaskforhelp ◴[] No.43650640{4}[source]
    Go can also compile to llvm https://github.com/goplus/llgo Though I am not sure how fast it is.
    replies(1): >>43650959 #
    11. Imustaskforhelp ◴[] No.43650647{3}[source]
    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.

    replies(3): >>43650670 #>>43651285 #>>43651826 #
    12. pmarreck ◴[] No.43650670{4}[source]
    Roc?

    They're unfortunately in the middle of a compiler rewrite from Rust to Zig right now though

    13. the_third_wave ◴[] No.43650678[source]
    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

    14. pjmlp ◴[] No.43650959{5}[source]
    Doesn't look like it fully supports the language or ecosystem, with partial support for 1.21 version.
    15. shawabawa3 ◴[] No.43651285{4}[source]
    > 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?

    16. relistan ◴[] No.43651362[source]
    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.
    replies(1): >>43651368 #
    17. relistan ◴[] No.43651368[source]
    In case anyone asks, yes I did also test the Go version on a single core. It was slower than on multi-core.
    18. xigoi ◴[] No.43651826{4}[source]
    I think V might be what you’re looking for?
    19. compumike ◴[] No.43656180[source]
    Using it extensively in production at https://heiioncall.com/ . It’s a joy to work with. Fast to write AND fast to run. :)