What does HackerNews think of pixie?

Full-featured 2d graphics library for Nim.

Language: 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/
I am working on OpenStreetMap renderer in Nim - see 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

I would use Nim again when I when I will see this application is suited for it (e.g. some command line apps).

The proof is in the link!

> Fast compile times: a full compiler rebuild takes ~12s (Rust: 15min, gcc: 30min+, clang: 1hr+, Go: 90s) [2].

The compiler is really big and self-hosted too.

For large nim projects check out: https://github.com/mratsim/Arraymancer or https://github.com/treeform/pixie (personal faves).

Nim is the most readable language I've ever seen. I've dabbled with Go, but Nim is almost like pseudocodes+types. Highly recommend you take a look and try it out! You can use libraries like https://github.com/planety/prologue or https://github.com/treeform/pixie to create something quickly and fun(compile times are faaasst!).

And Nim does not have a mandatory GC, you can go as low-level as you want, but in case you don't want that you can choose from several great GC's(a capable soft real-time GC and Boehm for example). Or you could combine the best of both worlds and take a look at the shiny fancy ARC/ORC deterministic memory management: https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc...

Dlang's betterC would be a good option for just a better-than-C language but looks like it doesn't support D's standard library [1]. That'd mean being stuck with plain C container libraries. :/

Personally, I was impressed by an approach taken by the authors of Pixie (a fast 2d library like Cairo) [2]. They created a "library wrapper" generator for Nim code that supports creating libraries Python, Node, C, and Nim itself that they call Genny [3]. Haven't tried it but being able to use Nim and it's ref based gc but still export to nice API's in other languages is fantastic. Pixie's aim is to be a Cairo alternative so it makes sense they'd need this. I hope the approach takes off. Usually writing any cross language API's is a lossy operation.

Here's a sample of the API definition:

    exportObject Matrix3:
      constructor:
         matrix3
      procs:
         mul(Matrix3, Matrix3)
1: https://dlang.org/spec/betterc.html 2: https://github.com/treeform/pixie 3: https://github.com/treeform/genny

(edited formatting)