Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

masak (6289)

  (email not shown publicly)

Been programming Perl since 2001. Found Perl 6 somewhere around 2004, and fell in love. Now developing November (a Perl 6 wiki), Druid (a Perl 6 board game), pls (a Perl 6 project installer), GGE (a regex engine), and Yapsi (a Perl 6 implementation). Heavy user of and irregular committer to Rakudo.

Journal of masak (6289)

Saturday November 29, 2008
05:25 PM

November 29, 2008 -- "I will call it 'the graphophone'!"

[ #37976 ]

131 years ago today, Thomas Edison demonstrated for the first time a device he called a "phonograph", which plays back recorded sound. Wikipedia:

Edison's early phonographs recorded onto a tinfoil sheet phonograph cylinder using an up-down ("hill-and-dale") motion of the stylus. The tinfoil sheet was wrapped around a grooved cylinder, and the sound was recorded as indentations into the foil. Edison's early patents show that he also considered the idea that sound could be recorded as a spiral onto a disc, but Edison concentrated his efforts on cylinders, since the groove on the outside of a rotating cylinder provides a constant velocity to the stylus in the groove, which Edison considered more "scientifically correct". Edison's patent specified that the audio recording be embossed, and it was not until 1886 that vertically modulated engraved recordings using wax coated cylinders were patented by Chichester Bell and Charles Sumner Tainter. They named their version the Graphophone. Emile Berliner patented his Gramophone in 1887.

Dang, I kinda liked the sound of "graphophone". 哈哈

Today, in order to reduce some of the repetitiveness of the MediaWiki markup parser test suite (set input, set expected output, calculate actual output, test, rinse, repeat), I created the module Test::InputOutput , which resembles CPAN's Test::Base a bit, minus the syntactic relief. Some of the MediaWiki tests now look like this instead. Typical example of separating the algorithm from the specifics.

Since that wasn't what I set out to do today, I'm going to stop here, and do that instead. I want to continue passing tests concerning italic and bold.

Also, ihrd++ merged his dispatch branch today into master, so I'll review that merge.

In short, if you haven't downloaded November yet, you should. If nothing else, there's a lot of working Perl 6 code to look at. It's not even hard: look, a link! The kind folks over at github even provide a zipball and a tarball for those who don't have git yet. That's what I call service.


The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • You test looks good!
    And I really like that line:

    plan +@tests;

    Simple, obvious! :)

    • You test looks good! And I really like that line:

      plan +@tests;

      Simple, obvious! :)

      Thank you. :) I wish I could take more credit for it, though. It's mostly stolen from Test::Base, which does this:

      plan tests => 1 * blocks;

      Perhaps having seen it before made me want to re-invent it in Perl 6.

      (Actually, it could be even easier, if I had put the plan call inside the test method in the Test::InputOutput module. That way, the module user wouldn't have had to call plan at all. But doing that felt like a breach of freedom on the part of the module user: what if she wanted to plan more tests