• by compumike on 4/11/2024, 3:47:11 AM

    Beautiful, thank you. Consider posting this on the Crystal community forum https://forum.crystal-lang.org/ as well!

  • by raffraffraff on 4/11/2024, 5:09:31 PM

    So ruby fans want Crystal to get more publicity and python fans want Nim to get more.

    Has anyone used both in any serious project, and if so can you compare? I've spent a tiny amount of time with Nim but found documentation, training videos, books etc extremely thin on the ground. Lots of Nim projects on github are ancient and haven't been updated in years. Chat GPT never gave me working code. How is Crystal in this regard? How would you compare their std libraries and available modules?

  • by Alifatisk on 4/11/2024, 9:34:18 AM

    I read that during the first run, it will be slower because of the crystal code being compiled. Is the compiled code stored somewhere?

    I am asking this because in that case, can’t I run it myself and share the code with the precompiled parts so others don’t have to experience the slow start?

  • by bhaney on 4/11/2024, 2:22:53 AM

    Wonder if it would be possible/useful to have the Ruby interpreter itself identify eligible functions and "crystalize" them automatically

  • by edvinbesic on 4/11/2024, 2:19:34 AM

    What is the current state of crystal toolchain? Last time I used it I really enjoyed the language but the compilation times were a bit of a turn off.

  • by Wouterken on 4/12/2024, 9:10:07 AM

    Hey HN,

    Author of the gem here. Appreciate the attention!

    I hacked this together last weekend to scratch an itch and have some fun. This got a lot more attention than I was expecting so early on.

    I've had to scramble a bit to start hammering this into something that's less prototype, more legitimate project. I hope it's now close to a cohesive enough state that someone trying it out will have a relatively smooth experience.

    Given the interest, I definitely plan to sink a bit more dedicated time into this project, to tick off a few key missing features and add some polish. It would be great to see it grow into something that can be useful to more than just me. Seems like there's definitely some shared desire for this type of tool.

    It probably goes without saying that you probably shouldn't convert large amounts of mission critical code to depend on this (for now).

    It's still early days and the API hasn't been "crystallized" yet...

  • by SuaveSteve on 4/11/2024, 4:17:35 PM

    Hopefully this raises awareness of Crystal!

  • by MatmaRex on 4/11/2024, 2:31:28 AM

    Everything old is new again… https://github.com/seattlerb/rubyinline (2002)

  • by yxhuvud on 4/11/2024, 5:28:27 AM

    Very, very impressive. It will be very interesting to see how much of crystal is supported, of IO and fibers and gc etc.

  • by nomilk on 4/11/2024, 3:31:52 PM

    Ha. TIL you can do 1_000_000.times do ... (equivalent to 1000000.times do ...). That's really nice.

  • by transfire on 4/11/2024, 6:09:04 PM

    Awesome! I’ve been waiting to see if someone would eventually do this. With further refinement this could be a big deal for Ruby. No more “Ruby is too slow”, when you can Crystalize your bottlenecks.

    One feature it seems to lack is the ability to crystalize instance methods?

  • by unixhero on 4/11/2024, 12:52:25 PM

    I wish I was a Crystal developer

  • by Ocha on 4/11/2024, 2:35:34 PM

    This is such a well thought out project. Very excited about it. Great work!

  • by theappsecguy on 4/11/2024, 11:28:25 PM

    This could honestly be huge for some Rails speedup

  • by deedubaya on 4/11/2024, 2:11:43 AM

    Neat!