How/Why did you find Crystal?

Thought it might be interesting to see how folks came to discover Crystal and why did you stick around.

I had heard of Crystal a few years ago but never thought of playing with it. Recently I wanted to build a simple web app that would be self contained in a single binary. I know some Golang but not totally in love with it, was looking for a similar compile to one binary type language. I tried vlang but documentation and ai knowledge of it was outdated. Started to play with Crystal and it was a joy. It reminded me of how ruby made me love programming again. Been coding my app for a few weeks and loving the language so far. Been impressed with ameba as well, it’s great for directing me towards more idiomatic ways.

8 Likes

I actually remember this quite well. Was almost 10 years ago at this point where I was scrolling on my phone thru its like personalized news feed and was this article about Crystal. The headline was the old ā€œFast as C, slick as Rubyā€ one and it really caught my eye. At the time I was working on my honor’s thesis that was a program written in Ruby. Ended up porting things over and it made it like 1,000x faster. Granted back then I didn’t really know as much as I do now, so I feel like some/most of the gain is just because of a better implementation than entirely because of the language. But either way it ended up sticking and have been using it since.

P.S. Which framework did you end up going with? :stuck_out_tongue:

5 Likes

None, kind of crazy I know. Might eventually port to something if I ended up running into issues I can’t fix. Lots of asking ai, reading, and googling to determine how to do something got me where I’m at.

I am using slang for the html rendering, that’s probably the closest, otherwise it’s mostly standard lib. This is my repo if curious, Quick Headlines. Be gentle as it’s my first project in Crystal.

3 Likes

I knew of Crystal for a long time, but since due to my work I use Windows, I could never use it. About a year ago I checked again and saw it was finally working on Windows and started slowly to use it. I’m still learning it and getting used to the differences from Ruby.

2 Likes

Through Wikipedia’s, actually. I was looking for languages (I forget why) that compiled to machine code, were at least close to C’s performance, was preferably OOP, and had a GC. Not many tick all of those boxes, but Crystal seemed to, so I decided to give it a try. At first it was a bit unusual feeling since I had no Ruby experience, but I still managed to pick it up quickly. Now it’s my second favorite language.

3 Likes

I was Googling for a way to compile Ruby to a single executable much like what Go does and Crystal came up. Go’s syntax just doesn’t feel intuitive to me so Crystal is a perfect fit.

After 1.0 was released I used it in a project at work to convert ā€˜sudoreplay’ logs to plain text, those logs were later uploaded to Splunk. The project made it to production bastions and we even compiled it for Graviton CPUs . I don’t work there anymore but as far as I know it’s still used there.

I’m not really a developer, lately I’ve been having Claude help me with some Crystal code to great success- I think the best is still to come and I’m hoping to be able to share my next project with the community here.

2 Likes

I’ve been using Ruby for a long time, and I’ve known about Crystal for a long time as well, but never try it.

But one day, after I started working with statically typed languages like Dart and Go, I really like Dart’s null safety’s feature. That made me revisit Crystal, and use it instead of Ruby, still now.

@Kritoke BTW, if you want a SSG, maybe you can try GitHub - crystal-china/website: Crystal China website , I try to minimize the use of external dependencies,it support write markdown directly which rendered use markd, and highlight code block use tartrazine, front-end use htmx, built to a single binary (includes all assets files)

Well, I’ll admit I’m a bit lazy. The website hasn’t been updated in a while. actually, there’s a tailwindcss branch. I’ll admit I’m not really a front-end guy, I had some frustrations switching to using tailwindcss, But most of the features actually work very well, It’s also easy to turn into a forum, although it’s a bit crude.

I came from JS and discovered Crystal after looking for a compiled language with GC with an easy syntax.

Crystal is a rare sweet spot, matching productivity with performance, with all due respect to Go and Nim.

I have a debt with @Blacksmoke16 because of a backend framework that is protocol agnostic I initially made in NodeJS, but I discovered cancer before being able to port it to Crystal. Now the treatment ended (thanks God) and I finally started to port it. I hope to provide good news soon.

3 Likes

I don’t remember how I first found Crystal. So it probably wasn’t a memorable encounter. For a long time, I didn’t think programming language speed was that important. My first reaction might have been something like: ā€œInteresting, there are people who want to limit Ruby’s expressive power and make it more rigid.ā€ It also took me a few years from the first encounter to actually trying Crystal.

2 Likes

I’ll certainly take a look, I’m specifically looking for simple and minimal dependencies for a static site generator. The crystal china site looks like it uses lucky and other things. Could still be a good reference for using markdown though.

Okay, any question for how this website work, you can ask in the Github discussion or IM here.

Anyone who uses ruby regularly will have heard of crystal at some point in the past few years. I heard about it around 6 or 7 years ago. I wanted to learn it to get into open source. It took me quite a while to feel comfortable with it, but it worked out. I have a lot of issues with the language but there’s nothing like ruby and crystal out there so I always come back.

2 Likes

I think the first time i heard about crystal was in a ruby lightning (5min) talk, maybe in 2015. Have been using it since then to replace ruby and scala.

1 Like

https://www.heise.de/hintergrund/Einstieg-in-Crystal-Kompilierte-Sprache-mit-modernen-Konzepten-7454848.html

Habe ich damals gelesen. Hat mich an Eiffel erinnert. Bin nur interessierter Laie. Leidetr gibt es keine deutschsprachigen Bücher , Webseiten. Aber bei Kindle findet man jetzt einige gute englisch sprachige Bücher. Mein Englisch ist schlecht. Schönes neues Jahr.

After having used Python compiled languages felt like a straightjacket but of course the trade-off was performance.

And so the search began…

1 Like

It found me. :slight_smile:

I’ve been working on a port of an old (circa 2002) PalmOS app of mine (ninerpaint.com) for some time (hobby project).

I coded a first prototype in Rust: solid and performant but painful to refactor, something I do a lot when in exploratory mode.

Switched to C: good performance, easier to refactor than Rust, crashes a lot, of course, but idc at this early (still exploratory) stage.

Did a brief stint with the Kagi people, who pointed the way to Crystal, used for their backend. Though nothing came of that, the seed had been planted.

Been w. Crystal ever since. See attached for screenshot of work in progress.

I will probably spend some time with Lisp + CLOS when in need of further exploratory coding; CLOS is so much more advanced than most OOP flavours (IMO).

But as far as known feature coding is concerned, Crystal hits the spot.

9 Likes

Hmm.. I started with Crystal around 2017 or 2018, thanks to a recommendation from a friend who knew I loved Ruby. (Unfortunately, he’s a Python fanatic.)

I began with some simple toy projects, tinkering here and there, and now I’m focused on this project.

I use Rust and Go pretty often too, but honestly, nothing beats the sheer joy of writing code in Crysta.

In Korea, there are probably very few users, so I really hope the community grows and more people start using it :grinning_face_with_smiling_eyes:

5 Likes

I read about Crystal in the Ruby Weekly newsletter. Must have been around November 2021, as since then I’ve been writing my own web framework and implementing small projects with it in my spare time. Having worked with Ruby in the years before (and still doing it in my job), I never thought I would one day stumble upon a language I’d like even more - but here we are! I still feel pure joy from making something work in elegant ways every time I touch my Crystal codebases. Whatever the thoughts of the original inventors about it are now (not sure if any of them is active in the community anymore?), I am grateful for what they’ve brought to us. Thank you!

3 Likes

When I first try a new language I like to keep a log. So I found exactly when I started using Crystal and how it went: Learning Crystal by Implementing a Static Site Generator | Ralsina.Me

5 Likes