Re: [gentoo-user] [OT] Which openoffice

2008-05-07 Thread Etaoin Shrdlu
On Wednesday 7 May 2008, 09:38, Neil Bothwick wrote:

> I never awk, although I am often accused of gawking :)

Ah yes, we all use GNU awk. 

(ok, better stop this here :-)
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] [OT] Which openoffice

2008-05-07 Thread Neil Bothwick
On Wed, 7 May 2008 08:53:55 +0200, Etaoin Shrdlu wrote:

> LOL! That went unnoticed, sorry. It should have been "As Neil awk", of 
> course :-)

I never awk, although I am often accused of gawking :)


-- 
Neil Bothwick

Oops. My brain just hit a bad sector.


signature.asc
Description: PGP signature


Re: [gentoo-user] [OT] Which openoffice

2008-05-06 Thread Etaoin Shrdlu
On Tuesday 6 May 2008, 23:36, Neil Bothwick wrote:
> On Tue, 6 May 2008 18:19:22 +0200, Etaoin Shrdlu wrote:
> > As Neil sed
>
> 

LOL! That went unnoticed, sorry. It should have been "As Neil awk", of 
course :-)
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] [OT] Which openoffice

2008-05-06 Thread Neil Bothwick
On Tue, 6 May 2008 18:19:22 +0200, Etaoin Shrdlu wrote:

> As Neil sed




-- 
Neil Bothwick

If it isn't broken, I can fix it.


signature.asc
Description: PGP signature


Re: [gentoo-user] [OT] Which openoffice

2008-05-06 Thread Etaoin Shrdlu
On Tuesday 6 May 2008, 13:37, Joe User wrote:

> fixed some bugs:
>
> echo `uptime|sed 's/.*up\s*\([0-9]*\).*/\1\/10+/';grep '^cpu
> MHz' /proc/cpuinfo|awk '{print $4"/30+";}';free|grep '^Mem'|awk
> '{print $3"/1024/3+"}';df -P -k -x nfs -x smbfs|awk '{if ($1 ~
> "/dev/(scsi| sd)"){ s+= $2} s+= $2;} END {print
> s/1024/50"/15+70";}'`|sed 's/,/./'| bc|sed 's/\(..$\)/.\1cm/'

As Neil sed, almost everything can be done with awk. Then, Willie said 
that the double count for devices is a bug. Thus:

echo `uptime|awk '{print $3"/10+"}'; awk '/^cpu MHz/{print 
$4"/30+"}' /proc/cpuinfo; free|awk '/^Mem/{print $3"/1024/3+"}'; 
df -Pk -x nfs -x smbfs|awk 'NR>1{s+=$2} END{print s/1024/50"/15+70"}'`|
bc|sed 's/.$/.&cm/'

which shortens my length to 105.0cm  >:-(
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] [OT] Which openoffice

2008-05-06 Thread Willie Wong
On Mon, May 05, 2008 at 10:11:41PM +0200, Penguin Lover Justin squawked:
> >your virtual p*n*s length: 

This should answer your question below. But just in case you are one
of those male geeks who never get to experience the joy that is the
American high school locker room: yes, the jocks do go around
comparing how well endowed they are. 

> >my desktop only gets its 65.3cm because of its 514 day uptime. 
> >  
> Your desktop has an uptime of 1 and half year?

Yes, and? It runs a kernel old enough that the most recent exploits
don't apply (and since I am the only local user, I don't worry too
much about local priviledge escalation). It is on an UPS, so even when
the power goes off in the neighborhood, it is still on (though I get
no internet when that happens). :)

There really isn't any need for me to reboot, so I don't. 

> What does this XXcm value mean?
> 
(loop back to top)

W
-- 
It is said that papers in string theory are published at a rate
greater than the speed of light. This, however, is not problematic
since no information is being transmitted.
~Prof. Dr. phil. habil. Hagen Michael Kleinert
Sortir en Pantoufles: up 515 days, 12:05
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] [OT] Which openoffice

2008-05-06 Thread Willie Wong
On Tue, May 06, 2008 at 10:45:23AM +0200, Penguin Lover Etaoin Shrdlu squawked:
> On Tuesday 6 May 2008, 10:39, Neil Bothwick wrote:
> > On Tue, 6 May 2008 10:11:07 +0200, Etaoin Shrdlu wrote:
> > > cat /proc/cpuinfo|grep '^cpu MHz'|awk '{print $4"/30 +";}'
> >
> > This uses three commands when one will do, there's no need for cat or
> > grep
> >
> > awk '/^cpu MHz/ {print $4"/30 +";}' /proc/cpuinfo
> >
> > Similarly for the free command.
> 
> Ah sure. I just wanted to explain what the commands do, and didn't even 
> try to make corrections.
> 
> > Longer isn't always better ;-)
> 
> But it produces better obfuscated code! :-)

