Hello Daniel,

Daniel Drake a écrit :
I guess that depends on your ability as a C programmer and your definition of 'flexible'. As shell interpreters are typically written in C I don't think you can fairly say that you can do things in shell script which can't be done in C.

First, i didn't want to hurt and i'm happy to see you like C but it seems you misunderstood me :). C is just more powerful when you talk about speed, pointers, functions and procedures. Anyway, C comes from C and ... assembler. Assembler is also powerful but not flexible, mostly because it depends on the hardware you use. It is difficult to read and does not fit for large programs (what about Doom 1 the game ? ;). Also we could talk about another "command interpreter" like irb. It doesn't depend on any platforms or hardwares, it is object-oriented and you can program while using it. That's what i call flexible. Of course {ba,a,k,c,etc}sh are certainly just enough flexible but obviously not powerful. You want more power, you can also write a program in C or in whatever language you like and call it from the shell interpreter. As a result, you will increase the abilities of your shell.

Imagine you lack some functionalities in your script. You just need to add them and also rerun the script. Such flexibility is not possible with C or Pascal especially if you don't have either libraries or compilers. It is like in the past with a C64 where you could peek and poke in basic in a program to cheat ! with C you have only {a,s}db like debugger (it is a little bit more difficult then...) But indeed, a script doesn't protect you from syntax errors. In that case you can even not call a shell. You need the rescue cdrom as usual :)
baselayout-2 doesn't drop any features that I know about, actually it adds several, and it is much much more reliable than its predecessors. It solves all the highly reproducible and extremely difficult to fix problems that I had with baselayout-1.
Sorry, i didn't go into baselayout-2 too deep but you write rc in C and that is what i have considered a bad idea. You make approximately 11 calls to exec(). If something has changed like the name of a program it calls, you won't be able to remedy it with ease (and don't tell me: just create a link to it ;).

Yes, it is difficult to fix problems with a shell script but sometimes that means the script has become too big and it is time to think it differently. I like the ideas in baselayout-1 but unfortunately i didn't have really any use of it except the fact i can control the order the daemons are loaded. Instead /sbin/functions.sh has helped me a lot to write a script that does approximately the same but in ash and with candies too :). I actually use it during the earlier boot stage process when disks are still not recognized. Also i have integrated a modified splash-functions.sh too. It is certainly not universal but it works. I hope i will be able to support crypted raid1 boot disk as well in the future. Also, it isn't fast nor it doesn't innovate, but above all it is aesthetic (in my point of view anyway).

And believe me, I tried to fix them, focusing specifically on the concurrency issues. I now believe it is *impossible* to write an unbreakable and race-free locking mechanism in shell script, which is the only realistic way to avoid some of these bugs.

Daniel

Right, a shell is not what handles the best concurrency issues but "wait" and "jobs" have been quite improved. If you have an example i could try. Also, that makes life exciting and i cheer you up. I'm sure you will succeed and improve gentoo even better :)


| And unless you are missing some kind of feature from baselayout-2, or there is otherwise something that could be done with previous | versions that is no longer possible, then I don't think you have any real reasons (other than political ones) to push off the upgrade...

I'm not quite good in politics but i will follow your advice :). I just have feared you will definitely drop baselayout-1. (anyway, maintaining two different kinds of software that do approximately the same thing is a pain). I will need to reconvert sooner or later. Also, we leave in really hard time, everything is moving too fast ;)


Jj
--

           |\      _,,,---,,_
     ZZZzz /,`.-'`'    -.  ;-;;,_
          |,4-  ) )-,_. ,\ (  `'-'
         '---''(_/--'  `-'\_)



*My Two Cents Comment** *
"Don't fear the pen. When in doubt, draw a pretty picture." --Baker's Third Law of Design.


--
[EMAIL PROTECTED] mailing list

Reply via email to