[Zope] Re: Linux am me ;-) [OT]
Bo M. Maryniuck
b.maryniuk@forbis.lt
Mon, 12 Aug 2002 18:53:25 +0200
On Monday 12 August 2002 16:02, Derrick 'dman' Hudson wrote:
> On Mon, Aug 12, 2002 at 09:44:04AM +0200, Bo M. Maryniuck wrote:
> | On Sunday 11 August 2002 05:59, Derrick 'dman' Hudson wrote:
> | > PS. My .sig is randomly chosen by a python script.
> |
> | BTW, Python script for THIS is just heavy overkill
>
> Nah, it's only 4 lines of code. =20
=2E..plus Python interpreter, plus code interpretation, plus memory crapp=
ing...
So since it will start, run and crash goes a lot of time, comparing with=20
simple Bash.
> The first line is a list literal
> containing lots of triple-quoted strings. =20
No! This should be as plug-in file.
> The second line imports
> random. =20
Yes, sure. We import some module...
> I'm curious to see how you wrote that.
Just in two lines:
-----------------8<------------------
#!/bin/bash
fortune filename
-----------------8<------------------
For comparison:
*bo@bogdanm:(~/bin) time fortune
"I'm really enjoying not talking to you ... Let's not talk again REAL
soon ..."
real 0m0.005s
user 0m0.000s
sys 0m0.000s
*bo@bogdanm:(~/bin) python -c ''
*bo@bogdanm:(~/bin) time python -c ''
real 0m0.059s
user 0m0.030s
sys 0m0.010s
*bo@bogdanm:(~/bin) time python -c 'import random'
real 0m0.148s
user 0m0.050s
sys 0m0.000s
:P
--=20
Sincerely yours, Bogdan M. Maryniuck
linux: because a PC is a terrible thing to waste
(ksh@cis.ufl.edu put this on Tshirts in '93)