GoogleCL

2010-06-20 Thread Oleg Goldshmidt
Heh-heh, for those of you guys and gals who love both Google apps and
command line (and I suspect there are a few here) here is a bit of
code annouced yesterday (?):

http://code.google.com/p/googlecl/

I don't use Google apps myself and I have not tried it, but it looks
darn useful if you do, so I thought I'd post. Curiosity: can someone
report if this works from Androids and/or other Linux phones?

-- 
Oleg Goldshmidt | p...@goldshmidt.org

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: platform for number crunching---resume

2010-06-20 Thread Meir Michanie
There is always another option,...
one other option would be to underclock your CPUs and then even when they
hit the 100% usage over long periods as it is running at lower speed, it
wouldn't heat that much.

On Sat, Jun 19, 2010 at 11:12 AM, Shimon Panfil wrote:

> Many thanks for everybody who answered my question.
> Short resume is following:
> 1. x86_64 is really the only affordable platform( sure it depends on
> definition of "affordable" but anyway people got it right);
> 2. Good idea is cleaning off the dust from the box and check thermal paste;
> 3. Is the problem specific to my machine or has general nature still
> unclear,
> since:
> a) gamers forums are full of complaints about overheating;
> b) nobody provides example of heavy *numerical* load without overheating,
> kernel compilation for example is not relevant becouse AFAIK compiler does
> not use floating point calculations and power consumption and heating may be
> essentially different;
> 4. All the subject of CPU power consumption and heating is complicated and
> needs serious investigation. Most of the references I've seen are of
> anecdotal character, very little reliable physical/engineering information.
> Probably manufacturers prefer to keep this information for own use.
> S.
>
> --
> Shimon Panfil: Industrial Physics and Simulations
> http://industrialphys.com
>
> ___
> Linux-il mailing list
> Linux-il@cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: platform for number crunching---resume

2010-06-20 Thread geoffrey mendelson


On Jun 20, 2010, at 11:48 AM, Meir Michanie wrote:


There is always another option,...
one other option would be to underclock your CPUs and then even when  
they hit the 100% usage over long periods as it is running at lower  
speed, it wouldn't heat that much.




The problem with that is the whole system is desinged to be run at  
about 85% useage. Beyond that everything overheats, electrical signals  
interfere with each other, etc.


100% is ok for peaks, but if the system runs like that for days, it's  
going to fail. Even if you were to add better cpu cooling, replace  
passive heat sinks on other chips with active ones, and so on.


Attempts at using commerical game systems such as the PS/3 for compute  
farms did not do well. The first version was fine, but the latest  
"slim" one can't sustain high cpu rates, which is one reason Sony  
dropped (with a loud thud) Linux on them.


Geoff.
--
geoffrey mendelson N3OWJ/4X1GM Jerusalem Israel geoffreymendel...@gmail.com
I do multitasking. If that bothers you, file a complaint and I will  
start ignoring it immediately.








___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Perl and integer overflows

2010-06-20 Thread Shachar Shemesh

Hi all,

I'm trying to calculate the result of a string hash function in perl. I 
need an explicit function, as the perl output is used to create a C 
program, that will then use that very same hash function. Please, do not 
direct me to perl's excellent hash handling. I know it's there. I use it 
where applicable. This is not one of those cases.


