Smalruby
Speakers: Kouji Takao, Nobuyuki Honda
2017.09.20 15:50 - 16:30, Dahlia #rubykaigiB, RubyKaigi 2017 at International Conference Center Hiroshima, Hiroshima, Japan
Speakers: Kouji Takao
2 / 48
Speakers: Nobuyuki Honda
3 / 48
Ruby Programming Shounendan
● Promoting the joy of programming to many kids.
一人でも多くの青少年にプログラミングの喜びを!
● Building internet safety awareness for kids through
programming!
プログラミングを通じて青少年とネット社会との関わり方
を考える組織を地域社会の中に!
4 / 48
Matsue City, Shimane
http://en.wikipedia.org/wiki/File:Japan_location_map_with_side_map_of_the_Ryukyu_Islands.svg : Maximilian Dörrbecker (Chumwa) CC-BY-SA 3.0CC by SA
Matz-e
5 / 48
Workshop
●Trial:
Instroducing Ruby for kids and parents
●Dojo:
Computer programming clubs
(like CoderDojo)
6 / 48
Development
●Materials
Textbook, Worksheet, etc.
●Tools
Smalruby: Visual programming environment
Smalrubot: Robot controlled by smalruby
7 / 48
Agenda
●Programning Education in Japan
●"Scratch"
●Smalruby
8 / 48
Programming
Education
in Japan
9 / 48
Books
●Hello Ruby
●Manga
●For non-tech parent
10 / 48
TV Show: "Why! Programming"
11 / 48
CoderDojo
●Programming club for young person aged 7 ‒ 17
●World wide 1,250 Dojo
●Over 93 Dojo in Japan
12 / 48
Compulsory Education:義務教育
●2012: For ages 13-15
●2020: For ages 6 - 12
13 / 48
Background
● Fourth Industrial Revolution
第4次産業革命
IoT, Big Data, AI, etc.
●Computational Thinking for elementary
school in Japan
プログラミング的思考
14 / 48
Computational Thinking for elementary
school in Japan
●Ability to think logically the following three
things to realize the series of activities that
you intend
自分が意図する一連の活動を実現するために次の
3つのことを論理的に考えていく力
15 / 48
Computational Thinking for elementary
school in Japan
1. What kind of movement combination is
necessary
どのような動きの組合せが必要か
16 / 48
Computational Thinking for elementary
school in Japan
2. How to combine symbols corresponding
to each movement
一つ一つの動きに対応した記号を、どのように
組み合わせたらいいのか
17 / 48
Computational Thinking for elementary
school in Japan
3. How can we improve the combination of
symbols to get closer to the intended
activities
記号の組合せをどのように改善していけば、よ
り意図した活動に近づくのか
18 / 48
Origin of Computational Thinking for
elementary school in Japan
●Jeannette M. Wing, Computational Thinking,
Communications of the ACM, Vol.49, No.3, pp.33-35,
Mar. 2006
https://www.cs.cmu.edu/ 15110-s13/Wing06-ct.pdf
●翻訳中島秀之, 計算論的思考,
情報処理 Vol.56 No.6
June 2015
https://www.cs.cmu.edu/afs/cs/usr/wing/www/ct-japanese.pdf
19 / 48
"Scratch"
20 / 48
"Scratch"
●Visual Programming Environment
Programming Language, Script Editor
Paint/Draw Editor, Sound Editor
●Web Browser Application (Flash)
●SNS (Forum)
●Remix (like GitHub's Fork)
21 / 48
"Scratch"
●Over 20,000,000 users world wide
●Over 200,000 users in Japan
●Used by the majority of educational
organizations in Japan
22 / 48
23
日本語
English
24
日本語
English
25
日本語
English
26
日本語
English
27
日本語English
28
日本語
English
29
Super Brave Bros 2.0 :
スーパー勇者ブラザーズ2.0
30 / 48https://scratch.mit.edu/projects/47142062/
Smalruby
31 / 48
Motivation
Scratch on
Ruby World
32 / 48
Motivation
20,000,000 Scratchers
↓
Rubyists
33 / 48
Smalruby
●Scratch's API for Ruby
Scratch:
Ruby: move(10)
34 / 48
forever do
turn_cw(15)
end
日本語
English
35
if (Time.now.sec % 3) == 0
say(message: "Fizz")
else
say(message:
Time.now.sec)
end
日本語
English
36
日本語
English
@v = 15
until y < 0
y += @v
@v += -1
await
end
37
日本語
English
@v = 15
until
touching_color?(
0x2E, 0xFE, 0x2E)
y += @v
@v += -1
await
end
38
English
def sprite1.jump(v0)
@v = v0
until touching_color?(
0x2E, 0xFE, 0x2E)
y += @v
@v += -1
await
end
end
39
日本語
English
sprite1.when(
:receive, "Hey Cat1") do
jump(15)
broadcast("Hey Cat2")
end
40
Architecture
Smalruby::
Character
Stage
< Character
EventHandler
World
Variables: characters, stages, event_handlers
Main Loop
41 / 48
DXRuby / dxruby_sdl
●DXRuby (Windows)
Game library on Windows DirectX for beginers
http://dxruby.osdn.jp/
●dxruby_sdl (Mac, Linux)
DXRuby API on SDL/Ruby
https://github.com/smalruby/dxruby_sdl
42 / 48
Ruby "Super Brave Bros 2.0"
43 / 48
20,000,000 _
Scratchers ≒ Rubyists (?)
44 / 48
Conclusion
●Programning Education in Japan
Books, TV Show
CoderDojo: 93 Dojo
Compulsory Education: For ages 6-12 & 13-15
●"Scratch
Defact standard for programming education
●Smalruby
Scratch's API for Ruby
Scratcher Rubyist
45 / 48
Ruby Programming Shounendan
● Promoting the joy of programming to many kids.
一人でも多くの青少年にプログラミングの喜びを!
● Building internet safety awareness for kids through
programming!
プログラミングを通じて青少年とネット社会との関わり方
を考える組織を地域社会の中に!
46 / 48
Welcome Developers
●GitHub: smalruby/smalruby
47 / 48
Thanks!
Q&A

Smalruby - The neat thing to connect Rubyists and Scratchers -