Lots of experienced people on this forum use Nim, but in my opinion Nim could be used as a first programming language too - and this is why I've made this tutorial.
If you have any questions, comments, or advice how to make this better - let me know.
I just had a quick flick through it, it looks really well presented and accessible to inexperienced programmers. Well done!
As an aside, it'd be really cool to have something like this combined with the nim playground: https://play.nim-lang.org/ to make something similar to the Go tour.
I just had a quick flick through it, it looks really well presented and accessible to inexperienced programmers. Well done!
Thank you!
it'd be really cool to have something like this combined with the nim playground
You're not the first one (not even the second one either :)) mentioning this. I agree that would be cool/useful. Maybe this could be done for the ver2.0 of the tutorial.
I'm not a professional programmer. On first glance this looks great. I'm re-inspired to programming again.
Quick question: To what degree does Nim support network programming? I'm sure that at the very least it must support sockets. Right?
Quick question: To what degree does Nim support network programming? I'm sure that at the very least it must support sockets. Right?
A very great degree. Nim offers async await and this forum is written 100% in Nim using it :)
It would be great if you could add concurrent and parallel content.
I'm not sure that qualifies as the very basics that should be taught to the newcomers.
As you can see, I also didn't mention custom types/objects, templates, macros, etc., as I tried not to overwhelm the beginners.
But some article/tutorial focusing on concurrency/parallelism in Nim would be nice indeed. I leave that to the people more experienced in that field.
@miran,
This is fantastic!
I'll put commenting on this tutorial on my todo list. I can do it one of two ways:
If you are not familiar with the work of a Content Editior, such as the kind that works for a publishing house:
Content editors are horrible beasts hated by writers world-wide. They nitpick and comment, cross whole paragraphs out, and much worse. Writers put up with them because they, grudgingly, improve their work somewhat. The only saving grace is that writers are allowed to ignore the suggestions.
As you might of guessed, I've been both a book writer and a content editor. At least I wasn't an evil Copy Editor. :)
If you choose option #2, it will take me about a week to get you the feedback. I'll pass the markup to you as a private document, the world need never see it.
http://thehelpfulwriter.com/kinds-of-editors-what-editors-do/index.html
Thanks (in advance) for your help!
1. make mild suggestions like a friendly contributor
For mild suggestion and small fixes, you (and others) can submit a pull request in the repo, or just raise an issue.
2. markup the tutorial like a commercial Content Editor (...) it will take me about a week to get you the feedback. I'll pass the markup to you as a private document; the world need never see it.
If you are willing to do this - I'm all for it. Take as much time as you want/need, no hurry.
To celebrate the release of Nim v1.0, the tutorial has been updated.
Several typos and errors have been fixed, but the most noticeable improvement is in the PDF version of the tutorial, which is now much nicer to read, and not just an afterthought like previously.
If you prefer the web version, it is still at https://narimiran.github.io/nim-basics/
Great work miran!
Your Asciidoctor css layout looks nice. I was never fully satisfied with the default Asciidoctor style, and also liked the Asciidoctor Stylesheet Factory themes not really. So I tried tuning them a bit, but was not too successful.
It seems you tuned CSS for html, pdf and even the CSS for code listings successful. Looks all nice.
I think Dom's book was also written with Asciidoctor, and the initial draft was looking good in ebub and pdf version, but unfortunately Manning made it uglier in the final release, so I newer read the final version.
There is now an experimental .epub version of the tutorial, available at https://github.com/narimiran/nim-basics/raw/master/nim-basics.epub
It looks ok when I view it in Calibre, but I don't know how it is on a physical ebook reader since I don't have one. If you own an ebook reader, I would like to hear your feedback before I make it public/official.
What I'm interested in: are font sizes ok (I guess you can change that to your suiting, but I'd like to have sane defaults), are left and right margins ok, are code samples shown properly (without some unintended line breaks where there should be none), and... anything else that you notice.
I'll check it on my kindle tonight.
Ping me on gitter if you don't hear from me until tomorrow.
Sorry for not getting back to you sooner. I was busy with some exams. I checked the new EPUB on my Kindle and it looked awesome. Extra white space problem is solved and the TOC works as expected.
If its not too much to ask
* Devote an introductory chapter to metaprogramming with a simple DSL tutorial.
* And a chapter to major databases connection. (especially SQLite).
* I really wish you included a topic on concurrency and parallelism and how you would normally use them in Nim.
All these topics go beyond beginners tutorial.
I'll consider them for the "Intermediate Nim" tutorial if/when I begin to write it.