On Tue, 10 Jul 2001 at 13:12:37 -0300, Raul Dias wrote:
> >
> >I've read numerous of times about Jon Orwants Rock-Paper-Scissors program
> >that is "Markov based" and "remains unbeaten since 1997".
>
> How can a markov based R-P-S can be unbeatable without cheating?
It chooses each of R, P and
On Wed, 08 Aug 2001 at 09:29:35 +0200, Juanma Barranquero wrote:
>
> On Wed, 08 Aug 2001 13:15:11 +0800, Kye Leslie <[EMAIL PROTECTED]> wrote:
> According to GSM 03.38, "Digital cellular telecommunications system
> (Phase 2+); Alphabets and language-specific information", section
> 6.2.1, "Defa
On Thu, 09 Aug 2001 at 09:04:55 +0200, Abigail wrote:
> But I guess that ~ isn't in FORTRAN 0, and perhaps " and \ aren't either.
IBM mainframes until recently still made allowances for the
"48-character set" which was presumably what was available then. Let's
see: [-A-Z0-9,./*+=()$' ]
(see htt
On Mon, 20 Aug 2001 at 14:44:50 +1000, [EMAIL PROTECTED] wrote:
> Accordingly, here is my entry for World's Largest JAPH:
>
> ''=~(
>'(?{'.(']'
> ^'-').((']'^
> '-')|'"').('`'|
> ')').('`'|'.').((
> ']'^'-')|'$').'"'
> ..' '. ' '.' '.'#'
> ..'\\' .('`'|'.'
syntax
On Mon, 20 Aug 2001 at 09:55:34 +0100, Matthew Byng-Maddick wrote:
> On Mon, Aug 20, 2001 at 06:53:01PM +1000, [EMAIL PROTECTED] wrote:
> > Does a leading '.' have a special meaning in some mailers??
> > Does anyone else have '..' at the front of lines 7 and 8?
>
> It should be escaped by the sen
On Mon, 20 Aug 2001 at 10:19:30 +0100, Ian Phillipps wrote:
> Here's a test, since I've not seen this problem before.
> I've bcced myself on several addresses to see how it copes.
. One dot here
.. Two dots
The FWP copy didn't get to me - de-duped by procmail :-(
So
On Mon, 20 Aug 2001 at 09:06:18 -0400, Ronald J Kimball wrote:
> On Mon, Aug 20, 2001 at 10:19:30AM +0100, Ian Phillipps wrote:
> > On Mon, 20 Aug 2001 at 09:55:34 +0100, Matthew Byng-Maddick wrote:
> > > On Mon, Aug 20, 2001 at 06:53:01PM +1000, [EMAIL PROTECTED] wrote:
&g
On Tue, 21 Aug 2001 at 06:39:27 -0700, Randal L. Schwartz wrote:
> >>>>> "Ian" == Ian Phillipps <[EMAIL PROTECTED]> writes:
> Ian> I've identified the culprit: the tesco.net mail relay is misbehaving on
> Ian> this front. Interesting this is the
On Wed, 22 Aug 2001 at 11:32:18 +1000, [EMAIL PROTECTED] wrote:
> >From [EMAIL PROTECTED] (Randal Schwartz) 1 Feb 90 22:28:58 GMT
> @a=split(/(\d)/,"4Hacker,2another3Perl1Just");shift(@a);%a=@a;
> print "@a{1..4}";
66:
%a=("",split /(\d)/,"4Hacker,2another3Perl1Just");print"@a{1..4}";
I *think
On Fri, 07 Sep 2001 at 01:01:44 -0500, Craig S. Cottingham wrote:
> > /Users/me/Documents/LearnC/FirstSteps
> > then I'd like
> > .../LearnC/FirstSteps
> > to display in the title bar (or on the prompt).
> > export PROMPT_COMMAND="perl -e
> > '@d=split/\//,qx(pwd);@d=(q(...),@d[\$#d-1..
On Fri, 07 Sep 2001 at 09:30:51 -0500, Craig S. Cottingham wrote:
> On Friday, September 7, 2001, at 03:48 , Simon Cozens wrote:
> > If I could assume I was using zsh:
> On Friday, September 7, 2001, at 04:39 , Ian Phillipps wrote:
>
> > Well, this requires a zero-length
e next line,
> > and/or had extraneous spaces near the right margin.)
> No, I got it too.
> I think fwp mailing list is wrapping long lines.
> Ian Phillipps was able to prevent that happening in his original post.
I didn't send my portrait to FWP, but I don't think that FWP w
On Thu, 18 Oct 2001 at 18:33:53 -0400, Selector, Lev Y wrote:
> Wow! This is really elegant !!
> -Original Message-
> From: Josh Goldberg [mailto:[EMAIL PROTECTED]]
> sub isNumber {
> !/\d/ ? 0 : $_ == 0 ? 1 : $_ * 1
> }
Possibly elegant, but definitely not correct.
Anything no
On Thu, 18 Oct 2001 at 20:43:40 -0400, Uri Guttman wrote:
> >>>>> "IP" == Ian Phillipps <[EMAIL PROTECTED]> writes:
> IP> I feel sure this is a FAQ...
> trust your feelings. i didn't answer because it IS an FAQ. FAQ's aren't
> fun. :
On Wed, 24 Oct 2001 at 19:33:25 +0100, Robin Houston wrote:
> On Wed, Oct 24, 2001 at 01:05:38PM -0500, Greg Bacon wrote:
>
> > but my recollection is that determining whether a string is in a CSL
> > is a problem in PSPACE (and maybe PSPACE-complete).
>
> Yes, recognising CSLs is PSPACE-complet
On Thu, 25 Oct 2001 at 12:56:21 +0100, Robin Houston wrote:
> On Thu, Oct 25, 2001 at 10:42:44AM +0100, Ian Phillipps wrote:
> > I don't normally like to butt into a private conversation,
> :-) I hope this doesn't seem like a private conversation -- otherwise
> it shouldn
[EMAIL PROTECTED] wrote:
> Here is [...] a new mystery man.
> Can you identify him?
Philip Newton wrote:
> Dr. Damian?
Yes, I traced the photo from his web site.
Andrew.
On Thu, 15 Nov 2001 at 10:20:58 -0500, Ronald J Kimball wrote:
> That will not work in this case, because it would print out a newline for
> every line of input, including the ones that are being skipped.
I'd construe that as a feature: the line numbers stand more chance of
remaining in sync - u
On Thu, 15 Nov 2001 at 15:06:46 -0500, Michael G Schwern wrote:
> $1$dkb300:[schwern.src.perl-current.][00]perl.exe;11
> Still dunno what the [00] means.
On its own, [00] designates the root directory. I don't know what it
means in this context, except I see a trailing dot in the fir
On Sat, 17 Nov 2001 at 20:44:28 -0500, Michael G Schwern wrote:
> sh2perl goes back even further than that, though not as a fully
> functioning program. The mythological sh2perl program was one that
> would email your shell program to either comp.lang.perl (back when
> there was *only* comp.lang
On Tue, 20 Nov 2001 at 12:57:11 +, mallum wrote:
> on Tue, Nov 20, 2001 at 01:53:40PM +0200, Vladi Belperchinov-Shabanski wrote:
> > it was really interesting for me how performance changed
> > between perl versions and other languages (interpreters/
> > scripts/etc.) but C points just
On Tue, 27 Nov 2001 at 11:31:39 -0600, Andy Bach wrote:
> Hi.
>
> Okay, would the maths folk like to offer a helpful explanation?
> -- Forwarded message --
> How do I select a random line from a file?
See also
http://groups.google.com/groups?threadm=xn9zo7tvb5h.fsf%40owl.doc.ic.
On Thu, 29 Nov 2001 at 07:09:10 -0600, Greg Bacon wrote:
> Yesterday, I saw an interesting related exercise. Write a program that
> reads the lines from a file and outputs the middle line. The kicker is
> that you can't use arrays.
You say "file". I unilaterally interpret that as a plain file t
On Thu, 29 Nov 2001 at 22:38:47 -0600, Greg Bacon wrote:
> In message <[EMAIL PROTECTED]>,
> Dmitry Kohmanyuk =?KOI8-R?B?5M3J1NLJyiDrz8jNwc7Ayw==?= writes:
> : On Thu, Nov 29, 2001 at 06:20:37PM -0500, Michael G Schwern wrote:
> : > Does the "read from the front and back" trick qualify as one
On Sat, 01 Dec 2001 at 22:36:59 +, Jonathan E. Paton wrote:
> Okay, more imagination required. Lets abuse the symbol
> table since I'm bored,
> --- PERL SCRIPT ---
> #!/usr/bin/perl -w
> while (<>) {
> eval qq(\*main\:\:A$.=sub { print \"$_\" });
> }
> if ($. == 0) { exit; }
> my $middl
On Mon, 03 Dec 2001 at 16:44:29 +1100, [EMAIL PROTECTED] wrote:
> Yellow Jersey Melbourne-Time
> - --
> 103 Ronald J Kimball 04:32 03-Dec-2001
> 101 Keith C Ivey 07:58
> 95 Rick Delaney 08:51
> 93 Eugene van der Pijll
On Mon, 03 Dec 2001 at 14:23:21 +, Robin Houston wrote:
> unless the file contains \0 characters...
> To cope with that, you have to use
> perl -aln0777F
Santa has kindly said that there are no \0 characters.
Ian
On Tue, 04 Dec 2001 at 22:33:45 +0100, Philippe 'BooK' Bruhat wrote:
> I am very curious to see what else than the obvious can be done for
> rev.pl. And I wonder if shorter than the obvious is possible (I guess so).
Ah, you mean the one that's in the perl documentation :-)
I wrote that as a hol
On Wed, 05 Dec 2001 at 10:55:25 +, Piers Cawley wrote:
> Eugene van der Pijll <[EMAIL PROTECTED]> writes:
> > [EMAIL PROTECTED] schreef op 05 december 2001:
> >> Please let me know when you think we should end the game.
Well, 6 December is St Nicolas' day, so that sounds like a good time to
s
; --- Tim Ayers 21
> #!/usr/bin/perl
> printf"%010d\n",$.,<>
Harumph. I remember something like this approach flitting through my
mind, but, I thought, the $. would be evaluated before the <>, so it
would be zero.
Moral: try it!
Hmm... why isn't it zero?
>
On Fri, 07 Dec 2001 at 11:22:44 +0100, BooK wrote:
> I love this one. As an added bonus, perlvar says "Use of $# is deprecated."
You mean that there are some entries which would *not* be deprecated?
I must have missed them :-)
Ian
On Tue, 22 Jan 2002 at 10:21:13 +0100, Philippe 'BooK' Bruhat wrote:
> En réponse à Simon Cozens <[EMAIL PROTECTED]>:
> > So, who's gonna go to the obvious next level and give us an ofuscated
> > FORTH implementation, plus a decent JAPH in FORTH?
> Well... That was the reason why I first tried t
On Tue, 29 Jan 2002 at 17:31:57 +0100, Eugene van der Pijll wrote:
> I'm sure it didn't. I sent in my best solution on friday (I think), and
> have been in bed with a severe headache only since yesterday afternoon.
but still posting to FWP. Now *there's* dedication :-)
I had it two weeks a
On Fri, 01 Feb 2002 at 10:58:10 -0500, Ala Qumsieh wrote:
> Rick Klement writes:
> > s/\b\d\b/0$&/g
> > (it's the effects of playing a lot of golf lately... :)
> Golf?!
> s|\b\d/|0$&|g
Perhaps some of the baroque constructions seen in this thread are
actually a game of perl flog, desi
On Sun, 03 Feb 2002 at 08:02:19 +0100, Philip Newton wrote:
> On Sat, 02 Feb 2002 22:24:05 +0100, [EMAIL PROTECTED] (Bart Lateur)
> wrote:
> > WTF is wrong with sprintf()? It's a proper tool for this job. Next
> > you'll want to replace "13.57831" by "13.58" without using sprintf().
> This remind
On Fri, 08 Mar 2002 at 18:27:00 +, Stephen Turner wrote:
> I've looked quickly at all the entries up to 55 strokes, and identified the
> following methods for difficult bits of the problem. Apologies for errors
> and omissions!
> Methods for pulling off all pairs of characters:
>
> /(?=(..).
On Mon, 18 Mar 2002 at 10:58:12 +, Stephen Turner wrote:
> On Mon, 18 Mar 2002 [EMAIL PROTECTED] wrote:
> > 12. Stephen Turner $ 290,000.00
> Great! The only mistake I can find is that I don't appear to have received
> my cheque yet.
It's in the post.
Ian
On Mon, 25 Mar 2002 at 19:40:59 +, xfgh hfgh wrote:
> Many of the questions can be great FWP/Golf:)
>
> http://icpc.baylor.edu/icpc/Finals/problems.pdf
>
> Congrats to Chinese, Americans and Russians!
> World finals results:
> 3 University of Waterloo 6 | 974
I think you forgot
On Mon, 25 Mar 2002 at 12:23:43 -0800, resi dencia wrote:
>
> Hmm.. very interesting.. each university has one team, each time has 3 people, total
>5 hours of programming. Languages C, C++, Java and Pascal are allowed to use.
> So, here is chance to prove either you are smarter than top college
On Thu, 28 Mar 2002 at 10:21:58 +1100, [EMAIL PROTECTED] wrote:
> open$%;print<0>
> is indeed the shortest possible Perl quine.
No. The shortest possible Perl quine is, of course, the file which I've
attached. It also works in C. (This isn't original - I can't remember
who pointed it out)
Ian
On Thu, 28 Mar 2002 at 04:23:20 -0600, Dave Hoover wrote:
> This works for me with decimals:
> ($x="@a") =~ s/([\d.]+) ?/$min||=$1;$min=$1<$min?$1:$min/eg;
Sorry, this steps into the heffalump trap that "0" is false.
(There was a prolonged and bitter debate on p5p about whether to have an
"if
On Mon, 01 Apr 2002 at 00:55:31 -0600, Steven Lembark wrote:
>
> > Create a small (doesn't have to be golf), efficient, cross-platform
> > and pure Perl program to decompress the data attached via __DATA__.
> > The compression format is up to you. tgz, tbz, zip, cpio.. whatever.
> > Just as long
On Wed, 17 Apr 2002 at 10:49:25 -0400, Bill -Sx- Jones wrote:
> On 4/17/02 6:11 AM, "Dmitry Kohmanyuk" <[EMAIL PROTECTED]> wrote:
> "... supported by the Perl Foundation, so if you feel like you have to do
> something, rabblerousing on behalf of the Perl Foundation would be
> a better idea..."
>
On Thu, 30 May 2002 at 20:11:14 +0200, Magnus Bodin wrote:
> What is the idiom (golf) to pack 7-bit-ASCII to 8-bit-code?
I'm sure others will do better, but try this:
sub s8{pack'B*',join'',grep$i++%8,(unpack'B*',pop)=~/./g}
Hmm... what was that golfing trick to avoid "join"? I forget.
But thi
On Tue, 19 Nov 2002 at 11:30:17 +0200, Vladi Belperchinov-Shabanski wrote:
>
> hi!
>
> I hope I understand the problem correctly, i.e. `how to escape'?
>
> In this case I always prefer:
>
> our %ESCMAP = ();
> for ( 0 .. 255 ) { $ESCMAP{ chr( $_ ) } = sprintf("%%%02X", $_); }
That's not en
t
eugene is about the size of a dog
eugene is devastated
But, most relevantly,
eugene is right
Ian
--
phillipps is adequate but i wouldn't rave
On Wed, 13 Aug 2003 at 14:46:22 +0100, Paul Makepeace wrote:
> This isn't really perl, but it might be mildly fun for a few seconds:
> $len += $page_size - $len % $page_size if $len % $page_size;
> Any way of doing this in a single arithmetic expression, without the if?
Assuming integers:
$len
On Wed, 21 Jan 2004 at 16:48:47 -0500, Andrew Pimlott wrote:
> But such code
> can sometimes be improved even more by defining a specific constant
> for each use.
> foo($bar, $baz, !VERBOSE, STOP_ON_ERROR);
And the real Fun with Perl is that this code will work perfectly well
without your bo
On Fri, 06 Feb 2004 at 09:45:43 -0500, [EMAIL PROTECTED] wrote:
> What does the construct "}{" mean? As in
> $ perl -pe ' } { $_="foo\n"' /dev/null
> foo
> I figure it has to do with how the -p switch affects the script that
> is passed to the interpreter. Is this documented anywhere?
Yes,
On Sat, 25 Sep 2004 at 19:09:31 -0700, Randal L. Schwartz wrote:
> > "Keith" == Keith C Ivey <[EMAIL PROTECTED]> writes:
> Well, it also presumes that "!" returns literally 0 and 1. I've
> never seen a promise of that in any docs.
> I think Perl6 should return "42" for true, just to keep peo
There's a craze for this number puzzle. I thought I'd try to hack
together a solver - I'm not the first! - and the following is my
offering (in perl, of course):
http://homepage.ntlworld.com/phillipps/sodsolve
It's not very pretty, but it solved a puzzle rated by the Times (of
London) as
On Wed, 27 Jul 2005 at 10:15:25 -0400, Quantum Mechanic wrote:
> 1) Not strict and warnings clean.
> 2) perl -c on
> if( $puzmap[$bestpos] & 1 == 0 )
> gives:
> "Possible precedence problem on bitwise & operator at
> sudoku_ip.pl line ..."
Hmm... it's warning-clean on my 5.8.4 - what ve
52 matches
Mail list logo