I do appreciate Nim, and bought Dom's book, but I feel it's missing a trick in its current state. No doubt I'll try it again as I'm ever the optimist :-)
I do appreciate Nim, and bought Dom's book, but I feel it's missing a trick in its current state. No doubt I'll try it again as I'm ever the optimist :-)
There's a powerful theme — C-like performance with an expressive syntax and automatic memory management — that's undercut by a range of somewhat scatterbrained, idiosynchratic features.
Nim's feature set is ambitious, and it really feels like Nim's authors decided to go "breadth first" rather than "depth first", implementing everything but the kitchen without considering that some more complicated ideas could be deferred until the core language was mature; Nim would have benefited from a more conservative, agile, minimalist approach. At least it would have allowed it to reach 1.0 and more widespread adoption earlier.
Nim also makes some design choices (first-class iterators, the case insensitivity madness, the massive amount of pragmas, OO inheritance, out arguments, etc.) that I wish would have been left on the drawing board to mature.
A casual skim through the top of the commit history indicates that Araq (Andreas Rumpf) is still doing almost all of the development. That's a red flag — being responsible for a complex language, compiler, standard library and documentation is a lot of work. (And it's of course a dangerous bus factor.)
I also think it's a mistake to charge for a book at such an early stage when the quality of the official documentation is less than stellar. dom96 is Nim's most active evangelist on HN; if he wants Nim's adoption to take off, making the book available for free should, strategically, be a no-brainer.
That said, it's not all negative. If evaluated purely on technical merits, Nim is one of the most promising languages currently in development, and it's one of the languages I intend to use this year for various smaller, experimental projects.
Sadly I cannot do that, or at least not in the near future. My publisher holds the copyright, so unless I get explicit permission to offer the book for free this cannot happen.
Perhaps in hindsight it would have been better for me to write this book independently. But if that were the case I likely wouldn't have the motivation to get it finished.
That was supposed to be "kitchen sink", but I guess this works, too.
It's biggest problem is the lack of engaged contributers (really only 2 or 3), leading to many bugs ( you can never really trust the compiler), little documentation, and a very messy standard library.
Creating a language is really hard work. Nim is impressive considering how many people work in it.
But in it's current state you can really only use it for "just for fun" projects.
Not sure what has to happen for adoption but it's a real gem of a language that just needs users.
Unfortunately the image on that page is misleading. We have been getting ~$1300 every month for the duration of our BountySource campaign, which isn't bad. I think that the ~$3k value only includes direct non-recurring payments via BountySource.
Sadly, it isn't enough for either of us to work full-time on Nim.
Must have been a lot of work.
Check out the stdlib: http://nim-lang.org/docs/lib.html
Some interesting projects related to the above:
Webdev frameworks:
https://github.com/dom96/jester
https://flyx.github.io/emerald/
https://github.com/onionhammer/nim-templates.git
Gamedev:
Urho3D game engine wrapper: https://github.com/3dicc/Urhonimo
Nim GLSL framework (allows writing GLSL in Nim, meaning you can use metaprogramming in GLSL): https://github.com/yglukhov/nimsl
Roguelike api: https://github.com/Vladar4/libtcod-nim/
SFML lib: https://github.com/BlaXpirit/nim-csfml
SDL lib: https://github.com/PMunch/SDLGamelib
High level glfw wrapper: https://github.com/ephja/nim-glfw
Chipmonk wrapper: https://github.com/fowlmouth/nimrod-chipmunk/
Blog on writing a 2D platformer in Nim: https://hookrace.net/blog/writing-a-2d-platform-game-in-nim-...
Blog on making a JS NES emulator in Nim: https://hookrace.net/nimes/
It can easily be wrapped in a more usable API, for instance I have made mine: https://github.com/andreaferretti/rosencrantz
Nim's standard lib also has sockets and http. Nim's niche is clean and fast code, with strong C/C++ interop and metaprogramming.
Run 'nimble search game' to get a list like this (I did not copy and paste the whole list):
libtcod-nim: url: git://github.com/Vladar4/libtcod-nim/ (git) tags: roguelike, game, library, engine, sdl, opengl, glsl description: Wrapper of the libtcod library for the Nim language. license: zlib website: https://github.com/Vladar4/libtcod-nim
nimgame: url: git://github.com/Vladar4/nimgame/ (git) tags: game, engine, sdl description: Simple 2D game engine for Nim language. license: MIT website: https://github.com/Vladar4/nimgame
sfml: url: git://github.com/fowlmouth/nimrod-sfml/ (git) tags: game, library, opengl description: High level OpenGL-based Game Library license: MIT website: https://github.com/fowlmouth/nimrod-sfml
enet: url: git://github.com/fowlmouth/nimrod-enet/ (git) tags: game, networking, udp description: Wrapper for ENet UDP networking library license: MIT website: https://github.com/fowlmouth/nimrod-enet
fowltek: url: git://github.com/fowlmouth/nimlibs/ (git) tags: game, opengl, wrappers, library, assorted description: A collection of reusable modules and wrappers. license: MIT website: https://github.com/fowlmouth/nimlibs
nimrod-glfw: url: git://github.com/rafaelvasco/nimrod-glfw/ (git) tags: library, glfw, opengl, windowing, game description: Nim bindings for GLFW library. license: MIT website: https://github.com/rafaelvasco/nimrod-glfw
chipmunk: url: git://github.com/fowlmouth/nimrod-chipmunk/ (git) tags: library, physics, game description: Bindings for Chipmunk2D 6.x physics library (for backwards compatibility) license: MIT website: https://github.com/fowlmouth/nimrod-chipmunk
chipmunk6: url: git://github.com/fowlmouth/nimrod-chipmunk/ (git) tags: library, physics, game description: Bindings for Chipmunk2D 6.x physics library license: MIT website: https://github.com/fowlmouth/nimrod-chipmunk
nim-glfw: url: git://github.com/EXetoC/nim-glfw/ (git) tags: library, glfw, opengl, windowing, game description: A high-level GLFW 3 wrapper license: MIT website: https://github.com/EXetoC/nim-glfw
linagl: url: https://bitbucket.org/BitPuffin/linagl (hg) tags: library, opengl, math, game description: OpenGL math library license: CC0 website: https://bitbucket.org/BitPuffin/linagl
It does need more users, for sure, but I think it's a testament to the productivity of the language that people have done so much cool stuff already. Random example, metaprogramming & unit tests for glsl: https://github.com/yglukhov/nimsl
That's interesting, I've had the opposite experience; the few times I think I'm hitting a compiler bug it turns out the compiler is telling what I'm doing wrong but I'm misinterpreting what it's saying. Not saying this applies to you though. Was this with recent versions?
Having said that, with templates and macros I very rarely get a c compilation error (ie; an actual bug), but these are usually because I'm accidentally doing something silly like recursing compile time generation. The compiler should catch these, and it's only rare cases it doesn't.
In my experience writing a game engine in opengl the language has been rock solid and very fast. For me, the core language has been absolutely fantastic and very reliable.
1) Encounter unexpected behaviour with standard features
2) Ask irc for help
3) Response: shrug must be a compiler bug
Put it this way, the only compiler bugs I've had in the last year or so have been c gen errors, maybe two in the past year of pretty heavy use. All of those have been because I've been doing something silly with templates.
I've said similar elsewhere.
The existing documentation isn't welcoming to those new to Nim. I've read the freebie first chapter of Dom's book and it seemed very promising and I wanted to read more. However $40 for an ebook is ridiculous. I can't afford to make that kind of outlay just to see whether or not an obscure language with very little traction is worth pursuing.
I think the best solution would be for the Nim foundation to use some of that bug bounty money to buy the rights to make Dom's book freely available on The official site.
ctwmelbjs16
It shouldn't surprise that the community is small. Please join and contribute and the language will grow.
It's hard to really trust it, though, when you've got a few semi maintained and used libraries for any given domain. It's not just the lack of libraries that's frustrating (wrapping C isn't hard), but like you said, there's a point where there's too few uers to find obscure things on Google.
I hear the normal PyPlot/GR wrappers are pretty useful as well. They're ultimately not native Julia code, but since Julia makes it so easy to reuse tools in other languages, why not take advantage of that feature?