Yay! Free bug-fixing! I love this list. 

Actually, I have that script sitting on my computer since some time in
2002. I didn't write it: it was written by a friend of mine and posted
to the college unix users group mailing list, with comments as to what
the proper scaling factors are all around. 

The scaling factors for the various components were chosen at that
time because it seemed to be good, realistic numbers to compare
performances of then-current desktop boxes. At least *we* felt it
works better than bogomips. 

As to the part of looking at used memory instead of total memory: I
don't remember it doing that, I have to go back to check. The double
counting of scsi disks is a bug, mostly because this script was
written before UDEV when it wasn't an issue. 

Lastly: this is just some good, not-too-clean locker-room-style fun.
Don't take it too seriously!

Regards, 

W
-- 
In this course we will of course make use of God's Units, namely 
   h-bar = c = 1
but occasionally I will indulge myself in my personal addition to
those units, in the form of 
   2 = -1 = pi = i = 1
please feel free to interject whenever you feel confused, and I will
make my best effort to clarify things. 
   ~Prof. Herman Verlinde explaining the things. 
PHY 509, Intro to QFT, first lecture 09-12-03
Sortir en Pantoufles: up 515 days, 11:57
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] [OT] Which openoffice

2008-05-06 Thread Joe User
Am Montag, 5. Mai 2008 22:00:37 schrieb Willie Wong:
>
> echo `uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'; cat
> /proc/cpuinfo|grep '^cpu MHz'|awk '{print $4"/30 +";}';free|grep
> '^Mem'|awk '{print $3"/1024/3+"}'; df -P -k -x nfs -x smbfs | grep -v
> '1024-blocks' | awk '{if ($1 ~ "/dev/(scsi|sd)"){ s+= $2} s+= $2;}
> END {print s/1024/50"/15 +70";}'`|bc|sed 's/\(.$\)/.\1cm/'

fixed some bugs:

echo `uptime|sed 's/.*up\s*\([0-9]*\).*/\1\/10+/';grep '^cpu 
MHz' /proc/cpuinfo|awk '{print $4"/30+";}';free|grep '^Mem'|awk '{print 
$3"/1024/3+"}';df -P -k -x nfs -x smbfs|awk '{if ($1 ~ "/dev/(scsi|
sd)"){ s+= $2} s+= $2;} END {print s/1024/50"/15+70";}'`|sed 's/,/./'|
bc|sed 's/\(..$\)/.\1cm/'

Regards,
Joe User
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] [OT] Which openoffice

2008-05-06 Thread Etaoin Shrdlu
On Tuesday 6 May 2008, 10:39, Neil Bothwick wrote:
> On Tue, 6 May 2008 10:11:07 +0200, Etaoin Shrdlu wrote:
> > cat /proc/cpuinfo|grep '^cpu MHz'|awk '{print $4"/30 +";}'
>
> This uses three commands when one will do, there's no need for cat or
> grep
>
> awk '/^cpu MHz/ {print $4"/30 +";}' /proc/cpuinfo
>
> Similarly for the free command.

Ah sure. I just wanted to explain what the commands do, and didn't even 
try to make corrections.

> Longer isn't always better ;-)

But it produces better obfuscated code! :-)
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] [OT] Which openoffice

2008-05-06 Thread Neil Bothwick
On Tue, 6 May 2008 10:11:07 +0200, Etaoin Shrdlu wrote:

> cat /proc/cpuinfo|grep '^cpu MHz'|awk '{print $4"/30 +";}'

This uses three commands when one will do, there's no need for cat or grep

awk '/^cpu MHz/ {print $4"/30 +";}' /proc/cpuinfo

Similarly for the free command.

Longer isn't always better ;-)


-- 
Neil Bothwick

God: What one human uses to persecute another.


signature.asc
Description: PGP signature


Re: [gentoo-user] [OT] Which openoffice

2008-05-06 Thread Etaoin Shrdlu
On Monday 5 May 2008, 22:12, Alan McKinnon wrote:

