Gentoo Archives: gentoo-dev

From: merv <merv@×××××××××××××.cy>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] initscripts in python
Date: Wed, 16 Apr 2003 05:27:25
Message-Id: 3E9D168C.10392.73F5440@localhost
In Reply to: [gentoo-dev] initscripts in python by Justin Whitney
1 I for one would enjoy the clean-feel of Python in initscrit composition.
2 That said, I would miss the very "Unix atmospherics" of awk and sed
3 and the run-time interactivity of the shell scripting (I mean, it's potential
4 for shorthand notation).
5
6 It may be a difficult one to call though. I imagine that many would feel
7 similar sentiments about the scripting advantages of both Python and
8 shell scripting. Maybe practicality would have the last say, however.
9 On machines with very limited resources (I have a box running Gentoo
10 on a Pentium 133Mhz and < 1GB harddrive with 64Mb RAM), Python
11 would be a death sentence for the box. Shell scripting is the only
12 option in such environments for job control etc etc.
13
14 Perhaps we might experiment with a build-time option for incorporating
15 *both* Python and shell scripting tools such as awk and sed in to the
16 shell (by having the Python *shell extras* turned on/off via a
17 compilation flag?). In such environments both would be available for
18 use as a shell scripting resource. Or perhaps again, we might set
19 about incorporating shell scripting notation in to Python and attempt to
20 ferment a hybrid for shell scripting purposes, initscrits and the like.
21
22 Interesting idea that has made me think more closely about what a
23 shell scripting language is and what it is for.
24
25 Will be good to see if this goes anywhere.
26
27 --Merv Hammer
28
29 On 15 Apr 2003 at 21:29, Justin Whitney wrote:
30
31 > Hi,
32 >
33 > I don't really like talking about these kinds of vague ideas (like I'm
34 > doing here), because that doesn't get them written - but this one I want
35 > feedback on first before I dive in... so...
36 >
37 > For a lot of reasons I'd like to implement the initscrits in something
38 > other than shell script. Something like python, say.
39 >
40 > Reasons for doing this would include:
41 >
42 > *writing (advanced) shellscripts requires learning awk/sed, and various
43 > other minor tools (mostly because their features aren't supported by the
44 > language). Use of a language with these features builtin lowers the
45 > learning requirement, or at least puts it all under one roof.
46 > *improved performance and bytecode-compilability
47 > *Speedups due to fewer exec calls (for awk/sed/etc)
48 >
49 > Reasons NOT to do this would include:
50 >
51 > *breaking from standard would mean packages with provided initscripts
52 > would require a rewrite.
53 > *slight increase in boot requirements (interpreter and libs must exist
54 > at least minimally on root partition)
55 > *probably needs a bit more memory
56 >
57 > other bits:
58 >
59 > *compatibility could obviously be maintained, as existing shell scripts
60 > could still be run without changes.
61 >
62 >
63 > Note: I am by no means proposing this as a standard feature of gentoo.
64 >
65 > That said, since gentoo already uses python for portage, selecting
66 > python as the language to use makes sense. Aside from the re-writes,
67 > and some other details, I don't see much disadvantage to the above
68 > design.
69 >
70 > Comments appreciated.
71 >
72 > --Justin Whitney
73 >
74 >
75 > --
76 > gentoo-dev@g.o mailing list
77 >
78
79
80 --
81 Merv Hammer
82 mailto: merv@×××××××××××××.cy
83 ------------------------------------------------------------------------------
84 -Working with Unix is like wrestling a worthy opponent...
85 -Working with windows is like attacking a small whining child
86 who is carrying a .38
87
88 --
89 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] initscripts in python Jeff Rose <rosejn@××××××××.EDU>
Re: [gentoo-dev] initscripts in python Paul de Vrieze <gentoo-user@××××××××.net>
Re: [gentoo-dev] initscripts in python Abhishek Amit <abhishekamit2000@×××××.com>