Live data from Hacker News

Crystal 1.0 – What to expect

crystal-lang.org

51–60 of 351 posts

Re: Crystal 1.0 – What to expect

#51
post #5

Really happy to see this go 1.0. Between Crystal and Zig it's nice to see C++/Rust get some competition

Crystal has a GC. I see it as more similar to the likes of Nim, Swift, Java or C#. It's a great language regardless.

Ah! I hadn't thought of those, though I think because 3 out of 4 are tied to a specific platform

Re: Crystal 1.0 – What to expect

#52
I think any new programming language should have a "why?" section on their page. I mean obviously this language is serving a need, but what is it? In any case, congrats! I like the features and would like to give it a try some day. I'm still curious about the motivations of this particular language though. Anyone more familiar care to elaborate a bit?

Edit: Ok, looks like there is a "why" section on github!

Re: Crystal 1.0 – What to expect

#53
If curious, here are the significant past threads I found. Others?

An Introduction to Crystal - https://news.ycombinator.com/item?id=26217013 - Feb 2021 (39 comments)

Switch from Ruby to Crystal - https://news.ycombinator.com/item?id=25005780 - Nov 2020 (35 comments)

Go vs. Crystal Performance - https://news.ycombinator.com/item?id=23615303 - June 2020 (160 comments)

Ruby vs. Crystal Performance - https://news.ycombinator.com/item?id=23431941 - June 2020 (148 comments)

Crystal 0.34 - https://news.ycombinator.com/item?id=22800139 - April 2020 (31 comments)

Towards Crystal 1.0 - https://news.ycombinator.com/item?id=22725829 - March 2020 (32 comments)

Crystal 0.33 - https://news.ycombinator.com/item?id=22331005 - Feb 2020 (42 comments)

Nim vs. Crystal - https://news.ycombinator.com/item?id=21883882 - Dec 2019 (147 comments)

Lilith: x86-64 OS written in Crystal - https://news.ycombinator.com/item?id=21860713 - Dec 2019 (251 comments)

Crystal 0.31 - https://news.ycombinator.com/item?id=21053366 - Sept 2019 (15 comments)

Parallelism in Crystal - https://news.ycombinator.com/item?id=20897029 - Sept 2019 (41 comments)

Crystal 0.29 - https://news.ycombinator.com/item?id=20110253 - June 2019 (7 comments)

Crystal 0.28.0 Released - https://news.ycombinator.com/item?id=19694006 - April 2019 (30 comments)

Crystal 0.27.0 released - https://news.ycombinator.com/item?id=18370498 - Nov 2018 (36 comments)

Crystal 0.26.0 released - https://news.ycombinator.com/item?id=17753367 - Aug 2018 (40 comments)

Crystal 0.25.1 released - https://news.ycombinator.com/item?id=17424639 - June 2018 (152 comments)

Crystal 0.25 - https://news.ycombinator.com/item?id=17319689 - June 2018 (68 comments)

Why Crystal Is My Next Language - https://news.ycombinator.com/item?id=17280969 - June 2018 (192 comments)

The Crystal Programming Language - https://news.ycombinator.com/item?id=16842442 - April 2018 (73 comments)

Why I'm excited about Crystal in 2018 - https://news.ycombinator.com/item?id=16221053 - Jan 2018 (7 comments)

Crystal 0.24.1 released - https://news.ycombinator.com/item?id=16021965 - Dec 2017 (22 comments)

Overview of the Crystal language - https://news.ycombinator.com/item?id=15945262 - Dec 2017 (90 comments)

Crystal in Production: Diploid - https://news.ycombinator.com/item?id=15574714 - Oct 2017 (120 comments)

Journey from Node to Crystal - https://news.ycombinator.com/item?id=15240984 - Sept 2017 (6 comments)

Crystal Lang vs. Node.js vs. Go Benchmarks - https://news.ycombinator.com/item?id=14368050 - May 2017 (10 comments)

From Ruby to Crystal: A Quick Look - https://news.ycombinator.com/item?id=13949353 - March 2017 (43 comments)

Building a Command-Line Application with Crystal - https://news.ycombinator.com/item?id=13945591 - March 2017 (33 comments)

Porting Ruby to Crystal - https://news.ycombinator.com/item?id=13837109 - March 2017 (34 comments)

A new year resolution to have Crystal reach the 1.0 milestone in 2017 - https://news.ycombinator.com/item?id=13281333 - Dec 2016 (78 comments)

The Crystal Programming Language - https://news.ycombinator.com/item?id=13209575 - Dec 2016 (193 comments)

Crystal: Fast as C, Slick as Ruby - https://news.ycombinator.com/item?id=12223395 - Aug 2016 (429 comments)

Kemal: Fast, simple web framework for Crystal - https://news.ycombinator.com/item?id=11143811 - Feb 2016 (16 comments)

