TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Embed Crystal code directly in Ruby

211 pointsby FrancoisBosunabout 1 year ago

15 comments

compumikeabout 1 year ago
Beautiful, thank you. Consider posting this on the Crystal community forum <a href="https:&#x2F;&#x2F;forum.crystal-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;forum.crystal-lang.org&#x2F;</a> as well!
raffraffraffabout 1 year ago
So ruby fans want Crystal to get more publicity and python fans want Nim to get more.<p>Has anyone used both in any serious project, and if so can you compare? I&#x27;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&#x27;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?
评论 #40010208 未加载
评论 #40004762 未加载
Alifatiskabout 1 year ago
I read that during the first run, it will be slower because of the crystal code being compiled. Is the compiled code stored somewhere?<p>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?
评论 #40003213 未加载
评论 #40002401 未加载
评论 #40002617 未加载
bhaneyabout 1 year ago
Wonder if it would be possible&#x2F;useful to have the Ruby interpreter itself identify eligible functions and &quot;crystalize&quot; them automatically
评论 #39998874 未加载
评论 #39997915 未加载
评论 #40001282 未加载
edvinbesicabout 1 year ago
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.
评论 #39998226 未加载
评论 #39998389 未加载
评论 #40009138 未加载
评论 #40001527 未加载
Wouterkenabout 1 year ago
Hey HN,<p>Author of the gem here. Appreciate the attention!<p>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.<p>I&#x27;ve had to scramble a bit to start hammering this into something that&#x27;s less prototype, more legitimate project. I hope it&#x27;s now close to a cohesive enough state that someone trying it out will have a relatively smooth experience.<p>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&#x27;s definitely some shared desire for this type of tool.<p>It probably goes without saying that you probably shouldn&#x27;t convert large amounts of mission critical code to depend on this (for now).<p>It&#x27;s still early days and the API hasn&#x27;t been &quot;crystallized&quot; yet...
SuaveSteveabout 1 year ago
Hopefully this raises awareness of Crystal!
MatmaRexabout 1 year ago
Everything old is new again… <a href="https:&#x2F;&#x2F;github.com&#x2F;seattlerb&#x2F;rubyinline">https:&#x2F;&#x2F;github.com&#x2F;seattlerb&#x2F;rubyinline</a> (2002)
评论 #39997903 未加载
评论 #40001190 未加载
评论 #39999652 未加载
评论 #40001431 未加载
yxhuvudabout 1 year ago
Very, very impressive. It will be very interesting to see how much of crystal is supported, of IO and fibers and gc etc.
评论 #39999572 未加载
nomilkabout 1 year ago
Ha. TIL you can do 1_000_000.times do ... (equivalent to 1000000.times do ...). That&#x27;s really nice.
评论 #40004665 未加载
评论 #40003935 未加载
transfireabout 1 year ago
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.<p>One feature it seems to lack is the ability to crystalize instance methods?
unixheroabout 1 year ago
I wish I was a Crystal developer
评论 #40002956 未加载
Ochaabout 1 year ago
This is such a well thought out project. Very excited about it. Great work!
theappsecguyabout 1 year ago
This could honestly be huge for some Rails speedup
deedubayaabout 1 year ago
Neat!