Building a Command-Line Application with Crystal
1–10 of 35 posts
Re: Building a Command-Line Application with Crystal
#2Re: Building a Command-Line Application with Crystal
#3Anyone compare Nim to Crystal? Both are AOT languages with syntax inspired by dynamic languages (Python & Ruby). Nim transpiles to C and Crystal uses LLVM. I've been playing with Nim, but I have a feeling Crystal will catch on quicker.
Elixir has already taken most of the ruby mindshare, the crystal team really isn't hacking it when it comes to presenting why crystal should be used instead of ruby except for speed. That its faster is the only viable motivation currently.
I don't know anything about nim, so I can't really compare it. I wrote some compiler plugins and utilities for crystal at my company, but I ended just rewriting the component in ruby, and it runs hourly with JRuby.
I hope Ruby3 gets optional types a la Dart, and a code conversion tool. Those two things would revive the entire ruby universe.
Edit: last time I touched crystal was 6-7 months ago, but I doubt anything has changed.
Edit edit: not an elixir fanboy. It sucks too, but at least it compiles down to BEAM so if I'm writing erlang I don't have to actually touch it as long as it works.
The elixir astroturfing is out of control lately. It's cool, it ain't THAT cool.
Re: Building a Command-Line Application with Crystal
#4Anyone compare Nim to Crystal? Both are AOT languages with syntax inspired by dynamic languages (Python & Ruby). Nim transpiles to C and Crystal uses LLVM. I've been playing with Nim, but I have a feeling Crystal will catch on quicker.
CoC, bad compiler, bad type system, no formal proofing whatsoever, some of documentation reads like someone who knows English as a second or third or fourth language wrote it, in some cases it's just plain wrong. Elixir has already taken most of the ruby mindshare, the crystal team really isn't hacking it when it comes to presenting why crystal should be used instead of ruby except for speed. That its faster is the o…
Re: Building a Command-Line Application with Crystal
#5[0] https://crystal-lang.org/api/master/JSON.html#mapping%28prop...
Re: Building a Command-Line Application with Crystal
#6Anyone compare Nim to Crystal? Both are AOT languages with syntax inspired by dynamic languages (Python & Ruby). Nim transpiles to C and Crystal uses LLVM. I've been playing with Nim, but I have a feeling Crystal will catch on quicker.
CoC, bad compiler, bad type system, no formal proofing whatsoever, some of documentation reads like someone who knows English as a second or third or fourth language wrote it, in some cases it's just plain wrong. Elixir has already taken most of the ruby mindshare, the crystal team really isn't hacking it when it comes to presenting why crystal should be used instead of ruby except for speed. That its faster is the o…
Re: Building a Command-Line Application with Crystal
#7Anyone compare Nim to Crystal? Both are AOT languages with syntax inspired by dynamic languages (Python & Ruby). Nim transpiles to C and Crystal uses LLVM. I've been playing with Nim, but I have a feeling Crystal will catch on quicker.
meanwhile, crystal does not even support windows yet. https://github.com/crystal-lang/crystal/issues/26
Re: Building a Command-Line Application with Crystal
#8Hmm, 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't have to do too much with option parsing. Plus you can just use your editor rather than the shell. [0] https://crystal-lang.org/api/master/JSON.html#m…
This post is very much about my first pass at this and my first experience with Crystal. Cleaning up the JSON parsing is the next item on my list when I have time.
Re: Building a Command-Line Application with Crystal
#9Anyone compare Nim to Crystal? Both are AOT languages with syntax inspired by dynamic languages (Python & Ruby). Nim transpiles to C and Crystal uses LLVM. I've been playing with Nim, but I have a feeling Crystal will catch on quicker.
CoC, bad compiler, bad type system, no formal proofing whatsoever, some of documentation reads like someone who knows English as a second or third or fourth language wrote it, in some cases it's just plain wrong. Elixir has already taken most of the ruby mindshare, the crystal team really isn't hacking it when it comes to presenting why crystal should be used instead of ruby except for speed. That its faster is the o…
Um, what's wrong with that? Not everyone gets to learn English as their first language, do their efforts deserve to be discarded just because of that?
I mean, I could point out that your grammar ('some of documentation') invalidates your entire comment, but that's kinda silly.
Re: Building a Command-Line Application with Crystal
#10Hmm, 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't have to do too much with option parsing. Plus you can just use your editor rather than the shell. [0] https://crystal-lang.org/api/master/JSON.html#m…
I do use it in this project, but most definitely in the wrong way. I had a little trouble seeing how I could use it for getting at nested values of varying types and still have some sane error handling. This post is very much about my first pass at this and my first experience with Crystal. Cleaning up the JSON parsing is the next item on my list when I have time.