The future of the Crystal language - https://news.ycombinator.com/item?id=10803635 - Dec 2015 (36 comments)

Crystal-Lang – Beauty of Ruby, Faster Than Go - https://news.ycombinator.com/item?id=10014178 - Aug 2015 (31 comments)

Amethyst – Rails inspired web-framework for Crystal language - https://news.ycombinator.com/item?id=9716508 - June 2015 (8 comments)

Crystal Language - https://news.ycombinator.com/item?id=9669166 - June 2015 (171 comments)

Crystal: the programming language - https://news.ycombinator.com/item?id=8658358 - Nov 2014 (51 comments)

Meet Crystal language in its birthday. It is compiled and has ruby like syntax - https://news.ycombinator.com/item?id=6342609 - Sept 2013 (84 comments)

Re: Crystal 1.0 – What to expect

#54

I love the idea of Crystal but I remember reading that compilation times can balloon very quickly for moderately sized apps. Can anyone who writes Crystal today dispel or confirm that information? I imagine the inferred typing makes building a fast compiler really tough.

I just downloaded 1.0 and tried hello world. It took over 2 seconds. I hope that's just some kind of bug.

No, that's expected. The program you wrote might be minimalistic, but there is still a lot of code under the hood for the runtime. If you compile a program that's twice as complex, you should still get roughly the same build time. FWIW The compiler builds in about 30 seconds. And it's a really complex piece of software.

Re: Crystal 1.0 – What to expect

#55
Congrats on the release!

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 (automatically multiplexing the lightweight threads onto a smaller number of OS threads).

Also it does it with a very readable and clean syntax.

Wrote a little about it, with code comparisons, before:

https://rillabs.com/posts/crystal-concurrency-easier-syntax-...

Re: Crystal 1.0 – What to expect

#56
post #5

Really happy to see this go 1.0. Between Crystal and Zig it's nice to see C++/Rust get some competition

Crystal has a GC. I see it as more similar to the likes of Nim, Swift, Java or C#. It's a great language regardless.

My experience porting C++ stuff into Java/.NET, with occasional native libs, most of the time using a GC based language is more than enough for the expected system performance.

Naturally it requires understanding the whole stack, how to improve performance in general, picking the right data structures and algorithms as well.

Of course, there are scenarios where that might not be enough, and that is where a C or C++ native library might come into play.

No need to be siloed into a single language.

Re: Crystal 1.0 – What to expect

#57
post #15

How does it compare to Nim?

similar clarity and elegance of expression (crystal is a bit more beautiful i think) both use significant whitespace nim has better cross-platform and embedded support, as crystal targets llvm while nim targets c/c++/js nim has more low-level support with the tradeoff of supporting dangerous things like raw pointers crystal has better async imho

Crystal doesn't use significant whitespace (like Ruby).

Re: Crystal 1.0 – What to expect

#58
post #39

Earlier quoted context omitted.

> No Nulls Does it not? It has 'nil', just like Ruby. Basically the same thing, the docs literally say it's 'similar to null in other languages'. https://crystal-lang.org/reference/syntax_and_semantics/lite...

It has a Nil type, not a Nil Value. So a function might return an Int or a Nil, but if you then try to, say, invoke a function expecting an Int on a Nil, it predictably blows up. An Int cannot be Nil itself.

To expand on that, Crystal's Nil goes hand-in-hand with its union types. So, if you want to allow a function's argument to be either an integer or nil, then the parameter type is "Int | Nil".

It's not entirely unlike how algebraic data types with a "None" case work in the ML family of languages.

Re: Crystal 1.0 – What to expect

#59

Earlier quoted context omitted.

Was that possibly before they backed off from global type inference? I think that was the cause of long compilation times. They require you to annotate a few types manually now which is an effective cut.

They haven’t backed off from global inference. They did move to require you to type collections, but methods are not inferred at definition but rather at invocation and it happens globally. There is no solution really. If you want a language to feel like it is dynamically typed but actually has types, something gotta give, and in this case it is compilation times. And it gets quite high fast.

> They haven’t backed off from global inference.

You might know a lot more than me about the subject, so feel free to correct me, but I think it used to be truly global inference - as in you were expected to write the whole program with no annotations. But now you're required to annotate instance and class variable types, because compile times were becoming intractable.

Re: Crystal 1.0 – What to expect

#60
post #52

I think any new programming language should have a "why?" section on their page. I mean obviously this language is serving a need, but what is it? In any case, congrats! I like the features and would like to give it a try some day. I'm still curious about the motivations of this particular language though. Anyone more familiar care to elaborate a bit? Edit: Ok, looks like there is a "why" section on github!

I started this with my documentation because I am still convincing myself that it is a good idea.

http://www.adama-lang.org/docs/why-the-origin-story

Post reply on HN