It's almost impossible to come up with names these days due to the massive amount of software released every year. It's so bad that I automatically include the language name as well as the framework name in any search I do.
In this instance the Nim and JS libraries have different names (and even different spellings of the common subset) so I don't see an issue.
Nim is such a breath of fresh air when I read it. This library looks great.
I've been trying to learn it / grok its documentation for awhile. Any suggestions on how to learn it better? I've given Exercism.IO a try (disclaimer: satisfied learner from there but not trying to shill) but I've had difficulty adopting the language from a Python background.
Nim's a pleasant language to read/write! Out of curiosity, what aspects have you found challenging to learn? One caveat of imitating Python's syntax is that the semantics are not the same as in Python and are closer to Pascal/Ada in many ways.
If you haven't read through the Nim-for-Pythoners [1] it'd be good. I read the "nim manual" [2] constantly and just use ctrl-f. Though Nim Basics by narimiran is a nice tutorial form [3].
To learn any new language or framework I just recommend diving in and doing things. Have some goal and mind that you want to create and work at it. Its usually hard to start at first but once you get going its just a little bit of progress at a time.
Despite completely disagreeing with you on the first point, I've had some of the same experience too.
Some years ago when I was going through languages frequently, I was pretty interested in it for a bit, but found it kind of hard to get into and my interest ultimately wandered.
I thought a large part of that was due to my unusually strong dislike of the syntax, and that that was why I found it unusually difficult to grok. Maybe it wasn't. Interesting.
I’d recommend looking into Nim in Action [1] by Dominik Picheta. Really good book overall and helps get you up and running with Nim concepts. Dominik is core Nim team and author of Nimble.
This was the final presentation at NimConf in June and I was blown away, as I am sure many others were. The fact that this library exists makes the task of creating a high quality retained-mode UI library in Nim much easier. You don't have to try and wrangle Pango/Cairo/Skia to act as your foundation.
(BGRAControls contains the BGRABitmap components).
It's sad Lazarus/FreePascal doesn't get much play, because high quality libraries like this have existed for years for it and it seems to not get much traction.
It’s really great work. The font support is a bit behind the times though, and text shaping is non-existent. I see so many libraries fall at that hurdle, they think they can do it themselves then when they realise it’s hard and requires a team of people they either abandon it or tell you to use harfbuzz without the necessary integration points. Hopefully that won’t be the case here!
Not to mention operations like "complex blends: Darken, Multiply, Color Dodge, Hue, Luminosity... etc" and many SIMD accelerations. It also has Node, Python, and C interfaces. Though I haven't found an excuse to use it yet. Surely there's got to be some excuse... ;)
Dug into the source for the GIF decoder a bit and it looks like it only supports the most basic features- no windowing, animation, local colortables, or background colors. I suspect many optimized static GIFs won't decode correctly. Still, everything has to start somewhere!
SVG support has been really helpful for me to see a diverse and "real world" set of rendering results when working on Pixie. And for testing it's great to be able to grab huge sets of open source SVG files and check our results.
I had been using ImageMagick for these types of things. Wondering how pixie improves over it.
Without knowing how much overhead Nim brings in, I still believe it would have been better if this library preliminary was a C or C++ lib and then had binding for all the other languages.
Nim nowadays (with the new ARC/ORC memory management) seems to be similar with C++ in terms of runtime overhead, so I don’t think you need to be too worried about it.
I am not sure Pixie improves over ImageMagick. Perhaps it has some more advanced blend modes or other algorithms that ImageMagick hasn't implemented. ImageMagick is really great for pipelines of conversions. I see Pixie being more of a Quartz, Cairo, Skia, etc. for the Nim platform that can serve as the low-level canvas for a lot of higher-level functionality. Sadly, I am not enough of a Nim expert to know the trade-offs between using native code or importing C libraries.
I actually wrote a small program for batch scaling images using pixie a couple weeks ago and it was a bit faster than ImageMagick, and the results looked the same. The scaling in pixie is a little less flexible though.
I haven't really compared any other features though. Scaling images does appear to be quicker though (when compiled with -d:release -d:danger --opt:speed)
After the conference talk, I rushed to try it out. I remember having quite some difficulty getting the demos to work well on a Mac and eventually gave up.
I chose to write Pixie in Nim because I really like Nim:
* Nim very fast. I can beat any C/C++ program in performance using same tricks as they do. Cleaver Memory management, inlining, static analysis, SIMD. There is no wall that you run where you need to drop into "C".
* Nim is very easy to write, I came from Python/CoffeeScript and it was a very easy transition. Nim feels like Python with Types.
* Nim is very powerful with generics/templates/macros allowing you to write DSLs quickly.
* Nim has very easy interop with C. So its very easy to use existing C libraries or low level operating system APIs.
* Nim works everywhere: From Desktop Windows/Mac/Linux, to mobile iOS/Android to embeaded devices. It even compiles to JavaScript (like CoffeeScript/Typescript or WASM) or GL shader language. It run anywhere.
* Nim has a smaller community that has not been overrun by complexity or apathy. Everything feels green and fresh and everyone helps everyone else. But still big enough that there are libraries for most things.
That's unfortunate. I did not know about pixi.js when we picked the name. It feels like all of the cool names are taken! When we were thinking of a name we just looked around the Nim community for name collisions.
Is pixi.js pretty big? I haven't heard of it before tonight, and I thought I'd had exposure to most of the bigger JS frameworks via HN (I'm not a JS guy, more Python).
[+] [-] Guzba|4 years ago|reply
It's extremely fresh but our tests are working so consider giving it a try.
For those interested in Nim's meta-programming, we're generating those Python bindings for Pixie from our Nim code using https://github.com/treeform/genny here https://github.com/treeform/pixie/blob/master/bindings/bindi... More languages in the works.
[+] [-] pjs_|4 years ago|reply
[+] [-] chmod775|4 years ago|reply
https://github.com/pixijs/pixijs
This project is likely to get drowned out by pixi search results when its users try to Google anything related to it.
[+] [-] hnlmorg|4 years ago|reply
In this instance the Nim and JS libraries have different names (and even different spellings of the common subset) so I don't see an issue.
[+] [-] tokai|4 years ago|reply
[+] [-] hutzlibu|4 years ago|reply
[+] [-] christophilus|4 years ago|reply
[+] [-] tomrod|4 years ago|reply
I've been trying to learn it / grok its documentation for awhile. Any suggestions on how to learn it better? I've given Exercism.IO a try (disclaimer: satisfied learner from there but not trying to shill) but I've had difficulty adopting the language from a Python background.
[+] [-] elcritch|4 years ago|reply
If you haven't read through the Nim-for-Pythoners [1] it'd be good. I read the "nim manual" [2] constantly and just use ctrl-f. Though Nim Basics by narimiran is a nice tutorial form [3].
There's a few standard links: 1: https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programm... 2: https://nim-lang.org/docs/manual.html 3: https://narimiran.github.io/nim-basics/
[+] [-] metasyn|4 years ago|reply
"nim in action" by dom96 https://www.manning.com/books/nim-in-action
nim days by xmonader https://xmonader.github.io/nimdays/
[+] [-] treeform|4 years ago|reply
[+] [-] foerbert|4 years ago|reply
Some years ago when I was going through languages frequently, I was pretty interested in it for a bit, but found it kind of hard to get into and my interest ultimately wandered.
I thought a large part of that was due to my unusually strong dislike of the syntax, and that that was why I found it unusually difficult to grok. Maybe it wasn't. Interesting.
[+] [-] beshrkayali|4 years ago|reply
1: https://www.manning.com/books/nim-in-action
[+] [-] diskzero|4 years ago|reply
[+] [-] treeform|4 years ago|reply
[+] [-] analognoise|4 years ago|reply
https://github.com/bgrabitmap/bgracontrols
(BGRAControls contains the BGRABitmap components).
It's sad Lazarus/FreePascal doesn't get much play, because high quality libraries like this have existed for years for it and it seems to not get much traction.
[+] [-] diskzero|4 years ago|reply
[+] [-] tomcam|4 years ago|reply
[+] [-] jahewson|4 years ago|reply
[+] [-] elcritch|4 years ago|reply
[+] [-] RodgerTheGreat|4 years ago|reply
[+] [-] Guzba|4 years ago|reply
For example, I have a few "megatests" where I render entire icon sets or emoji sets such as https://raw.githubusercontent.com/treeform/pixie/master/test... and https://raw.githubusercontent.com/treeform/pixie/master/test...
Running these tests helps me feel more confident that changes I'm making are not breaking things.
[+] [-] habibur|4 years ago|reply
Without knowing how much overhead Nim brings in, I still believe it would have been better if this library preliminary was a C or C++ lib and then had binding for all the other languages.
[+] [-] cyber_kinetist|4 years ago|reply
[+] [-] diskzero|4 years ago|reply
[+] [-] RattleyCooper|4 years ago|reply
I haven't really compared any other features though. Scaling images does appear to be quicker though (when compiled with -d:release -d:danger --opt:speed)
[+] [-] gnramires|4 years ago|reply
[+] [-] jb1991|4 years ago|reply
[+] [-] treeform|4 years ago|reply
[+] [-] tenaciousDaniel|4 years ago|reply
[+] [-] treeform|4 years ago|reply
* Nim very fast. I can beat any C/C++ program in performance using same tricks as they do. Cleaver Memory management, inlining, static analysis, SIMD. There is no wall that you run where you need to drop into "C".
* Nim is very easy to write, I came from Python/CoffeeScript and it was a very easy transition. Nim feels like Python with Types.
* Nim is very powerful with generics/templates/macros allowing you to write DSLs quickly.
* Nim has very easy interop with C. So its very easy to use existing C libraries or low level operating system APIs.
* Nim works everywhere: From Desktop Windows/Mac/Linux, to mobile iOS/Android to embeaded devices. It even compiles to JavaScript (like CoffeeScript/Typescript or WASM) or GL shader language. It run anywhere.
* Nim has a smaller community that has not been overrun by complexity or apathy. Everything feels green and fresh and everyone helps everyone else. But still big enough that there are libraries for most things.
[+] [-] MattRix|4 years ago|reply
[+] [-] treeform|4 years ago|reply
[+] [-] tomrod|4 years ago|reply
[+] [-] vladharbuz|4 years ago|reply
[+] [-] muizelaar|4 years ago|reply
https://github.com/RazrFalcon/tiny-skia
https://github.com/jrmuizel/raqote
Go:
https://github.com/tdewolff/canvas
[+] [-] brundolf|4 years ago|reply
[+] [-] unknown|4 years ago|reply
[deleted]
[+] [-] eyelidlessness|4 years ago|reply
[+] [-] eyelidlessness|4 years ago|reply
[+] [-] losethos7|4 years ago|reply
[deleted]
[+] [-] riofoxx|4 years ago|reply
[deleted]