Earlier quoted context omitted.
I'm referring to fat binaries like the one Golang would compile too. Apologies if I have some terms mixed up here! Golang produces one single binary you can deploy to your target environment and doesn't really require anything else installed. From what I've read, Crystal generates a binary but you also need to ensure Crystal is installed on your target environment.
Golang makes statically linked binaries. (Well, until you use cgo.) By default, Crystal generates dynamically linked binaries. You absolutely do not need Crystal to run them. But you do need: - Boehm GC (libgc-threaded) - libevent - PCRE if the program uses regexps - libyaml if the program uses yaml - OpenSSL if the program uses crypto/TLS (?) Here's an example ldd output: /usr/local/bin/shards: libyaml-0.so.2 => /us…
Crystal 0.25.1 released
91–100 of 154 posts
Re: Crystal 0.25.1 released
#92Won't the impending releases of TruffleRuby, Graal and Substrate VM make Crystal irrelevant?
All that Graal stuff, while a true open source project, has some "Oracle weirdness" around it (IIRC, only Linux (and probably only amd64) is supported in the "community edition") and requires JDK 9/10 (not available on FreeBSD yet..)
Re: Crystal 0.25.1 released
#93Earlier quoted context omitted.
That's about speed (though I think Truffle/Graal make an app consume more memory). Crystal is type-safe, and no optimizing VM can do that for Ruby. Not that type-safety is a killer feature, but that's just one difference.
https://medium.com/byteconf/stripe-is-building-a-ruby-typech... Stripe are trying to solve that issue.
Re: Crystal 0.25.1 released
#94I tried out Crystal and Kemal a few months ago and really enjoyed it. However, one issue that's preventing me from wanting to take it to production is that apparently you cannot generate fat binaries and run them without Crystal also being installed in your deployed environment. Is that true still? If it is, does anyone know when support for "real" fat binaries (no need for Crystal on the server) will be available?
https://crystal-lang.org/docs/using_the_compiler/ "Creating a standalone executable":
crystal build some_program.cr --release --static
Builds a static binary (just tried it on Ubuntu 18.04 with a simple hello-world).
Re: Crystal 0.25.1 released
#95I tried out Crystal and Kemal a few months ago and really enjoyed it. However, one issue that's preventing me from wanting to take it to production is that apparently you cannot generate fat binaries and run them without Crystal also being installed in your deployed environment. Is that true still? If it is, does anyone know when support for "real" fat binaries (no need for Crystal on the server) will be available?
I'll be updating it later today with 0.25.1 support.
You can statically compile a local crystal file using a docker one-liner that is included in the description.
Re: Crystal 0.25.1 released
#96I tried out Crystal and Kemal a few months ago and really enjoyed it. However, one issue that's preventing me from wanting to take it to production is that apparently you cannot generate fat binaries and run them without Crystal also being installed in your deployed environment. Is that true still? If it is, does anyone know when support for "real" fat binaries (no need for Crystal on the server) will be available?
Not sure when/if this changed recently, but from: https://crystal-lang.org/docs/using_the_compiler/ "Creating a standalone executable": crystal build some_program.cr --release --static Builds a static binary (just tried it on Ubuntu 18.04 with a simple hello-world).
Re: Crystal 0.25.1 released
#97Re: Crystal 0.25.1 released
#98Crystal wants very badly to displace ruby, in order to leverage the network of developers and generate more and more attention. It's a smart decision on their part.
As such, crystal doesn't seem to have munch interest in low-level nitty gritty. "we aren't trying to be C" is a common comment amongst contributors.
For game dev, (why I'm bothering with rust) it's too big a turn off to ignore.
For web dev, I suspect crystal will ultimately find some success. Lucky framework has some REALLY cool features that rails hackers are going to discover eventually.
Unless ruby 3 drops a type system bomb and finds a 10x perf speedup, the continuing progress crystal is making will consume the ruby ecosystem.
Congrats on another successful release! Still no exhausting matched, no parallelism, and the spectre of type system changes in the future still looms, but aside from those things, looking good!
And windows support. But I personally don't mind windows support being missing. Fuck 'em. Continuing to settle for windows with alternative implementations and things like Wine only gives windows more power as an antihero. Let them be forced to adopt a Linux kernel, no compromise.
Edits: typos
Re: Crystal 0.25.1 released
#99Earlier quoted context omitted.
Exactly. I wouldn't write a kernel or shared library in Crystal and I wouldn't write a webapp in Rust.
> wouldn't write a webapp in Rust https://rocket.rs looks nice ;)
And there is need for HTTP frameworks in Rust, for example embedded stuff often hosts HTTP servers. However, just like C we frameworks, it's my opinion they're not for the average use case.
Re: Crystal 0.25.1 released
#100Earlier quoted context omitted.
I've programmed in both and as far as I can tell here's the best use case for each: Go - I want to program explicitly and don't mind a little extra code or syntax to do it. I want close to the best performance possible and a single distributable binary. I don't mind being encouraged to "roll my own" api / web app rather than using a framework. Crystal - I want to feel like I'm writing in Ruby, but with type checking…
Great response. [EDIT - as highlighted by the replies below you can't use Rails with Crystal...my fault for misreading the parent] I didn't quite realize that I could use Rails with Crystal. That would be make it more interesting if I knew how to use Rails ^^