• Save
Rejectkaigi 2010
Upcoming SlideShare
Loading in...5
×
 

Rejectkaigi 2010

on

  • 1,979 views

 

Statistics

Views

Total Views
1,979
Views on SlideShare
1,908
Embed Views
71

Actions

Likes
2
Downloads
0
Comments
1

2 Embeds 71

http://d.hatena.ne.jp 55
http://speakerrate.com 16

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…
  • DubiousはRailsぽく書けるWebフレームワークって、すげ〜!
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Rejectkaigi 2010 Rejectkaigi 2010 Presentation Transcript

  • Sunday, August 29, 2010
  • Mirah/Dubious John Woodell Takeru Sasaki RejectKaigi 2010 2 Sunday, August 29, 2010
  • Thank you for using "AppEngine/JRuby” "AppEngine/JRuby" 3 Sunday, August 29, 2010 View slide
  • Spin-up? Yes, this is a problem... 4 Sunday, August 29, 2010 View slide
  • ...but now you can use Mirah and Dubious "Mirah/Dubious" 5 Sunday, August 29, 2010
  • Mirah is a staticly typed language, that uses type-inference Mirah Ruby JVM 6 Sunday, August 29, 2010
  • Now, how does it work? (minus a few boring details) 7 Sunday, August 29, 2010
  • First, JRuby’s Parcer creates AST JRuby AST mirahp -e "puts 'RubyKaigi'+(167*12+6)" Script Body Call(println) Call(out) Constant(System) Call(+) String("RubyKaigi") Call(+) Call(*) Fixnum(167) Fixnum(12) Fixnum(6) 8 Sunday, August 29, 2010
  • Then, the AST becomes JVM bytecode AST bytecode mirah -e "puts 'RubyKaigi'+(167*12+6)"; javap -c DashE RubyKaigi2010 Compiled from DashE public class DashE extends java.lang.Object{ public static void main(java.lang.String[]); Code: 0: getstatic #12; //Field java/lang/System.out:Ljava/io/PrintStream; 3: ldc #14; //String RubyKaigi 5: sipush 167 8: bipush 12 10: imul 11: bipush 6 13: iadd 14: invokestatic #20; //Method java/lang/String.valueOf:(I)Ljava/lang/ String; 17: invokevirtual #24; //Method java/lang/String.concat:(Ljava/lang/ String;)Ljava/lang/String; 20: invokevirtual #30; //Method java/io/PrintStream.println:(Ljava/lang/ String;)V 23: return public DashE(); Code: 0: aload_0 1: invokespecial #36; //Method java/lang/Object."<init>":()V 4: return 9 } Sunday, August 29, 2010
  • "Pure JVM bytecode" We don't need a Runtime. This is very, very fast! bytecode JRuby Runtime 10 Sunday, August 29, 2010
  • Dubious is Web framework for Mirah Dubious Mirah Web *du bi ous[ djbis | dj- ] [ ] [1] (( )) … ((of, about, as to ...)). [2] > 11 Sunday, August 29, 2010
  • Write Rails-style code, it runs on Google App Engine GoogleAppEngine Rails 12 Sunday, August 29, 2010
  • Here’s code from Dubious, this is not Rails! Rails Dubious 13 Sunday, August 29, 2010
  • Dubious controllers will be familiar Sunday, August 29, 2010
  • Mirah can use ERb templates Sunday, August 29, 2010
  • The models are simple (no schema) Sunday, August 29, 2010
  • It really works, and spins-up in ~1sec Spinup. 17 Sunday, August 29, 2010
  • It isn’t "Dubious" Thank you! http://mirah.org http://dubious-demo.appspot.com @johnwoodell & @urekat 18 Sunday, August 29, 2010
  • Sunday, August 29, 2010