Hacker News new | past | comments | ask | show | jobs | submit login
Crystal 0.31 (crystal-lang.org)
140 points by ksec on Sept 23, 2019 | hide | past | favorite | 15 comments



How portable are Crystal binaries? Or more generally, how easy is it to share a Crystal program with someone who isn't a Crystal user? E.g. C and C++ requires a lot of esoteric knowledge w/ occasionally slow builds, Go isn't that bad but has an intrusive bad default GOPATH, Rust + Rustup is like Go with better defaults but relatively long compilation times, Python/Ruby need the runtime installed + some kind of isolating environment, NodeJS just needs the runtime + NPM, Perl needs some kind of CPAN setup which is really confusing for newbies, etc.


Like Go, Crystal embeds the runtime inside of the executable by default so it doesn't require the user to install the language runtime libraries on the users computer unlike Java, C#, etc.

The only way to get a true portable statically-linked Crystal binary on Linux is to compile your program statically using an Alpine Linux Docker container. MacOS portability shouldn't be a problem since everything is static except for libSystem.dylib.


Like Java and C# actually, it just doesn't get more known due to the amount of devs that don't deal with commercial AOT toolchains outside corporations.


Just to clarify, Go has an extremely simple cross compilation story. GOOS=windows GOARCH=amd64 go build main.go will consistently create a windows binary. It also has great support for a wide variety of architectures. This has been true since Go 1.5 and GOPATH idiosyncrasies are largely going away with the move to go modules. https://golang.org/doc/install/source#environment


It's actually pretty easy; I compile stuff on a mac, then run it on a Linux box regularly. Usually use Docker though.


It's not cross compilation in Docker because Docker on macOS is literally just a VM running a Linux kernel.


N.B. unlike the other problems you listed, Go's "intrusive bad default GOPATH" is a development-time choice; presuming the developer used Go modules, the compiling-from-source user won't have to think about GOPATH.


Excited by the constant development of Crystal. Here is hoping that the various frameworks and shards will keep pace.


> Please update your Crystal and report any issues. We will keep moving forward and start the development focusing on 0.32.

There is potential in Crystal but the most terrifying thing about using it right now is the breaking changes.

How often is it that Crystal has to continue to keep doing breaking changes on every release? Everytime I read a new changelog, I am put off of updating due to the number of changes required to compile with a new version. There are 8 breaking changes in this release which is enough to put some people off of learning the language. It is now equivalent to Swift 3 at this point: No source-compatibility, some initial Windows support and experimental multi-threading.

Other than this, in terms of its speed and Ruby-like syntax, Crystal completely blows all other languages out of the ocean. And it is on par with C/C++/Rust and Zig.


It's still in the 0th major version, such changes are expected until 1.0. I indeed wouldn't recommend using Crystal for anything serious until the language stabilizes.

I think this is a good strategy if you want to end up with a good core language with a lot of polish.


Totally agree. If this happened post 1.0 I’d be concerned. But pre 1.0 this is what I’d expect and want. Polish things up because afterward you can’t!


(Or you can and you get the Python 3 debacle for a decade.)


Having experiment Crystal for a web server benchmark, my concern is that Crystal keeps consuming available memory (optimize compiled) probably due to garbage collector compare to Go and Rust.


It is supremely annoying that the polygon icon in the top-left of the navbar does not take me back to the home page, instead it's just a dumb play-thing that I can drag around with my mouse.

People always judge books by their covers.

edit: that reads in a really nasty tone, imagine that I had instead said "Unsolicited usability tip, ... " :).


Can't wait for 1.0, shameless plug https://gitlab.com/maxpert/crlocator is one of the project's I've been running on prod for over year now.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: