5 ms·
Nim: Curated Packages
- stanislavb 4y agoThis is definitely a well organized list with helpful packages. For those interested in Nim, I'd recommend giving a go to https://www.libhunt.com/l/nim https://www.libhunt.com/l/nim as well. (disclosure - I work on LibHunt)
- themodelplumber 4y agoBTW in case anybody is looking for help learning Nim, the Nim Discord was pretty helpful. I wrote a simple text file parser and ran into an annoying issue with the compiler reporting indentation errors which were really issues unrelated to indentation, so I asked there. Turns out they have a community pastebin-type compiler for sharing code, and within a few minutes a couple others shared back fixes to my source. Really convenient compared to pulling one's hair out for a couple hours...
- benreesman 4y agoNim has sort of been in my peripheral vision for awhile but I’ve never really checked it out. Any Nim fans have a good link to a good sell for it? No cynicism at all: I’m genuinely curious?
- severak_cz 4y agoI am working on OpenStreetMap renderer in Nim - see https://github.com/severak/lunarender3/ https://github.com/severak/lunarender3/ (but work somewhat stalled) I needed some language which is: - compiled to binaries - and really fast - has needed libraries (HTTP server, protocol buffers, sqlite and image generation) - it's easy to set up It was nice experience and Nim simply worked for my needs. People on Nim forum were nice and helped me when I ran into problems. It has nice and usable built-in library and I was really impressed by graphic library pixie - https://github.com/treeform/pixie https://github.com/treeform/pixie I would use Nim again when I when I will see this application is suited for it (e.g. some command line apps).
- themodelplumber 4y agoLess of a global sales pitch for Nim (I'm a shoo-in from Pascal), but I found this today and thought it was neat: "Enu lets you build and explore worlds using a familiar block-building interface and a Logo inspired API." https://www.youtube.com/watch?v=ECJsq7BeZ8w https://www.youtube.com/watch?v=ECJsq7BeZ8w https://github.com/dsrw/enu https://github.com/dsrw/enu
- plainOldText 4y agoI'd say just try it out for yourself with these simple examples: https://nim-by-example.github.io/ https://nim-by-example.github.io/ Here's a nice link comparing memory safety of C, Zig, Rust and Nim – https://uploads.peterme.net/nimsafe.html https://uploads.peterme.net/nimsafe.html – which was inspired by this post: https://www.scattered-thoughts.net/writing/how-safe-is-zig/ https://www.scattered-thoughts.net/writing/how-safe-is-zig/
- benreesman 4y agoThank you! Will check it out!
- steve_adams_86 4y agoI don’t have any convincing links, but my sell would be that a yokel like me was able to learn and build things with Nim really quickly. It was something like 4 hours to start getting familiar and seeing results. I was able to make a wordle clone in a few days of very limited spare time. The reference I used the most was this: https://github.com/nim-lang/Nim/wiki/Nim-for-TypeScript-Programmers https://github.com/nim-lang/Nim/wiki/Nim-for-TypeScript-Prog...
- akavel 4y agoYou may like to take a look at the NimConf presentations - https://conf.nim-lang.org/2020/ https://conf.nim-lang.org/2020/ and https://conf.nim-lang.org/2021/ https://conf.nim-lang.org/2021/ - for some nice inspiration as well as discussions of pros and cons done by actual practitioners. As for me, in short words, what I found especially amazing in Nim was its resemblance to pseudocode (I literally found that it's a great notation to use when thinking in a notebook), fast compile times while at the same time low-bloat, macros, and the crazy impressive cross-platform story - including a JS target (I used it to write a functioning WebExt plugin for a browser; though I quickly got tired of the HTML+CSS part that remained necessary). At the other end of the x-platform spectrum, if you take a look at the videos, people are also successfully playing with Nim on microcontrollers (and I mean the real, small ones, not the Linux-hosting kinds). As for a few less amazing aspects, I struggled with the parallelism story; it is there, which makes it a complete modern runtime - but I found it nonstandard enough (and possibly somewhat unpolished?) that I failed to complete a hobby project where it was required. Thus (and also for a number of completely of unrelated reasons) I personally switched to learning Rust after Nim. Nim's package management is also missing lockfiles for reproducibility; I believe this might have recently gotten back into spotlight and hopefully is being worked on, but I don't know for sure, I'm not tracking the community now. PS. Ah, and Araq (the BDFL) is constantly experimenting with some really cool stuff (e.g. the Orc garbage collector). Which gives the language and ecosystem some of its most interesting, exciting, and exceptional traits; OTOH then I'd say the financial support story of the language is regrettably not enough for some of the class-leading prototypes to make it past teaser stage (see e.g. DrNim: https://nim-lang.org/docs/drnim.html https://nim-lang.org/docs/drnim.html).
- 41b696ef1113 4y agoI keep waiting for something like this for Rust. Call it the BatteriesIncluded2022 crate and do an annual release cycle. If it could get a nod from the official Rust maintainers, all the better. Something that is roughly analogous to the Python/Go standard libraries allowing to stand up quite a bit more software without pulling in a hundred different crates.
- waaveshine 4y agoWhat things would you like to see included that aren’t currently in the standard library?
- 41b696ef1113 4y agoFair question. Noting that I am a Python person who has only tooled around with Rust a bit, a few packages I think warrant inclusion because the base options are too anemic: - Command line parsing (more feature rich the manually iterating over args) - (De)Compression: tar, zip, gzip, bzip2 - CSV parser - Date time - Hashing: md5, sha1, sha256 - HTTP requests - Logging - Random generation: ints, floats, sampling, uuids - Regex - SQLite bindings - (De)serialization: json, ini, toml, yaml - System niceties: where is user home?, # of cpus? Appreciating some of these are quite complex, and probably best left to a crate that has more leeway in experimentation/breaking APIs. Edit: tried to make the formatting less bad
- waaveshine 4y agoMaybe some of these can be chalked up to language philosophy or APIs as you said, but many of these would be welcome additions in my eyes. I think regex, time, and crates like num_cpus would especially be nice to have. There's plenty of those types of crates where it feels like you can't compile a single project without seeing it float by as you build the dependencies.
- shepmaster 4y ago> and crates like num_cpus https://doc.rust-lang.org/std/thread/fn.available_parallelism.html https://doc.rust-lang.org/std/thread/fn.available_parallelis... — Rust 1.59
- pabs3 4y agoDoes nim have virtual packages or meta-packages (dependency-only packages)? Then you could just pull nim-parse-json and have it pull in the curated package for JSON parsing.
- tui 4y agoYes it does. Just make a package without Nim source code
- Sam69 4y ago[flagged]
- jasfi 4y agoNim is fast and highly productive to code in. I'm nearly ready to release my Nim Dev Framework (for web apps, web-services and console apps). It has an ORM and the web/view part is getting there. Should be released in the next month or so. https://nexusdev.tools https://nexusdev.tools
- stoicjumbotron 4y agoI might be wrong, but is Nim comparable to Go? And if so, how does it fare against it?
- poulpy123 4y agoComparable in the sense that it's a compiled language with a GC and an easy to read syntax. They have their drawbacks and advantages over each other, but go is the only one with a strong institutional backing and a lot more dev.
- goodpoint 4y agoNim ARC/ORC is much closer to Rust than Go.
- treeform 4y agoI've been doing Nim professionally for about 3 years now. But I only shipped a small project in Go. I feel like Go specifically “dumbs down” the language so that it can be used in large teams with varying programmer skills and high turnover. Perfect for large companies. Go routine stuff is really cool. But If you're not writing a super concurrent http server in a large team, Nim is just better at compiling to JS, Game Dev, Mobile and Embedded applications. It allows you to do cool meta programming and express things with templates and macros. You can go really low level with SIMD and manual memory or really high level with database, html, ui, and api DSLs. Go feels like it was made to do one thing, while Nim is more of a swiss army knife of things.
- vsajip 4y agoJust under their table of contents, they say that "This list is fairly outdated." and point you to https://github.com/xflywind/awesome-nim https://github.com/xflywind/awesome-nim - and that repo seems to have recent updates.
- goodpoint 4y agoBoth lists are unnecessary. You are better off search Nimble and evaluate the libraries yourself.