> nazgul screenlets-0.0.2 # echo `uptime|grep days|sed 's/.*up
> \([0-9]*\) day.*/\1\/10+/'; cat /proc/cpuinfo|grep '^cpu MHz'|awk
> '{print $4"/30 +";}';free|grep '^Mem'|awk '{print $3"/1024/3+"}'; df
> -P -k -x nfs -x smbfs | grep -v '1024-blocks' | awk '{if ($1 ~
> "/dev/(scsi|sd)"){ s+= $2} s+= $2;} END {print s/1024/50"/15
> +70";}'`|bc|sed 's/\(.$\)/.\1cm/' 67.1cm
>
> Fascinating, most fascinating. I get 67.1cm! Longer than yours!
>
> Now, this command of your. Wazzitdo?

It builds a bc expression, which is then fed to bc and the result is 
divided by 10 and has "cm" added to it.

uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'

This checks the uptime, and outputs "n/10+", where "n" is the uptime in 
days. In my case, the expression is "2/10+".


cat /proc/cpuinfo|grep '^cpu MHz'|awk '{print $4"/30 +";}'

This outputs "n/30 +", where "n" is the CPU speed in mhz. In my case 
(hyperthreding cpu) it outputs

3000.000/30 +
3000.000/30 +


free|grep '^Mem'|awk '{print $3"/1024/3+"}'

This outputs "n/1024/3+", where "n" is the "used memory" from free's 
output. On my desktop, that is "1721716/1024/3+", but obvioulsy it 
changes almost every time you run the command. Not sure why the used 
memory is used instead of the total.

df -P -k -x nfs -x smbfs | grep -v '1024-blocks' | awk '{if ($1 
~ "/dev/(scsi|sd)"){ s+= $2} s+= $2;} END {print s/1024/50"/15
+70";}'

This outputs "n/15 +70", where "n" is the sum of the 1024-blocks as per 
df's output (excluding nfs and smbfs file systems), divided by 1024 and 
further divided by 50. The block count of /dev/scsi* or /dev/sd* devices 
is counted twice (not sure why though). On my system, the output 
is "5313.33/15 +70".

So, the final expression fed to bc is

2/10+ 3000.000/30 + 3000.000/30 + 1721716/1024/3+ 5313.33/15 +70

bc does the math, and sed divides the result by 10 and adds "cm" to the 
result. For me, that gives 118.4cm.

It would be interesting to know why Willie chose those values, those 
scaling factors, and what's the purpose of the constants.

Nice script though! Thanks!
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] [OT] Which openoffice

2008-05-05 Thread b.n.

Willie Wong ha scritto:

Since we've come this far, I really want to know what is 
your virtual p*n*s length: 


echo `uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'; cat /proc/cpuinfo|grep '^cpu MHz'|awk '{print 
$4"/30 +";}';free|grep '^Mem'|awk '{print $3"/1024/3+"}'; df -P -k -x nfs -x smbfs | grep -v 
'1024-blocks' | awk '{if ($1 ~ "/dev/(scsi|sd)"){ s+= $2} s+= $2;} END {print s/1024/50"/15 
+70";}'`|bc|sed 's/\(.$\)/.\1cm/'

my desktop only gets its 65.3cm because of its 514 day uptime. 
I won't even dream about compiling OO on it. 


145.8 cm - booted a few hours ago due to inadvertentely clicking the 
reset button :(


But now please explain exactly what does that line calculates...

m.
--
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] [OT] Which openoffice

2008-05-05 Thread Volker Armin Hemmann
On Montag, 5. Mai 2008, Willie Wong wrote:
> On Mon, May 05, 2008 at 09:30:52PM +0200, Justin wrote:
> > * app-office/openoffice
> >
> > Mon Mar 10 18:35:42 2008 >>> app-office/openoffice-2.3.1-r1
> >   merge time: 3 hours, 11 minutes and 4 seconds.
> >
> > Mon Apr 21 11:18:22 2008 >>> app-office/openoffice-2.4.0
> >   merge time: 1 hour, 15 minutes and 27 seconds.
> >
> > Sat Apr 26 11:55:21 2008 >>> app-office/openoffice-2.4.0
> >   merge time: 3 hours, 1 minute and 37 seconds.
> >
> >
> >
> > q6600 with 2GB RAM
>
> 1 hour and 15 minutes? Now you are just showing off.
>
> Since we've come this far, I really want to know what is
> your virtual p*n*s length:
>
> echo `uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'; cat
> /proc/cpuinfo|grep '^cpu MHz'|awk '{print $4"/30 +";}';free|grep '^Mem'|awk
> '{print $3"/1024/3+"}'; df -P -k -x nfs -x smbfs | grep -v '1024-blocks' |
> awk '{if ($1 ~ "/dev/(scsi|sd)"){ s+= $2} s+= $2;} END {print s/1024/50"/15
> +70";}'`|bc|sed 's/\(.$\)/.\1cm/'
>
> my desktop only gets its 65.3cm because of its 514 day uptime.
> I won't even dream about compiling OO on it.

219.7cm and I booted 2h ago ;)

and still I don't compile openoffice. Why waste the time? I could emerge kde 
or gnome or a complete gentoo in the same time

-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] [OT] Which openoffice

