News for hackers. Stuff that matters.
Re:Crystal 0.25.1 released by notheguyouthink on Friday June 29, 2018 @01:42PM (#17426131)
> 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?

Re:Crystal 0.25.1 released by asterite on Friday June 29, 2018 @04:12PM (#17427482)
"Fast as C" should maybe be changed to something else. Crystal can bind directly to C functions and libraries without any overhead, plus you have pointers and other stuff. So you could really write code that runs as fast as C if you program like in C, but with Crystal syntax. That's where the tagline comes from. But of with course normal usage of the language, with its heap-allocated stuff, garbage collector and usual stuff (like Array#map, which does allocate a new array), you won't get performance like C, but it will be acceptable, and usually faster than dynamic/interpreted languages.
Re:Crystal 0.25.1 released by Felz on Friday June 29, 2018 @03:29PM (#17427077)
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 by Thaxll on Friday June 29, 2018 @03:58PM (#17427391)
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.
Re:Crystal 0.25.1 released by Felz on Friday June 29, 2018 @07:42PM (#17428700)
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 by RX14 on Friday June 29, 2018 @03:32PM (#17427117)
Crystal's definitely up there, faster than java at least for most workloads. That can be improved much further by innovating on the GC.
Re:Crystal 0.25.1 released by qop on Friday June 29, 2018 @03:45PM (#17427228)
It really ought to say "fast LIKE c" because none of the core devs actually want crystal to be used for systems programming.

All they want is ruby with static types, that runs fast. Those things will satisfy them alone.

Intelligently written C/C++/D/Zig/Rust will always knock Crystal out of the park. :(