Where Everybody's Crazy

I'm a missionary in Japan. The name of my mission agency is WEC International. That's supposedly Worldwide Evangelisation for Christ, but I think I have a better idea about what it stands for...

2005-05-28

Maypole 6.0

We haven't had a technical post for a while, so let's have on: today I have been playing a little with porting Maypole to Perl 6. It's very nice, quite a lot cleaner than the Perl 5 implementation, although that may be the refactoring process coming into play - I've split off request and response objects, for instance.

I take back a lot of what I thought about Perl 6; pugs has changed the whole scene. Things which I thought would be very nice Just Work, not only in the language, but they have implementation too:

    method BUILD ($.config, $.frontend) {
        $.config //= Maypole::Config.new();
        $.frontend //= ::Maypole::Frontend::CGI;
    }

    method setup {
        $.config.defaults;

        if (!$.model) {
            require $.config.model_class;
            $.model = $.config.model_class.new();
        }
        $.model.setup($?SELF, @_);
        if ($.model.can("adopt")) {
            $.model.adopt($_) for $.config.classes;
        }
        $:initialized = 1;
    }

The nicest part is the hundreds of auxilliary modules that Maypole currently needs are just part of the language in Perl 6. (And yes, I know they'd be part of the language in Ruby or Smalltalk or whatever, but this is Perl, or at least smells close enough to it to make me happy.)

Notice the "require" line, for instance, which would need UNIVERSAL::require in Perl 5; the instance data and accessors are all done for me.

And it runs. Today. Not next year. Today. I love it.


Posted at 18:00:56 in perl | # | G | P | 0 Comments
Language
Japanese English
Links

Tags and Tools
« 2005-05 »
S M TWTFS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

RSS


I am...

lathos: Going from iPod 1.x to 2.x and severely regretting it.


Photoblog

castle1_filtered.jpg

gosanpai_filtered.jpg

ichibangai2_filtered.jpg

machinaga_filtered.jpg

mizu.jpg


Speedblog

http://glosoli.blogspot.com/2005/09/encrypted-thumb-drive-and-autoplay.html # it's my blog: Encrypted thumb drive and autoplay howto

http://daiyainn.gooside.com/ # 京都だいや旅館 京へおこしやす

http://www.e-chords.com/guitartab.asp?idmusica=96629&keyb=true # Where Could I go Tab by Ben Harper - E-Chords

http://www.inmamaskitchen.com/RECIPES/RECIPES/Soups/vegetable_stock.html # Moosewood's Vegetable Stock Recipe

http://www.foodnetwork.com/food/recipes/recipe/0,,FOOD_9936_8389,00.html # Good Eats Roast Turkey Recipe: Recipes: Food Network

http://www.reallivepreacher.com/node/203 # You Ain't Jesus, PreacherPart Two: Losing The Language of Love

http://leiterreports.typepad.com/blog/2005/06/95_theses_on_th.html # Leiter Reports: A Philosophy Blog: 95 Theses on the Religious Right

http://cbae.nmsu.edu/~dboje/teaching/338/traits.htm # TRAITS

http://jweb.kokken.go.jp/gitaigo/index.html # 擬音語・擬態語 - 日本語を楽しもう! -

http://www.nanzan-u.ac.jp/SHUBUNKEN/publications/jjrs/jjrs_cumulative_list.htm # Japanese Journal of Religious Studies: Cumulative list of Essays & Book Reviews

http://www.myspace.com/chloecfrancis # www.myspace.com/chloecfrancis

http://www.solar.ifa.hawaii.edu/cgi-bin/StrikeProb?latitude=+35.38&longitude=-136.26&location=Nagahama,+Japan # Tropical Cyclone Strike Probabilities for Nagahama, Japan

http://www.missionjapan.org/mission/jmissionorg.html # Japan Mission Organization List

http://www.aquasapone.com.au/soapmaking/showergel_soap.html # AquaSapone - How to make shower gel from natural handmade soap

http://www.ultimate-guitar.com/tabs/d/danilo_montero/la_unica_razon_crd.htm # La Unica Razon Chords by Danilo Montero @ Ultimate-Guitar.Com


Musicblog

Bonobo – Transmission94 (Parts 1 & 2)

Sia – Rewrite

Thievery Corporation – Thievery Corporation - Revolut

Powered by Glob!
Search: