1 |
On Mon, Feb 24, 2014 at 9:07 AM, Alan McKinnon <alan.mckinnon@×××××.com> wrote: |
2 |
> On 24/02/2014 01:12, Mick wrote: |
3 |
>> On Sunday 23 Feb 2014 22:32:32 Alan McKinnon wrote: |
4 |
>>> On 23/02/2014 20:18, Canek Peláez Valdés wrote: |
5 |
>>>> I don't think forking would attract much developers. Writing something |
6 |
>>>> new trying to follow "the*nix design principles", but being modern and |
7 |
>>>> with the same features (all of them optional, of course) of systemd |
8 |
>>>> will have more chances; although I think it will fail because most of |
9 |
>>>> the people that can code "better" actually like the systemd design, |
10 |
>>>> and would prefer to contribute to it. |
11 |
>>>> |
12 |
>>>> And if you found enough of this mythical good-coders, good luck |
13 |
>>>> defining what it means "the*nix design principles". |
14 |
>>> |
15 |
>>> I've been wondering about this concept of "the*nix design principles"... |
16 |
>> |
17 |
>> Well, I'm no authority on this since I can't code, but here's a starter for |
18 |
>> 10: |
19 |
>> |
20 |
>> http://www.faqs.org/docs/artu/ch01s06.html |
21 |
>> |
22 |
>> http://people.fas.harvard.edu/~lib113/reference/unix/co-unix4.html |
23 |
> |
24 |
> I really like documents like this, all airy-fairy and giving the |
25 |
> impression that the whole design was worked out nicely in advance. It |
26 |
> wasn't. the doc even quotes this fellow who had nothing to do with the |
27 |
> doc itself: |
28 |
> |
29 |
> "Those who don't understand UNIX are doomed to reinvent it, poorly." |
30 |
> --Henry Spencer |
31 |
> |
32 |
> Let me tell you how Unix was designed, how the whole thing took shape |
33 |
> once K&R had gotten C pretty much stabilized. It is most apparent in IO |
34 |
> error handling in early designs and it goes like this: |
35 |
> |
36 |
> We don't do error handling. We don't even try and deal with it at the |
37 |
> point it occurred, we just chuck it back up the stack, essentially |
38 |
> giving them message "stuff it, I'm not dealing with this. You called me, |
39 |
> you fix it." |
40 |
> |
41 |
> Doesn't sound like good design does it? Sounds more like do whatever you |
42 |
> think you can get away with. Good design in this area gives you |
43 |
> something conceptually along the lines of try...catch...finally (with |
44 |
> possibly some work done to avoid throwing another exception in the |
45 |
> finally). Unix error "design" does this: |
46 |
> |
47 |
> exit <some arb number> |
48 |
> and an error message is in $@ if you feel like looking for it |
49 |
> |
50 |
> Strangely, this approach is exactly why Unix took off and got such |
51 |
> widespread adoption throughout the 70s. An engineer will understand that |
52 |
> a well-thought out design that is theoretically correct requires an |
53 |
> underlying design that is consistent. In the 70s, hardware consistency |
54 |
> was a joke - every installation was different. Consistent error handling |
55 |
> would severely limit the arches this new OS could run on. By taking a |
56 |
> "Stuff it, you deal with it coz I'm not!" approach, the handling was |
57 |
> fobbed off to a higher layer that was a) not really able to deal with it |
58 |
> and b) at least in a position to try *something*. |
59 |
> |
60 |
> By ripping out the theoretical correctness aspects, devs were left with |
61 |
> something that actually could compile and run. You had to bolt on your |
62 |
> own fancy bits to make it reliable but eventually over time these things |
63 |
> too stabilized into a consistent pattern (mostly by hardware vendors |
64 |
> going bankrupt and their stuff leaving the playing field) |
65 |
> |
66 |
> And so we come to what "Unix design" probably really is: |
67 |
> |
68 |
> "You do what you have to to get the job done, the simpler the better, |
69 |
> but I'm not *really* gonna hold you to that." |
70 |
> |
71 |
|
72 |
*slow clap* |
73 |
|
74 |
-- |
75 |
This email is: [ ] actionable [ ] fyi [x] social |
76 |
Response needed: [ ] yes [ ] up to you [x] no |
77 |
Time-sensitive: [ ] immediate [ ] soon [x] none |