TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Learning Programming with Nim

181 pointsby jblindsayalmost 7 years ago

14 comments

dual_basisalmost 7 years ago
I&#x27;ve got a systems level project I want to play around with, however GC is not a deal breaker for me. The languages I&#x27;ve been considering are Rust, Nim, Crystal, and Zig. I&#x27;ve started writing it in Rust but the syntax is unnecessarily noisy for my taste and there are too many times I have to do similar things in a slightly different syntactic way due to some inherent idiosyncrasies, which makes the code much harder to read. In addition, it seems like there are often too many ways to do the same thing, which increases the surface area of the language.<p>I like Nim syntax the best, and Crystal and Zim are tied for second. I don&#x27;t mind a small library &#x2F; ecosystem. The main things I&#x27;m interested in are:<p>- I want to write once and run on Windows &#x2F; Linux &#x2F; Mac. (I&#x27;m not writing a GUI.) - Concurrency and async capabilities - Safety guarantees (both types and threads) - Speed<p>I&#x27;d be interested in people&#x27;s recommendations, or links to comparisons between these languages.
评论 #17304534 未加载
评论 #17305118 未加载
评论 #17304788 未加载
评论 #17304254 未加载
评论 #17304263 未加载
评论 #17305664 未加载
评论 #17310742 未加载
评论 #17304637 未加载
评论 #17304390 未加载
narimiranalmost 7 years ago
Author of the tutorial here.<p>I didn&#x27;t expect that somebody else might post a link to it - it seems I might be too late for the party.<p>If anybody has any questions regarding Nim or suggestions how to make the tutorial better - let me know.
评论 #17304396 未加载
评论 #17306178 未加载
squarefootalmost 7 years ago
I&#x27;ll take the chance of suggesting also Dominik&#x27;s book (1) both because it&#x27;s good and because so I can politely ask the publisher next time please do use bigger or darker fonts for code:) The print is perfect, but I&#x27;m a glass wearing old fart with some difficulties with thin fonts when they&#x27;re not dark enough. As an example, I can read perfectly HN fonts though they appear even smaller than the book ones. The white paper background could also be a factor though, I in fact like a lot more non 100% white backgrounds.<p>(1) <a href="https:&#x2F;&#x2F;www.manning.com&#x2F;books&#x2F;nim-in-action" rel="nofollow">https:&#x2F;&#x2F;www.manning.com&#x2F;books&#x2F;nim-in-action</a>
评论 #17304288 未加载
j1eloalmost 7 years ago
Looks like this time Nim is only receiving good comments and praises! It is very interesting and I&#x27;ve been following the language from some time already, since when it was still named &quot;Nimrod&quot;.<p>In the past I already mentally classified it as a not very well defined language, with a not very well done feature set analysis. A comment in HN described it in a way that seems to fit: <i>(...) a hodgepodge of stuff thrown together, a lack of language design with a surplus of features</i> (from this thread: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=11960814" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=11960814</a>)<p>It&#x27;s not the only time when the language&#x27;s (arguably) unnecessary breath has been critiziced: from having a <i>suprisingly huge feature set</i> (<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13312205" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13312205</a>) to <i>implementing everything but the kitchen</i> (sink) and having a <i>lack of engaged contributers, leading to many bugs, little documentation, and a very messy standard library</i> (<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13355579" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13355579</a>).<p>Have those comments (which admittely only represent the personal opinions of their owners) been rendered outdated by now?<p>I&#x27;d argue that for an absolute zero-knowledge starting point, Rust would be more valuable to start learning, given that both would have a big (or &quot;huge&quot;) surface but very different levels of apparent polish and structural design choices behind them. But of course, it&#x27;s all a matter of taste.
jamiek88almost 7 years ago
That is the clearest, most succinct explanation of variables, types and mutability I’ve ever read.<p>I’m not deep into this yet but I dig the ‘voice’ being used. It’s difficult to break ‘obvious’ things down to those without background while staying concise.
评论 #17304296 未加载
评论 #17303129 未加载
gtycombalmost 7 years ago
&#x27;Nim in Action&#x27; from Manning is well written and solid, I found recently. Nim is surprisingly robust, I&#x27;d mention. The book has a chapter on using Jester for a web framework. This is adequate for some things. If anyone is at the point of using Nim as a server for React clients, doing something beyond a hello world (interacting with forms), I would love some pointers. I haven&#x27;t yet thought through what may be done with Nim&#x27;s capability to compile Nim code to javascript in situations like this.
评论 #17303664 未加载
评论 #17303688 未加载
Tharkunalmost 7 years ago
Significant whitespace and case- and underscore insensitivity. That&#x27;s pushing too many of my buttons for one language.<p>That being said, this is a very well written tutorial. Might be a nice format to use in other basic language tutorials.
评论 #17304285 未加载
评论 #17304221 未加载
评论 #17303622 未加载
评论 #17303644 未加载
评论 #17303764 未加载
PMunchalmost 7 years ago
I&#x27;ve been meaning to try this tutorial out on some non-programming friends of mine. But time is unfortunately a limited resource, so I haven&#x27;t gotten around to it. I helped proof read the texts and clear up some stuff, so if you have any questions about it feel free to ask and I&#x27;ll try to answer as much as I can! But it hasn&#x27;t been &quot;battle tested&quot; yet and it might be updated should we find things people struggle with, both with Nim and programming in general.
MaxBarracloughalmost 7 years ago
Anyone here qualified to compare Nim to the D programming language?
评论 #17303499 未加载
_bxg1almost 7 years ago
I used to get excited about new-language posts on here, but I&#x27;ve gotten weary of them over time. So many are just slight variations on standard syntaxes that meet their creator&#x27;s preferences. It&#x27;s rare to see anything that&#x27;s radical, and therefore truly interesting.
评论 #17303152 未加载
评论 #17303192 未加载
评论 #17303474 未加载
评论 #17303215 未加载
acehrelialmost 7 years ago
Because this is about learning programming with a language, here is a shameless plug for learning with D: <a href="http:&#x2F;&#x2F;ddili.org&#x2F;ders&#x2F;d.en&#x2F;index.html" rel="nofollow">http:&#x2F;&#x2F;ddili.org&#x2F;ders&#x2F;d.en&#x2F;index.html</a>
sullyj3almost 7 years ago
&gt;Nim is a statically typed programming language, meaning that the type of an assignment needs to be declared before using the value.<p>This is not strictly true, in languages with type inference (which are becoming increasingly common)
评论 #17303271 未加载
drcongoalmost 7 years ago
I really like the look of Nim and would love to see it gain some traction. Just wish I had the time to play with it more.
happy-go-luckyalmost 7 years ago
&gt; Who is this for?<p>&gt; People with minimal previous programming experience<p>&gt; People with some programming experience in other programming languages<p>Both mean the same.