crystal
-
Server side syntax highlighting with Crystal lang, NOIR and Lucky framework
by Vincent Jousse
I hate to rely on Javascript to highlight code. This is something that we can and should do on the backend IMHO: no point in overloading the browser for that. This blog is written in Crystal and Lucky Framework and I was using Prism.js to highlight my code as I didn't found a ready to be used solution at that time. It's not the case anymore: NOIR and some custom renderer for Github Flavored Mardown library cr-mark-gfm did the trick. Here is a little tutorial on how I did it.
-
Manage multiple Crystal Lang versions
by Vincent Jousse
As Crystal 0.36 is now out on Crystal Lang you may want to manage multiple versions of the crystal compiler locally. Let's see how to do that quickly and easily.
-
Lucky Framework: upload a file with Shrine while keeping the original filename
by Vincent Jousse
On the Lucky's website, the way to go to upload files is to use Shrine.cr. The problem is that, by default,
Shrine.cr
is not using the original name of the file to store it, but instead uses a generated id. And of course, for my particuliar use case (serving files directly through Nginx) I need the file to be stored with it's original filename. -
Why you should give Crystal Lang a try: a quick review
by Vincent Jousse
I've been trying out Crystal Lang for a few months now and I have to admit that, I am really happy with it, even if it's not a functional language nor has a very strict compiler. The reason why is pretty simple: it's as easy to write as any dynamic language like Ruby, Python or PHP while still providing a compiler that is helpful. Kudos to the Crystal team for that!
-
Adding tailwindcss to your lucky project
by Vincent Jousse
A short post about how to add tailwindcss to your lucky project. Disclaimer: I'm new to the crystal programming language, to the lucky framework and all the frontend stuff including webpack and tailwindcss.