Live data from Hacker News

The Crystal Programming Language

crystal-lang.org

11–20 of 116 posts

Re: The Crystal Programming Language

#11
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 the wonderful feel of Python. Definitely check this language out if this is the first time you're hearing about it.

Re: The Crystal Programming Language

#12
I used Crystal to create a web application a 2-3 years ago. It is running great without any problems. There are not that many users (only about 300-400) at any time. Anyhow, I did not touch the application in the last two years, and did not use Crystal in the last two years for anything else. I used Rust to write some simple personal CLI apps, which was fun but also hard. For some reason, couple of days back I returned to Crystal for a CLI app that I am making. I will say this: Crystal is a lot of fun to program in, easy to use and performant all at the same time. I cannot explain the reasons objectively, but it is really a joy to use Crystal. I think I will be using it from now on. I just wish it had a bigger community and as a result more libraries.

Re: The Crystal Programming Language

#13
post #12

I used Crystal to create a web application a 2-3 years ago. It is running great without any problems. There are not that many users (only about 300-400) at any time. Anyhow, I did not touch the application in the last two years, and did not use Crystal in the last two years for anything else. I used Rust to write some simple personal CLI apps, which was fun but also hard. For some reason, couple of days back I return…

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

Re: The Crystal Programming Language

#14

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.

I've tried a few times now to do data science in a statically typed language, and I just haven't enjoyed the developer experience. In general I tend to think the advantages of dynamic typing are overblown, but this is one problem domain where it seems to be indispensable.

ML and data engineering is a different story, of course. Also, I wouldn't be surprised if something clever could be done with a structural type system.

Re: The Crystal Programming Language

#15

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.

I've tried a few times now to do data science in a statically typed language, and I just haven't enjoyed the developer experience. In general I tend to think the advantages of dynamic typing are overblown, but this is one problem domain where it seems to be indispensable. ML and data engineering is a different story, of course. Also, I wouldn't be surprised if something clever could be done with a structural type sys…

What languages have you tried, and what in them did not work?

What’s wrong with casting variables to mutate their type?

Re: The Crystal Programming Language

#16
If you want to generate a Crystal SDK for REST APIs, please give OpenAPI Generator [1] a try. Here are 3 simple steps to do so: https://forum.crystal-lang.org/t/crystal-api-client-generato....

Hopefully this will save you some time in manually creating the API clients in Crystal.

[1] https://openapi-generator.tech/

Re: The Crystal Programming Language

#17

Earlier quoted context omitted.

Crystal's performant enough, but its key differentiating feature is its Ruby-like syntax. It's easy to write, and comparable in performance to Go and similar. Rust, Zig, and Nim are solving different problems.

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).

You can ditch Nims GC and runtime and bring your own if you want. Of course you'd lose access to most of the stdlib but this is why Nim can be used and is popular for embedded / bare metal.

Tmk Crystal still lacks Windows support as well and probably other os's / archs's compared to Nim

Re: The Crystal Programming Language

#18

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.

Data science is a domain crystal could excel in. Having both an approachable syntax and the feedback that the compiler and type system provides makes it an excellent companion for that work.

There's some interesting things you can do with the type system too, like capturing dimensionality in the type: https://git.sr.ht/~kb/matrix/tree/main/item/src/matrix.cr

One missing item though is SIMD support: https://github.com/crystal-lang/crystal/issues/3057

Re docgen - that's built into the compiler: https://crystal-lang.org/reference/1.5/syntax_and_semantics/...

Re: The Crystal Programming Language

#20

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.

I've tried a few times now to do data science in a statically typed language, and I just haven't enjoyed the developer experience. In general I tend to think the advantages of dynamic typing are overblown, but this is one problem domain where it seems to be indispensable. ML and data engineering is a different story, of course. Also, I wouldn't be surprised if something clever could be done with a structural type sys…

Static typing is like salt, sprinkle a little bit and it enhances and gives flavor to your food. Too much of it and it completely ruins the dish.
Post reply on HN