sign in
Home | Updates | Pages | Users | Admin | Help
Comparing version 2 and version 1 back

h1. 14th Ruby Kansai Workshop

"Event Page":http://jp.rubyist.net/?KansaiWorkshop14 (in japanese)

New place - now the usual computer lab. We are devided in groups - A,B,C etc.
Hm, maybe some team working ahead ;)

I decided to change my usual way of taking notes (gedit ;)) and installed "JunebugWiki":http://www.junebugwiki.com/ + "litespeed":http://litespeedtech.com/ on my notebook. Pretty cool - notes powered by textile. 

h2. The world of Ruby

Hm, maybe the title of the lesson is not right.

Nishimoto-san (keisuken)

Always using some java-powered presentation tool. 

h3. What is Ruby?

What exactly is Ruby - interpreter? compiler?

using virtual mchine

JIT(just in time compiler)
AOT(ahead of time compiler)

Ruby can run several application inside one VM? (no sandboxes?)

h3. C Ruby

h3. YARV

Still not ready - maybe after 1-2 years

h3. JRuby

http://jruby.codehaus.org/

Using Java VM. parsing parse.y from inside Ruby sources. Ruby 1.8 compatible.
Maybe J2EE+RoR will be good for the enterprise.

h3. xruby

http://code.google.com/p/xruby/

Using Java VM. Have compiler and runtime. Ruby 1.8 compatible. Need to compile the code every time (what for scripts?)

h3. Rubinius - Evan Phoenix

http://blog.fallingsnow.net/rubinius/

BSD Licence. written in C, bytecode compiler and interpreter. Smalltalk bulebook.
Very small runtime - for embedded systems?

h3. RubyCLR - John Lam

http://www.rubyclr.com/

MIT license, Windows .NET framework, C++ -> .NET bridge. CLR is .NET VM.

h3. Benchmark

Several basic algorithms - count,compare,array,fib

YARV is good and quick. Already in the trunk(1.9). 
Maybe there will be JRuby release in february?

The libraries are important. Cool and easy to use, if possible ;)
Problematic/missing libs in Ruby: GUI, Multimedia
But if you search - there is a lot already done: Ruby/Tk, Ruby-GNOME2 etc.
Where to found them: RAA, sf.net, rubyforge etc.

h3. Questions

Ruby on top Parot? (Perl is doing this)

h2. Plagger meets Ruby

yhara-san (Yataka Hara)
Ruby/SDL starter kit, Down! game (there was 2ch annonce

manga-like dialogs with cute girl hahahaha - japanese style

h3. What is Plagger

automatic RSS information getting (aggregator)

input-process-output
example: blog_rss - process - announce to IRC
example: Ruby site (ruby-lang) - find news and send them to gmail

h3. Internals

YAML config: global and plugins sections

global: ...
plugins:
  module: .... (input)
  module: .... (process)
  module: .... (output)
Automation via cron. Plagger plugins are in Perl. Pipe between plagger and ruby. $stdin and $stdout

Plagger - (pipe with text data) - $stdin Ruby $stdout - (pipe with text) - Plagger
h3. Plugins CustomFeed::Script, Filter::Pipe, Filter::RubyMan, Filter::Tateyomi, Publish::Pipe Plagger only working with title and links, no other RSS elements h3. Plagger installation cpan:

>force install Plagger
http://8-p.info/Plagger/ h3. Questions PRagger - system in pure ruby, plugins in ruby plagger.rb - just call plagger from the command line

system "plagger ..."
h2. Lightning talk h3. okkez-san ruby/tk what is the topic? - ruby documentation? who is sheepman? h3. kazuhiko-san letmesee+royal-fpw: Using electronic dictionary data from the browser (HTML output) what is letmesee? * EB library - C library for dictionaries, EPWING format (JISX0208) of data * RubyEB library - using EB from Ruby (also in C) * letmesee - CGI using RubyEB * bookmarklet (JavaScript) what is royal-fpw? FreePWING - software for creating EPWING cdroms with data? written in Perl No need to be expert in every language - perl, c etc. Just try. Happy hacking! h2. Beginners Lesson #11 - okkez-san irb basic usage, irb config customize, debug with irb okkez-san, sakai-san (konami-san student) h3. What is irb? interactive shell, come by default with ruby there is something named irbsh.

irb(main):001:0> '%03d' %1
=> "001"
irb(main):002:0> '%*s' %[10,'aaa']
=> "       aaa"
irb(main):003:0> 'a' *20
=> "aaaaaaaaaaaaaaaaaaaa"
Type of prompts: XMP, DEFAULT, NULL, CLASSIC, SIMPLE, INF_RUBY (when using irb in emacs mode)

IRB/conf[:PROMPT] =
{:XMP =>
  {:PROMPT_I => nil,
  ...
on *nix: _~/.irbrc_ interesting .irbrc

def ri(*args)
  puts `ri "#{args.join(' ')}"`
end

IRB.conf[:EVAL_HISTORY] = 1000

require 'irb/completion'

# history
require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"

require 'pp'
require 'yaml'
The difference between _load ".."_ and _require ".."_ : load rereading the file, if it is changed. load is mostly for config files. h3. Other usages rails script/console, iar (interactive active record), irbdb h3. irb subsession type irb from the irb:

# subsession
irb(main):001:0> irb
irb#1(main):001:0> jobs
=> #0->irb on main (#: stop)
#1->irb#1 on main (#: running)

# send an object
irb(main):002:0> irb Array
irb#1(Array):001:0> def hoge
irb#1(Array):002:1> puts 'Hoge'
irb#1(Array):003:1> end
=> nil
irb#1(Array):004:0> [].hoge
Hoge
=> nil
Powered by JunebugWiki v0.0.31