Why Isn't Every Sane Developer Obsessed with Crystal?

7 Likes

There exists benchmark from Tencent named AutoCodeBench (https://autocodebench.github.io/), where they compared pairing of LLM’s and PLs on the stack of programming problems. By using Upper Bound score (union of all solved problems of all LLM’s) Ruby got 79.5. Kotlin got 89.5, Elixir got like 97.5.

Sadly they didn’t use Crystal for tests. I think it’s an interesting area for research and Crystal is definitely capable to get high results.

4 Likes

This is interesting, even Julia scores high, which makes me think Crystal would most likely rank up there too!

Elixir’s score is insane! Makes sense though, José has been on this since day one. I tried building a Phoenix app with Claude Code and Tidewave and it’s pretty much mind blowing :joy:

Short term, maybe. But long term, I’d bet the pendulum swings back and next generation dynamic languages rise again.

2 Likes

Nah… Disregarding the clowns that vibe-code their new thing without any understanding whatsoever and then whine when hackers tear their site apart for the moment: you need to understand what the LLM is doing, and that’s just easier with Python than assembler. Because seasoned developers know that in the end they’re the maintainer. So they stick with what they know, and new folks will pick up on that because they want to get in on a particular thing.

Hell, LLMs might even be good for niche languages, interested parties might be more willing to give something a try as they can always ask the LLM for help.

2 Likes

But is Python easier to grok than Go? Or Crystal? Hmmm

That’s an interesting question: would Python succeed in a world that already had Go?

But I stand by my point, yes, Python is easier to grok than Go or Crystal for a whole bunch of existing developers. I’d wager that most developers that start using LLMs use them for languages they already know.

This is what happened with me. As a brand-new junior developer in 2018, I was introduced to Crystal for a small component a senior dev wanted me to write, so I read the language reference, tinkered with it a bit, and dove into the project. At this point, I continue to keep up with the forum and blog, but I don’t have the time for sizeable Crystal projects amidst my work in Java (which I like less and less) and C++ (which I’m learning to appreciate more, despite its faults). I do use Crystal for little tasks here and there, where bash tooling falls a bit short, but I hope one day to be back working in Crystal with more regularity.

In any case, my point was that this does work, at least sometimes.

7 Likes

I have been a Crystal enthusiast since before 1.0. And I started using agents last year. One trend I’m seeing is for backend development with agents, languages that are strongly opinionated are easier for agents to code against. C# is one that is standing out. If Crystal can position itself in a similar manner, then I can see dev communities picking it up. It has great frameworks (Lucky, Amber, Kemal) that aren’t bloated. Context is king with agents, and I can see Crystal development via agents be fast and have smaller errors on first passes.
I’ve definitely had success in creating small examples here and there. Would like to see how it fares on larger projects.

3 Likes

I’m pretty obsessed with Crystal these days. But then, I retired from paid programming work in 2015 and write code mostly for myself. So I have the freedom to choose whatever programming language is the most pleasant for me. If I were still working for $BIGSOFTWARECOMPANY, I’d be doing C and assembly language, or some Latest Thing popular language like Rust or Zig.

To give a few examples of the kinds of things I like to do with my freedom, in the last two years I rewrote the Sup email client in Crystal, and rewrote my MicroEMACS editor variant in Crystal. I also wrote a cscope-like program for Crystal. These were fun projects that benefit nobody but myself, and I use them every day.

I have also written a few very simple web-based server applications, one of which is a book cover URL cache server for the Koha library software, which is being used by three libraries in Vermont. I’ve also written an xBrowserSync server, which I deployed on my own VPS and use in my browsers. Again, these are things that almost nobody else is going to care about, because they’re not part of the Latest Thing Craze, but writing them pleased me.

As for LLMs, I refuse to use them. I’m old, and prefer doing things the hard way: studying code and documentation, and figuring things out slowly.

10 Likes

Is this Open source?

2 Likes

ce.mirror on  master [?] is :package: v0.1.0 via :gem_stone: v3.4.8 via :crystal_ball: v1.19.1 took 3s

make
./get_version.rb
./get_version.rb:17:in ‘IO#read’: closed stream (IOError)
from ./get_version.rb:17:in ‘Object#version’
from ./get_version.rb:26:in ‘block in ’
from ./get_version.rb:25:in ‘IO.open’
from ./get_version.rb:25:in ‘’
make: *** [Makefile:2: ce] Error 1

Oops. I use fossil instead of git at home, and didn’t notice. Try again.

2 Likes

:+1:

And I should have typed “TypeScript”: GitHub Data Shows AI Tools Creating "Convenience Loops" That Reshape Developer Language Choices - InfoQ

I recently started a side project and went back to rails. purely for the ecosystem.

This is hard but rails has systems for the database (caching, background jobs, notifications) and browser (turbo, partials, simulus). I just want to write my app and the complete integrated system to just get coding on the project is more important even though I love Crystal and would prefer to use it.

Maybe I can convince you to give the Marten web framework a try.

I also come from the Rails world and really like the lean Hotwire frontend.

I’ve written a few apps/extensions for Marten that provide better support for importmap and Turbo (namely marten-turbo and marten-importmap). They aren’t as deeply integrated into the framework as they are in Rails and require a bit more initial configuration, but for me, it’s sufficient - I don’t feel like the tooling is getting in my way.

My goal is to make this integrate more seamlessly over time, similar to Rails, while staying in the Crystal ecosystem.

Maybe you’ll give the tooling a chance and stick with Crystal.

4 Likes

I recommend checking out blueprint and datastar for frontend stuff as alt for hotwire in crystal, there is also celestite it’s is really nice if you like svelte

2 Likes

I have such great news for you, my friend.

  • the crystal-cache GitHub org (looks like @mamantoha, who probably publishes more shards than anyone else, also owns this) provides a great shard with a single interface and several different backends
  • for background jobs, mosquito is pretty solid
  • a really handsome dev published a turbo repo repo — it’s not actually necessary to work with Turbo specifically, but it also provides support for the cable shard for ActionCable integration to get nice server-pushed updates propagated to the DOM
  • partials are fine for Rails, but you can build UI components (which will be type-safe) based on any Crystal object that responds to to_s(io) and render it into ECR (and ECR-like) templates with <%= MyComponent.new "and maybe some args" %>
    • the complete implementation of Armature::Component, which is how all of my apps’ UI components are defined, is 9 lines of code including structural boilerplate
    • Armature::Component uses Armature::Template for HTML-escaping by default just like all the Ruby HTML template engines do, but you can also use ECR from the stdlib
  • Stimulus is covered by stimulus.cr

The ecosystem does have a lot of the bases covered. Not everything, but the common needs are handled. If by “notifications” you mean APNS/FCM push notifications, then yeah, this does seem to be missing from Crystal, however if you’re sending them via AWS SNS, I’ve got you.

6 Likes