Introduction to Crystal & Athena on Heise.de

Major German IT news portal heise.de published an introduction article about Crystal:

It’s in German, of course. But autotranslate might get you a long way.

It showcases some simple Crystal syntax and then starts building a tiny example web app with Athena.

They also announce follow-ups at the end.

8 Likes

nice! something that i can throw at my co-workers.
very good. I expect some more germans on this forum soon :)

Wunderbar! I put together Add note that `PCRE2` needs to be manually installed by Blacksmoke16 · Pull Request #33 · athena-framework/website · GitHub to make it a bit more clear pcre2 needs to currently be manually installed :muscle:.

Sadly the libraries mapping in shard.yml doesn’t really do much for this. I don’t suppose that could be make a bit more clear to the end user? Like maybe run the libs in the map through pkg-config if available and at least show like:

Warning: You may need to install ‘pcre2’ as it was not found on your system and Athena requires it

I also noticed one of the image captions said Athena does not support HTTPS. This isn’t entirely true as you can pass your own ssl_context to enable it. Tho I’m not sure if that’s something I can include out of the box, maybe some guide on how to generate/use self-signed certs locally would be enough? Or at least suggest putting it behind Nginx/Traefik/etc?

Given that we ship pcre with crystal, could we ship pcre2 too?

Yes, we’ll do that when PCRE2 becomes the default in stdlib. Right now it’s only an opt-in preview.
It’s only needed in this example because Athena has an explicit dependency on PCRE2.

I agree the libraries property could use some love. We’d have to experiment with what makes sense for it.
I fear pkg-config won’t be good because it can need some customization and platform-specifics into account. That’s a hard thing and would essentially duplicate the logic that goes into @[Link] annotations.

What about just printing some information only verbiage after install based on the contents of the map. Would be a quick win and at least make people aware of it, but at the cost of some possibly extraneous text if you already have everything installed. Probably a worth while trade off I’d think tho. Always can do something more robust later.

3 Likes