Live data from Hacker News

Crystal 1.0 – What to expect

crystal-lang.org

291–300 of 351 posts

Re: Crystal 1.0 – What to expect

#291

Nim vs Crystal is an interesting read if not to just compare syntax (three articles span 3 years so I wonder how much has changed since): https://framework.embarklabs.io/news/2019/11/18/nim-vs-cryst...

I tried to re-run the json parsing test mentioned in the article using latest stable version for both (not super scientific but just compiling the same code using same command and running the binary against the same json ). Crystal completed the task in 2.1s~ vs 3.71s~ for Nim (the timings were quite stable across multiple executions). So seems like atleast for this test, Crystal continues to be quicker.

That json test gets a lot of attention but A) large scale floating point IO is a terrible application of json (if for no other reason than that float parsing is slow) and B) this mostly measures construction of a big object graph, not json parsing, and so is a poorly isolated test.

A better Nim impl would use `parsejson` directly at which point its speed can approach the fastest of any impl. [1] Also, it is implementions (like stdlib) that are assessed not the speed of the language. There are like 10 json parsers beyond the stdlib. No idea about Crystal ecosystem diversity...

EDIT: Also, I just ran the base64 encode/decode and with `crystal build --release b64.cr` vs. `nim c --gc:markAndSweep -d:danger --cc:gcc --passC:-flto b64`, the Nim ran twice as fast not half as fast.

Anyway, people should not draw conclusions like "Crystal is faster than Nim" from things like this.

[1] https://forum.nim-lang.org/t/6920

Re: Crystal 1.0 – What to expect

#292

It feels like Crystal it took all the best things from the languages I love, and put them together into one, beautiful language: - Elegance of Ruby - Statically type checked + global type inference - No Nulls - Go-like concurrency - Easy C ffi - High performance I really hope the Crystal succeeds and the language goes mainstream - this release is a huge step forward towards that. Congrats to the Crystal team for reac…

All of those points are already met and in a better way by mature languages like e.g Kotlin. Really the only argument would be the "Ruby elegance" (or familiarity?) which I don't know. What make ruby/crystal more "elegant" (I would prefer the term readable ) than the competition?

> What make ruby/crystal more "elegant" (I would prefer the term readable) than the competition?

In the words of David Heinemeier Hansson:

> In fact, Ruby, to me, so much of the enjoyment in Ruby is these incredible subtleties, of how many different ways you can structure a conditional. Like, Ruby has, I don't know even the count, there's gotta be 60 different ways you can say `if something`, right? And it is in those 60 different ways that I find half the enjoyment of writing Ruby. Like, it was one of those things where I knew, very early on, that Python was not a language for me because it said, right in the manifesto, there should be preferably one and only one way to do things. Ruby has the exact opposite approach, there should be preferably ten thousand subtle different ways of doing things, that will allow you to write that particular conditional, with just the right emphasis, do you write it in the front, do you put it at the back, is it multi-line, is it single line? Like, there's so much variety and it's in that variety that I find poetry. And it is the poetry of writing Ruby code, of making those subtle distinctions where, at the end, you can like, "Ehh, should we move it around" like, where I just go like, giggles, right? Like, this where like we talked about that big smile, right? So much of that big smile comes from, not just like solving the problem, but solving it in a poetic way.

Re: Crystal 1.0 – What to expect

#293
post #267

Earlier quoted context omitted.

Why Kotlin when you got Swift is an equally valid point. People like choice and for a lot of us, running on the JVM is a non starter. Try creating a small command line tool for a JVM language. You need to distribute a virtual machine with it. You got the overhead of firing up a VM or JIT just for a short lived session. Also JVM gobbles memory. You would not want a system made up of lots of tiny command line tools all…

Since 2000 AOT compiling into native code has been available to Java developers, no different from using something like Go. That many didn't want to buy those compilers and settled with the free beer that could get hold of is another matter.

Just to corroborate - with gcc's gcj Java folk could get compilation to an ELF binary for free as well. I was profiling such in 2004. This was unpopular/unmaintained enough that eventually gcc discontinued it.

Sadly, people often confuse "prevailing mindset of the noisiest authorities of some programming language" with "the programming language itself" { not that this is the only confusion or maybe even the worst... :-) }

Re: Crystal 1.0 – What to expect

#294
post #271
post #125

Earlier quoted context omitted.

I'd consider it more seriously now it's 1.0. You've basically got an ecosystem of Ruby-likes: - Ruby itself - Crystal - Elixir I'm massively keen on Zig, too, but it still feels like early days for the language itself. The C-interop is utterly astounding but I don't want to write Zig as syntax-sugar around C libraries.

And Julia as well.

