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.

Building a Command-Line Application with Crystal

99 pointsby willlllabout 8 years ago

6 comments

neovintageabout 8 years ago
I&#x27;ve spent a number of years using ruby and I got super excited about the potential of Crystal about a year ago. The notion that I can use a Ruby-like syntax and ship a binary to deploy my web apps was killer. But, a year ago the language was a bit rough, and to some extent, it still is. The team behind it is open about their goals and it blows me away with how much changes on a <i>daily</i> basis for a team of their size. Hopefully, the crystal team can set out to complete what they set their sights on for 2017[1]. That would really round out the feature set for a 1.0 release.<p>I think what I like the most is the community is willing to help you out. Although, nowadays a strong community is what makes or breaks a language.<p>[1] <a href="https:&#x2F;&#x2F;crystal-lang.org&#x2F;2016&#x2F;12&#x2F;29&#x2F;crystal-new-year-resolutions-for-2017-1-0.html" rel="nofollow">https:&#x2F;&#x2F;crystal-lang.org&#x2F;2016&#x2F;12&#x2F;29&#x2F;crystal-new-year-resolut...</a>
throwaway7645about 8 years ago
Anyone compare Nim to Crystal? Both are AOT languages with syntax inspired by dynamic languages (Python &amp; Ruby). Nim transpiles to C and Crystal uses LLVM. I&#x27;ve been playing with Nim, but I have a feeling Crystal will catch on quicker.
评论 #13946151 未加载
评论 #13945867 未加载
name_for_nowabout 8 years ago
Hmm, seems like the author either does not know about JSON.mapping [0] or just chose not to use it. Honestly, the corresponding macro for YAML is the main reason I use Crystal for CLI apps since it comes with the stdlib. YAML is easy enough to write quickly that I don&#x27;t have to do too much with option parsing. Plus you can just use your editor rather than the shell.<p>[0] <a href="https:&#x2F;&#x2F;crystal-lang.org&#x2F;api&#x2F;master&#x2F;JSON.html#mapping%28properties%2Cstrict%3Dfalse%29-macro" rel="nofollow">https:&#x2F;&#x2F;crystal-lang.org&#x2F;api&#x2F;master&#x2F;JSON.html#mapping%28prop...</a>
评论 #13946180 未加载
sdogruyolabout 8 years ago
BTW the Crystal website has just been redesigned :) <a href="https:&#x2F;&#x2F;crystal-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;crystal-lang.org&#x2F;</a>
grogenautabout 8 years ago
Dangit, doesn&#x27;t work natively on windows without bash :(<p>And I&#x27;m all windows lately. Guess I can try it on my mac but that&#x27;s like over there.<p>I do love the multi-platform-ness and single file of go, so it&#x27;ll be cool to try this and get some ruby love.
评论 #13947558 未加载
devmunchiesabout 8 years ago
I really, really like crystal but was bitten a few times on a project because it is still not quite ready for primetime.<p>Because its so young, there have been a handful of breaking changes which affected my code a few times (and even worse, my dependencies).<p>They have a good concurrency model but I&#x27;m waiting for them to add parallelism.<p>I mostly just crave the solidarity in tooling, dependencies, APIs, compiler options&#x2F;performance which will come after hitting 1.0 (i hope). I&#x27;m excited for the day I can go all in. Keep it up Crystal team!