69 points · by thejokersthief · 5y ago · 39 comments
8s to compile a hello world is "reasonable"? Am I missing something?
One of its main competitors hasn't exactly been up to Turbo Pascal levels with their own compiliation performance.
I would like to have something similar for Python.
Also, the FFI in Nim is basically just declaring some C function as a `proc`. So, wrapping existing C libraries is as easy as Cython for Python. You can even jump start things by running `c2nim` on a header file.
Depending on the application, F# is a fantastic alternative to Python if you want some succinct code (with advanced types too) and fast runtime performance.
For anything 'scientific' there is Julia (with PyCall and RCall).
That said, it's a completely different language from Python, so the comparison to Ruby/Crystal is not very apt.
an alternate youtube frontend https://github.com/iv-org/invidious
and an OS written in Crystal https://github.com/ffwff/lilith
However, there seemed to be some confusion about whether the language could continue with inferred types or whether you'd need to annotate yourself - and what that would mean for compile speeds. I'm hoping those concerns can be resolved
It is certainly possible to port Ruby applications to Crystal without a total rewrite, but the addition of static types in and of itself means you may be surprised at how much fiddling is required to get the compiler to approve your code.
I think in practice that Crystal will have to carve out its own niche distinct from Ruby - and I'm not sure whether the Ruby like syntax is much of an advantage against competing languages.
I made https://pix.fastloop.xyz entirely in Crystal: https://github.com/yeo/pix/tree/master/src