Xavier Noria | 21 Oct 14:09
Gravatar

Perl 'Expert' Quiz of the Week #26 (Tk roller coaster simulation)


IMPORTANT: Please do not post solutions, hints, or other spoilers
        until at least 60 hours after the date of this message.
        Thanks.

IMPORTANTE: Por favor, no enviéis soluciones, pistas, o cualquier otra
        cosa que pueda echar a perder la resolución del problema hasta
        que hayan pasado por lo menos 60 horas desde el envío de este
        mensaje. Gracias.

BELANGRIJK: Stuur aub geen oplossingen, hints of andere tips in de
        eerste 60 uur na het verzendingstijdstip van dit
        bericht. Waarvoor dank.

UWAGA: Prosimy nie publikowac rozwiazan, dodatkowych  badz pomocniczych
	informacjii przez co najmniej 60 godzin od daty tej wiadomosci.
	Dziekuje.

----------------------------------------------------------------

You will write a program that simulates a two-dimensional roller 
coaster.

A 2-D roller coaster track is given by stdin as a sequence of scaled
line segments:

      ...
      153.167706326906 170.818594853651
      152.705297542038 170.778692088403
      152.230255082701 170.621111633323
(Continue reading)

Mark Jason Dominus | 14 Oct 22:49
Favicon
Gravatar

Perl Quiz of the Week #26 (Acrostic puzzle formatter)


IMPORTANT: Please do not post solutions, hints, or other spoilers
        until at least 60 hours after the date of this message.
        Thanks.

IMPORTANT: S'il vous plaît, attendez au minimum 60 heures après la
        date de ce message avant de poster solutions, indices ou autres
        révélations. Merci.

BELANGRIJK: Stuur aub geen oplossingen, hints of andere tips in de
        eerste 60 uur na het verzendingstijdstip van dit
        bericht. Waarvoor dank.

VNIMANIE: Pozhalujsta ne shlite reshenija, nameki na reshenija, i
        voobshe lyubye podskazki v techenie po krajnej mere 60 chasov
        ot daty etogo soobshenija.  Spasibo.

Qing3 Zhu4Yi4: Qing3 Ning2 Deng3Dao4 Jie1Dao4 Ben3 Xin4Xi2 Zhi1Hou4 60
        Xiao3Shi2, Zai4 Fa1Biao3 Jie3Da2, Ti2Shi4, Huo4 Qi2Ta1 Hui4
        Xie4Lou4 Da2An4 De5 Jian4Yi4.  Xie4Xie4.

----------------------------------------------------------------

Last week I asked folks to write a program to generate acrostic
puzzles, given a quotation and a source credit.  (See

        http://perl.plover.com/qotw/e/025

for complete details.)  Here's an example puzzle:

(Continue reading)

Dan Sanderson | 14 Oct 16:33

Solutions and Discussion for Perl Quiz of the Week #25 (RPN calculator)


Sample solutions and discussion
Perl Quiz of The Week #25 (20040928)

