Live data from Hacker News

The Crystal Programming Language

crystal-lang.org

51–60 of 116 posts

Re: The Crystal Programming Language

#52

Earlier quoted context omitted.

Probably because of the Ruby inspired syntax which just brings joy. Hopefully the ecosystem can grow and partially catch up as well

i've seen that said so many times, and fail to understand why Ruby syntax brings joy. Personally, I thought the muddled Proc, block, and lambda situation a mess, coming from Scheme 30 years ago to Ruby 20 years ago.

> Personally, I thought the muddled Proc, block, and lambda situation a mess

Why not use one (probably just block) for everything? Coming from ruby 10 years ago.

Re: The Crystal Programming Language

#53

Out of all the programming languages coming out these days, Crystal is the one I am watching out for. I've never programmed with Ruby, but I have programmed with Python in the past so I really value the focus on programmer friendly syntax that Python taught me. Currently a Golang a programmer and I love the performance plus binary executables! From my experience so far Crystal feels like a performant language with th…

Just curious whether you have checked out Nim. I love it coming from Python, curious to know what Crystal offers apart from Nim for Python users.

Re: The Crystal Programming Language

#54

Earlier quoted context omitted.

Nim and Crystal feel like they are in exactly the same space? GC, fast, single executable compilation without runtime (I would also throw Go into this list).

there is a runtime. its just baked into the final executable. you can't have garbage collection without one.

Everything has a runtime nowadays. Even C, even if it isn't all that large (including for example the memory structures necessary to keep malloc and free working).

Re: The Crystal Programming Language

#55

Huge props for the Crystal lang team. Crystal powers 90% of the Kagi search backend (reminder being Python). Highlights are great performance and concurency handling. Biggest downsides at this moment are compilation speed (does not take advantage of multi CPU cores) and debugging tools. Overall our experience has been fantastic (we adopted it while still in beta) and the pace the language is developing is great.

What do you mean by great concurrency? Last I checked multithreading was still hidden behind an experimental compiler flag, which turns me off a bit...

Re: The Crystal Programming Language

#56
post #2

What is the edge it gives when compared to Rust, Zig, and Nim?

Controversial in this forum, but its GC.

In some applications memory allocation is not that important, so it's nice not having to think about it at all.

I've gone deep into Rust recently, but Crystal might still eat Python's lunch, a language I've fallen out of love with.

Re: The Crystal Programming Language

#57

Now, all we need for crystal to succeed is numpy, scipy, something pandas-like, and of course matplotlib (not plots, matplotlib). By the way, how are we on data-science friendly IDEs? Debugging? Automatic thorough documentation generator? Tooling in general? Is the time to first plot fast? Where I work, we desperately need a fast python.

>... numpy, scipy, something pandas-like, and of course matplotlib... Where I work, we desperately need a fast python.

It sounds like Julia would be a better fit than Crystal?

Ironically they have similar problems: compile/start-up time (though crystal has working ahead of time compilation - AFAIK Julia developers are still working on speeding up "first run" in various ways).

Re: The Crystal Programming Language

#58

Earlier quoted context omitted.

Probably because of the Ruby inspired syntax which just brings joy. Hopefully the ecosystem can grow and partially catch up as well

I guess beauty is in the eye of the beholder because I look at that syntax and cringe.

What about it makes you cringe?

Re: The Crystal Programming Language

#60

Let's migrate RoR to CoR

That could be possible considering much of the language seems compatible. However, Crystal has incompatible accessor syntax for some reason. And concurrency is handled differently unless rails uses fibers everywhere. At this point they are way too different to just get away with syntax find/replace, it would require structural changes as well.
Post reply on HN