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 ]

autrijus (1505)

autrijus
  (email not shown publicly)
http://pugs.blogs.com/

Journal of autrijus (1505)

Friday April 15, 2005
03:55 PM

Day 74: Cwd and quoting constructs.

[ #24207 ]
Today I did minimal Pugs coding, instead mangling with #catalyst folks a bit, in my pursuit of The Way Forward with writing complex web applications for our company. It looks like the new, shiny Catalyst 5.0 is even easier to work with, and a Bamboo-Catalyst-Mason connection looks quite attractive.

Also, I caught leo on IRC, and he likes my idea of making ascii instead of iso-8859-1 as Parrot's default character set as well. Now my suggestion is in much more capable hands, I can further delay my adventure into the segfaulting land...

Pugs development continues to happen at a faster-than-a-speeding-bullet pace. I ego-googled a little bit, and it seems that several non-camelfolks have noticed our humble project: Ted from the Java/Python land, Glenn from the Lisp land, and even the great Prof. Wadler himself, who have brought innumerable advanced technologies to Haskell-land for Pugs to use.

Schwern appeared on #perl6 today, advocating the idea of a temporizable $*CWD to simplify chdir() logic:

if some_condition() {
    temp $*CWD = '/var/run/myapp';
    # ... do lots of things in that directory ...
}
# ... goes back to the original directory automagically

While he was composing his proposal to p6l, I suggested him to actually implement it in Pugs, and walked him through this implementation in a matter of minutes. Compared to implementing a new SvMG in Perl 5, that is perhaps too easy...

<Schwern> $ ./pugs -e 'say $*CWD'
<Schwern> /Users/schwern/devel/pugs
<autrijus> woot.
<Schwern> Ok, that was too easy
<autrijus> now, write some test.

Because Schwern's test needs readdir(), I implemented the most simple form for him (readdir(Str) returns List), so he happily committed the test. And then there are some discussions about making all FilePath operations transparently work on URIs... But nothing concrete has ensued.

Our new committer roie has supplied a massive patch to make quoting modifiers work, so we have full access to selective interpolation now. Corion and I then proceeded to clear up some whitespace handling issues. All in all, wonderful work!

Theorbtwo is surveying the possibility of an eval_haskell() builtin in Pugs; because hs-plugins also uses the name Eval, we concluded that it may be best to rename all Pugs modules into Pugs.Eval, Pugs.AST etc.

On the cookbook front, gcomnz has written a massive introduction on the 01strings section, detailing the relevant Synopsis chunks with useful examples.

There are other, less-massive changes as well:

  • andras checked in UTF-8 URL encoding support for CGI.pm, with some tests as well.
  • iblech found lots of corner cases in map and hash/list subscript contexts, and added the test fo them.
  • corion fixed a LWP::Simple test, changed filename of fp-p6, failing pugs --version tests, among many other things.
  • ninereason highlighted the bug of assigning to negative array indices, which I hope to fix before the 6.2.1 release.
  • nothingmuch and corion refactored a lot of config header generation logic in Pugs's build system, allowing the user to set flags in $ENV{GHC}.
  • ovid added to HTML::Entities the ability to specify one's own character class to encode/decode.
  • I dropped the rx:p5 adverb; the other three notations, rx:P5, rx:Perl5 and rx:perl5, are all recognized.
  • I also implemented the want() function in its string context form.

See you tomorrow!

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.
  • A dnslookup on wagner.elixus.org is failing, it looks like ns2.elixus.org and ns1.elixus.org are both timing out. :-(
    • Weird, it works for me... Anyway here it is.

      ----------------------------------------------------------------------
      r13201 (orig r1987):  schwern | 2005-04-15 18:39:03 +0800

      First stab at $*CWD

      ----------------------------------------------------------------------
      === mirror/pugs/src/AST.hs
      ======================================================== ==========
      --- mirror/pugs/src/AST.hs  (revision 13200)
      +++ mirror/pugs/src/AST.hs  (revision 13201)
      @@ -1091,6 +1091,15 @@
           fetch