Crystal: Documentation / Tutorial: From ruby to crystal

Created on 4 Apr 2019  路  7Comments  路  Source: crystal-lang/crystal

I would like to suggest a short document, a mini-tutorial, for people who already know ruby but may consider crystal for whatever the reason.

It may be a quite common use case to see ruby users come start with crystal; I assume many current crystal users came from ruby.

Now you may say that working through the official tutorial is what people should go through, which is fine; but people are lazy too. My idea would be just to distill the core things, the core differences, to get people going. Perhaps a bit like a wiki, but an official link from the tutorial to that wiki may be useful.

What should this tutorial include?

  • Syntax differences, ideally with examples; starting with the biggest differences, e. g. type system.

  • Minor differences elsewhere in the language.

I am not sure if this may be considered worthwhile to have but it may help people transition into crystal, e. g. get started with it. Right now there is quite a lot of documentation but people don't always have time to read it all - right now I have only 30 minutes left before I have to leave here for ~4 hours, then I come home, have ~2 more hours, then sleep, early wake up, things to do ... during the week it is very hard to find enough time to learn crystal. Over the weekend it is a bit better but I'd be much happier to look sort of just at a "distilled version" for crystal.

(One advantage of a wiki may be that it is easier for people to add/contribute to it, and github has a wiki integrated as far as I know on a per project basis.)

Most helpful comment

Regardless of this specific issue, Crystal is missing a tutorial that guides you through the language while maybe building some small programs, either assuming Ruby knowledge or not. I'd love to have something like this... but it requires time and effort.

All 7 comments

There is already a pretty extensive article on our wiki: https://github.com/crystal-lang/crystal/wiki/Crystal-for-Rubyists Maybe it just needs more exposure?

Could you reopen this discussion on the forum, please? Thank you :heart:

I think it will better to have its own repo rather than the wiki, like https://github.com/crystal-lang/crystal-for-rubyists and have a link pointing to it in https://github.com/crystal-lang/crystal-book

Regardless of this specific issue, Crystal is missing a tutorial that guides you through the language while maybe building some small programs, either assuming Ruby knowledge or not. I'd love to have something like this... but it requires time and effort.

I've been reading https://doc.rust-lang.org/book/ch02-00-guessing-game-tutorial.html lately, I thought it was very well explained even for a simple example like this! We can start shorter of course!

@asterite #4462

I've started with very short first steps. Maybe I should already publish it to continue working on it together?

@straight-shoota Definitely!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asterite picture asterite  路  3Comments

pbrusco picture pbrusco  路  3Comments

relonger picture relonger  路  3Comments

ArthurZ picture ArthurZ  路  3Comments

will picture will  路  3Comments