Re:Marten, a Crystal web framework that makes building web a...
by karol on Sunday October 30, 2022 @06:33PM
(#33399670)
Nice project, learned a bit from it about some Vanguard funds I didn't know about previously.
Re:Marten, a Crystal web framework that makes building web a...
by jxf on Sunday October 30, 2022 @10:07PM
(#33401257)
Can you clarify this remark? You're saying that a mutual fund told you about a programming language?
Re:Marten, a Crystal web framework that makes building web a...
by PKop on Sunday October 30, 2022 @11:47PM
(#33401840)
No, OP's project written in Crystal told him about mutual funds.
Re:Marten, a Crystal web framework that makes building web a...
by paulgb on Sunday October 30, 2022 @05:47PM
(#33399116)
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?
Re:Marten, a Crystal web framework that makes building web a...
by compumike on Sunday October 30, 2022 @05:54PM
(#33399207)
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.
Re:Marten, a Crystal web framework that makes building web a...
by victor106 on Sunday October 30, 2022 @07:05PM
(#33399982)
Nice!!!
What are some advantages of Crystal over other languages like Go, Java.C#, Rust?
Re:Marten, a Crystal web framework that makes building web a...
by compumike on Sunday October 30, 2022 @07:16PM
(#33400067)
Developer happiness, plus minimizing "pain score" https://news.ycombinator.com/item?id=32216786
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:
Then just edit src/main.cr and you're off and running :)