HNHacker News
TopNewBestAskShowJobs

binki89

63 karma · joined February 26, 2016

submissionscomments
binki89··on Crystal language 0.20.0 released
That's true. I think that there is a good number of people out there who have been waiting for exactly this. Hopefully it will be available soon but unfortunately I know of no signs that it is actively being worked on by anyone at the moment.
binki89··on Raybench – Crystal Programming Language
In terms of performance, I was able to reduce the computational time from 1m57.812s to 0m30.203s (25.6% of the original time) on my 2.8 GHz 16 GB memory machine simply by changing each 'class' to a 'struct'. The difference is that structs are allocated on the stack in Crystal. This is a common performance optimization in Crystal (https://crystal-lang.org/docs/guides/performance.html). For comparison, the Go code, also listed on the site, ran on my machine in 1m22.466s. I think that with the use of structs instead of classes, Crystal does run very similar to C speeds. Otherwise, I really enjoyed this article. The author compares several other languages with the same benchmark (see http://www.eccentricdevelopments.com/programming-language-co...). It would be interesting to see D-lang in a future comparison.
binki89··on Go 1.7 is released
Maybe try Crystal (https://crystal-lang.org/) then. It has many of the benefits of Go and a Ruby-like syntax. It feels even more like a scripting language than Go because of awesome type inference, uses a similar model as Go for concurrency, and even has proper generics ;-)
binki89··on Ask HN: What are the best programming languages?
I've enjoyed Crystal (https://crystal-lang.org/) a lot lately. Others have mentioned Nim, which is quite good. Also, D-lang (http://dlang.org/) doesn't get nearly enough love by people. It's an excellent language too.
binki89··on Crystal: Fast as C, Slick as Ruby
Nim (http://nim-lang.org/) is really as close as you're going to find.
binki89··on Crystal: Fast as C, Slick as Ruby
Good question about pattern matching in Crystal. I found this reply by asterite (the creator of Crystal) to a similar question that is worth reading:

https://crystal-lang.org/2014/06/19/crystal-0.1.0-released.h...

The question was asked in the comments as with the reply. I'm sorry that I can't link to it directly but it's the seventh comment from the top.

binki89··on Ask HN: Crystal and Kemal or Elixir and Phoenix?
Crystal is so great to use.
binki89··on Ask HN: Which language for writing a fast, distributable command-line tool?
I've previously used Go to develop a command-line tool and it worked quite well. I particularly liked the fact that I could cross-compile it so that I had a single static binary that could target various platforms/OSes without the need to compile explicitly on those platforms. I also think that Nim and Crystal could be quite good for this. Crystal, in particular has a remarkable scripting language feel, because of the extensive type inference, despite being natively compiled. It's also faster than Go, which is itself quite fast. Nim is no slouch performance wise either though and has the most pythonic like syntax of the languages I've described here.
binki89··on Crystal – The Programming Language
I'm so excited about the prospect of Crystal language approaching 1.0 stability even if this is a fair way away. It just seems like a language with a lot of potential. If they added multi-threading and Windows support tomorrow, I think I'd be using it for all of my new projects. These things take time though...
binki89··on A Guide to the Academic Writing Style
My favorite is Tip #36: Integer numbers less than ten should be written in long-form unless they are measurements with associated units or are within a range (e.g. 2-5). For example, you shouldn’t write, "There were 4 cats that scratched the researchers more than all others." For those of us that are old enough to recall life before we started publicly broadcasting 144-character reports on the nuances of our breakfasts (Forget my diet; I'm having 2 bowls of cornflakes this morning!), these low-integer numerals are particularly grating.
binki89··on Program your next server in Go
Yes, you're right that it is in an early stage of development and doesn't yet support Windows (to be fair, even Rust added full Windows support fairly late in their development cycle to 1.0). Crystal is probably in a slightly earlier stage than Nim, though not by much. Both are very interesting languages that I think would plot in similar locations on the chart. D is also a lot of fun. I think all are competing in this same native compiled realm that seems to be popular right now.
binki89··on Program your next server in Go
And Crystal (http://crystal-lang.org/).