You are not logged in.
Don't forget that Nimrod generates C code before compiling it to a binary. So it's the power of C with the simplicity of Python. To me that's a good middle ground.
I think domcox means that we won't be able to just type leafpad /usr/bin/tazpkg to change it's code anymore. By writing it in Nimrod we're adding a few more steps to altering the code, namely having to install Nimrod (which will be about 5MB) and gcc, having to download the source code and then having to compile the changed code. This however has very little to do with Libre or Free Software, because either way complies with GPL. For KISS, learning to use Nimrod (and it's compiler) is a big hump and not the easiest thing for some. That's what I think domcox is trying to say. It's not exactly KISS friendly at first.
Offline
Yep, exactly Trixar_za,
Like when I go to/from work, I have the choice to use my assigned company vehicle or my own two feet.
If I use the car, I am warm and dry whatever the weather, I may listen to mp3 and cool! bills are payed by the company.
there are caveats though.
I have to check other drivers front, left, right, back, respect traffic lights and road signs, I'm often stuck in a traffic jam, it's also hard to find a place to park.
I'm totally dependant on other people, I focus my attention on driving: I'm dominated by the tool.
It's not the case when I walk, ok sometimes it's cold, somtimes it's hot, and I have to remove or add layers to adjust to the weather changes before going. It takes me longer, but it's time well spent as I found walks are relaxing and help me thinking and make decisions. Moreover, the motor doesn't produce emissions of air pollutants that have been shown to have negative effects on public health or the natural environment:)
I'm totally dependant on my shoes, I dominate the tool.
And this is why I gave up wheels for my own 2 Feet.
It's all about heteronomy vs autonomy.
This is where SliTaz shines, autonomy.
Offline
Haha!
Nice story, Dominique! Please, tell me more. I seriously :-|
You forgot about one little thing — using your own legs as a means of transportation, it is important to understand their limitations.
Yes, I too can go to and from work on foot. And it is even pleasant, except when I'm tired as hell. It takes only 20–30 minutes. But once a year or two I can afford a luxury — oversleeping. And then I need URGENTLY to get to work. Have to call a taxi, can not be helped. Yes, I'm simply FORCED to take a taxi. But, on the other hand — I am happy that I managed such a small price to resolve the issue.
When I have free time and desire, I love to walk out of town and take photographs to nature. It is pleasant;)
By the way, come to me on Facebook! I have a mountain of beautiful photos!
But what to do when you need to get to the next city? When I was a student and I had not enough money to get home, I had to walk. I came home a few hours later, it was already dark, and no one waiting me. I've had plenty of time to reflect on the way 
The next story.
As a child I had a clone of the ZX-Spectrum (if you do not know - it's a computer with a Z80 CPU @ 3.5 MHz with 48 KB of memory, programs saved on a cassette tape and home TV was instead of monitor).
Pretty quickly I learned Basic, and then, eventually, I figured with the assembler. I liked to write quick little programs! Mmm… These were wonderful times! (And, I did not ask the question: why do I have to study this assembler? Because all you can do in Basic!)
Once I fell into the hands translated into Russian book «Graphics on the ZX Spectrum». There were all kinds of graphics, but I especially liked the program that plotted 3D surface, described by simple functions. Like these:

The program has been very slow. I do not remember exactly how much time was spent on a drawing, but it is certainly not less than half an hour. It was possible to change the position of «camera» in the 3D space, it can change viewing direction, and the function itself. And again, run the program, and again to wait half an hour 
After several years as a student, I worked in practice, and we have been working on IBM PC @ 33MHz, and then I learned what is QBasic. After a while I studied it and was able to adapt the old program to another Basic, to another screen resolution, for opposite directions of the axes… What can I say? The program just flew! I was pleased with the whole picture was drawn for a minute or two, and still could press PrtSc and get a picture on memory from the dot-matrix printer.
Is there forced me to learn any ZX-Basic, assembler, and QBasic, as it did in the first story? Eh?
Yes, it's my curiosity! My reluctance to accept the current situation…
The third, and last for today, story.
The story on the rational use of resources. We return to the ZX-Spectrum. The first programs, the first games for it were written mainly in BASIC with a little machine code. Frankly, they were miserable. But, every year in my hands got all the new, more beautiful game. It seems that the developers were able to squeeze everything out of this machine, but no! See the following more beautiful game, and my eyes are disclosed in surprise, and the hands are drawn to the disassembler to see how they work. And, I still stayed with CPU Z80 @ 3.5MHz and 48 kb RAM. I only added a music processor.
The developers were not lazy to improve their skills, develop new algorithms, to learn new techniques, and they really do impossible things! A user could only wonder and enjoy the benefits of progress 
End of story. Now the conclusions.
If you really think you are a developer, learn a new programming language, or, better, a couple. This will be an inspiration to you, you will have new ideas.
SliTaz rocks not due to its autonomy, but because it's small and fast, as though it may sound commonplace. Simplicity should be for the user. But the developer has a lot to know and be able to spend their time looking for solutions on the Internet, spend time and mental strength to develop new algorithms, with permanent self-education.
It's good when developers know Bash. They can interact with each other. But I think we have reached a certain point when using the old techniques are no longer effective. If you wish — please refute me, rewriting the TazPanel shell-code, the code that gives the packages lists. We need to do it, though not at 10 or 500 times faster, but only 2 times. Okay?
Well, finally, it seems to me that you is not seen or tried the Nimrod. Why refuse without even looking at him? Welcome to the page Nimrod Tutorial (Part I). Read a few screens, is it difficult? It seems to me, becoming acquainted with him better, is simply impossible to give it up.
Offline
I'll leave you all with this:
[c]brenton@trixarian:~$ python -c "import this"
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those![/c]
Offline
I have started work on several utilities that I think will be key to interacting with the sh config files we should continue to use. I will commit them tonight (~9hrs from now), I have to go to work.
Offline
Hi Christian,
Feel free to use my procedure to read variables from shell-like conf files (receipts, slitaz.conf etc):
http://hg.slitaz.org/nim-tools/file/b701d0b23859/tazpanel/tazpanel_inc.nim#l8
There you can see examples of using this procedure.
Offline
How are we going to handle translations?
Offline
At the moment, it is 'in process'. Take a look at this:
http://hg.slitaz.org/nim-tools/file/b701d0b23859/tazpkg-web/i18n.nim
But I plan to rewrite these procedures.
G*(msgid: string): string
G*(msgid: string, msgnum: int): string
G*(msgid: string, variable: string): string
G*(msgid: string, variables: openarray[string]): string
getLang: string # from env variables
getPlural(lang: string, n: int): int # get plural form
getVarNum(msgid: string): int # get number of used variables
getUALang: string # from browser environment
setLang(UALangs: string) # set available preferred language
...
PS: Application of current procedures (I mean G"...") here:
http://hg.slitaz.org/nim-tools/file/b701d0b23859/tazpkg-web/page.nim
Offline
import os, osproc, strutils, parseopt, strtabs
const printVarsScript = "/tmp/printVars.sh "
proc createScript(): void =
if existsFile(printVarsScript.strip) != true:
echo("Creating script")
writeFile(printVarsScript.strip,
"#!/bin/sh \n" &
"tmpa=/tmp/a \n" &
"tmpb=/tmp/b \n" &
"set -a \n" &
"env > $tmpa \n" &
". $1 \n" &
"env > $tmpb \n" &
"diff $tmp{a,b} | sed -ne 's/^> //p' \n" &
"rm $tmp{a,b} \n")
return
proc confVar*(confFile: string): PStringTable =
createScript()
var
command = "sh " & printVarsScript & confFile
commandResult = execCmdEx(command)
rawVars = commandResult.output.strip
result = newStringTable(modeCaseSensitive)
for line in splitLines(rawVars) :
var
lineSplit = split(line, '=')
result[lineSplit[0]] = lineSplit[1]
return
Offline
Sorry about the bad formatting, I did not know where to put it in the source tree so I pasted it here
Offline
Hi Christian,
ok, I'll see your code. I want to go to work.
Sorry about the bad formatting, I did not know where to put it in the source tree so I pasted it here
I think that Trixar_za would not be against
Trixarian Pastebin
Or any other Pastebin (search). Just leave your link here.
Offline
There is also http://irc.slitaz.org/paste/ - paste.slitaz.org is still broken though, but that's the same site 
Offline
Oh, I recall! I have an old account on pastebin.com.
Here is Christian's code: http://pastebin.com/1MqPaarC
We can edit it (if it need).
Offline
It is just a sloppy rough draft for turning a shell script into a dictionary of variable/value pairs
Offline
@Trixar_za: http://paste.slitaz.org/ should work now.
Offline
@Bellard Still prefer OpenPastebin (https://github.com/xanmanning/Knoxious-Open-Pastebin) to Zerobin - Both use Flatfile databases (well, technically OpenPastebin can use MySQL or Flatfile)
Offline
The most impressive features about Zerobin is that it allows comments, encrypts the data and can 'burn after read'.
Offline
Note that your can force the key: http://paste.slitaz.org/?e9327da47b8aa373#SliTaz=
Offline
@Aleksej
There is work on a rewrite of tazpkg using spk. You can look at spk code here:
http://hg.slitaz.org/spk/
I also don't like the idea of rewriting everything in nimrod. Only cause i spent most of my time in shell. I move from archlinux two years ago to slitaz cause none of the tools was compiled in C or was binaries.
I'm also working on slitaz-tank iso thats going to become a new sub project of slitaz. I can't make changes quick changes to stuff in pkgs.slitaz.org if parts of it are compiled binaries when doing testing in VM.
I prefer we just stick to bash code and just make the bash code better.
Offline
Such messages make my heart cry. The transition was untimely and unnecessary for any of the developers. 2-3 more of these messages, and all will be over, so is really not begun.
Offline
I have been doing more and more work in nimrod lately and it seems too new of a language. I think we should focus on finishing spk. I would love to write in a more structured language like nimrod, but we need to improve other parts of slitaz before we can make such radical changes. What else is on the plate for 5.0?
Offline
What if pankso said that way back when he created SliTaz 1.0 or the beta and alphas of that? Why make a new micro linux, why not stick with DSL or Puppy? Why not stick with Ubuntu or Debian or Fedora? Why make a whole new Linux from scratch?
Why? Because he wanted to and it was innovative in itself to create it. Innovation pushes a distribution and community forward, it allows it to grow. What you two are doing is the opposite of innovation. It's reluctance to change. It's down to what developers want compared to the users. Users want fast and small applications. Developers want to be able to use SLOW shell scripts because it's easy to edit WHEN they feel like it, even though they RARELY do so. So here's what I'm going to do: I'm going to carry on regardless of what you, domcox or godane has to say. I will then release a package for it and let the USERS decide between having slow ash scripts and the ~500% performance boosts, even on OLDER machines, the Nimrod code will bring. Wanna make a bet which will win?
Offline
Thank you for your support, Brenton!
You make me happy and strengthened me on my way.
I must say that enough work for everyone. For those who write on Ash and for those who write on the Nimrod, no matter, he writes frequently or rarely. No need to determine whose contribution was greater, and whose lower. No need to be separated, because in the long run we're doing one thing.
New tools to be written on the Nimrod, using proven, polished and tested algorithms from the original tools written in Ash. By using a completely different language, the implementation of these algorithms will be different. But possibilities offered by the original tools, will be transferred to the new tools. If someone can add a new feature, but only in the Ash-code, the same feature will be carried over to the Nimrod-code. And vice-versa.
Let everyone engaged only what brings him pleasure!
Offline
More on a philosophical approach:
Introducing Nimrod to code Slitaz tools is conformism: this is the way Debian, Ubuntu, Fedora and other convoluted distributions are built whatever is the algol-derived language used.
By using self-limiting tools (ash, awk), you allow ordinary users to take control of their system and let them develop their creativity. There are no more developpers on one side and consumers on the other side, but people building together solutions. This is innovation, based on philosophical roots. I agree it's difficult to accept because the idea of self-limiting tools is antithetical to technology (and capitalism).
Offline
We can develop both and let the user decide which they want to use.
If we use Nimrod or if we use Ash scripts, the user still needs to learn the language and in Ash scripts' case, the tools like awk and sed. I can also predict with 90% certainty that most users don't care either way.
Any way you try spinning it, you're being deletist rather than inclusionistic about this. Why can't we have both? Why shouldn't the users have the right to decide?
Offline
[ Generated in 0.020 seconds, 7 queries executed - Memory usage: 1.6 MiB (Peak: 1.77 MiB) ]