The hash function I'm using is sdbm hash function 
(http://www.cse.yorku.ca/~oz/hash.html). To calculate it, I need to 
perform integer arithmetics, knowing full well it may overflow. It is 
okay for it to overflow, as I only need the bottom 32 bits. In fact, my 
code ANDs the result with 0x, to make sure that, on 64 bit 
platforms, I only get the bottom 32 bits.


Here's the problem. When the integer gets too big, Perl replaces it with 
MAXINT. On 64 bit platforms, that's not too bad - I can simply truncate 
to 32 bits after each operation. On 32 bit platforms, I'm a bit at a 
loss as to what to do.


Any suggestions on how to get the C integer semantics out of perl?

Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Perl and integer overflows

2010-06-20 Thread Dotan Shavit
On Sunday 20 June 2010 13:25:00 Shachar Shemesh wrote:
> Hi all,
> 
> I'm trying to calculate the result of a string hash function in perl. I
> need an explicit function, as the perl output is used to create a C
> program, that will then use that very same hash function. Please, do not
> direct me to perl's excellent hash handling. I know it's there. I use it
> where applicable. This is not one of those cases.
> 
> The hash function I'm using is sdbm hash function
> (http://www.cse.yorku.ca/~oz/hash.html). To calculate it, I need to
> perform integer arithmetics, knowing full well it may overflow. It is
> okay for it to overflow, as I only need the bottom 32 bits. In fact, my
> code ANDs the result with 0x, to make sure that, on 64 bit
> platforms, I only get the bottom 32 bits.
> 
> Here's the problem. When the integer gets too big, Perl replaces it with
> MAXINT. On 64 bit platforms, that's not too bad - I can simply truncate
> to 32 bits after each operation. On 32 bit platforms, I'm a bit at a
> loss as to what to do.
> 
> Any suggestions on how to get the C integer semantics out of perl?
I'd google for "perl long long"

#

> 
> Shachar
> 

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


interesting tidbit about overheating

2010-06-20 Thread shlomo bauer
Mechanical engineers are involved in the design of boards too!

How?

When boards are heated everything tends to expand and guess what, the
expansion factor is not the same for the comments, the traces, etc.
Multiple layer boards are designed so that things melt at different
temperatures -- guess what that means on top of everything -- the
board itself is made of layers and the layers and components (traces,
holes, etc) all expand at different rates.

Engineers need not only work with the temperature range effects but
also the duty cycle.  Running
a cache hot say, with a hit rate of say 97% vs. the design rating of
90% means not only do the chips
run hot, but the board is getting stressed.  So when an engineer
calculates how much solder and what kind of solder based on a 90% hit
rate, guess what happens when you hand tune the computations to  hit
the cache more often -- yep, mechanical stress failures.

All this of course comes from the bell-curve.  When you design around
the center and then add a 50%
safety factor, you're not really  +2 standard deviations to the right;
and that's what you need to know:  what is the safety margin in the
design, how close to it are you (or equivalently, how far to the
right).

More interestingly.

Chip manufactures produce chips and then sort them at the end.

The "sort" operation sorts chips by the highest clock frequency they
run.  I.e., a 1 GHz and 1.5 GHz processor have the same design are
made the same way, etc.  At the end of the manufacturing cycle, the
chips are tested and then sorted.  Of course the sorting is
statistical and need to be biased to the left so that it's pretty good
odds that whatever chip you buy can run at a higher clock rate, but
it will run hotter (maybe even significantly so, hence the sort
operation putting it in a slow bucket),
stress your boards, etc.

Well, I hope this tidbit is enlightening even though it offers no advice.

Shlomo

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: cat command with timeout

2010-06-20 Thread Yigal Asnis
You can use timeout command, like
timeout 5 cat ...
Yigal

--- On Sat, 6/19/10, Dan Bar Dov  wrote:

From: Dan Bar Dov 
Subject: Re: cat command with timeout
To: "Ori Idan" 
Cc: "IGLU Mailing list" 
Date: Saturday, June 19, 2010, 11:03 PM

Years ago I needed a cat with a timeout argument.I modified the cat code. It 
was very easy (if I remember correctly less than one hour of work).
Sadly, I don't have the code.

Good luck.Dan

2010/6/10 Ori Idan 

I have to read lines from serial port, I thought to read them using 'cat' 
however, since the other unit connected to the serial port, might malfunction 
and not send anything, I need a timeout to stop reading after few seconds.




Does someone know of an alternative to cat with timeout?

-- 
Ori Idan
 




___

Linux-il mailing list

Linux-il@cs.huji.ac.il

http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il





-Inline Attachment Follows-

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il



  ___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Perl and integer overflows

2010-06-20 Thread Shlomi Fish
On Sunday 20 Jun 2010 13:25:00 Shachar Shemesh wrote:
> Hi all,
> 
> I'm trying to calculate the result of a string hash function in perl. I
> need an explicit function, as the perl output is used to create a C
> program, that will then use that very same hash function. Please, do not
> direct me to perl's excellent hash handling. I know it's there. I use it
> where applicable. This is not one of those cases.
> 
> The hash function I'm using is sdbm hash function
> (http://www.cse.yorku.ca/~oz/hash.html). To calculate it, I need to
> perform integer arithmetics, knowing full well it may overflow. It is
> okay for it to overflow, as I only need the bottom 32 bits. In fact, my
> code ANDs the result with 0x, to make sure that, on 64 bit
> platforms, I only get the bottom 32 bits.
> 
> Here's the problem. When the integer gets too big, Perl replaces it with
> MAXINT. On 64 bit platforms, that's not too bad - I can simply truncate
> to 32 bits after each operation. On 32 bit platforms, I'm a bit at a
> loss as to what to do.

You can compile Perl with 64-bit integers, even on 32-bit platforms. That or 
use a big-integer module such as Math::BigInt :

http://perldoc.perl.org/Math/BigInt.html

See its lib => 'GMP' option if you want much better speed.

Regards,

Shlomi Fish

-- 
-
Shlomi Fish   http://www.shlomifish.org/
What does "Zionism" mean? - http://shlom.in/def-zionism

God considered inflicting XSLT as the tenth plague of Egypt, but then
decided against it because he thought it would be too evil.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: cat command with timeout

2010-06-20 Thread Raz
watch -n1 cat lala
is another possiblity

2010/6/20 Yigal Asnis 

> You can use timeout command, like
> timeout 5 cat ...
> Yigal
>
> --- On *Sat, 6/19/10, Dan Bar Dov * wrote:
>
>
> From: Dan Bar Dov 
> Subject: Re: cat command with timeout
> To: "Ori Idan" 
> Cc: "IGLU Mailing list" 
> Date: Saturday, June 19, 2010, 11:03 PM
>
> Years ago I needed a cat with a timeout argument.
> I modified the cat code. It was very easy (if I remember correctly less
> than one hour of work).
>
> Sadly, I don't have the code.
>
> Good luck.
> Dan
>
> 2010/6/10 Ori Idan 
> http://mc/compose?to=...@helicontech.co.il>
> >
>
>> I have to read lines from serial port, I thought to read them using 'cat'
>> however, since the other unit connected to the serial port, might
>> malfunction and not send anything, I need a timeout to stop reading after
>> few seconds.
>> Does someone know of an alternative to cat with timeout?
>>
>> --
>> Ori Idan
>>
>>
>>
>> ___
>> Linux-il mailing list
>> Linux-il@cs.huji.ac.il 
>> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>>
>>
>
> -Inline Attachment Follows-
>
>
> ___
> Linux-il mailing list
> Linux-il@cs.huji.ac.il 
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>
>
> ___
> Linux-il mailing list
> Linux-il@cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Perl and integer overflows

2010-06-20 Thread Shachar Shemesh

Shlomi Fish wrote:
You can compile Perl with 64-bit integers, even on 32-bit platforms. That or 
use a big-integer module such as Math::BigInt :


http://perldoc.perl.org/Math/BigInt.html

  

Thanks. I'll give it a try.

Shachar

See its lib => 'GMP' option if you want much better speed.

Regards,

Shlomi Fish

  



--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: cat command with timeout

2010-06-20 Thread Tzafrir Cohen
On Sun, Jun 20, 2010 at 04:06:51PM +0300, Raz wrote:
> watch -n1 cat lala
> is another possiblity

What for?

This re-runs cat 1 second after it has finished running.

Try:

  watch -n1 'sleep 5; echo hi'

It will refresh the display every 6 seconds.

-- 
Tzafrir Cohen | tzaf...@jabber.org | VIM is
http://tzafrir.org.il || a Mutt's
tzaf...@cohens.org.il ||  best
tzaf...@debian.org|| friend

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Just for giveaway and/or trade

2010-06-20 Thread Dotan Cohen
> If you are nice, I want one and one thing only in trade - a vacuum handle for 
> computer room tiles. One. C'est touts.
>

Hi Marc. What is special about such a vacuum handle? I have lots of
junk and I'm pretty sure that there are some vacuum cleaner
accessories at my mother in law's place. What makes computer room
tiles special such that they need a specialized vacuum handle, and how
can I tell that I have such a handle?


-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: platform for number crunching---resume

2010-06-20 Thread Nadav Har'El
On Sat, Jun 19, 2010, Shimon Panfil wrote about "platform for number 
crunching---resume":
> b) nobody provides example of heavy *numerical* load without  
> overheating, kernel compilation for example is not relevant becouse  
> AFAIK compiler does not use floating point calculations and power  
> consumption and heating may be essentially different;

The key phrase in the above sentence is "may be". Do you have any reason
to suspect why floating-point calculation take significantly more energy
than integer calculations (and all the other things that go on, including
memory refresh, and what have you)? Have you actually measured such a
difference?

I didn't, so I'm only guessing here, but my guess is that there may be a
difference between the exact energy use of a tight FPU calculation loop and
a tight integer calculation (or kernel compilation, or whatever), but I doubt
it's a really significant different to the point of making a difference
between a perfectly functioning 8-CPU machine and the heat-death of a 2-CPU
machine...


-- 
Nadav Har'El|   Sunday, Jun 20 2010, 9 Tammuz 5770
n...@math.technion.ac.il |-
Phone +972-523-790466, ICQ 13349191 |This message contains 100% recycled
http://nadav.harel.org.il   |characters.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Just for giveaway and/or trade

2010-06-20 Thread Marc Volovic
:) it is handle to pick up computer room floor tiles.

Looks like a phone hand-set.

Marc

On Jun 20, 2010, at 8:17 PM, Dotan Cohen wrote:

>> If you are nice, I want one and one thing only in trade - a vacuum handle 
>> for computer room tiles. One. C'est touts.
>> 
> 
> Hi Marc. What is special about such a vacuum handle? I have lots of
> junk and I'm pretty sure that there are some vacuum cleaner
> accessories at my mother in law's place. What makes computer room
> tiles special such that they need a specialized vacuum handle, and how
> can I tell that I have such a handle?
> 
> 
> -- 
> Dotan Cohen
> 
> http://gibberish.co.il
> http://what-is-what.com

Marc Volovic
marcvolo...@me.com




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Just for giveaway and/or trade

2010-06-20 Thread Dotan Cohen
On 20 June 2010 20:41, Marc Volovic  wrote:
> :) it is handle to pick up computer room floor tiles.
>
> Looks like a phone hand-set.
>

Ah, that thing! No, I have none of those, sorry!

Have a great week.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Just for giveaway and/or trade

2010-06-20 Thread Moish

On 20/06/2010 19:17, Dotan Cohen wrote:

If you are nice, I want one and one thing only in trade - a vacuum handle for 
computer room tiles. One. C'est touts.



Hi Marc. What is special about such a vacuum handle? I have lots of
junk and I'm pretty sure that there are some vacuum cleaner
accessories at my mother in law's place. What makes computer room
tiles special such that they need a specialized vacuum handle, and how
can I tell that I have such a handle?




Well, If you have a puck, it's a great paddle for air hokey !

--
Moish


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il