Stories
Slash Boxes
Comments
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)

masak
  (email not shown publicly)
http://masak.org/carl

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)

Tuesday November 10, 2009
05:59 PM

November 10 2009 -- think of the children!

[ #39872 ]

40 years ago today, a children's TV show, which was to turn out to be very successful and educational to boot, debuted:

In Sesame Street's first season, the Educational Testing Service (ETS) reported that the cognitive skills of its young viewers had increased by 62%. They found that children who viewed the show the most often did 62% better at correctly recognizing a rectangle than less frequent viewers.

How long before we see a children's show teaching programming?

Since it's Temporal Tuesday today, I've been making commits on the temporal Rakudo fork. Things are moving forward, if a bit slowly.

The only challenging part today was converting day-of-year to month and day-of-month. I'm not sure I got that 100% right (i.e. need to write more tests); also, I cheated a bit and disregarded leap years for now. I have a feeling this detail might undergo some change before the dust lands. Still, I like the feature (specifying year and day-of-year), and can see its use in some situations. It's valid ISO 8601, just as all the other datetime formats I'm implementing.

The reason I'm doing this work at all, is because I think the current way Rakudo handles dates and times is too bare-bones. I also think that adding a few convenience methods here and there to make it more useable out-of-the box — scratch that; I want to make it super-simple — is important, because most every semi-large application one writes will involve date and time. My argument boils down to not wanting to write

Temporal::DateTime.new(:date(Temporal::Date.new(:year(2010), :month(4), :day(1))), :time(Temporal::Time.new(:hour(0), :minute(0), :second(0))), :timezone(Temporal::Timezone::Observance.new(:offset(0), :isdst(False), :abbreviation(''))))

when I want to refer to April 1st, 2010. I'd prefer something like

DateTime.new('2010-04-01')

(You think the former syntax is a joke? Go look at the Rakudo source!)

Update: and in no way whatsoever do I wish to blame mberends++, the chief author of Rakudo's current Temporal.pm. He's basically implemented things to spec... which is why the spec needs changing, too.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.