Hello All!
[EMAIL PROTECTED] (Mtv Europe) wrote:
> New "Power Crisis" minigolf is available on the system
> http://terje.dev.webon.net/golf/
It turned out, that "power crisis" was very prophetical name and as a
direct result of this, last night system was unavailable.
We make our apologies to t
Terje Kristensen ([EMAIL PROTECTED]) wrote:
> One big difference is that in the minigolf, we dont submit
> solutions, just the score. in this way you dont need a ref to check
> solutions, and the person who holds the contest can also play.
>
> we use the same testscript, so there you have some r
46 +0100
To: [EMAIL PROTECTED]
Subject: Re: minigolf
Re: Terje Kristensen ([EMAIL PROTECTED]) wrote:
Re: > It's been over a week since the TPR04c ended now, so i think it's time for
another minigolf. :)
Re: >
Re: > This time it's a joint effort by myself and Mtve.
Re:
Terje Kristensen ([EMAIL PROTECTED]) wrote:
> It's been over a week since the TPR04c ended now, so i think it's time for another
>minigolf. :)
>
> This time it's a joint effort by myself and Mtve.
>
> http://terje.dev.webon.net/golf/
Every time I see these mini-golfs come up I think what a cry
--- Phil Carmody <[EMAIL PROTECTED]> wrote:
> 0: 47
> 1: 47
0: 46
1: 46
_Now_ I think I'm at a dead end, and would require a new algorithm.
Phil
=
--
"One cannot delete the Web browser from KDE without
losing the ability to manage files on the user's own
hard disk." - Prof. Stuart E Madn
En réponse à Benoît Chauvet <[EMAIL PROTECTED]>:
> From: "Peter Makholm" <[EMAIL PROTECTED]>
>
> > Anyone ready to exploit that you can write to the script?
>
> Waooo ! Sound great !
>
> But the rules does not mention if the script must pass the tests twice.
> (if it can modify itself, maybe i
En op 29 mei 2002 sprak Benot Chauvet:
> > Anyone ready to exploit that you can write to the script?
>
> Waooo ! Sound great !
>
> But the rules does not mention if the script must pass the tests twice.
The script, *as originally written*, should pass the tests every time it
is run. The state o
- Original Message -
From: "Peter Makholm" <[EMAIL PROTECTED]>
> Anyone ready to exploit that you can write to the script?
Waooo ! Sound great !
But the rules does not mention if the script must pass the tests twice. (if
it can modify itself, maybe it will become unusable after the fir
In article <[EMAIL PROTECTED]>,
Peter Makholm <[EMAIL PROTECTED]> writes:
> [EMAIL PROTECTED] (Ton Hospel) writes:
>
>> This is not the first time I've been wondering about the exact form of $0.
>> I'd also like a judgement if `$0 args` is allowed (probably not ok),
>> and even `$^X $0 ar
[EMAIL PROTECTED] (Ton Hospel) writes:
> This is not the first time I've been wondering about the exact form of $0.
> I'd also like a judgement if `$0 args` is allowed (probably not ok),
> and even `$^X $0 args` (probably ok).
It is usual with something like the following rule:
- The program m
In article ,
[EMAIL PROTECTED] (Ton Hospel) writes:
> In article <[EMAIL PROTECTED]>,
> Lolly Pop <[EMAIL PROTECTED]> writes:
>> #!perl -l
>> print$n-map$n+=@a%$_?0:$_,@a=1..pop
>>
>
> Yup, you found the 38 (don't you dare to enter the next TPR
> as be
In article <[EMAIL PROTECTED]>,
Lolly Pop <[EMAIL PROTECTED]> writes:
> [EMAIL PROTECTED] (Jonathan e. paton) writes:
>
>> It might not be the winning solution, but you missed
>> a character optimisation suggested earlier:
>>
>> #!perl -l
>> map$n+=$m%$_?0:$_,1..($m=pop)/2;print$n
>
> Y
[EMAIL PROTECTED] (Jonathan e. paton) writes:
> It might not be the winning solution, but you missed
> a character optimisation suggested earlier:
>
> #!perl -l
> map$n+=$m%$_?0:$_,1..($m=pop)/2;print$n
You can knock this down some more (38?) by using
the return value of map to correct the ove
> > ...
>
> OK, then, how about:
>
> #!perl -l
> $m=pop;map$n+=$m%$_?0:$_,1..$m/2;print$n
>
> Which is still a 43. The map saves a couple of
> characters. I don't think this one has legs, tho';
> I can't see much more that can be reduced from it.
> But then, I'm not a very good golfer.
On Thu, 16 May 2002, Ryan Russell wrote:
>
> Does anyone have any hints for someone new at this? It seems like a lot
> of the golf relies on less-known side-effects. I'm wondering if someone
> has started documenting the tricks. I'm going to need a few hints before
> I'm able to read and compr
>Unfortunately you don't. This solution misses the requested \n, fixing
>that makes it a 46
OK, then, how about:
#!perl -l
$m=pop;map$n+=$m%$_?0:$_,1..$m/2;print$n
Which is still a 43. The map saves a couple of characters. I don't
think this one has legs, tho'; I can't see much more t
Ton Hospel wrote:
>
> Oh, notice that the 37 solution uses something which would
> start the judges discussing, might be rejected and will need
> a rules amendment (either explicitely allowing or disallowing
> it) for future golfs (judges for TPR4, take note !).
*mad cackles*
--
Rick Klement
En op 16 mei 2002 sprak Ryan Russell:
> > > Hang on... can't that be changed to:
> > >
> > > $m=pop;$n+=$m%$_?0:$_ for 1..$m-1;print$n
> > >
> > > you might be able to get rid of the space between "for 1".
>
> No, needs the sapce.
Nope. Of course, you can't just delete it, but spaces around a
[EMAIL PROTECTED] wrote:
>>-Original Message-
>>From: Ryan Russell [mailto:[EMAIL PROTECTED]]
>>Newbie question, why does it only add 3 characters? I would
>>have to add
>>,"\n" (5) with what (little) I know. Wait...
>>print"$n\n"
>>OK, so 4 then.
>
> print$n.$\
or
#perl -l
print$n
o
> -Original Message-
> From: Ryan Russell [mailto:[EMAIL PROTECTED]]
>
> On Fri, 17 May 2002, Ton Hospel wrote:
>
> > Unfortunately you don't. This solution misses the requested
> \n, fixing
> > that makes it a 46
>
> OK, thanks. I was getting a new line after running my program, but
On Fri, 17 May 2002, Ton Hospel wrote:
> Unfortunately you don't. This solution misses the requested \n, fixing
> that makes it a 46
OK, thanks. I was getting a new line after running my program, but I
wasn't sure if the artifact of the way it was run counted or not, and I
didn't see any obviou
In article ,
[EMAIL PROTECTED] (Ton Hospel) writes:
> Here's a small challenge that I set people on ircnet #perl:
>
> minigolf: write a program that, given argument n, prints to stdout the sum
> of the factors of n followed by a newline, e.g. "program 12" shou
In article <[EMAIL PROTECTED]>,
"Jonathan E. Paton" <[EMAIL PROTECTED]> writes:
>> > This is in fact unexpectedly challenging. a 43 is easy. A 40 is hard.
>>
>> Here's mine
>>
>> $m=pop;for(1..$m-1){$n+=$m%$_?0:$_}print $n
>>
>> 43, if I understand the rules correctly. (First attempt a
> > This is in fact unexpectedly challenging. a 43 is easy. A 40 is hard.
>
> Here's mine
>
> $m=pop;for(1..$m-1){$n+=$m%$_?0:$_}print $n
>
> 43, if I understand the rules correctly. (First attempt at this... been
> wanting to play since I read about it on /.)
Hang on... can't that be changed
On Thu, 16 May 2002, Ton Hospel wrote:
> This is in fact unexpectedly challenging. a 43 is easy. A 40 is hard.
Here's mine
$m=pop;for(1..$m-1){$n+=$m%$_?0:$_}print $n
43, if I understand the rules correctly. (First attempt at this... been
wanting to play since I read about it on /.)
Does anyo
Benoît Chauvet wrote:
>
> > Fun, but none too impressive:
> >
> > #!perl -l
> > (1x pop)=~/^(1+)\1+$(?{$x+=$+[1]})./;print$x
> >
> > Can't break 41. G.
>
> This one is 48 stokes, isn't it ?
> By the way, would you explain the meaning of $+[1] ?
> Is this a not documented perlvar @+ ?
>
47,
On Thu, May 16, 2002 at 06:19:43AM -0500, [EMAIL PROTECTED] wrote:
> Fun, but none too impressive:
>
> #!perl -l
> (1x pop)=~/^(1+)\1+$(?{$x+=$+[1]})./;print$x
Interesting.
However, this segfaults for 65535 on Linux and Solaris (both v5.6.1),
and gives incorrect result of 45920 on Windows 2000
> perldoc perlvar
> /LAST_MATCH_END
Excuse me FX, you were right, but I was stupid enough to use the (not
complete) french translations of perldoc.
Forgive me and forget those mails, golfers... :s
--
|3enoît, going back to bed 'till June 1stin perlvar.
Benoît Chauvet ([EMAIL PROTECTED]) wrote:
> It certainly means that @+ contains the position of the last character of
> last match in the original string, followed by the positions of the last
> characters of the groups.
>
> Terrific !
>
> Damn, I don't have time (nor talent and sufficient knowl
On Thu, 16 May 2002 15:19:46 +0200
Beno <[EMAIL PROTECTED]> wrote:
: So I keep asking : what does @+ mean ?
You need to know the captured number to increment $x, but there you have
a handful of 1s in a row, the (IMHO clever) trick is to retrieve the
actual divisor asking for an offset via @+. Lo
On Thu, 16 May 2002 15:19:46 +0200
Beno <[EMAIL PROTECTED]> wrote:
: So I keep asking : what does @+ mean ?
You need to know the captured number to increment $x, but there you have
a handful of 1s in a row, the (IMHO clever) trick is to retrieve the
actual divisor asking for an offset via @+. Lo
Hey, I managed to find the answer alone, with this script :
#!perl -l
$,=';';
$_="-a--cc---";
/(a+)-+(b+)-+(c+)-/;
print "1234567890123";
print;
print @+;
which outputs :
1234567890
-a--cc---
11;2;7;10
It certainly means that @+ contains the position of the last character of
last match
- Original Message -
From: "F.Xavier Noria" <[EMAIL PROTECTED]>
> : By the way, would you explain the meaning of $+[1] ?
> : Is this a not documented perlvar @+ ?
>
> perldoc perlvar
> /LAST_MATCH_END
Thanks, but then, I'll reformulate my question :
I know $+, and I know Perldoc ;) , bu
On Thu, 16 May 2002 13:56:48 +0200
Beno <[EMAIL PROTECTED]> wrote:
: > Fun, but none too impressive:
: >
: > #!perl -l
: > (1x pop)=~/^(1+)\1+$(?{$x+=$+[1]})./;print$x
: >
: > Can't break 41. G.
:
: By the way, would you explain the meaning of $+[1] ?
: Is this a not documented perlvar @+ ?
- Original Message -
From: <[EMAIL PROTECTED]>
To: "'Ton Hospel'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 1:19 PM
Subject: RE: Minigolf
> Fun, but none too impressive:
>
> #!perl -l
> (1x pop)=~/^(1+)\1+$
Fun, but none too impressive:
#!perl -l
(1x pop)=~/^(1+)\1+$(?{$x+=$+[1]})./;print$x
Of course, Abigail is entirely to blame for this solution. I was a bit
surprised to discover that $_ is set to the regex string within the
re-eval, so I couldn't use it for the accumulator.
Can't break 41. Grrr
36 matches
Mail list logo