• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
"Lego Programming" with Lorzy
 

"Lego Programming" with Lorzy

on

  • 2,800 views

 

Statistics

Views

Total Views
2,800
Views on SlideShare
2,799
Embed Views
1

Actions

Likes
2
Downloads
31
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    "Lego Programming" with Lorzy "Lego Programming" with Lorzy Presentation Transcript

    • Lorzy: “Lego Programming” in Perl Chia-liang Kao <clkao@clkao.org> YAPC::Asia 2009, Tokyo
    • 自己 介紹
    • id:clkao
    • 高 嘉良
    • 台湾 人
    • 日本語
    • 日本語 不會
    • Takesako Inline::x86
    • Just In Time
    • Just In Time Slides
    • Just In Time Software!
    • no translation
    • RT: Request Tracker
    • In Perl!
    • We Perl
    • $normal_user ☠ Perl
    • Lorzy: Lazy, Lispy, Orz
    • • Scheme-like interpreter in Perl • Typeful • uses Moose & Moose type system
    • Example
    • Defining Rules, Actions
    • (Think gmail filters)
    • (lambda (ticket transaction) <HERE>) :: Bool
    • sub { my ($ticket, $transaction) = @_; <HERE> } # returns Bool
    • If ticket’s queue matches “Foo”
    • $ticket->queue->name eq “Foo”
    • S-Expression
    • (Str.Eq (RT::Model::Queue.name (RT::Model::Ticket.queue ticket)) “Foo”)
    • Strongly Typed
    • (Types are Good)
    • Problem
    • $ticket->queue->name eq “Foo”
    • $ticket->queue->name eq “Foo”
    • $ticket->queue->name eq “Foo”
    • $ticket->queue->name eq “Foo”
    • ???!!!
    • Type mismatch!
    • Any function that takes Str and returns Bool
    • Any function that takes a and returns b
    • RT::Model::Ticket Bool
    • RT::Model::Ticket Bool
    • Any function that takes a and returns a
    • Bool Bool
    • Bool Bool
    • Backend: lcore
    • We want a sandbox
    • Dump database password, etc...
    • In Perl Environment
    • First attempt: ~2003 Audrey & Jesse
    • Type mismatch!
    • Second attempt: ~2008
    • lcore: ~600 lines
    • TODO
    • iTunes
    • iTunes not?
    • iTunes
    • iTunes and/or?
    • iTunes
    • iTunes ArrayRef[Bool]
    • MooseX::Types::Applicative
    • map isa => “CodeRef[CodeRef[a,b], ArrayRef[a], ArrayRef[b]]”
    • should be (a → Bool)
    • Load existing rules into the UI
    • Conclusion
    • Visual Programming Environment
    • Sandbox for providing user extensions
    • All about Types!
    • Live Demo!
    • http://github.com/bestpractical/rt/tree/lcore http://github.com/bestpractical/lcore
    • clkao@clkao.org Hackathon on weekend!
    • Questions?