5 ms·
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
by habibur 5y ago
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.
- diskzero 5y agoI 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.
- gavinray 5y ago> Sadly, I am not enough of a Nim expert to know the trade-offs between using native code or importing C libraries. I'm no expert either but (not sure if this is what you're getting at) Nim is "compiled" to C/C++/JS and you have nearly full control over emitted code. So I don't think it's far-fetched to emit C with hand optimizations if you really need them. That's the weird thing about Nim. It's not really a new language so much as a syntax and front end to several existing languages. If you compile in "-d:danger" mode turning off all checks and highest optimizations, the C code it spits out is pretty human readable even.
- PMunch 5y ago> That's the weird thing about Nim. It's not really a new language so much as a syntax and front end to several existing languages. This is a bit of an over-simplification. Nim does a lot of stuff on its own, so you won't be able to convert back from C to Nim for example. The most obvious being of course the macro system that is just normal Nim code but is evaluated at compile-time and generates code for you. In fact you can use the compiler to evaluate Nim without compiling it, so it certainly falls into the language in its own right category.
- cyber_kinetist 5y agoNim 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.
- treeform 5y agoThis is correct. Given any C/C++ program one can write an equivalent Nim program. But because you have advanced metaprogramming available to you it will probably be shorter and easier to understand.
- RattleyCooper 5y agoI 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)