Live data from Hacker News

Crystal 0.25.1 released

crystal-lang.org

101–110 of 154 posts

Re: Crystal 0.25.1 released

#101
post #95

I 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?

You can use my alpine docker image to statically compile without any fuss: https://hub.docker.com/r/durosoft/crystal-alpine/ 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.

That's great! I've only heard complaints that it's difficult to statically compile. Sounds like a solved problem though.

Re: Crystal 0.25.1 released

#102
post #6

Earlier quoted context omitted.

I'm not sure why anyone would actually use it in the current state, unstable, lack of libraries, lack of community and the biggest problem no multi-threading / windows support

For the thrill man! If it doesn't have a library you need you create it yourself. Eventually enough people who have the skill to contribute will become interested in Crystal and contribute a library, then one day crystal will replace java. In all seriousness, other than the multithreaded windows support, which libraries are missing?

For sure. I've had a lot of fun getting to be the person to create some basic libraries for things like image manipulation and an ORM for mongodb when I find no one else has done that yet.

One big thing that is missing still is full google cloud platform and AWS libraries. There is an s3 connector but I think it's out of date.

Re: Crystal 0.25.1 released

#103

Crystal looks interesting although I decided to learn Golang instead. It's more mature and the WIP features described below made me cautious (i.e. what other features are immature). Anyone know when Crystal will get concurrency-a-la-golang? i.e. running concurrent processes in parallel? At the moment I think it's still single-threaded. https://crystal-lang.org/docs/guides/concurrency.html Still no windows support: ht…

>I decided to learn Golang instead

So what has been your experience with Golang so far?

Re: Crystal 0.25.1 released

#104
post #73

Won't the impending releases of TruffleRuby, Graal and Substrate VM make Crystal irrelevant?

Some people (myself included) actually want the type safety and method overloading etc. Also you can only make a dynamic language so fast before there are inherent trade-offs.

Re: Crystal 0.25.1 released

#105
post #94

I 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).

Thanks! These instructions seem to have less warnings than I saw last time, which implies it's more stable now.

Re: Crystal 0.25.1 released

#106

I 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?

Crystal supports static linking with `--static`, unfortunately glibc and openssl don't like static linking, so it turns out to be easier to do in an alpine linux chroot/container/etc which uses musl instead of glibc. Crystal is in the alpine linux repositories as of 3.8, so this should be now a lot easier.

If someone wants to generate some good tooling around this workflow, it'd be greatly appreciated.

Re: Crystal 0.25.1 released

#107
Any Julia programmers who have tried Crystal? I've never quite seen the point with Crystal when you got something like Julia. Although I guess there is a value in familiarity.

I was a big fan of Ruby back in the day, but I just feel that our understanding of what makes good language design has evolved since then. The heavy OOP focus in Ruby seems very 90s in retrospect.

I don't think it makes sense to restrict dispatch on single objects. Real world problems often don't fit that paradigm.

Re: Crystal 0.25.1 released

#108
post #98

I gave up on crystal and realized I should've started with rust in the first place. Crystal 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…

Exhaustive matching is on the cards, parallelism is coming, and any type system changes in the future will be minimal.

And yes, crystal isn't trying to be C, but you can still do many of the low-level things that you can do in C. It'd be nice to know what exactly you were missing from Crystal.

Re: Crystal 0.25.1 released

#109
post #11

Earlier 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…

> I don't mind being a little less performant than other compiled languages. What other languages? Because the language uses "Fast as C" as part of it's tagline. Is this a false claim?

That's definitely such an underspecified claim that it's not even wrong. Fast as C under what conditions?

I've personally found that a lot of Go's marketing is, if not misleading, outright false. As an example: https://blog.plan99.net/modern-garbage-collection-911ef4f8bd...

Re: Crystal 0.25.1 released

#110
post #98

I gave up on crystal and realized I should've started with rust in the first place. Crystal 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…

The second windows support is ready I'm going to start poking around with crystal for game dev stuff, cross platform UI, desktop apps, electron replacement, among other things.
Post reply on HN