Leon wrote:
Amelia points out that you got her name wrong. She was named by Larry
Don't think this gets you off the 1.5 pints you owe me.
Chris
_
View your other email accounts from your
I thought I should (again) post some sample answers. The challenge of writing a
Xmas quiz is always coming up with short, interesting questions that touch on
interesting and potentially controversial answers. I spent the better part of a
year coming up with the questions I did, and, to be
On Wed, Dec 09, 2009 at 01:20:54PM +, Chris Jack wrote:
I think my answer to question 10 may cause controversy, but it is
based on a careful reading of the sited webpage.
10) What is the highest value of X that is a currently available, stable
production release of perl 5.X?
Answer: 8
On Mon, 30 Nov 2009 16:43:19 -0600, Dave Hodgkinson daveh...@gmail.com wrote:
On 30 Nov 2009, at 18:24, Chris Jack wrote:
Seeing as last year's quiz was mildly popular,
Bonus question:
How many people will be mildly irritated by starting a new thread
with a Reply-to: to an existing one?
On Tue, 01 Dec 2009 06:33:49 -0600, David Cantrell da...@cantrell.org.uk
wrote:
On Mon, Nov 30, 2009 at 10:43:19PM +, Dave Hodgkinson wrote:
Bonus question:
How many people will be mildly irritated by starting a new thread
with a Reply-to: to an existing one?
Not as many as will be
On 1 Dec 2009, at 07:44, Ruud H.G. van Tol wrote:
Abigail wrote:
On Mon, Nov 30, 2009 at 06:24:12PM +, Chris Jack wrote:
7) Write a one line program that takes a non-negative integer as an argument
and prints the square root when the answer's an integer.
Restrictions: the perl line
On Tue, Dec 1, 2009 at 09:03, Mike Whitaker m...@altrion.org wrote:
(this is not an answer)
But this might be:
echo 169 | perl -pe '/(\d+)(?{ $_ = sqrt($^N).\n })/;'
Except it didn't follow the rules.
Cheers,
Philip
--
Philip Newton philip.new...@gmail.com
On Mon, Nov 30, 2009 at 02:52:21PM -0800, Avleen Vig wrote:
On Nov 30, 2009, at 14:43, Dave Hodgkinson daveh...@gmail.com wrote:
How many people will be mildly irritated by starting a new thread
with a Reply-to: to an existing one?
Answer: none. We stopped being petty in 1997 and grew up :p
On Mon, Nov 30, 2009 at 11:40:04PM +, Chris Jack wrote:
Abigail abig...@abigail.be wrote
On Mon, Nov 30, 2009 at 06:24:12PM +, Chris Jack wrote:
7) Write a one line program that takes a non-negative integer as an
argument
and prints the square root when the answer's
Avleen Vig wrote:
On Nov 30, 2009, at 14:43, Dave Hodgkinson daveh...@gmail.com wrote:
On 30 Nov 2009, at 18:24, Chris Jack wrote:
Seeing as last year's quiz was mildly popular,
Bonus question:
How many people will be mildly irritated by starting a new thread
with a Reply-to: to an
On Mon, Nov 30, 2009 at 10:43:19PM +, Dave Hodgkinson wrote:
Bonus question:
How many people will be mildly irritated by starting a new thread
with a Reply-to: to an existing one?
Not as many as will be mildly irritated at me replying but chopping out
the Reply-To.
--
David Cantrell |
7) Write a one line program that takes a non-negative integer as an
argument and prints the square root when the answer's an integer.
Restrictions: the perl line should be a regular expression.
You are allowed to use the following functions/operators x, -,
length, print plus any of
I recall that as part of technical test I took for a previous role, to
try and interpret and determine what it did. Quite cool, but the
coolness was definitely exceeded by it's evilness... :)
Mark.
On Tue, Dec 1, 2009 at 11:26 AM, Abigail abig...@abigail.be wrote:
which would be 'similar' but
On Mon, 30 Nov 2009 18:24:12 +, Chris Jack wrote:
1) Without running it to check, what does the following program output?
my %a = (3,2,1,0);
for my $b (sort values %a) {
$b += 4;
}
print $a{1} . \n;
Bizarrely enough, on both my Snow Leopard machines (default perl
On Tue, 1 Dec 2009 11:23:09 -0500, Matt Sergeant wrote:
On Mon, 30 Nov 2009 18:24:12 +, Chris Jack wrote:
1) Without running it to check, what does the following program output?
my %a = (3,2,1,0);
for my $b (sort values %a) {
$b += 4;
}
print $a{1} . \n;
Bizarrely
Matt == Matt Sergeant mserge...@messagelabs.com writes:
Matt On Mon, 30 Nov 2009 18:24:12 +, Chris Jack wrote:
1) Without running it to check, what does the following program output?
my %a = (3,2,1,0);
for my $b (sort values %a) {
$b += 4;
}
print $a{1} . \n;
Matt
2009/12/1 Matt Sergeant mserge...@messagelabs.com:
On Tue, 1 Dec 2009 11:23:09 -0500, Matt Sergeant wrote:
On Mon, 30 Nov 2009 18:24:12 +, Chris Jack wrote:
1) Without running it to check, what does the following program output?
my %a = (3,2,1,0);
for my $b (sort values %a) {
$b
On Tue, Dec 1, 2009 at 17:52, Dermot paik...@googlemail.com wrote:
(not sure about this point) is a copy of the value in $a{1}.
That's the salient point - it's an alias to the value in $a{1}, rather
than a copy, since values %hash returns aliasses, sort just shuffles
those aliasses, and foreach
Dermot == Dermot paik...@googlemail.com writes:
Dermot My first impression was that it would be 4. However, without running
Dermot it, I would say 0 on the basis that $b is scoped within the loop and
Dermot (not sure about this point) is a copy of the value in $a{1}.
That's the nice thing
On 12/01/2009 04:52 PM, Dermot wrote:
2009/12/1 Matt Sergeantmserge...@messagelabs.com:
On Tue, 1 Dec 2009 11:23:09 -0500, Matt Sergeant wrote:
On Mon, 30 Nov 2009 18:24:12 +, Chris Jack wrote:
1) Without running it to check, what does the following program output?
my %a = (3,2,1,0);
2009/12/1 Philip Newton philip.new...@gmail.com:
On Tue, Dec 1, 2009 at 17:52, Dermot paik...@googlemail.com wrote:
(not sure about this point) is a copy of the value in $a{1}.
That's the salient point - it's an alias to the value in $a{1}, rather
than a copy, since values %hash returns
Matt == Matt Sergeant mserge...@messagelabs.com writes:
Matt Yes. Though oddly enough it doesn't show up in the same terminal when
Matt ssh'd into a Linux box. I'd like to know the reason why that is.
Maybe linux doesn't echo the ^D as uparrow D?
Or maybe linux adds a newline after it?
Dunno.
On Tue, 01 Dec 2009 08:47:55 -0800, Randal L. Schwartz wrote:
Lemme guess. You did this:
$ perl
... type program in here ...
^D (control D)
The D is from your control D.
Common misconception.
Yes. Though oddly enough it doesn't show up in the same terminal when
ssh'd into a Linux
Seeing as last year's quiz was mildly popular, I thought I'd do another one.
I've changed the mix of questions based on what people submitted answers to
last year - it also arguably a little more educational this time around.
Any feedback about the quiz, either private or public is welcome.
On Mon, Nov 30, 2009 at 06:24:12PM +, Chris Jack said:
6) What is the name of the official Soft Toy Camel of the London Perl Mongers?
Bonus mark if you own one.
I bet only 2 people get this correct although I suspect several people
will get the answer the OP was thinking of.
On 30/11/09 18:24, Chris Jack wrote:
In-Reply-To: mailman.10014.1258641251.36522.london...@london.pm.org
References: mailman.10014.1258641251.36522.london...@london.pm.org
Grrr
1) Without running it to check, what does the following program output?
my %a = (3,2,1,0);
On Mon, Nov 30, 2009 at 07:38:31PM +, Dave Cross said:
According to the Beanie Baby people, he's called Niles. According to us
(and the 2001 leadership election ballot papers) she's called Amelia.
[ SPOILER SPACE ]
Actually - there are two
Dave == Dave Cross d...@dave.org.uk writes:
1) Without running it to check, what does the following program output?
my %a = (3,2,1,0);
for my $b (sort values %a) {
$b += 4;
}
print $a{1} . \n;
Dave Without running it, I'd say 4. Having now run it, I'm glad that's what I
said
On Mon, Nov 30, 2009 at 12:14:21PM -0800, Randal L. Schwartz wrote:
Dave == Dave Cross d...@dave.org.uk writes:
1) Without running it to check, what does the following program output?
my %a = (3,2,1,0);
for my $b (sort values %a) {
$b += 4;
}
print $a{1} . \n;
On Mon, Nov 30, 2009 at 06:24:12PM +, Chris Jack wrote:
Seeing as last year's quiz was mildly popular, I thought I'd do another
one. I've changed the mix of questions based on what people submitted
answers to last year - it also arguably a little more educational this
time around.
Any
On Nov 30, 2009, at 3:17 PM, Graham Barr wrote:
On Nov 30, 2009, at 2:14 PM, Randal L. Schwartz wrote:
Dave == Dave Cross d...@dave.org.uk writes:
1) Without running it to check, what does the following program output?
my %a = (3,2,1,0);
for my $b (sort values %a) {
$b += 4;
On Nov 30, 2009, at 2:14 PM, Randal L. Schwartz wrote:
Dave == Dave Cross d...@dave.org.uk writes:
1) Without running it to check, what does the following program output?
my %a = (3,2,1,0);
for my $b (sort values %a) {
$b += 4;
}
print $a{1} . \n;
Dave Without running it,
On Mon, Nov 30, 2009 at 03:22:04PM -0600, Graham Barr wrote:
On Nov 30, 2009, at 3:17 PM, Graham Barr wrote:
On Nov 30, 2009, at 2:14 PM, Randal L. Schwartz wrote:
Dave == Dave Cross d...@dave.org.uk writes:
1) Without running it to check, what does the following program
Merry Ex-Mass.
A sysadmin and pedant's point of view
On 30/11/2009 18:24, Chris Jack wrote:
1) Without running it to check, what does the following program output?
Something like:
bash: syntax error near unexpected token '('
Don't assume my default interpreter is your default
Graham == Graham Barr gb...@pobox.com writes:
Graham I meant to add that this change to sort was added to 5.6.0. So to
Graham answer your question it was nearly a decade ago :-)
Yeah, well it wasn't true when I was running Perl 2.0 on the One True
Unix under the Real Bourne Shell
:-)
--
On 30 Nov 2009, at 18:24, Chris Jack wrote:
Seeing as last year's quiz was mildly popular,
Bonus question:
How many people will be mildly irritated by starting a new thread
with a Reply-to: to an existing one?
--
Dave HodgkinsonMSN: daveh...@hotmail.com
On Nov 30, 2009, at 14:43, Dave Hodgkinson daveh...@gmail.com wrote:
On 30 Nov 2009, at 18:24, Chris Jack wrote:
Seeing as last year's quiz was mildly popular,
Bonus question:
How many people will be mildly irritated by starting a new thread
with a Reply-to: to an existing one?
Answer:
On Mon, Nov 30, 2009 at 10:43:19PM +, Dave Hodgkinson wrote:
How many people will be mildly irritated by starting a new thread
with a Reply-to: to an existing one?
Meh, judging by the headers he's probably never used a threaded email
client so has no reason to know any better. No point in
On Nov 30, 2009, at 13:21, Martin A. Brooks wrote:
A sysadmin and pedant's point of view
I take it sysadmins are too angry and bitter to understand or care for the
holiday[1] spirit I'm sure the quiz was sent in. Why don't you go change
someones password?
- ask
[1]
On Nov 30, 2009, at 3:51 PM, Abigail wrote:
I meant to add that this change to sort was added to 5.6.0. So to answer
your question it was nearly a decade ago :-)
Which was the same release where values() returned aliases instead of copies.
Ah, you are right. sort was before that. the
Abigail abig...@abigail.be wrote
On Mon, Nov 30, 2009 at 06:24:12PM +, Chris Jack wrote:
7) Write a one line program that takes a non-negative integer as an argument
and prints the square root when the answer's an integer.
Restrictions: the perl line should be a regular
Chris Jack chris_j...@msn.com wrote:
Abigail abig...@abigail.be wrote
On Mon, Nov 30, 2009 at 06:24:12PM +, Chris Jack wrote:
7) Write a one line program that takes a non-negative integer as an
argument
and prints the square root when the answer's an integer.
Restrictions: the perl
James Coupe ja...@zephyr.org.uk wrote:
$ perl -e '(1 x $ARGV[0]) =~ m/^(1*)((??{$1x(length($1)-1)})$)(?(2)(?{print
length $1}))/' 4
2
I don't recommend trying it on large numbers. 1024 was about as high as
my boredom threshold could tolerate on this box.
Oh, it gets better if I do something
Abigail wrote:
On Mon, Nov 30, 2009 at 06:24:12PM +, Chris Jack wrote:
7) Write a one line program that takes a non-negative integer as an argument
and prints the square root when the answer's an integer.
Restrictions: the perl line should be a regular expression.
Just a regular
44 matches
Mail list logo