(The quiz question is archived at http://perl.plover.com/qotw/r/025 .)

== Posted Solutions

As of October 3, 2004, twelve people submitted solutions to this quiz.
Nine used Perl, one used Python and two used Ruby.  Thanks to everyone
who participated in this week's quiz.

Rod Adams
  http://perl.plover.com/~alias/list.cgi?1:mss:2295
Kester Allen
  http://perl.plover.com/~alias/list.cgi?1:mss:2297
Rich Bishop
  http://perl.plover.com/~alias/list.cgi?1:mss:2292
Dan Boger
  http://perl.plover.com/~alias/list.cgi?1:mss:2302
Roger Burton West
  http://perl.plover.com/~alias/list.cgi?1:msp:2285
Michael Carman
  http://perl.plover.com/~alias/list.cgi?1:msp:2288
  http://perl.plover.com/~alias/list.cgi?1:mss:2294
Andrew Dalke (Python)
  http://perl.plover.com/~alias/list.cgi?1:mss:2300
Jon Ericson
  http://perl.plover.com/~alias/list.cgi?1:msp:2294
James Edward Gray II (Ruby)
(Continue reading)

Mark Jason Dominus | 6 Oct 17:22
Favicon
Gravatar

Perl 'Expert' Quiz of the Week #25 (acrostic puzzle generator)


IMPORTANT: Please do not post solutions, hints, or other spoilers
        until at least 60 hours after the date of this message.
        Thanks.

IMPORTANT: S'il vous plaît, attendez au minimum 60 heures après la
        date de ce message avant de poster solutions, indices ou autres
        révélations. Merci.

Qing3 Zhu4Yi4: Qing3 Ning2 Deng3Dao4 Jie1Dao4 Ben3 Xin4Xi2 Zhi1Hou4 60
        Xiao3Shi2, Zai4 Fa1Biao3 Jie3Da2, Ti2Shi4, Huo4 Qi2Ta1 Hui4
        Xie4Lou4 Da2An4 De5 Jian4Yi4.  Xie4Xie4.

UWAGA: Prosimy nie publikowac rozwiazan, dodatkowych  badz pomocniczych
	informacjii przez co najmniej 60 godzin od daty tej wiadomosci.
	Dziekuje.

----------------------------------------------------------------

You will write a program to generate double-acrostic puzzles.

A double-acrostic puzzle is a little like a crossword puzzle, except
that the words don't cross.  The goal of the puzzle is to determine
the contents of a secret quotation.  The solver receives a list of
crossword-style clues.  The solution to each clue is a word or a short
phrase.  Each letter in a clue answer is transferred to corresponding
labeled spaces in a grid.  When all the spaces in the grid are filled
in with the correct letters, the grid will contain the secret
quotation.

(Continue reading)

Randy W. Sims | 1 Oct 17:32

Solutions and Discussion for Perl 'Expert' Quiz of the Week #24 (Module dependency evaluation)


Sample solutions and discussion
Perl 'Expert' Quiz of The Week #24 (20040923)

        If you've ever written any modules then you are probably
        familiar with the concept of requirements or
        prerequisites. These are dependencies that must be met in
        order for your module to work correctly. For example, if your
        module uses another module then that module must be present on
        the user's system in order for your module to function
        correctly.

        If you've used MakeMaker then you've probably written
        something like:

             use ExtUtils::MakeMaker;

             WriteMakefile(
                 NAME          => 'Your::Module',
                 VERSION_FROM  => 'lib/Your/Module.pm',
                 PREREQ_PM     => {
                     'Test::More' => 0,
                     'File::Spec' => 0.82,
                 },
             );

        or with Module::Build:

             use Module::Build;

(Continue reading)

Dan Sanderson | 29 Sep 04:14

Perl Quiz of the Week #25 (RPN calculator)


IMPORTANT: Please do not post solutions, hints, or other spoilers
        until at least 60 hours after the date of this message.
        Thanks.

IMPORTANTE: Por favor, no enviéis soluciones, pistas, o cualquier otra
        cosa que pueda echar a perder la resolución del problema hasta
        que hayan pasado por lo menos 60 horas desde el envío de este
        mensaje. Gracias.

IMPORTANT: S'il vous plaît, attendez au minimum 60 heures après la
        date de ce message avant de poster solutions, indices ou autres
        révélations. Merci.

WICHTIG: Bitte schicken Sie keine Lösungen, Tipps oder Hinweise für
        diese Aufgabe vor Ablauf von 60 Stunden nach dem Datum dieser
        Mail. Danke.

VNIMANIE: Pozhalujsta ne shlite reshenija, nameki na reshenija, i
        voobshe lyubye podskazki v techenie po krajnej mere 60 chasov
        ot daty etogo soobshenija.  Spasibo.

Qing3 Zhu4Yi4: Qing3 Ning2 Deng3Dao4 Jie1Dao4 Ben3 Xin4Xi2 Zhi1Hou4 60
        Xiao3Shi2, Zai4 Fa1Biao3 Jie3Da2, Ti2Shi4, Huo4 Qi2Ta1 Hui4
        Xie4Lou4 Da2An4 De5 Jian4Yi4.  Xie4Xie4.

UWAGA: Prosimy nie publikowac rozwiazan, dodatkowych  badz pomocniczych
	informacjii przez co najmniej 60 godzin od daty tej wiadomosci.
	Dziekuje.

(Continue reading)

John J. Trammell | 28 Sep 05:07

Solutions and Discussion for Perl Quiz of the Week #12 (Histograms)

Sample solutions and discussion
Perl Quiz of The Week #12 (20030212)

[ This is a writeup of a very old quiz for which I never posted a
  report.  I hope to be able to fill in the other missing reports in
  the coming months.  Thanks to John J. Trammell for doing it.  -MJD ]

NAME
    qotw-r12-summary.pod - summary of "regular" Perl Quiz of the
    Week #12

SYNOPSIS

    The following programmers participated in Quiz 12:

      James Edward Gray II
      Kurt Hutchinson
      David Kershaw
      Brian King
      Not a Number
      Riccardo Perotti
      Marcelo Ramos
      John Trammell (late)

    Their code is available from

        http://perl.plover.com/qotw/misc/r012/

THE QUIZ
    The quiz text reads:
(Continue reading)

Randy W. Sims | 23 Sep 11:54

Perl 'Expert' Quiz-of-the-Week #24 (Module dependency evaluation)


IMPORTANT: Please do not post solutions, hints, or other spoilers
        until at least 60 hours after the date of this message.
        Thanks.

IMPORTANTE: Por favor, no enviéis soluciones, pistas, o cualquier otra
        cosa que pueda echar a perder la resolución del problema hasta
        que hayan pasado por lo menos 60 horas desde el envío de este
        mensaje. Gracias.

WICHTIG: Bitte schicken Sie keine Lösungen, Tipps oder Hinweise für
        diese Aufgabe vor Ablauf von 60 Stunden nach dem Datum dieser
        Mail. Danke.

BELANGRIJK: Stuur aub geen oplossingen, hints of andere tips in de
        eerste 60 uur na het verzendingstijdstip van dit
        bericht. Waarvoor dank.

Qing3 Zhu4Yi4: Qing3 Ning2 Deng3Dao4 Jie1Dao4 Ben3 Xin4Xi2 Zhi1Hou4 60
        Xiao3Shi2, Zai4 Fa1Biao3 Jie3Da2, Ti2Shi4, Huo4 Qi2Ta1 Hui4
        Xie4Lou4 Da2An4 De5 Jian4Yi4.  Xie4Xie4.

----------------------------------------------------------------

If you've ever written any modules then you are probably familiar with
the concept of requirements or prerequisites. These are dependencies
that must be met in order for your module to work correctly. For
example, if your module uses another module then that module must be
present on the user's system in order for your module to function correctly.

(Continue reading)

Zed Lopez | 21 Sep 17:23

Solutions and Discussion for Perl Quiz of the Week #24 (Turing Machine simulation)

Sample solutions and discussion
Perl Quiz of The Week #24 (20040915)

There were 14 Perl solutions, one in Python, one in Ruby, and a whole
bunch of interesting Turing Machines contributed -- I was thrilled by
the play this quiz inspired.

Here's my solution, with annotations:

    #!/usr/bin/perl

    use strict;
    use warnings;

    my ($filename, $input) = @ARGV;
    die "Usage: $0 filename [input]" if !defined $filename or @ARGV > 2;

Make sure the program has exactly 1 or 2 input parameters.

    my (%table, $state, @tape, $head);

Define the Turing Machine's basic elements as global variables.

    my %movehead = (L => -1, R => 1);

Initialize a hash for converting the state transition table's
direction symbol to a value suitable for adding to an array subscript.

    open (FH, $filename) or die "Can't open $filename: $!";
    while (<FH>) {
(Continue reading)

Zed Lopez | 15 Sep 16:01

Perl Quiz of the Week #24 (Turing Machine simulation)


IMPORTANT: Please do not post solutions, hints, or other spoilers
        until at least 60 hours after the date of this message.
        Thanks.

WICHTIG: Bitte schicken Sie keine Lösungen, Tipps oder Hinweise für
        diese Aufgabe vor Ablauf von 60 Stunden nach dem Datum dieser
        Mail. Danke.

BELANGRIJK: Stuur aub geen oplossingen, hints of andere tips in de
        eerste 60 uur na het verzendingstijdstip van dit
        bericht. Waarvoor dank.

VNIMANIE: Pozhalujsta ne shlite reshenija, nameki na reshenija, i
        voobshe lyubye podskazki v techenie po krajnej mere 60 chasov
        ot daty etogo soobshenija.  Spasibo.

UWAGA: Prosimy nie publikowac rozwiazan, dodatkowych  badz pomocniczych
	informacjii przez co najmniej 60 godzin od daty tej wiadomosci.
	Dziekuje.

----------------------------------------------------------------

When computer scientists want to study what is computable, they need a
model of computation that is simpler than real computers are.  One
model they use is called a "Turing Machine".    A Turing Machine has
three parts:

    1.  One state register which can hold a single number, called the
        state; the state register has a maximum size specified in
(Continue reading)

Mark Jason Dominus | 11 Sep 11:16
Favicon
Gravatar

[ADMIN] Volunteers for older QOTW sample solutions?


Now that the quiz writeups are being handled by volunteers, I thought
it might be possible to find people to volunteer to fill in the
missing writeups from the past.

In the past, I haven't always sent out a discussion or a sample
solution for every QOTW.  I wanted to send out reports for each one,
but sometimes I didn't have enough time or energy to do it.  One time
I kept putting off the report so that I could do a little more
research, and then a little more, and then I never did the report at all.

If you were unsure about volunteering to do a writeup, this would be
an easy way to find out what it would be like.  The job is the same,
but there is no deadline and no time pressure.  If you find that
writing the report is too much work, you can quit, and, nobody will
care, or even notice.  If you do finish the report, it will be a
completely unexpected bonus for the other mailing list subscribers.
So writing one of these old reports is a no-lose opportunity for you.

The quizzes that are missing reports are:

  "Regular" quizzes:

        http://perl.plover.com/qotw/r/010  (Guess-the-animal game)
        http://perl.plover.com/qotw/r/012  (Histogram function)
        http://perl.plover.com/qotw/r/015  (Greek clock)

  "Expert" quizzes:

        http://perl.plover.com/qotw/e/008  (Graham's function)
(Continue reading)


Gmane