Upload
clkao
View
1.609
Download
2
Embed Size (px)
Citation preview
自己介紹
id:clkao
高嘉良
♨
台湾人
日本語
日本語
不會
しょうがない
Takesakoさんの Inline::x86
Just In Time
Just In TimeSlides
Just In TimeSoftware!
殘念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: ~2003Audrey & Jesse
Type mismatch!
Second attempt: ~2008
lcore:~600 lines
TODO
iTunes
not?
iTunes
iTunes
and/or?
iTunes
iTunes
ArrayRef[Bool]
iTunes
MooseX::Types::Applicative
mapisa => “CodeRef[CodeRef[a,b], ArrayRef[a],
ArrayRef[b]]”
should be (a → Bool)
Load existing rulesinto 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
Questions?
謝謝!