perl.golf
  Home FAQ Contact Sign in
perl.golf only
 
Advanced search
June 2008
motuwethfrsasuw
      1 22
2345678 23
9101112131415 24
16171819202122 25
23242526272829 26
30       27
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007    
total
perl.golf Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  scrabble word scorer         


Author: Jasper
Date: Jun 17, 2008 03:44

Hi, y'all,

Can anyone beat 55 on this? I don't know if we ever did it as a
challenge. Should I search for it in the book?

--
Jasper
no comments
  A challenge to explain the strange results (under linux)         


Author: Zhu Shanshan
Date: Jun 11, 2008 20:59

I used perl "v5.8.5 built for i386-linux-thread-multi".

My data:

##################### File:color.txt

chartreuse

deeppink

goldenrod

lightblue

dodgerblue

darkgoldenrod

My scripts:

##################### File: test.pl

use strict;

use warnings;

open IN,"color.txt" or die;

while (){

chomp;

print "$_";

}

close IN;
Show full article (1.13Kb)
3 Comments
  google's challenges         


Author: Jasper
Date: May 27, 2008 04:27

Has anyone been golfing the google challenges?

I've got the robot one to around 74 characters (not including the 'use
Math::BigInt' :))

The other one didn't seem all that interesting in comparison..

~~~tumbleweed~~~
--
Jasper
4 Comments
  Re: Upcoming event         


Author: Peter Johncke
Date: Apr 13, 2008 22:55

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

"Keep On Swinging"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Great Chain [http://rs6.net/tn.jsp?e=001bTia2OQdbhzJoyecAuMdehbAb848anStrR0Y5F_vzWufXVBQgwH2a...]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

"The Trick Shot Master presents an unforgettable Golf Spectacle unlike anything
you have ever seen"

Peter Johncke "The Trick Shot Master" brings you a Golf Show unlike anything you
have ever seen.

. Peter travels all over the world with his amazing show.

For information and booking an appearance for your next event contact us by calling
or email:

The Trick Shot Master

Tel. +1-561-627-2437

E-mail: info@trickshotmaster.com [mailto:info@trickshotmaster.com]

www.trickshotmaster.com [http://rs6.net/tn.jsp?e=001bTia2OQdbhzJoyecAuMdehbAb848anStrR0Y5F_vzWufXVBQgwH2a...]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Show full article (2.05Kb)
no comments
  Re: Just chipping in...         


Author: Tuomo Salo
Date: Nov 20, 2007 11:24

This one has no performance issues and is even a little bit shorter. Yay!

#!perl -l
$r=qr/\((??{$r})*\)/;map/^$r+$/&&print,glob"{(,)}"x2x pop

-bass
3 Comments
  Re: Just chipping in...         


Author: Phil Carmody
Date: Nov 19, 2007 18:44

--- Tuomo Salo wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> - From the keyboard of Phil Carmody (2007-11-15 15:05):
>> I saw this on sci.math, and thought "one liner" ;-)
>
> While I could not squeeze this down to a one 80 char line, there is only
> one line that does not begin with a # :-)
>
> #!perl -l
> $\=~s#(.*)\n#"$1(\n"x($1=~y/(//<$a)."$1)\n"x($1=~y/)//*2<$_-1)#gefor
1..2*($a=pop);print
>
> I tried to do the generation by hand, implemented that method as a
> regex, and polished (or should I say disfigured) the result with a
> couple of standard golfing tricks. Notice the lack of escaped parens,
> btw :-)
>
> There are probably a couple of mrmagoos there, at least you could lose
> a couple of chars (along with any perceived one-linerness) by replacing
> the "\n":s with literal newlines. ...
Show full article (1.26Kb)
no comments
  Just chipping in...         


Author: Phil Carmody
Date: Nov 15, 2007 05:05

I saw this on sci.math, and thought "one liner" ;-)
I even think a DP non-recursive approach should be quite quick.
Keeping the output in the logical order might cost a few strokes.

#!/usr/bin/perl

$count = $ARGV[0];

print join "\n", pren($count), "";

sub pren
{
my @list = ();
Show full article (1.93Kb)
8 Comments
  Re: Teen scared, awaiting transfer to state prison         


Author: Michael Yardley
Date: Aug 5, 2007 01:09

On Aug 3, 9:35 pm, "_ G O D _" TELUS.NET> wrote:
> WA women inmates allege sex assaults
> Seattle, WA, USA
> The Washington state prison system is
> investigating allegations that four male
> guards at the main women's penitentiary
> sexually assaulted two inmates. ...http://seattlepi.nwsource.com/local/64=
20AP_WA_Inmate_Sex_Probe.html
>
> Prison closure postponed
> Escanaba, MI, USA
> "Michigan has the sixth largest prison system,
> a very high rate of recidivism, and long prison
> stays due to mandatory sentencing guidelines....http://www.dailypress.net=
/stories/articles.asp?articleID=3D12584
> ...
Show full article (6.78Kb)
no comments
  (polish) golfs archive         


Author: Jasper
Date: Jul 17, 2007 06:14

Hey,

I'm looking for a list of the polish golfs, with rules and test
programs, but kernelpanic.pl, where I expected to find them, seems
reluctant to give them up.

I'm just organizizing a little intra-company golf for fun, is all, but
I don't want the overhead of creating a whole compo..

Anyone keep any of this around? Anyone know specifically of a good one
that was fun?

I suppose I could grab one of Terje's golfs that I didn't do instead...

Thanks
--
Jasper
no comments
  RE: regexp quickie         


Author: Roy Johnson
Date: Jun 27, 2007 12:26

Mine (borrowing RJK's testing code): $1 will be the last letter (non-underscore) before or at the target location; $2 will be the first letter at or after the target location, or the last letter if no such letter exists.

for (qw/ A_Z_K_ A_____ _____K /) {
print "$_\n";
for my $n (1 .. 6) {
my $r = $n - 1;
print "$n: ";
print /^(?=.{0,$r}([^_]))?.{0,$r}.*?([^_])/
? "[$1] ($2)" : "no match";
print "\n";
}
}
2 Comments
 
1 2 3