Re: AW: mini-golf: first differing position

2004-04-21 Thread Yitzchak Scott-Thoennes
On Wed, Apr 21, 2004 at 09:44:54AM +0200, Xavier Noria [EMAIL PROTECTED] wrote: Good. With a little modification we get 26 if this is right: $_=$x^$y;$n=$-[0]if/[^\0]/ $x = abc; $y = abc\0\0\0; gives undef instead of the required 3 On Wed, Apr 21, 2004 at 07:48:57AM +0200, Xavier Noria

AW: AW: mini-golf: first differing position

2004-04-21 Thread Winter Christian
Xavier Noria wrote: On Apr 21, 2004, at 8:40, Winter Christian wrote: Good. With a little modification we get 26 if this is right: $_=$x^$y;$n=$-[0]if/[^\0]/ or even get a 25: $_=$x^$y;($n)[EMAIL PROTECTED]/[^\0]/ -Christian

Re: AW: mini-golf: first differing position

2004-04-21 Thread Xavier Noria
On Apr 21, 2004, at 10:04, Yitzchak Scott-Thoennes wrote: On Wed, Apr 21, 2004 at 09:44:54AM +0200, Xavier Noria [EMAIL PROTECTED] wrote: Good. With a little modification we get 26 if this is right: $_=$x^$y;$n=$-[0]if/[^\0]/ $x = abc; $y = abc\0\0\0; gives undef instead of the required 3

RE: AW: mini-golf: first differing position

2004-04-21 Thread Terje Kristensen
and even 24 $_=$x^$y;($n)[EMAIL PROTECTED]/^\0+/ ($n)[EMAIL PROTECTED]($x^$y)=~/^\0*/ Terje -Original Message- From: Winter Christian [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 10:09 AM To: [EMAIL PROTECTED] Subject: AW: AW: mini-golf: first differing position

xor of unicode strings

2004-04-21 Thread Bernie Cosell
I'm not sure if this is 'fun', but it might be at least curious: I don't have a UTF-8 system handy to try, but I'm wondering: what happens with the string-xor operator on UTF-8 strings. It obviously cannot work byte- by-byte, but it seems like it is going to be a bit tricky figuring out what

Re: xor of unicode strings

2004-04-21 Thread Yitzchak Scott-Thoennes
On Wed, Apr 21, 2004 at 07:37:42AM -0700, Yitzchak Scott-Thoennes [EMAIL PROTECTED] wrote: On Wed, 21 Apr 2004, Bernie Cosell wrote: I'm not sure if this is 'fun', but it might be at least curious: I don't have a UTF-8 system handy to try, but I'm wondering: what happens with the

Re: AW: mini-golf: first differing position

2004-04-21 Thread Xavier Noria
On Apr 21, 2004, at 10:27, Xavier Noria wrote: Sure thank you, then looks like {$x ne$y$x=~/./sg$y=~/\G\Q$/gredo;$n=$-[0]} is the shortest solution so far (49). Just for the record, using the trick in the last post by Terje we get 48: {$x ne$y$x=~/./sg$y=~/\G\Q$/gredo;($n)[EMAIL

Re: fractional cents

2004-04-21 Thread A. Pagaltzis
* John Douglas Porter [EMAIL PROTECTED] [2004-04-20 08:39]: It seems to me that the precision desired should depend on context, and nothing else. And that being the case... printf $fractional_cents ? '%7.3f' : '%7.sf', $amt; irrespective of the value of $amt. Why is this not right?

Re: fractional cents

2004-04-21 Thread A. Pagaltzis
* Bernie Cosell [EMAIL PROTECTED] [2004-04-22 00:02]: On 21 Apr 2004 at 22:55, A. Pagaltzis wrote: If you do this by looking at $amt, then your method must be mathematical, because chopping characters in the string representation of the unrounded $amt might occasionally lead to results