Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Crystaldoc.info – Crystal Shards API Documentation Hosting (crystaldoc.info)
43 points by nobodywasishere 11 months ago | hide | past | favorite | 13 comments
This is a website I developed in Crystal for hosting API documentation for Crystal shards (aka gems, crates, libraries, etc). It's built in Crystal itself and is using Postgres, Kemal, the built-in doc generation tooling, and Lexbor. I've been working on this for a number of months and I'm proud of where it's gotten. All feedback welcome!

Repo: https://github.com/nobodywasishere/crystaldoc.info




Why isn't crystal gaining much adoption? It seems like a very solid language as it looks like Ruby (even Matz gave praise to crystal) it's built on LLVM (blazing fast) and the library ecosystem is growing.

What does it need (other than probably true Ruby interop) for mass adoption?

Is there any companies using and making bank with crystal in production?


Speaking as someone who likes Crystal and has written a few libraries and tools in it (as well as contributed to the reference implementation/stdlib/compiler a bit):

1. Crystal is only superficially similar to Ruby; those familiar with Ruby will find its syntax familiar, but the language's syntax, semantics, and even stdlib diverge substantially once you go beyond basic things. In many cases I'd argue that Crystal's stdlib is way better planned and thought through than Ruby's was, but those differences add friction.

2. Despite only being superficially similar, Crystal is still heavily associated with Ruby, and Ruby's moment is (perceived to be) "over" in terms of the tech/stack hype cycle.

3. Crystal's value proposition is somewhat limited: Go, Nim, etc. all fill similar niches, and Rust has been eating into those niches as well (including for people like me).

With all that being said, I think Crystal is a great language, and I would love to see it be used (and gleaned from) more. In particular, I think that Crystal's stdlib is well designed, that the macro system is extremely intuitive and way better than Rust's, and that Crystal's FFI is way more ergonomic than most languages in its cohort (although Rust's is about as good).


Happy Crystal user and code contributor here. (Also created https://github.com/compumike/crystal-docker-quickstart in case you want to try Crystal without installing anything.) In my opinion:

- Slow compile times are still a pain for iteration.

- The REPL / interpreter mode is still rough around the edges.

As far as companies using Crystal:

- We’re using it happily in production at Heii On-Call https://heiioncall.com/status

- Kagi is using it for their search engine backend https://news.ycombinator.com/item?id=32687071

- Other companies using it list: https://crystal-lang.org/used_in_prod/


+1 to the other comments, but I feel like crystal has a few huge chicken and egg problems, maybe exacerbated by the fact its natural "audience" is perhaps the ruby community. As a rubyist myself I've tried to evaluate/subversively introduce crystal into projects a number of times and every time I had to bail out because i couldn't identify adequate libraries for things i needed.

I don't need (or, frankly, want) Rails but I couldn't identify even basic things like an adequate ORM or anything other than the most basic wrappers around raw DB drivers. There's a few web frameworks that look kind of promising (amber, kemal) but I ran into immediate problems testing them out and they seems just way too immature. And it just continues - libraries i need just not existing, or being so basic I couldn't in good conscience rely on them in a professional context.

This isn't crystal's fault, it's just not done yet. The problem is, right now at least, crystal's "sales pitch" is "ruby, but type safe and faster and more modern" - but that seems like a vague theoretical future benefit, whereas I have all the tools I need in ruby right now. It's gonna be a tough nut to crack. I do wish them the best though.


In the last 10 years there have been too many cool new programming languages vying for programmers. Nim is in a similar situation, why isn't it growing more? The problem is that one of the key factors in choosing a language is existing community size. Rust, and to a lesser extent Go, took most of the mindshare of programmers who were looking for something new.


They also had the benefit of being backed by significant corporations and being used in large projects (Mozilla/Google and Servo/K8s).

Crystal needs some big projects to gain that mindshare.


I went through a phase about a year ago where I started all my hobby projects in Crystal. It was a pretty fun exercise but I stopped eventually for the following reasons:

- Ultimately, I ran into some bugs with things in the standard library. There's still a lot of warts and a lot of vague error messages. Hopefully this has improved since I last touched it.

- No windows support. Much of my hobbyist time is spent dabbling with gamedev so it always felt like eventually this would be a dealbreaker.

- I found it hard to grasp some of the type grammar. Mixing the looseness of Ruby syntax with strict typing can sometimes result in weird ergonomics.

That said, I think if/when it matures further I plan on going back to it. Macros were really cool and at the end of the day I just really like working in ruby style languages. The community was also super helpful on Discord.


The windows support is a killer, but I think they’ve been working to improve it. 95% of workstations at my office are Windows, so there’s that’s a huge missing market share.

I still say that the initial lack of good windows support by Ruby was a major reason that Python “won”.


Yeah, there's a GH issue thread here that I keep an eye on: https://github.com/crystal-lang/crystal/issues/5430

I figure whenever windows support lands will be a good time to give it a shot again.


What does it do better than all the popular languages?


Not OP and not a professional Crystal dev (not even a Ruby hobbyist). But I use other languages professionally, including Java, Python and (to a smaller degree) Rust.

But my $0.02: what Crystal does best for me is the "fun factor". It has a very good balance between a dynamic language "feel" with the safety of static typing, and with native compilation.

I can just prototype things willy-nilly with minimal ceremony and not worry too much if it starts getting big.


Because there's very little value added from Crystal compare to Go. So nobody's gonna sacrifice the huge ecosystem to move there.


Nice work! I've begun queuing up/adding my Crystal shards to your site.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: