Hacker News new | ask | show | jobs
by brodouevencode 1055 days ago
What are some noteworthy projects or libraries written in Nim?
8 comments

Ones that have not been mentioned so far:

- npeg lets you write PEGs inline in almost normal notation: https://github.com/zevv/npeg

- owlkettle is a declarative macro-oriented library for GTK: https://github.com/can-lehmann/owlkettle

- ratel is a framework for embedded programming: https://github.com/PMunch/ratel

- futhark provides for much more automatic C interop: https://github.com/PMunch/futhark

- nimpy allows calling Python code from Nim and vice versa: https://github.com/yglukhov/nimpy

- questionable provides a lot of syntax sugar surrounding Option/Result types: https://github.com/codex-storage/questionable

- nlvm is an unofficial LLVM backend: https://github.com/arnetheduck/nlvm

- chronos is an alternative async/await backend: https://github.com/status-im/nim-chronos

- cps allows arbitrary procedure rewriting in continuation passing style: https://github.com/nim-works/cps

A longer list can be found at https://github.com/ringabout/awesome-nim.

We have written pixie: https://github.com/treeform/pixie . Pixie is a 2D graphics library similar to Cairo and Skia written entirely in Nim. Which I think is a big accomplishment. It even has python bindings: https://pypi.org/project/pixie-python/
Is pixie capable of realtime usage like in games or generative art? Last time I looked it seemed CPU-only.
Not by itself! But together with other library boxy you can: https://github.com/treeform/boxy

You should use pixie to load textures, create text, rasterize vector graphic etc... and send them to boxy to be drawn every frame.

Yes Pixie is CPU only, and just like you can't use Cairo or Skea for real time games you can't use Pixie, but boxy you totally can.

I use pixie for my game framework. It's used to load textures, layout fonts, and render font atlases. It can be used for generative art but https://github.com/EriKWDev/nanim or sdl2 using renderer's makes more sense as they are gpu accelerated.
Nitter (Twitter frontend) is written in Nim: https://github.com/zedeus/nitter/
Lots of high-quality Nim projects and libs are being worked on and used by the folks at Status:

https://github.com/status-im/nimbus-eth2

https://github.com/orgs/status-im/repositories?language=nim&...

https://findsight.ai is my project, written in Nim

I gave a talk about it here: https://www.youtube.com/watch?v=elNrRU12xRc including some more intense use of Nim (for inline PEG grammars and data-parallel processing with Weave)

I don't know if my particular version is noteworthy, but I recently started making updated Nim bindings for OpenCV and it was kinda fun. I don't consider myself an advanced C++ programmer, but Nim made the process easier than I had feared it would be. https://github.com/tapsterbot/mvb-opencv
Not familiar with Nim enough to figure it out - are the bindings auto generated in similar style like opencv bindings to any other supported language (python, julia, objc, rust, etc)?
They are currently not auto-generated. (I only implemented the absolute minimum to get started calling the most commonly used OpenCV methods from Nim.) Hopefully the bindings will be auto-generated be in the future, though!
Not sure if it counts as noteworthy, but I'm submitting this comment via my TUI web browser that I've been writing in Nim.

https://git.sr.ht/~bptato/chawan

Also, there exists another Nim web browser project; from what I can tell, it's in somewhat earlier stages of development.

https://github.com/xTrayambak/ferus

Check out my project Torrentinim for a popular but simple enough project if you want to taste what Nim is like.

https://github.com/sergiotapia/torrentinim

It's easy to understand code.