Live data from Hacker News

The Crystal Programming Language

crystal-lang.org

51–60 of 180 posts

Re: The Crystal Programming Language

#52
post #15

I love that we're getting new languages lately, but almost all of them seem to be ignore the significant new requirement of our age: parallelism & concurrency. Specifically, you need lightweight processes and no-shared-memroy architecture. While the number of cores on a machine is remaining relatively low, the number of machines in a system are going up. Erlang got this right and build a lot of infrastructure around…

>> I love that we're getting new languages lately, but almost all of them seem to be ignore the significant new requirement of our age: parallelism & concurrency.

Yes. I expect this to be the norm in future languages. App developers shouldn't have to worry about these kind's of things, and we can just focus on making apps. Parallelism and concurrency should just work out of the box.

Re: The Crystal Programming Language

#53

Wow! Ruby was the first programming language I learnt and I still love it. Crystal is going to add features I've always missed: static typing and compilation. Thank you guys, it will be awesome!

You missed compilation?

He probably meant the results of compilation: superfast binaries ;)

Re: The Crystal Programming Language

#55

Now someone convince Matz to reimplement Ruby in crystal, add optional typing to CRuby, and you have won big time.

Actually, that's already happening[1]. Also note that there is a library for "ruby contracts[2]" (which I didn't try yet, but I'm very eager to do so) which could give the same result as a statically typed language.

[1] https://www.omniref.com/blog/blog/2014/11/17/matz-at-rubycon...

[2] http://egonschiele.github.io/contracts.ruby/.

Re: The Crystal Programming Language

#56

I'm looking for something beautiful like Ruby but fast like Go. Do you think Crystal fits this bill? Also, are there packages/libs/gems for Crystal? What are they called? What do I google for? One of the major reasons why I dumped Go is that it's just too verbose and makes me write too much boilerplate code. I want to sort a collection and I have to write the same algorithm every single time for every single type. It…

What's your desired use case? I have same problem, same concerns and I think that Nim look promising (at least for me). I was giving Go a try, but nah - there just wasn't magic between us ;)

Re: The Crystal Programming Language

#57
post #16

Just curious, why Crystal? It looks just like Ruby. What problem(s) are you addressing with Crystal?

We like the way Ruby lets you quickly prototype things, but its performance isn't very good (it's just good) and it also lacks static type checks (for example "undefined method '...' for Nil" is a very common runtime error). So, we are trying to create a language with all the nice aspects of Ruby but with static checks and better performance. Of course that comes at a price: no dynamic aspects (no eval, no instance_e…

> So, we are trying to create a language with all the nice aspects of Ruby but with static checks and better performance.

I'm really interested in performance. Do you have some honest and realiable benchmarks comparing Crystal to both MRI and Rubinius?

Re: The Crystal Programming Language

#59

I'm looking for something beautiful like Ruby but fast like Go. Do you think Crystal fits this bill? Also, are there packages/libs/gems for Crystal? What are they called? What do I google for? One of the major reasons why I dumped Go is that it's just too verbose and makes me write too much boilerplate code. I want to sort a collection and I have to write the same algorithm every single time for every single type. It…

CrystalGems would be really a boon!!

Re: The Crystal Programming Language

#60
post #41

Earlier quoted context omitted.

I recommend adding something about static type checking to the list at the top of Crystal's homepage. I saw "never have to specify the type of...", and believed it was another dynamically typed language. I actually didn't know it had static type checking until I had closed the tab, and glanced at this comment you posted here. (I know, I didn't read very far in the linked page.) That aside, it looks neat! :)

You are right, it's far from obvious after reading that list. I updated it. Thanks!

I came across this a few months ago and ignored it for similar reasons: the homepage doesn't talk about the fact that nil is a type not a value (which is AWESOME, btw). It wasn't until a coworker encouraged me to dig into the docs that I realised Crystal is actually pretty sweet.

I recommend stating something like "No unexpected nils at runtime" and for those curious, a link for where to read more. Not having nil is basically the most important feature in most new languages I take the time to play with. Now that I know Crystal treats nil responsibly, I'm really keen to start playing with it.

Post reply on HN