Julia if anything is unlike Ruby. The very first Ruby example on the official site showcases its object-oriented nature. Julia instead of objects has multiple dispatch.

Re: Crystal 1.0 – What to expect

#295

Earlier quoted context omitted.

All of those points are already met and in a better way by mature languages like e.g Kotlin. Really the only argument would be the "Ruby elegance" (or familiarity?) which I don't know. What make ruby/crystal more "elegant" (I would prefer the term readable ) than the competition?

> What make ruby/crystal more "elegant" (I would prefer the term readable) than the competition? In the words of David Heinemeier Hansson: > In fact, Ruby, to me, so much of the enjoyment in Ruby is these incredible subtleties, of how many different ways you can structure a conditional. Like, Ruby has, I don't know even the count, there's gotta be 60 different ways you can say `if something`, right? And it is in thos…

> there should be preferably ten thousand subtle different ways of doing things

This doesn’t sound elegant (meaning “pleasingly ingenious and simple”) at all.

It also only seems readable in the most shallow sense - certainly not understandable.

Re: Crystal 1.0 – What to expect

#296

Earlier quoted context omitted.

The biggest factor drawing me to experiment a little with Crystal is that it is one of very few languages providing what otherwise has been pretty unique to Go: Lightweight threads+Channels+M:N concurrency This has no value proposition versus Kotlin coroutines and if it doesn't have first class support for structured concurrency, cancelation and most importantly reactive streams then this language is sub-par.

Have you ever thought about why so many of your comments get downvoted?

The conflict between mental expectations / wishful thinking of people reading me and the sounds, grounded in truth arguments that I provide likely hurt some feelings and thus is downvoted. Platforms like HN definitely lack truth seekers like me that make online conversations more epistemologically valid, especially in this post truth era.

Do you realize the human resources cost that a new language imply? A new programming language (which is not polyglot aka based on graalvm) imply an almost complete duplication of work for creating their library ecosystem instead of reusing the existings. We talk about so many human hours wasted that could have instead be used for making the world a better place. Justifying such a cost is already almost impossible with a language that has a clear value proposition but to not realize the absurdness of this cost for a language that has no clear value proposition really is something intellectually...

Re: Crystal 1.0 – What to expect

#297

Earlier quoted context omitted.

Have you ever thought about why so many of your comments get downvoted?

The conflict between mental expectations / wishful thinking of people reading me and the sounds, grounded in truth arguments that I provide likely hurt some feelings and thus is downvoted. Platforms like HN definitely lack truth seekers like me that make online conversations more epistemologically valid, especially in this post truth era. Do you realize the human resources cost that a new language imply? A new progra…

You just spam java facts, you're hardly an epistemological wonder of conversation. I fact checked a couple of your comments and only one was right.

Take a look at yourself and reflect. If there's dozens or hundreds of interactions that go poorly, notice that YOU are the common denominator.

What you've written here is clearly delusional and makes me worry for your health.

Re: Crystal 1.0 – What to expect

#298
post #163

Earlier quoted context omitted.

Kotlin mostly requires JVM, Crystal does not. With Kotlin native, Kotlin js and most importantly Graal native this is plain wrong.

This is correct today. This was not the case when Crystal development started.

Translation: Crystal had a value proposition but now it's gone, before the product launch.

Re: Crystal 1.0 – What to expect

#299

Ruby was one of the languages I "cut my teeth" with to some extent, and I've always loved it's syntax and guiding philosophies, but was pulled away to PHP for my job, and ended up using other things for side projects. So a project that compiles to native code but uses Ruby-like syntax is very much "what I would build if I committed to building a language". But I've kept pushing off learning it on the notion that I co…

Personally I was surprised to see that Thoughtbot (a top web/mobile app consultancy and creator of factorybot and other well known open source libs) starting publishing blog posts detailing use of Crystal for some of its client projects. To me this was a sign that it should be taken seriously as an option for web development.

Re: Crystal 1.0 – What to expect

#300

Earlier quoted context omitted.

The conflict between mental expectations / wishful thinking of people reading me and the sounds, grounded in truth arguments that I provide likely hurt some feelings and thus is downvoted. Platforms like HN definitely lack truth seekers like me that make online conversations more epistemologically valid, especially in this post truth era. Do you realize the human resources cost that a new language imply? A new progra…

You just spam java facts, you're hardly an epistemological wonder of conversation. I fact checked a couple of your comments and only one was right. Take a look at yourself and reflect. If there's dozens or hundreds of interactions that go poorly, notice that YOU are the common denominator. What you've written here is clearly delusional and makes me worry for your health.

Answer to the second part of my message instead of ad homineming my health, attack the ideas not the human being, which is something that evidently should not need to be stated.
Post reply on HN