Crystal 1.2.2 Is Released
crystal-lang.org
crystal-lang.org
Given these features, there does not appear to be much adoption of Crystal among Ruby developers. It is still early days for the language (post 1.0 release).
Some questions for Ruby developers:
- Have you taken a look at Crystal?
- What is your impression of Crystal?
- Are there any features that would make you use the language? (Or reasons for not using Crystal?)
I don't use it for work because I work for a Rails shop and we're currently happy with Rails.
- needless differences to Ruby: for example, the devs have refused to implement single-line if...then...end simply because they don't like it (https://github.com/crystal-lang/crystal/issues/4117)
- cryptic error messages, mostly type-related: this might have got better in subsequent releases, I guess.
This was my first attempt with Crystal. It took me about 40 min to get it working, about twice as long as it would have taken in ruby.
It then ran for 20 minutes and was done.
Unfortunately, I’m not sure what could be added to Crystal to make it stand out. The programming language space is somewhat bloated, and IMO to find a niche that doesn’t intersect with Ruby, Crystal needs to be able to compete with Rust and C/C++(Rust as the current novelty systems language of choice, C/C++ as the incumbent). I’m not sure if Crystal has a chance competing with Ruby/Python on their turf (hacking together scripts and web apps).
A bunch of times.
> What is your impression of Crystal?
Still not as nice as Ruby, but pretty slick and OK. Seems less mature and less useful than something like Nim, despite the similarities with Ruby.
> Are there any features that would make you use the language? (Or reasons for not using Crystal?)
Back in the day, the lack of any decent support for parallelism. It seems they do have a strategy for it now which seems ok. But on a whole, Ruby is fast enough for my needs and Crystal still isn't as easy to use.
Edit - so just translated one of the benchmarks I use to test programming languages (economics benchmark, basically creates a bunch of arrays, performs a bunch of operations on them, compares them, etc..., that sort of thing - so lots of maths and looping) and Crystal is now slightly quicker than Nim although it produces an erroneous result so I'm curious about it's float64 implementation. Or maybe I got some syntax wrong going from Ruby -> Crystal.
Also, if anyone's curious, times on the benchmark I used (and everything is written in naive code, except Python which uses Numpy data structures so presumably some optimisation there?)
C++: 1.05 seconds
Crystal: 1.3 seconds (but wrong result, for now)
Nim: 1.4 seconds
Ruby --yjit: 35 seconds
Ruby --jit (mjit): 40 seconds
Python3 (using numpy): 100 seconds
Ruby no jit: 120 seconds
Just compile a binary from my Mac and send it over to peers or compile it within a Github Action/scp it to a plain new linux server/run it - a comfort I am not willing to give up.
(No, docker stuff doesn't cut it)
Which part [1] of it is not possible?
[1] https://crystal-lang.org/reference/guides/static_linking.htm...
Wait, that Nikola is a sponsor? How? Why?
See the "Advanced Electronics" section about halfway through the article.
As long as funding is going towards improving the language and ecosystem, I really don't see the issue here.
Should I stop using Rust because Facebook / Meta is using it for cryptocurrencies and they want to be a part of growing the Rust ecosystem?
For any other language or framework I would not be surprised ( I could almost bet ) the common view on HN would be to stop using it, example MySQL, Java etc.
But given this is Rust.
This is complete nonsense.