Gentoo Archives: gentoo-kernel

From: Jimmy Jazz <Jimmy.Jazz@×××.net>
To: gentoo-kernel@l.g.o
Cc: dsd@g.o
Subject: Re: [gentoo-kernel] I'm not able to get the vertical bar with gensplash after issuing alt+f1 key during the earlier boot stage
Date: Sun, 17 Jun 2007 14:02:50
Message-Id: 46753EA8.6060302@gmx.net
In Reply to: Re: [gentoo-kernel] I'm not able to get the vertical bar with gensplash after issuing alt+f1 key during the earlier boot stage by Daniel Drake
1 Hello Daniel,
2
3 Daniel Drake a écrit :
4 > I guess that depends on your ability as a C programmer and your
5 > definition of 'flexible'. As shell interpreters are typically written
6 > in C I don't think you can fairly say that you can do things in shell
7 > script which can't be done in C.
8 >
9 First, i didn't want to hurt and i'm happy to see you like C but it
10 seems you misunderstood me :). C is just more powerful when you talk
11 about speed, pointers, functions and procedures. Anyway, C comes from C
12 and ... assembler. Assembler is also powerful but not flexible, mostly
13 because it depends on the hardware you use. It is difficult to read and
14 does not fit for large programs (what about Doom 1 the game ? ;).
15 Also we could talk about another "command interpreter" like irb. It
16 doesn't depend on any platforms or hardwares, it is object-oriented and
17 you can program while using it. That's what i call flexible. Of course
18 {ba,a,k,c,etc}sh are certainly just enough flexible but obviously not
19 powerful. You want more power, you can also write a program in C or in
20 whatever language you like and call it from the shell interpreter. As a
21 result, you will increase the abilities of your shell.
22
23 Imagine you lack some functionalities in your script. You just need to
24 add them and also rerun the script. Such flexibility is not possible
25 with C or Pascal especially if you don't have either libraries or
26 compilers. It is like in the past with a C64 where you could peek and
27 poke in basic in a program to cheat ! with C you have only {a,s}db like
28 debugger (it is a little bit more difficult then...) But indeed, a
29 script doesn't protect you from syntax errors. In that case you can even
30 not call a shell. You need the rescue cdrom as usual :)
31 > baselayout-2 doesn't drop any features that I know about, actually it
32 > adds several, and it is much much more reliable than its predecessors.
33 > It solves all the highly reproducible and extremely difficult to fix
34 > problems that I had with baselayout-1.
35 Sorry, i didn't go into baselayout-2 too deep but you write rc in C and
36 that is what i have considered a bad idea. You make approximately 11
37 calls to exec(). If something has changed like the name of a program it
38 calls, you won't be able to remedy it with ease (and don't tell me: just
39 create a link to it ;).
40
41 Yes, it is difficult to fix problems with a shell script but sometimes
42 that means the script has become too big and it is time to think it
43 differently.
44 I like the ideas in baselayout-1 but unfortunately i didn't have really
45 any use of it except the fact i can control the order the daemons are
46 loaded. Instead /sbin/functions.sh has helped me a lot to write a script
47 that does approximately the same but in ash and with candies too :). I
48 actually use it during the earlier boot stage process when disks are
49 still not recognized. Also i have integrated a modified
50 splash-functions.sh too. It is certainly not universal but it works. I
51 hope i will be able to support crypted raid1 boot disk as well in the
52 future. Also, it isn't fast nor it doesn't innovate, but above all it is
53 aesthetic (in my point of view anyway).
54 >
55 > And believe me, I tried to fix them, focusing specifically on the
56 > concurrency issues. I now believe it is *impossible* to write an
57 > unbreakable and race-free locking mechanism in shell script, which is
58 > the only realistic way to avoid some of these bugs.
59 >
60 > Daniel
61
62 Right, a shell is not what handles the best concurrency issues but
63 "wait" and "jobs" have been quite improved. If you have an example i
64 could try. Also, that makes life exciting and i cheer you up. I'm sure
65 you will succeed and improve gentoo even better :)
66
67
68 | And unless you are missing some kind of feature from baselayout-2, or
69 there is otherwise something that could be done with previous
70 | versions that is no longer possible, then I don't think you have any
71 real reasons (other than political ones) to push off the upgrade...
72
73 I'm not quite good in politics but i will follow your advice :). I just
74 have feared you will definitely drop baselayout-1. (anyway, maintaining
75 two different kinds of software that do approximately the same thing is
76 a pain). I will need to reconvert sooner or later. Also, we leave in
77 really hard time, everything is moving too fast ;)
78
79
80 Jj
81 --
82
83 |\ _,,,---,,_
84 ZZZzz /,`.-'`' -. ;-;;,_
85 |,4- ) )-,_. ,\ ( `'-'
86 '---''(_/--' `-'\_)
87
88
89
90 *My Two Cents Comment** *
91 "Don't fear the pen. When in doubt, draw a pretty picture." --Baker's
92 Third Law of Design.
93
94
95 --
96 gentoo-kernel@g.o mailing list

Replies