Nimrod is a programming language, and I like it! ;)
A few days ago in the #slitaz IRC channel I hear what @Trixar_za talk to @ccssnet, that it's not a bad idea to rewrite TazPkg using some of compiling language, possible Nimrod. In that momemnt I not hear this name before. But next day I downloaded Nimrod sources, GCC and all what I need, I compiled compiler and bootstrap, and I set down at white Geany's paper to write my first program.
Development process for me is the same as Shell code programming:
- I define task (rewrite only hard timed loops in TazPanel, not in TazPkg);
- I open Geany as text editor;
- I open Midori with Nimrod's docs;
- I open Sakura to compile source.
That day I wrote several lines of code, but no joy. I've trapped in dead end of lack of examples.
Next day (or two) I read docs, I find big amount of great commands, and I write and rewrite my code, and I think it very nice now ;)
At the time I implemented two main TazPanel/pkgs loops: list of MyPackages, and cat of all mirror's packages by category. To compare execution time, I've cutting shell code loops to separate test scripts, you can find them in attachments. Execution time depends on CPU, I have "2x Intel® Atom™ CPU N270 @ 1.60GHz". Here are results:
Do you want to have a system that works in from 10 to 500 times faster? Silly question! YESSS! :D
I prepare a handmade package for you (due to forum restrictions, please remove last ".zip" from package's name), and you can easy install it to your system and test it's speed and performance. But I want to say you that this is only Developer's preview, it can be broken, and I recommend you to return to stable TazPanel version after all experiments ends. But you can stay with it.
Anyway, enjoy! Now you know what is "Fast as SliTaz" ;D
The heart of new possibilities is /usr/bin/tazpanel_inc (37,6KiB). Not so small, but it statically linked (standalone) and not wanted any external libraries to run. And size of resulted binary increased slowly.
And, at the end I want to raise a question: what is a future of this code? Are here developers who have free time and who interested in rewriting TazPanel, TazPkg and other SliTaz tools in Nimrod? We can collaborate. Or we leave this Nimrod code includes as-is? Or...?