If curious, here are the significant past threads I found. Others? An Introduction to Crystal - https://news.ycombinator.com/item?id=26217013 - Feb 2021 (39 comments) Switch from Ruby to Crystal - https://news.ycombinator.com/item?id=25005780 - Nov 2020 (35 comments) Go vs. Crystal Performance - https://news.ycombinator.com/item?id=23615303 - June 2020 (160 comments) Ruby vs. Crystal Performance - https://news.ycombi…
I guess it's an obligate-GC language. It would help if the front page were to say.
Crystal 1.0 – What to expect
211–220 of 351 posts
Re: Crystal 1.0 – What to expect
#212Earlier quoted context omitted.
Crystal has a GC. I see it as more similar to the likes of Nim, Swift, Java or C#. It's a great language regardless.
Does languages don’t belong together. Java and C# sure. They use sophisticated garbage collectors and target intermediate code. Nim, Crystal and Swift all compile to native code and is designed for that. Swift is not a GC language in the normal sense since it uses automatic reference counting. That is fully deterministic and with low latency. There is no stop the world to collect garbage like with Java and C#. Swift…
VM vs native is one way, but you can also go by the level of abstraction they provide, which very much puts them in the same category.
Also, this debate comes up every time, but ARC is widely classified as a form of garbage collection, just not a tracing one. It is transparent and automatic to the user. (Well, apart from cycles)
Re: Crystal 1.0 – What to expect
#213Earlier quoted context omitted.
To expand on that, Crystal's Nil goes hand-in-hand with its union types. So, if you want to allow a function's argument to be either an integer or nil, then the parameter type is "Int | Nil". It's not entirely unlike how algebraic data types with a "None" case work in the ML family of languages.
Or TypeScript, for a more well-known example
Re: Crystal 1.0 – What to expect
#214Earlier quoted context omitted.
multithreading is working with the -Dpreview_mt option, it's decent if the units of work are large enough at least 0,01ms, otherwise the channel overhead will dominate. I find the API nice and easy specially for those familiar with CSP or go. Performance should improve once it gets the necessary love for it to be released to be on by default. Windows requires a lot of boring work, especially considering most of the c…
Half of all devs work on Windows platforms, so IMHO, if the team wants the kind of traction needed to reach for Crystal to reach a self-sustaining level, this should be a high-priority task. Note that all of Crystal's competitors give first-class support to Windows: go, zig, nim, ruby, etc. I say this as a suggestion, rather than a critique. Actually, as a hopeful suggestion. :-)
Re: Crystal 1.0 – What to expect
#215Congrats on the release! The biggest factor drawing me to experiment a little with Crystal is that it is one of very few languages providing what otherwise has been pretty unique to Go: Lightweight threads+Channels+M:N concurrency (automatically multiplexing the lightweight threads onto a smaller number of OS threads). Also it does it with a very readable and clean syntax. Wrote a little about it, with code compariso…
edit: there seem to be some clues about FFI effects in this case of the PG connection library: https://forum.crystal-lang.org/t/issue-with-crashes-hangs-wi...
Re: Crystal 1.0 – What to expect
#216Earlier quoted context omitted.
The cross-platform story of .NET hasn't been complicated in a while. It's fully cross-platform between Windows, Linux, and macOS and has been for a few years. Edit: I just saw the person that you replied to said the same thing, so I'm not sure why you're pushing that it has a complicated cross-platform story.
So... pretty much everything I could do on .net framework runs on Linux and Mac now? Even Winforms, or WPF? To be fair I haven't written .net code in like 10 years, and the docs explaining how to navigate the transition from framework to core were extremely confusing. Has that soup of different technologies solidified any?
TL;DR rewrite it - there is no migration path!
Re: Crystal 1.0 – What to expect
#217Earlier quoted context omitted.
C# ? Not complicated at all. In fact it's currently one of the most cross platform language/runtime in existence after .NET Core appeared, and now more than ever with .NET 5.0. I even managed to AOT compile code and run it without a trace of .NET. Just amazing.
C# is a really good language, but I had nothing but problems trying to develop with it on Linux exclusively. MonoDevelop doesn't support Linux anymore since a bunch of proprietary components were added to it (and this isn't even mentioned on its homepage), so you have to use a community fork. That didn't bode well for me. The fork didn't have packages for my distro and I couldn't get it to compile for two hours. VS C…
Re: Crystal 1.0 – What to expect
#218It feels like Crystal it took all the best things from the languages I love, and put them together into one, beautiful language: - Elegance of Ruby - Statically type checked + global type inference - No Nulls - Go-like concurrency - Easy C ffi - High performance I really hope the Crystal succeeds and the language goes mainstream - this release is a huge step forward towards that. Congrats to the Crystal team for reac…
Thank you
Re: Crystal 1.0 – What to expect
#219Earlier quoted context omitted.
C# is a really good language, but I had nothing but problems trying to develop with it on Linux exclusively. MonoDevelop doesn't support Linux anymore since a bunch of proprietary components were added to it (and this isn't even mentioned on its homepage), so you have to use a community fork. That didn't bode well for me. The fork didn't have packages for my distro and I couldn't get it to compile for two hours. VS C…
What a weird case. I have successfully used dotnet core on these distros (alpine, centos, fedora, debian, ubuntu) without a single problem. If you don't mind, what distro are you using ?
Re: Crystal 1.0 – What to expect
#220It feels like Crystal it took all the best things from the languages I love, and put them together into one, beautiful language: - Elegance of Ruby - Statically type checked + global type inference - No Nulls - Go-like concurrency - Easy C ffi - High performance I really hope the Crystal succeeds and the language goes mainstream - this release is a huge step forward towards that. Congrats to the Crystal team for reac…
Just curious, as an avid user of Elixir lang, which has most of these anyway, what should be a compelling reason for someone like me to start using Crystal (more)? Thank you
Once replaced a python script while it was running. Expected time, python: 12 hours. Time to get it running in Crystal: 20 min. Time to finish in Crystal: 12 minutes.