2008-05-05 Thread Alan McKinnon
On Monday 05 May 2008, Willie Wong wrote:
> Since we've come this far, I really want to know what is
> your virtual p*n*s length:
>
> echo `uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'; cat
> /proc/cpuinfo|grep '^cpu MHz'|awk '{print $4"/30 +";}';free|grep
> '^Mem'|awk '{print $3"/1024/3+"}'; df -P -k -x nfs -x smbfs | grep -v
> '1024-blocks' | awk '{if ($1 ~ "/dev/(scsi|sd)"){ s+= $2} s+= $2;}
> END {print s/1024/50"/15 +70";}'`|bc|sed 's/\(.$\)/.\1cm/'

nazgul screenlets-0.0.2 # echo `uptime|grep days|sed 's/.*up \([0-9]*\) 
day.*/\1\/10+/'; cat /proc/cpuinfo|grep '^cpu MHz'|awk '{print $4"/30 
+";}';free|grep '^Mem'|awk '{print $3"/1024/3+"}'; df -P -k -x nfs -x 
smbfs | grep -v '1024-blocks' | awk '{if ($1 ~ "/dev/(scsi|sd)"){ s+= 
$2} s+= $2;} END {print s/1024/50"/15 +70";}'`|bc|sed 's/\(.$\)/.\1cm/'
67.1cm

Fascinating, most fascinating. I get 67.1cm! Longer than yours!

Now, this command of your. Wazzitdo?

-- 
Alan McKinnon
alan dot mckinnon at gmail dot com

-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] [OT] Which openoffice

2008-05-05 Thread Justin

Willie Wong schrieb:

On Mon, May 05, 2008 at 09:30:52PM +0200, Justin wrote:
  

* app-office/openoffice

Mon Mar 10 18:35:42 2008 >>> app-office/openoffice-2.3.1-r1
  merge time: 3 hours, 11 minutes and 4 seconds.

Mon Apr 21 11:18:22 2008 >>> app-office/openoffice-2.4.0
  merge time: 1 hour, 15 minutes and 27 seconds.

Sat Apr 26 11:55:21 2008 >>> app-office/openoffice-2.4.0
  merge time: 3 hours, 1 minute and 37 seconds.



q6600 with 2GB RAM




1 hour and 15 minutes? Now you are just showing off. 
  
It the truth, it was insanely fast. But as you can see the second time 
was much slower. I can't remember how that worked.
Since we've come this far, I really want to know what is 
your virtual p*n*s length: 


echo `uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'; cat /proc/cpuinfo|grep '^cpu MHz'|awk '{print 
$4"/30 +";}';free|grep '^Mem'|awk '{print $3"/1024/3+"}'; df -P -k -x nfs -x smbfs | grep -v 
'1024-blocks' | awk '{if ($1 ~ "/dev/(scsi|sd)"){ s+= $2} s+= $2;} END {print s/1024/50"/15 
+70";}'`|bc|sed 's/\(.$\)/.\1cm/'

my desktop only gets its 65.3cm because of its 514 day uptime. 
  

Your desktop has an uptime of 1 and half year?

What does this XXcm value mean?



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] [OT] Which openoffice

2008-05-05 Thread Willie Wong
On Mon, May 05, 2008 at 09:30:52PM +0200, Justin wrote:
> * app-office/openoffice
> 
> Mon Mar 10 18:35:42 2008 >>> app-office/openoffice-2.3.1-r1
>   merge time: 3 hours, 11 minutes and 4 seconds.
> 
> Mon Apr 21 11:18:22 2008 >>> app-office/openoffice-2.4.0
>   merge time: 1 hour, 15 minutes and 27 seconds.
> 
> Sat Apr 26 11:55:21 2008 >>> app-office/openoffice-2.4.0
>   merge time: 3 hours, 1 minute and 37 seconds.
> 
> 
> 
> q6600 with 2GB RAM
> 

1 hour and 15 minutes? Now you are just showing off. 

Since we've come this far, I really want to know what is 
your virtual p*n*s length: 

echo `uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'; cat 
/proc/cpuinfo|grep '^cpu MHz'|awk '{print $4"/30 +";}';free|grep '^Mem'|awk 
'{print $3"/1024/3+"}'; df -P -k -x nfs -x smbfs | grep -v '1024-blocks' | awk 
'{if ($1 ~ "/dev/(scsi|sd)"){ s+= $2} s+= $2;} END {print s/1024/50"/15 
+70";}'`|bc|sed 's/\(.$\)/.\1cm/'

my desktop only gets its 65.3cm because of its 514 day uptime. 
I won't even dream about compiling OO on it. 

Have fun,

W


-- 
Willie W. Wong  [EMAIL PROTECTED]
408 Fine Hall,  Department of Mathematics,  Princeton University,  Princeton
A mathematician's reputation rests on the number of bad proofs he has given.
-- 
gentoo-user@lists.gentoo.org mailing list