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)

Friday July 09, 2010
06:25 PM

Weeks 6 and 7 of GSoC work on Buf -- roundtrip

[ #40440 ]

Warning: this blog post doesn't contain any puns at all. It's just a boring update about my progress. If you don't believe me, just go ahead and read it. I dare you.

Been working on file I/O and Bufs lately. It's tough work, but I'm now at a point where things run. Some highlights:

  • I asked on Parrot how to write binary data. Got enough help to get me started coding an IO.write method.
  • I realized that I didn't like at all how the IO spec described IO.read and IO.write. So I rewrote it.
  • Having got the IO.write method working, I wrote an IO.read method along the same lines. Here they are.

Now, these new methods obviously write and read bytes to and from files, but the tests indicate that things don't properly round-trip yet. Part of that is because the tests want the example string "föö" to encode as iso-8859-1, but there's no logic that does that yet. My slightly sleepy brain tells me there's more to the story though, or the string wouldn't come back garbled as "fö". (Interesting how that somehow feels like a small piece of mojibake, before the brain even takes in the individual characters.)

Another nice highlight was my question about how Bufs should stringify, which TimToady just answered on #perl6. That should be a smop to implement.

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.