mrubyãSQLiteã«çµã¿è¾¼ãã§ã¿ã
mruby ããã§ãããã
ã¨ããããSQLiteãã使ããããã«ãã¦ã¿ã¾ããã
https://github.com/spiritloose/sqlite3ext-mruby
ã¨ãããããããªãã¨ãã§ãã¾ãã
SELECT mrb_eval('ARGV.shift.to_i * 2', 42); SELECT mrb_load('/path/to/library.rb'); SELECT mrb_load_irep('/path/to/library.mrb');
eval ã¨ã load ã§ããã ãããé¢ç½ããªãã®ã§ãruby ã§é¢æ°ãå®ç¾©ã§ããããã«ãã¦ã¿ãã
def fib(n) n < 2 ? n : fib(n - 1) + fib(n - 2) end create_function(:fib) do |n| fib(n) end
ã£ã¦ãããã¡ã¤ã«ã mrb_load ããã¨å¼ã³åºããããã«ãªãã
SELECT fib(30);
é常ã«çµã¿è¾¼ã¿ãããã¦è¯ãããã§ãããã©ã使ãã¨é¢ç½ãããªãã
MobiRuby ã¯ç´ æ´ãããã§ãããã
ã¨ãç´2å¹´ã¶ãã«æ´æ°ãã¦ã¿ãï½
YAPC::Asia Tokyo 2010ã§çºè¡¨ãã¦ãã¾ãã
YAPC::Asia Tokyo 2010ã§çºè¡¨ãã¦ãã¾ãããè³æ㯠Slide Share ã«ããã¦ããã¾ããã
ä¼å ´ã«ãããã¦ããæ¹ã ãã©ãããããã¨ããããã¾ããï¼ã
ã¾ããæéã足ããªãã¦æå¾ã®ã»ããããªãé§ã足ã«ãªã£ã¦ãã¾ã£ã¦ãã¿ã¾ããã§ããã
ä»åã®YAPCã¯ããããããªçºè¡¨ãèãã¦å¾ããã®ãå¤ãã£ãã§ãããã¾ããããããªæ¹ã ã¨ç´æ¥ãä¼ããã¦ã話ã§ãã¦ããã£ãã§ãã
Larryã«ãµã¤ã³ãè²°ãã¾ããï¼
YAPC::Asia Tokyo 2010ã§çºè¡¨ãã¾ã
ãã¦ããããä¹
ãã¶ãã®Postãªããã§ããâ¦
YAPC::Asia Tokyo 2010ã§(ä»æ¥)çºè¡¨ãã¾ãã
ãWrite Good Parser in Perlãã¨ããã¿ã¤ãã«ã§ããã¼ãµã«ã¤ãã¦ããããã話ãããã¨æãã¾ãã
http://yapcasia.org/2010/talks/63D6EAB0-BC8C-11DF-8791-B9FC0F276C45
ãããããé¡ããã¾ãã
追è¨
mod_psgi æ°¸ç¶åãWindows対å¿ãautoconfåãªã©
mod_psgi ã®éçºãã¼ã¡ã¼ã¡é²ãã¦ã¾ãã
mod_psgi ã Perlã¤ã³ã¿ããªã¿ãæ°¸ç¶åããããã«ãªãã¾ãã
ããã°ã«ã¯æ¸ãã¦ãªãã£ããã§ãããmod_perl ã®ãããªæ¹æ³ã§æ°¸ç¶åããããã«ãªã£ã¦ã¾ãã
親ããã»ã¹èµ·åæã« PSGIApp ãå ¨ã¦ do ã§èªã¿è¾¼ãããã«ãªã£ã¦ãã¾ãã
ã¨ãããã¨ã§ãmod_psgi ã§ã® .psgi ãã¡ã¤ã«ã¯ã¢ããªã±ã¼ã·ã§ã³ã®å®ç¾©ã¨ãmod_perl ã§ã® startup.pl ã®ãããªå¹æãããã¾ãã
Windowsã«å¯¾å¿ãã¾ãã
mattnさんがやってくれましたããã°ãããã§ããã
autoconfåãã¾ãã
ã¨ãããã¨ã§ã¤ã³ã¹ãã¼ã«æ¹æ³ã¯
$ ./configure && make && sudo make install
ã«ãªãã¾ãã詳ãã㯠README ãåç §ãã¦ãã ããã
ä»ã¯ããã±ã¼ã¸ã³ã°ãããã¤ããªãªã¼ã¹ãã¦ãªãã®ã§ãæåã«autoconfã§configureãçæããå¿ è¦ãããã¾ãã
ã§ä»å¾ã§ãããPSGI ã® SHOULD ã MAY ã®é¨åã§å®è£ ã§ãã¦ãªãã¨ããã®å®è£ (sendfileå¨ãã¨ã)ã¨ãããã£ã¦ãè½ã¡çãããæé©åãªã©ããã£ã¦ãããã°ãããªã¨æã£ã¦ã¾ãã
ãã¨ãæ°¸ç¶åæ¹æ³ã¯ã¾ã æ¤è¨ãã¦ãã¦ãPassenger ã mod_wsgi ã®ãããªå¥ãã¼ã¢ã³ãèµ·åãããããªæ¹æ³ãªã©ãæ¤è¨ãã¦ãã¾ãã
mod_psgi ãå®è£ ãã¦ã¿ã
http://github.com/spiritloose/mod_psgi
PSGI ãå®è£ ããApache2ã¢ã¸ã¥ã¼ã«ã
% make && make install
ã§ã¤ã³ã¹ãã¼ã«ã§ãã¦ã
LoadModule psgi_module modules/mod_psgi.so <Location /psgi> SetHandler psgi PSGIApp /path/to/app.psgi </Location>
ã§åãã
ãã¼ã£ã¨æ¸ããã®ã§ã¾ã ã¾ã ã®é¨åãå¤ãã¨ã¯ããããã©ãä¸éãå®è£ ã§ããã¨æãã
Plack::Test::Suite ã使ã£ããã¹ããæ¸ããã
http://github.com/spiritloose/mod_psgi/blob/master/t/suite.t
mod_perlã®ããã«Apacheã®æ©è½ãæä¾ããå¿
è¦ã¯ãªããã¢ããªã±ã¼ã·ã§ã³ã¸ã¯envã渡ãã°
ããã ããªã®ã§ãå®è£
ã¯é£ãããªãã
ãã¨ã¯ãã以å¤ã®é¨åããã£ã¦ãããã°ã
Perlã¤ã³ã¿ããªã¿ã®æ°¸ç¶åã¨ãã
ãã¨ãè¨å®ã¯mod_wsgiã®ããã«
PSGIScriptAlias /psgi /path/to/app.psgi
ã¨ãã®æ¹ãããã®ãããã
mod_perlite ã«ã¤ãã¦ã¯ä½ã£ã¦ãéä¸ã«æ°ã¥ãããã ãã©ããããPSGI対å¿ã«ããã«ã¯ã»ã¼æ¸ãç´ãã«ãªã
ã¨ããã£ãã®ã§ã¨ããããä½ã£ã¦ã¿ããã¨ã«ãããã¨ãã次第ã
追è¨
miyagawaããããMac OS Xã§ä»¥ä¸ã®ã¨ã©ã¼ã§httpdãèµ·åããªãã¨ã®ãã¨ã
Symbol not found: _PL_stack_sp Referenced from: /usr/libexec/apache2/mod_psgi.so Expected in: dynamic lookup
Mac OS X ã§åããæ¹ãããã£ããã£ããåé¿æ¹æ³ãæãã¦ããã ããã¨å©ããã¾ãã
ãã¡ãã®éçºç°å¢ã¯ä»¥ä¸ã®éãã§ãã
Apacheã¨Perlã¯ã½ã¼ã¹ãããã«ããããã¤ã§ãã
$ uname -a Linux debian 2.6.26-2-686 #1 SMP Wed Aug 19 06:06:52 UTC 2009 i686 GNU/Linux $ cat /etc/debian_version 5.0.3 $ /usr/local/apache2/bin/httpd -v Server version: Apache/2.2.10 (Unix) Server built: Nov 20 2008 11:31:51 $ /usr/local/bin/perl -v This is perl, v5.10.1 (*) built for i686-linux === snip ===
YAPC::Asia 2009 åå¤ç¥ã§çºè¡¨ãã¦ãã¾ãã
http://conferences.yapcasia.org/ya2009/event/596
Yokohama.pm 出張版 in YAPC::Asia 2009 前夜祭のスピーカー発表(追記あり) - Yokohama Perl Mongers
前夜祭レポート[随時更新]:YAPC::Asia Tokyo 2009 スペシャルレポート|gihyo.jp … 技術評論社
ãYokohama.pm åºå¼µç in YAPC::Asia 2009 åå¤ç¥ãã§ãSchenker ã«ã¤ãã¦çºè¡¨ããã¦ããã ãã¾ããã
è³æã¯ä»¥ä¸ã«ç½®ãã¾ããã
ä»ã®çããã®ãã¼ã¯ãé常ã«é¢ç½ãã£ãã§ãã
Yokohama.pmãYAPC::Asia ã®éå¶ã®çæ§ãæ¬å½ã«ãããã¨ããããã¾ããã
ãã¡ãã YAPCæ¬ç·¨ãåå ãã¦ãã¾ãã
zshã§cpanã³ãã³ãè£å®
ãã§ã«ããããªã¨æãã¤ã¤ãæ¸ãã¦ã¿ãã
以ä¸ã®ãã¡ã¤ã«ãã_cpanãã¨ãã¦$fpath ã«å ¥ããã
ã¨ãããªãã
$ cpan -[TAB] -A -- Shows the primary maintainers for the specified modules -C -- Show the "Changes" files for the specified modules -D -- Show the module details. -L -- List the modules by the specified authors. -O -- Show the out-of-date modules. -a -- Creates the CPAN.pm autobundle with CPAN::Shell->autobundle. -c -- Runs a `make clean` in the specified module's directories. -f -- Forces the specified action, when it normally would have failed. -h -- Prints a help message. -i -- Installed the specified modules. -m -- Makes the specified modules. -r -- Recompiles dynamically loaded modules with CPAN::Shell->recompile. -t -- Runs a `make test` on the specified modules. -v -- Print the script version and CPAN.pm version.