Hacker News new | past | comments | ask | show | jobs | submit login

My side project https://totalrealreturns.com/ is now about 5k lines of Crystal. There are some rough edges: in particular I think it could use a better templating solution (a port of HAML would be ideal!), and there are some failure modes with the Redis connection pool that have required workarounds.

This includes unit tests: the built-in spec framework is great and much like rspec. https://crystal-lang.org/reference/1.6/guides/testing.html

I'm now starting to use Crystal for internal backend infrastructure and microservices.

For anyone who wants to kick the tires on Crystal, I built a crystal-docker-quickstart project template: https://github.com/compumike/crystal-docker-quickstart works without having to install anything locally. (Assuming you have docker.) You can have your own, home-built "Hello world" static binary in under a minute:

    git clone https://github.com/compumike/crystal-docker-quickstart.git my_app && cd my_app && ./d_dev
    # in the shell that appears:
    make && out/my_app
Then just edit src/main.cr and you're off and running :)



Nice project, learned a bit from it about some Vanguard funds I didn't know about previously.


Can you clarify this remark? You're saying that a mutual fund told you about a programming language?


No, OP's project written in Crystal told him about mutual funds.


That is one fast-loading page, especially for (what looks to be) dynamic data!

Are you doing anything special or just using a good CDN?


Thanks :) No CDN actually -- it's just a side project served straight from a single VPS at the moment.

You're probably just seeing the speed of response caching (which I've written in Crystal too, using Redis and local disk as storage backends). If you request a new ticker symbol that isn't already cached, or specify custom date ranges, it will recompute or even have to fetch data from upstream data provider, and those requests will take a bit longer.

Also, the whole site is currently served up as a single HTTP request, except for a few external JS and CSS files (Bootstrap, uPlot) which are served from public CDNs.


Nice!!!

What are some advantages of Crystal over other languages like Go, Java.C#, Rust?


Developer happiness, plus minimizing "pain score" https://news.ycombinator.com/item?id=32216786




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: