Live data from Hacker News

Crystal 0.25.1 released

crystal-lang.org

131–140 of 154 posts

Re: Crystal 0.25.1 released

#131
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.

I'll still love you even though you're a windows heathen.

Actually, let me ask you something... Are you just targeting windows or are you a windows user also? I can't imagine writing non-dotnet code with windows, but maybe I'm doing it all wrong.

Re: Crystal 0.25.1 released

#132
post #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.

It's not the lack of features it's just the difference in what it's meant for. Crystal has a GC, it doesn't have a lot of memory control, etc. She just ain't that type of lady.

Crystal isn't what I thought it was. That's not a bad thing necessarily, it's certainly nobody's fault....

For what I have in mind, rust fits my needs much more closely. I want to write a game and learn all about graphics wizardry and rendering pipelines and all the cool Carmackian arts I've been missing out on. My career is winding down, but I think I will retain my gray matter longer if I keep myself busy.

If I were thirty years younger and starting out a career in web development, crystal would excite me. The prospect of all that ruby out there that will eventually need to be crystallized... Man, what an opportunity.

I don't really have a specific idea in my head of what a crystal for systems development would look like so I'm not sure that I could really provide what's missing from crystal.

Rust is made for systems from the start and there appears to be a large number of really smart low-level hackers on the scene already. I'm glad, because I don't know, so at least I can fail amongst a crowd.

:)

Re: Crystal 0.25.1 released

#133

Earlier quoted context omitted.

Kotlin syntax: "1 2 3".split(' ').map { it.toInt() }

Your example doesn't do the same thing. The same as grandparent, in crystal: "1 2 3".split.map &.to_i.*(2)

I believe that Ruby also has that & shortcut (or similar) but it's totally unreadable. I never used it and I don't even want to check the exact syntax. Is it the only way it works in Crystal?

Re: Crystal 0.25.1 released

#134
post #131

Earlier quoted context omitted.

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.

I'll still love you even though you're a windows heathen. Actually, let me ask you something... Are you just targeting windows or are you a windows user also? I can't imagine writing non-dotnet code with windows, but maybe I'm doing it all wrong.

I target it. My daily driver is Antergos or Ubuntu depending on how I'm feeling and how crappy GNOME is on any given year.

Re: Crystal 0.25.1 released

#135
post #106

Earlier quoted context omitted.

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.

I wonder if it is possible to do something that staticly link everything except the few libraries that misbehave.

There isn't much else left to link - iirc openssl, glibc, libevent, libpcre are all it needs.

Re: Crystal 0.25.1 released

#136

I've played around with a number of languages and settled on Crystal because: * Speed * Pleasant to use type system * Doesn't get in my way * Catches lots of bugs * Fun! I wrote http://luckyframework.org/ to write web applications with minimal boilerplate and as few runtime errors as possible. Take a look and let me know what you think

From https://luckyframework.org/guides/installing/

  >To get Lucky, you need to install these first.
  >Install one of these process managers: Overmind (recommended), Heroku CLI (great if you plan to use Heroku to deploy), forego, or foreman.
  >Node. Requires at least v6
  >Yarn
  >Crystal. Requires at least v0.25
  >Postgres (macOS/Others)
Why are those dependencies needed, except Crystal, particularly Node? And does Lucky only work with Postgres?

Re: Crystal 0.25.1 released

#137
post #127

Earlier quoted context omitted.

Particular to the c library? Because an "ldd" on the hello world listed quite a few libs which all worked fine with a static build.

openssl and libz are particularly fussy

I could definitely see openssl being tricky (libz not so much, but I might very well be naive here) - but how does changing the libc help with either?

Re: Crystal 0.25.1 released

#138
post #120
post #109

Earlier quoted context omitted.

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

If you were to use Go you would know that the GC is indeed pretty fast, on part or faster than Java / C# in many scenarios.

That's exactly what the article I linked said, isn't it? It has low pause times, at the expense of everything else.

Beware trading a visible cost for an unbounded number of smaller costs. In Go's case, in return for minimal pausing you get memory fragmentation, terrible performance if the GC is ever seriously taxed, and a 100% (!) heap memory use overhead. If you're just writing commandline daemons or servers you restart every ten minutes though, who cares?

Go doesn't come off too badly in this because it's not Java, which allocates like crazy. That's a laudable tradeoff, but that does not mean they solved garbage collection very well.

Re: Crystal 0.25.1 released

#139
post #97

Earlier quoted context omitted.

~100k LOC in Crystal? that's pretty amazing

about 60-70k of that is slang, CSS, and frontend javascript, but we're still looking at a large amount of pure crystal.

That’s a lot of slang (shard author here)! Happy to see people using it so much.

Re: Crystal 0.25.1 released

#140
post #131

Earlier quoted context omitted.

I'll still love you even though you're a windows heathen. Actually, let me ask you something... Are you just targeting windows or are you a windows user also? I can't imagine writing non-dotnet code with windows, but maybe I'm doing it all wrong.

I target it. My daily driver is Antergos or Ubuntu depending on how I'm feeling and how crappy GNOME is on any given year.

Nice. I browse with gallium on a Chromebook but I have a desktop at home with elementary. A little fancy but tolerable.

Still not quite the Year of the Linux Desktop... Any year now....

Post reply on HN