"Lego Programming" with Lorzy

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite & 1 Event

    "Lego Programming" with Lorzy - Presentation Transcript

    1. Lorzy: “Lego Programming” in Perl Chia-liang Kao <clkao@clkao.org> YAPC::Asia 2009, Tokyo
    2. 自己 介紹
    3. id:clkao
    4. 高 嘉良
    5. 台湾 人
    6. 日本語
    7. 日本語 不會
    8. Takesako Inline::x86
    9. Just In Time
    10. Just In Time Slides
    11. Just In Time Software!
    12. no translation
    13. RT: Request Tracker
    14. In Perl!
    15. We Perl
    16. $normal_user ☠ Perl
    17. Lorzy: Lazy, Lispy, Orz
    18. • Scheme-like interpreter in Perl • Typeful • uses Moose & Moose type system
    19. Example
    20. Defining Rules, Actions
    21. (Think gmail filters)
    22. (lambda (ticket transaction) <HERE>) :: Bool
    23. sub { my ($ticket, $transaction) = @_; <HERE> } # returns Bool
    24. If ticket’s queue matches “Foo”
    25. $ticket->queue->name eq “Foo”
    26. S-Expression
    27. (Str.Eq (RT::Model::Queue.name (RT::Model::Ticket.queue ticket)) “Foo”)
    28. Strongly Typed
    29. (Types are Good)
    30. Problem
    31. $ticket->queue->name eq “Foo”
    32. $ticket->queue->name eq “Foo”
    33. $ticket->queue->name eq “Foo”
    34. $ticket->queue->name eq “Foo”
    35. ???!!!
    36. Type mismatch!
    37. Any function that takes Str and returns Bool
    38. Any function that takes a and returns b
    39. RT::Model::Ticket Bool
    40. RT::Model::Ticket Bool
    41. Any function that takes a and returns a
    42. Bool Bool
    43. Bool Bool
    44. Backend: lcore
    45. We want a sandbox
    46. Dump database password, etc...
    47. In Perl Environment
    48. First attempt: ~2003 Audrey & Jesse
    49. Type mismatch!
    50. Second attempt: ~2008
    51. lcore: ~600 lines
    52. TODO
    53. iTunes
    54. iTunes not?
    55. iTunes
    56. iTunes and/or?
    57. iTunes
    58. iTunes ArrayRef[Bool]
    59. MooseX::Types::Applicative
    60. map isa => “CodeRef[CodeRef[a,b], ArrayRef[a], ArrayRef[b]]”
    61. should be (a → Bool)
    62. Load existing rules into the UI
    63. Conclusion
    64. Visual Programming Environment
    65. Sandbox for providing user extensions
    66. All about Types!
    67. Live Demo!
    68. http://github.com/bestpractical/rt/tree/lcore http://github.com/bestpractical/lcore
    69. clkao@clkao.org Hackathon on weekend!
    70. Questions?
    SlideShare Zeitgeist 2009

    + clkaoclkao Nominate

    custom

    773 views, 1 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 773
      • 773 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 22
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Groups / Events