rabbit-slide-hasumikin-RubyKaigiTakeout2020 2020.9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rabbit +1 -0
- data/README.rd +24 -0
- data/Rakefile +17 -0
- data/config.yaml +24 -0
- data/images/hasumi.jpg +0 -0
- data/images/mark32.png +0 -0
- data/images/mark48.png +0 -0
- data/images/mark64.png +0 -0
- data/images/monstarlab_webpage.png +0 -0
- data/images/mruby_machine.png +0 -0
- data/images/takeoutbox.png +0 -0
- data/images/takeoutbox.svg +1 -0
- data/images/title-background.png +0 -0
- data/mruby-machine--An-Operating-System-for-Microcontroller.rab +581 -0
- data/pdf/RubyKaigiTakeout2020-mruby-machine--An-Operating-System-for-Microcontroller.pdf +0 -0
- data/theme.rb +139 -0
- metadata +72 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a760cd5b15c040f901585fbb5387ea6ea3abfbb9e645be9537723bf638603068
|
4
|
+
data.tar.gz: 831e6b5d33373a05ba866c751c7ce5ed2da46ea568acd402941dfb8940586742
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5d461bff180b8a1819c5a12b352a33eab76db105cece3fd4fae462bdfa57ccdd8128faf93b45b24e1e8c3ce3b0e428af2001ead2ca22eec98d9b32085a66c02b
|
7
|
+
data.tar.gz: 6618acc5149555b1009df32e6dde19afed7f1b46581a5d0c3ba609282f5ca0746a011de9b9e8d072fed90302d37a3f9d0ef56a36f475e84e3dced7c9dcdd3ede
|
data/.rabbit
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
mruby-machine--An-Operating-System-for-Microcontroller.rab
|
data/README.rd
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
= mruby machine - An Operating System for Microcontroller
|
2
|
+
|
3
|
+
Presentation slide for RubyKaigi Takeout 2020
|
4
|
+
|
5
|
+
== For author
|
6
|
+
|
7
|
+
=== Show
|
8
|
+
|
9
|
+
rake
|
10
|
+
|
11
|
+
=== Publish
|
12
|
+
|
13
|
+
rake publish
|
14
|
+
|
15
|
+
== For viewers
|
16
|
+
|
17
|
+
=== Install
|
18
|
+
|
19
|
+
gem install rabbit-slide-hasumikin-RubyKaigiTakeout2020
|
20
|
+
|
21
|
+
=== Show
|
22
|
+
|
23
|
+
rabbit rabbit-slide-hasumikin-RubyKaigiTakeout2020.gem
|
24
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require "rabbit/task/slide"
|
2
|
+
|
3
|
+
# Edit ./config.yaml to customize meta data
|
4
|
+
|
5
|
+
spec = nil
|
6
|
+
Rabbit::Task::Slide.new do |task|
|
7
|
+
spec = task.spec
|
8
|
+
# spec.files += Dir.glob("doc/**/*.*")
|
9
|
+
# spec.files -= Dir.glob("private/**/*.*")
|
10
|
+
# spec.add_runtime_dependency("rabbit-theme-YOUR-THEME")
|
11
|
+
end
|
12
|
+
|
13
|
+
desc "Tag #{spec.version}"
|
14
|
+
task :tag do
|
15
|
+
sh("git", "tag", "-a", spec.version.to_s, "-m", "Publish #{spec.version}")
|
16
|
+
sh("git", "push", "--tags")
|
17
|
+
end
|
data/config.yaml
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
id: RubyKaigiTakeout2020
|
3
|
+
base_name: mruby-machine--An-Operating-System-for-Microcontroller
|
4
|
+
tags:
|
5
|
+
- mruby
|
6
|
+
- compiler
|
7
|
+
- microcontroller
|
8
|
+
presentation_date: '2020-09-04'
|
9
|
+
presentation_start_time:
|
10
|
+
presentation_end_time:
|
11
|
+
version: 2020.9.4.0
|
12
|
+
licenses: []
|
13
|
+
slideshare_id:
|
14
|
+
speaker_deck_id:
|
15
|
+
ustream_id:
|
16
|
+
vimeo_id:
|
17
|
+
youtube_id:
|
18
|
+
author:
|
19
|
+
markup_language: :rd
|
20
|
+
name: HASUMI Hitoshi
|
21
|
+
email: hasumikin@gmail.com
|
22
|
+
rubygems_user: hasumikin
|
23
|
+
slideshare_user:
|
24
|
+
speaker_deck_user:
|
data/images/hasumi.jpg
ADDED
Binary file
|
data/images/mark32.png
ADDED
Binary file
|
data/images/mark48.png
ADDED
Binary file
|
data/images/mark64.png
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 530.27 520.58"><defs><style>.cls-1{fill:url(#名称未設定グラデーション_25);}.cls-2{fill:#e9e9e9;}.cls-3{fill:url(#名称未設定グラデーション_25-2);}.cls-4{fill:#f3d35b;}.cls-5{fill:url(#名称未設定グラデーション_36);}.cls-6{fill:url(#名称未設定グラデーション_13);}.cls-7,.cls-9{fill:#8b0016;}.cls-7{stroke:#f8f8f8;stroke-width:1.79px;}.cls-10,.cls-7{stroke-linecap:round;stroke-linejoin:round;}.cls-8{fill:#fff;}.cls-10{fill:none;stroke:#e5bd3e;stroke-width:8.19px;}.cls-11{fill:#544347;}.cls-12{fill:url(#名称未設定グラデーション_34);}</style><linearGradient id="名称未設定グラデーション_25" x1="127.14" y1="8.22" x2="285.12" y2="8.22" gradientTransform="matrix(0.98, 0.1, -0.1, 0.99, 180, 133.89)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#bfbfbf"/><stop offset="1" stop-color="#fff"/></linearGradient><linearGradient id="名称未設定グラデーション_25-2" x1="-102.4" y1="187.64" x2="165.24" y2="187.64" gradientTransform="translate(177.35 134.61) rotate(5.86)" xlink:href="#名称未設定グラデーション_25"/><linearGradient id="名称未設定グラデーション_36" x1="-69.61" y1="146.39" x2="-69.61" y2="24.84" gradientTransform="matrix(0.99, 0.1, -0.1, 0.99, 177.37, 134.57)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#dbdbdb"/><stop offset="1" stop-color="#fff"/></linearGradient><linearGradient id="名称未設定グラデーション_13" x1="-102.4" y1="242.98" x2="82.55" y2="242.98" gradientTransform="translate(177.35 134.61) rotate(5.86)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#e6e6e6"/><stop offset="1" stop-color="#fff"/></linearGradient><linearGradient id="名称未設定グラデーション_34" x1="158.13" y1="146.39" x2="158.13" y2="-44.79" gradientTransform="matrix(0.99, 0.1, -0.1, 0.99, 177.37, 134.57)" xlink:href="#名称未設定グラデーション_13"/></defs><title>アセット 18</title><g id="レイヤー_2" data-name="レイヤー 2"><g id="レイヤー_1-2" data-name="レイヤー 1"><polygon class="cls-1" points="404.24 100.15 446.4 112.54 456.02 200.53 440.74 234.22 301.01 184.05 311.56 156.63 404.24 100.15"/><polygon class="cls-2" points="111.73 61.65 181.84 47.8 289.7 124.98 301.05 184.66 64.59 230.06 50.28 166.02 111.73 61.65"/><polygon class="cls-3" points="64.63 230.04 117.59 468.36 313.99 421.97 301.05 184.66 64.63 230.04"/><ellipse class="cls-4" cx="237.56" cy="238.28" rx="148.6" ry="46.2" transform="translate(-15.3 16.3) rotate(-3.81)"/><polygon class="cls-5" points="0 141.32 6.46 172.15 64.67 230.03 198.73 283.93 147.37 225.62 42.37 155.59 0 141.32"/><polygon class="cls-6" points="64.63 230.04 117.59 468.36 220.74 520.58 198.74 283.94 64.63 230.04"/><path class="cls-7" d="M167.79,372l11-20.34a5.57,5.57,0,0,0-1.73-.91l-25-6.89,15.31,28.05Z"/><polygon class="cls-7" points="167.45 371.87 152.14 343.81 130.02 361.52 167.45 371.87"/><path class="cls-7" d="M130,361.52l22.12-17.7L127.38,337a4.58,4.58,0,0,0-1.74-.1l4,24.56Z"/><path class="cls-7" d="M167.79,372l-.34-.09L130,361.52l-.34-.09.18,1.12,9,54.86c.8,1.62,2.42,2,3.63.95l.23-.21,24.54-45.25Z"/><path class="cls-7" d="M178.83,351.62a8.6,8.6,0,0,1,3.08,4.09l6,19.15a6.21,6.21,0,0,1-.41,2.6L167.77,372Z"/><path class="cls-7" d="M187.52,377.46a1.54,1.54,0,0,1-.16.38l-44.73,40.6s0,0,0,0L167.77,372Z"/><path class="cls-7" d="M125.64,336.87a6.13,6.13,0,0,0-4,2.12l-11.26,14.38a6.3,6.3,0,0,0-.4,2.6l19.75,5.46Z"/><path class="cls-7" d="M109.93,356a2.23,2.23,0,0,0,0,.42l28.89,61,0,.06-9.21-56Z"/><polygon class="cls-7" points="167.79 371.96 167.29 372.9 142.75 418.15 167.79 371.96 167.79 371.96"/><polygon class="cls-7" points="167.79 371.96 178.82 351.62 167.79 371.96 167.79 371.96"/><polygon class="cls-7" points="129.68 361.43 129.68 361.43 138.89 417.41 129.86 362.55 129.68 361.43"/><polygon class="cls-7" points="129.68 361.43 125.64 336.87 129.68 361.43 129.68 361.43"/><polygon class="cls-8" points="198.73 283.93 220.64 520.54 412.02 474.68 440.88 234.28 198.73 283.93"/><path class="cls-9" d="M271.38,316.24c.76,4.28-2.86,7.61-6.19,8.87,2.91.68,3.84,7.64,7,7.08a2.73,2.73,0,0,0,1.79-1.3c.22-.31.34-.45.57-.49a.4.4,0,0,1,.48.34,3.94,3.94,0,0,1-.43,1.71,6.62,6.62,0,0,1-4.88,4.14c-6.71,1.21-4.84-10.64-8.25-10-.17,2.7-.88,8.18-.43,10.7.11.63-.08.82-.64.92-1.11.21-3.33.84-3.92.95s-.75-.1-.86-.74c-.38-2.14,1.15-15,1.55-19.24a6.26,6.26,0,0,1,2-4.54c-4.8,1.18-7.67,5.46-7.22,8,.21,1.2.87,1.67,1.83,1.49a7.32,7.32,0,0,0,1.21-.49c.26,0,.4.08.45.35.18,1.05-1.4,4.2-4.32,4.73a3.83,3.83,0,0,1-4.7-3.41c-1.05-5.9,5.92-11.42,15.41-13.14C266.77,311.22,270.67,312.29,271.38,316.24Zm-5.22.13c-.34-1.92-1.43-2.85-2.87-2.59a7.83,7.83,0,0,0-1.1,3.54c-.38,3-.69,7.26-.66,7.25C265.16,323.45,266.71,319.45,266.16,316.37Z"/><path class="cls-9" d="M283,331.82a8.69,8.69,0,0,1-5.19,3.3,2.83,2.83,0,0,1-3.44-2.36c-.41-2.33.36-5.3.12-6.65-.11-.64-.39-.67-.47-1.16-.15-.82,1.75-1.75,3.9-2.14.82-.15,1.32.11,1.43.75.31,1.73-.61,4.49-.12,7.23a.87.87,0,0,0,1.05.78,2.83,2.83,0,0,0,1.95-1.94,10.8,10.8,0,0,0,.45-5c-.11-.64-.39-.67-.47-1.16-.15-.83,1.75-1.75,3.9-2.14.82-.15,1.32.11,1.43.75.27,1.46-.52,4.59-.16,6.58.17,1,.79,1.45,1.46,1.33s.87-.47,1.26-1.05c.22-.31.35-.45.57-.49a.54.54,0,0,1,.61.44,2.08,2.08,0,0,1-.38,1.3,6.05,6.05,0,0,1-4.23,3.33C283.72,334.05,283,331.82,283,331.82Z"/><path class="cls-9" d="M294.55,321.35a5.31,5.31,0,0,1,3.25-2.14c2.34-.42,4.08.35,4.58,3.13.64,3.64-1.13,8.54-6.28,9.47-3.78.68-5.84-1-6.34-3.85-.65-3.61,1.16-8.32.29-13.2-.22-1.24-1-1.73-1.74-1.59-.37.07-.58,0-.63-.35-.14-.78,1.6-2.38,3.71-2.76s3.34.48,3.67,2.36S294.58,319.56,294.55,321.35Zm1.36,8.71c1.81-.33,2-5.48,1.72-7.09-.17-.94-.76-1.26-1.43-1.14s-1.26.65-1.44,2a19.5,19.5,0,0,0-.12,5.1C294.77,329.69,295.2,330.19,295.91,330.06Z"/><path class="cls-9" d="M303.91,319.54c-.15-.82,1.75-1.75,3.86-2.13.86-.15,1.32.11,1.44.75.29,1.65-.51,4.67-.1,7,.12.64.58,1.1,1.17,1a3.3,3.3,0,0,0,2.06-2,10.47,10.47,0,0,0,.23-4.92c-.11-.64-.39-.67-.47-1.16-.15-.82,1.75-1.75,3.86-2.13.86-.16,1.32.11,1.44.75.16.94-.17,1.42-.11,7.77.06,5.92.35,14.44-6.36,15.65-2.71.49-5.32-.67-5.79-3.3a4.13,4.13,0,0,1,2.47-4.82c.26-.05.43,0,.47.26.06.38-.24.63-.09,1.45.19,1.09,1.17,1.61,2.43,1.38,2.7-.48,2.91-4.9,2.81-8.68a8,8,0,0,1-5.23,3.27,3,3,0,0,1-3.7-2.32c-.45-2.51.32-5.29.08-6.64C304.27,320.06,304,320,303.91,319.54Z"/><path class="cls-9" d="M316.25,319.89c-2.22.4-4.18-.95-4.65-3.58-1.13-6.39,4.87-11.78,10.21-12.74,3.55-.64,5.95.55,6.5,3.63a25.2,25.2,0,0,1-.11,6.07c3.1-2.35,2.68-10.72,6.24-11.37a9.12,9.12,0,0,1,4,.1c.45.15.63.27.68.57s-.1.49-.44.55a3.56,3.56,0,0,0-2.19,1.67c-1.77,2.73-2.53,7.48-6.16,9.41a4.38,4.38,0,0,1,3.36,2.77c1.22,2.57,2.09,5.75,4,5.4a2.88,2.88,0,0,0,1.65-1c.25-.28.38-.42.61-.46a.47.47,0,0,1,.56.4,3.43,3.43,0,0,1-.58,1.85c-.6,1.2-1.81,3.39-4.18,3.82-4,.73-5.29-3.07-6-6.94-.42-2.33-.77-4.09-1.86-4a47.72,47.72,0,0,0-.25,11.52c.11.64-.12.84-.64.93-1.15.21-3.33.84-3.92.95s-.78-.1-.9-.73c-.56-3.2,2-15.88,1-21.55a1.45,1.45,0,0,0-1.91-1.28c-2.49.45-5,5-4.43,8C316.9,313.84,318.26,319.52,316.25,319.89Z"/><path class="cls-9" d="M351.58,323.89a3,3,0,0,1-3.21-1.47,7.36,7.36,0,0,1-4.31,2.83c-2.19.4-4.24-.78-4.75-3.67-.66-3.72.89-7.92,6.19-8.88,2-.35,2.64.26,3.24.16s2.09-1.12,2.95-1.27a.49.49,0,0,1,.65.46c.16.9-.61,4.06-.09,7,.17,1,.87,1.44,1.53,1.32s.87-.47,1.27-1.05c.21-.31.34-.45.56-.49a.55.55,0,0,1,.62.43,2.09,2.09,0,0,1-.38,1.31A6.14,6.14,0,0,1,351.58,323.89Zm-5.46-9.59c-2.11.38-2.33,4.49-2,6.56.18,1,.76,1.68,1.58,1.53s1.33-.9,1.61-2.11a16.19,16.19,0,0,0,.09-5.1A1,1,0,0,0,346.12,314.3Z"/><path class="cls-9" d="M355.21,320c-.42-2.4.36-5.07.12-6.42-.11-.64-.34-.67-.43-1.16-.15-.83,1.72-1.75,3.86-2.13.82-.15,1.33.1,1.44.74.27,1.51-.5,4.09-.06,6.57.18,1,.83,1.44,1.5,1.31s.87-.46,1.27-1c.21-.31.34-.45.56-.49a.54.54,0,0,1,.61.43,2,2,0,0,1-.38,1.31,6.11,6.11,0,0,1-4.26,3.33C357,322.92,355.52,321.75,355.21,320Zm2.11-16.78a1.94,1.94,0,0,1,2.43,1.62,3.26,3.26,0,0,1-2.19,3.61,2.08,2.08,0,0,1-2.44-1.65A3.21,3.21,0,0,1,357.32,303.24Z"/><path class="cls-9" d="M367.78,321a4.11,4.11,0,0,1-5-3.64c-.66-3.68.88-7.92,6.18-8.87,2-.36,2.8.23,3.39.12.78-.14,1.84-1.07,2.88-1.26.37-.06.58.05.65.47a76.11,76.11,0,0,0-.26,8.22c.14,5.91.47,14.42-6.21,15.62-2.7.49-5.32-.66-5.78-3.29a4.14,4.14,0,0,1,2.46-4.83c.26-.05.43,0,.47.27s-.23.62-.08,1.45c.19,1.09,1.16,1.61,2.42,1.38,3.19-.58,2.73-7.24,2.62-8.07A5.75,5.75,0,0,1,367.78,321Zm1.67-11c-1.89.34-2.16,4.62-1.82,6.53.17,1,.8,1.68,1.61,1.53s1.38-.86,1.62-2.11a20.72,20.72,0,0,0,.05-5.09C370.79,310.15,370.27,309.81,369.45,310Z"/><path class="cls-9" d="M384,315.12a1.45,1.45,0,0,0,.9-.55c.22-.23.28-.36.5-.4s.4.12.44.35a1.67,1.67,0,0,1-.28,1A4.92,4.92,0,0,1,382,318.4c-2.44.44-3.77-.75-4.07-2.48-.43-2.4.36-5.07.12-6.42-.12-.64-.35-.67-.44-1.16-.15-.83,1.72-1.74,3.87-2.13.81-.15,1.32.11,1.43.75.27,1.5-.43,4.45,0,6.93C383,314.83,383.49,315.22,384,315.12Zm-4-16a1.93,1.93,0,0,1,2.43,1.62,3.24,3.24,0,0,1-2.19,3.61,2.07,2.07,0,0,1-2.43-1.65A3.21,3.21,0,0,1,380,299.14Z"/><path class="cls-9" d="M258,360.05a9.23,9.23,0,0,1-6.37,5.2c-5,5.09,8.49,43.81-15.43,48.22-7.38,1.36-13.72-2.36-14.91-8.91-1.36-7.47,4.25-12.13,9.44-13.09,2-.36,2.61-.17,2.73.45s-.22,1-.79,1.24a5.51,5.51,0,0,0-2.74,5.47,4.43,4.43,0,0,0,5.4,3.65c10.08-1.86,5.34-22,7.23-31.74a8.57,8.57,0,0,1,2.63-4.81,22.27,22.27,0,0,0-8.63,0c-4.29.79-6.8,4.09-6.29,6.91.41,2.21,1.89,3.12,3.77,2.77,1.2-.22,1.59-1.08,2.19-1.19a.74.74,0,0,1,.91.7c.51,2.82-2.22,8.36-7.48,9.33A8.58,8.58,0,0,1,219.5,377c-1.49-8.23,5.46-14.48,14-16s13.09-.68,16.93-1.39c5-.93,6.18-3.66,7.23-3.85.53-.1.87.07,1,.61A7.74,7.74,0,0,1,258,360.05Z"/><path class="cls-9" d="M279.47,405.1a6.16,6.16,0,0,1-6.52-3s-3.26,4.77-8.75,5.79c-4.44.81-8.6-1.57-9.66-7.44-1.37-7.55,1.75-16.08,12.5-18.06,4-.74,5.38.5,6.59.28s4.25-2.28,6-2.6a1,1,0,0,1,1.33.94c.33,1.83-1.22,8.26-.14,14.21.36,2,1.77,2.9,3.12,2.65s1.77-1,2.57-2.13c.43-.63.69-.91,1.14-1a1.11,1.11,0,0,1,1.25.88,4.17,4.17,0,0,1-.77,2.66A12.46,12.46,0,0,1,279.47,405.1Zm-11.14-19.45c-4.29.79-4.72,9.14-4,13.33.36,2,1.55,3.42,3.21,3.11,1.43-.26,2.7-1.83,3.26-4.3a32.8,32.8,0,0,0,.15-10.35A2,2,0,0,0,268.33,385.65Z"/><path class="cls-9" d="M312.89,390.91c.43-.63.69-.92,1.14-1a1.09,1.09,0,0,1,1.25.87,4.21,4.21,0,0,1-.76,2.66c-1.27,2.44-4,5.93-8.27,6.73-6.54,1.2-8.83-8.85-9.58-8.72,0,0-.59,7.05-.33,8.49s-.16,1.69-1.29,1.9c-2.26.41-5.2,1.35-6.4,1.57-.9.17-1.5-.12-1.73-1.41-1.21-6.64,2.51-23.86.45-35.22-.45-2.52-1.95-3.5-3.53-3.21-.68.12-1.19-.1-1.3-.71-.29-1.6,3.24-4.85,7.53-5.64,4-.74,6.78.95,7.47,4.77.87,4.8-1.44,22.48-.89,25.53,2.26-.42,4-3.43,3.71-5.26-.15-.83-.7-.89-.84-1.65-.29-1.6,3.93-4.9,7.39-5.54,1.51-.28,2.29.21,2.5,1.35.58,3.2-1.91,7.91-6.91,12.07,1.31,2.51,4.44,5.17,7.6,4.59A4.11,4.11,0,0,0,312.89,390.91Z"/><path class="cls-9" d="M337.31,385.38a3,3,0,0,1,1.41-1.21.89.89,0,0,1,1.07.75c.14.77-.13,1.44-1,2.87-2,3.13-5,7.54-12.31,8.89-7.07,1.3-12.61-1-13.94-8.3s3.32-15.11,13.33-17c5.11-.94,7.86.92,8.45,4.2.79,4.34-3.49,9.46-10.9,11.46.48,2.67,2.89,4.35,6.5,3.69C333.73,390.06,335.9,387.06,337.31,385.38Zm-8.6-9.28a1.61,1.61,0,0,0-2.13-1.43c-2.25.42-4.59,4.71-3.77,9.21C327,382.25,329,377.92,328.71,376.1Z"/><path class="cls-9" d="M361.88,373.84c1.55,8.54-2.47,16.84-11.72,18.55-6.62,1.22-11.61-1.88-12.72-8-1.34-7.39,3.11-15.86,13.42-17.76C356.43,365.63,360.93,368.58,361.88,373.84Zm-6.78,2.9c-2.5-.48-3.33-1.19-3.58-2.57-.34-1.9.67-2.72.59-3.18a.59.59,0,0,0-.79-.48,4.17,4.17,0,0,0-1.91,1.45c-1.6,1.87-2.9,5-2.11,9.37.62,3.43,3,5.28,5.91,4.74s4.4-4,3.92-6.71A3,3,0,0,0,355.1,376.74Z"/><path class="cls-9" d="M382.28,381.35a17.69,17.69,0,0,1-10.51,6.74,5.76,5.76,0,0,1-7-4.78c-.86-4.72.69-10.76.19-13.5-.23-1.3-.78-1.35-1-2.34-.31-1.68,3.55-3.57,7.91-4.38,1.65-.3,2.68.22,2.92,1.51.63,3.51-1.23,9.13-.22,14.69a1.8,1.8,0,0,0,2.15,1.58,5.78,5.78,0,0,0,3.95-4,22.18,22.18,0,0,0,.88-10.17c-.24-1.29-.79-1.35-1-2.34-.3-1.68,3.55-3.57,7.91-4.37,1.66-.31,2.69.21,2.92,1.51.54,3-1,9.33-.3,13.37.36,2,1.62,2.93,3,2.68s1.77-1,2.56-2.13c.44-.63.69-.91,1.15-1a1.1,1.1,0,0,1,1.24.88,4.23,4.23,0,0,1-.76,2.66,12.36,12.36,0,0,1-8.57,6.78C383.8,385.87,382.28,381.35,382.28,381.35Z"/><path class="cls-9" d="M407,363.09a39.59,39.59,0,0,0,0,8.91c.41,2.28,1.69,2.91,3.5,2.58,1.5-.28,2.74-2,3.77-3.22.44-.55.76-.92,1.21-1a1,1,0,0,1,1.15.74,2.69,2.69,0,0,1-.33,1.63c-1.48,2.95-5.66,8.21-10.32,9.08-5.42,1-8.35-1.86-9.08-5.9-.88-4.87.76-9.12.07-12.93-.18-1-2.1,0-2.35-1.38-.14-.76.05-2.29.88-2.44,4-.74,6.95-5.38,8.33-8.94.53-1.36,1.05-1.93,1.72-2a1.16,1.16,0,0,1,1.43,1c.3,1.68-.18,5,.05,6.3.18,1,.58,1.47,2.83,1.05.61-.11,1.1,0,1.21.64.28,1.53-.36,2.75-1.26,2.92C407.87,360.4,407.15,361.16,407,363.09Z"/><path class="cls-9" d="M281.34,454.94c-1,.16-2.17-1.83-2.34-2.84-.2-1.25.41-1.82,1.29-3.06,4.13-5.66,8.95-12.28,8.19-17-.37-2.27-1.57-3.06-3.62-2.73a3,3,0,0,0-2.41,3.34c.21,1.29,1.54,1.12,1.83,2.92a2.38,2.38,0,0,1-1.9,2.69c-2,.32-3.47-.9-3.85-3.21-.62-3.83,2.5-7.67,7.33-8.46s8.94.85,9.7,5.56c.93,5.73-6.92,11.81-9.2,16a10.47,10.47,0,0,1,1.17-.29c1.55-.26,3.06-.22,4.33-.43,2.05-.34,2.52-.89,3.29-2.2.33-.58.52-.85.84-.9.5-.08.74.21.82.72.32,1.94-1.13,7.77-5.73,8.53-3.1.51-4-.62-6.95-.14C283,453.61,282.34,454.77,281.34,454.94Z"/><path class="cls-9" d="M316.43,431c1.35,8.31-2,19-9.77,20.24-4.28.71-7.9-1.68-8.93-8.06-1.66-10.2,3.07-19.14,9.77-20.24C311.74,422.24,315.38,424.48,316.43,431Zm-11.77,14.26c.31,1.9,1.38,3.33,2.75,3.11,3.69-.61,3.39-13.13,2.32-19.73-.27-1.71-.83-3.42-2.29-3.18C304.07,426,302.84,434,304.66,445.26Z"/><path class="cls-9" d="M320.76,448.44c-1,.17-2.17-1.82-2.33-2.84-.21-1.24.4-1.82,1.28-3.05,4.14-5.66,9-12.29,8.19-17-.37-2.26-1.57-3.06-3.62-2.72a3,3,0,0,0-2.41,3.33c.21,1.3,1.54,1.13,1.83,2.93a2.36,2.36,0,0,1-1.9,2.68c-2,.32-3.47-.9-3.84-3.21-.63-3.83,2.5-7.66,7.33-8.46s8.93.85,9.7,5.56c.92,5.73-6.93,11.81-9.21,16,.41-.11.81-.23,1.18-.29,1.55-.25,3.05-.22,4.32-.43,2.06-.33,2.53-.88,3.3-2.2.32-.57.52-.84.83-.89.51-.09.74.21.82.71.32,1.95-1.12,7.78-5.73,8.54-3.09.51-4-.63-6.94-.14C322.46,447.12,321.76,448.28,320.76,448.44Z"/><path class="cls-9" d="M355.85,424.5c1.35,8.31-2,19-9.77,20.25-4.28.7-7.9-1.69-8.93-8.06-1.66-10.21,3.07-19.14,9.77-20.25C351.16,415.74,354.8,418,355.85,424.5Zm-11.77,14.27c.31,1.89,1.39,3.33,2.75,3.1,3.7-.61,3.4-13.12,2.32-19.73-.27-1.71-.83-3.42-2.29-3.17C343.49,419.52,342.26,427.55,344.08,438.77Z"/><path class="cls-10" d="M205.83,141.37s33.28,24.45,33,38.37"/><path class="cls-10" d="M243.09,128.52c10,5.84,30,30.83,32.06,37"/><path class="cls-10" d="M223.49,135.9c11.24,2.46,30.86,28.68,32.27,34.61"/><path class="cls-11" d="M517.18,48.63S153.56,191.36,148.39,193.76s-11.09,10.58-10.26,12.72,14,3,22.86.05S524,66.28,524,66.28,541.89,50.61,517.18,48.63Z"/><path class="cls-11" d="M492.12,0S141.51,168.21,136.56,171s-10.18,11.34-9.17,13.41,14.18,2,22.8-1.57S500.43,17.1,500.43,17.1,516.92.21,492.12,0Z"/><path class="cls-10" d="M200.94,135.88c-8.49,4.9-18,83.65-16.91,107"/><path class="cls-10" d="M216.79,128.51c-8.17,4.41-18.87,91.64-17.81,115"/><path class="cls-10" d="M234.73,121.37c-9.43,4-20.3,98.86-19.24,122.19"/><polygon class="cls-12" points="198.73 283.93 205.22 229.13 312.36 125.11 389.03 111.3 454.09 178.16 440.88 234.28 198.73 283.93"/></g></g></svg>
|
Binary file
|
@@ -0,0 +1,581 @@
|
|
1
|
+
= mruby machine
|
2
|
+
|
3
|
+
: subtitle
|
4
|
+
An Operating System for Microcontroller
|
5
|
+
: author
|
6
|
+
HASUMI Hitoshi @hasumikin
|
7
|
+
: date
|
8
|
+
September 4-5, 2020
|
9
|
+
: allotted-time
|
10
|
+
24m
|
11
|
+
: theme
|
12
|
+
theme
|
13
|
+
|
14
|
+
= Me
|
15
|
+
* HASUMI Hitoshi(羽角 均)\n@hasumikin(ハスミキン)
|
16
|
+
* From Ruby City Matsue,\na holy place of 🍶(熱燗)
|
17
|
+
* Developer on Rails\n(レールに乗った開発者)
|
18
|
+
* Coffee ☕\nCurry 🍛\nSoba (NoEmojiError)
|
19
|
+
# image
|
20
|
+
# src = images/hasumi.jpg
|
21
|
+
# align = right
|
22
|
+
# relative-height = 80
|
23
|
+
# relative_margin_left = 0
|
24
|
+
|
25
|
+
= Me
|
26
|
+
# image
|
27
|
+
# src = images/monstarlab_webpage.png
|
28
|
+
# relative_width = 104
|
29
|
+
# relative_margin_top = -2
|
30
|
+
== prop
|
31
|
+
: hide-title
|
32
|
+
true
|
33
|
+
|
34
|
+
= hide-title
|
35
|
+
(('tag:center'))
|
36
|
+
\n\n
|
37
|
+
(('tag:normal:Chapter 1'))
|
38
|
+
\n\n\n\n\n\n
|
39
|
+
(('tag:xx-large:Background'))
|
40
|
+
== prop
|
41
|
+
: hide-title
|
42
|
+
true
|
43
|
+
: background-image
|
44
|
+
images/title-background.png
|
45
|
+
: background-image-relative-width
|
46
|
+
100
|
47
|
+
: background-image-relative-height
|
48
|
+
100
|
49
|
+
|
50
|
+
= Motivation 😲 MicroPython
|
51
|
+
# blockquote
|
52
|
+
# title = https://github.com/micropython/micropython/wiki/FAQ
|
53
|
+
Generally, we keep minimal configuration of MicroPython under ((*80K*)) of ARM Thumb2 code (which includes ((*compiler*)) and ((*interactive prompt*)), ...). That means a Cortex-M microcontroller with ((*128KB*)) of ((*flash*)) can host a minimal version together with some hardware drivers.
|
54
|
+
|
55
|
+
= Motivation 😐 MicroPython
|
56
|
+
# blockquote
|
57
|
+
# title = https://github.com/micropython/micropython/wiki/FAQ
|
58
|
+
Regarding ((*RAM*)) usage, (...) ((*8KB*)) is minimal amount to run simple scripts. As Python is interpreted high-level language, the more memory you have, the more capable applications you can run. The reference MicroPython board, PyBoard, has ((*128KB*)) of RAM.
|
59
|
+
|
60
|
+
= Motivation 😕 mruby and mruby/c
|
61
|
+
* Flashing mruby application into 128KB ROM and running it on 128KB RAM are difficult
|
62
|
+
* mruby/c runs on 64KB RAM but it doesn't have mruby compiler
|
63
|
+
* You have to compile Ruby script into VM code before embedding
|
64
|
+
|
65
|
+
= Motivation 😖
|
66
|
+
(('tag:center'))\n
|
67
|
+
(('tag:xx-large:MicroPython: "Overwhelming, we are!"'))
|
68
|
+
\n\n
|
69
|
+
「圧倒的じゃないか、我が軍は」
|
70
|
+
|
71
|
+
= Motivation 🤔
|
72
|
+
(('tag:center'))
|
73
|
+
\n\n\n
|
74
|
+
(('tag:x-large:Would it be great if we have a smaller mruby compiler?'))
|
75
|
+
|
76
|
+
= Target Microcontroller
|
77
|
+
* PSoC5LP: Reference board of mruby/c
|
78
|
+
* Arm Cortex-M3 32bit processor
|
79
|
+
* 64KB RAM
|
80
|
+
* 256KB ROM
|
81
|
+
* It will be comparable to MicroPython if Ruby runs on PSoC5LP with compiler
|
82
|
+
|
83
|
+
= hide-title
|
84
|
+
(('tag:center'))
|
85
|
+
\n\n\n\n
|
86
|
+
Demo
|
87
|
+
== prop
|
88
|
+
: hide-title
|
89
|
+
true
|
90
|
+
|
91
|
+
= hide-title
|
92
|
+
(('tag:center'))
|
93
|
+
\n\n
|
94
|
+
(('tag:normal:Chapter 2'))
|
95
|
+
\n\n\n\n\n\n
|
96
|
+
(('tag:xx-large:Terms and Tools'))
|
97
|
+
== prop
|
98
|
+
: hide-title
|
99
|
+
true
|
100
|
+
: background-image
|
101
|
+
images/title-background.png
|
102
|
+
: background-image-relative-width
|
103
|
+
100
|
104
|
+
: background-image-relative-height
|
105
|
+
100
|
106
|
+
|
107
|
+
= Terms
|
108
|
+
* mruby
|
109
|
+
* A Ruby implementation for general embedded purpose
|
110
|
+
* mrbc
|
111
|
+
* The original mruby compiler bundled with mruby
|
112
|
+
* mruby/c
|
113
|
+
* Another implementation of mruby VM for one-chip microcontroller
|
114
|
+
* It doesn't have compiler
|
115
|
+
|
116
|
+
= Terms
|
117
|
+
* mmrbc (mini mruby compiler)
|
118
|
+
* Another mruby compiler for one-chip microcontroller
|
119
|
+
* mmruby (mini mruby) = mmrbc + mruby/c
|
120
|
+
* mruby machine
|
121
|
+
* A microcontroller embedded with integration of mmruby, CUI shell and peripheral drivers
|
122
|
+
|
123
|
+
= mruby machine
|
124
|
+
# image
|
125
|
+
# src = images/mruby_machine.png
|
126
|
+
# relative_height = 100
|
127
|
+
# relative_margin_top = 0
|
128
|
+
|
129
|
+
= Cross compilation tools for bare metal Arm
|
130
|
+
* arm-none-eabi-gcc, arm-none-eabi-ar, arm-none-eabi-ld, arm-none-eabi-strip, etc.
|
131
|
+
* What is "arm-none-eabi-" ?
|
132
|
+
* arm: Arm architecture
|
133
|
+
* none: Without OS (Bare metal)
|
134
|
+
* eabi: Embedded Application Binary Interface
|
135
|
+
|
136
|
+
= Three tool-chains in my laptop (Intel 64)
|
137
|
+
(1) (x86_64-linux-gnu-)gcc\nUsual compilation in daily development
|
138
|
+
(2) arm-linux-gnueabi-gcc\nBinary runs on QEMU (machine emulator)
|
139
|
+
(3) arm-none-eabi-gcc (--with-newlib)\nTo make a final library archive (libmmrbc.a) for bare metal Arm
|
140
|
+
|
141
|
+
= Docker image
|
142
|
+
((‘tag:center’))
|
143
|
+
\n\n\n
|
144
|
+
https://hub.docker.com/r/\nhasumikin/arm-none-eabi-tools
|
145
|
+
|
146
|
+
= C Library
|
147
|
+
* glibc (GNU C Library)
|
148
|
+
* Newlib
|
149
|
+
* Another C library especially for embedded system
|
150
|
+
* Some implementation is missed. eg) regex.c
|
151
|
+
* Newlib-nano
|
152
|
+
* Even smaller version of Newlib for Arm processor
|
153
|
+
* Yet other libraries
|
154
|
+
* EGLIBC, Clibc, sglibc, etc.
|
155
|
+
|
156
|
+
= hide-title
|
157
|
+
(('tag:center'))
|
158
|
+
\n\n
|
159
|
+
(('tag:normal:Chapter 3'))
|
160
|
+
\n\n\n\n\n\n
|
161
|
+
(('tag:xx-large:mmrbc'))
|
162
|
+
== prop
|
163
|
+
: hide-title
|
164
|
+
true
|
165
|
+
: background-image
|
166
|
+
images/title-background.png
|
167
|
+
: background-image-relative-width
|
168
|
+
100
|
169
|
+
: background-image-relative-height
|
170
|
+
100
|
171
|
+
|
172
|
+
= Repo
|
173
|
+
(('tag:center'))
|
174
|
+
\n\n\n\n
|
175
|
+
https://github.com/hasumikin/mmruby
|
176
|
+
|
177
|
+
= Features of mmrbc
|
178
|
+
* Portable and Less dependent
|
179
|
+
* Doesn't depend on mruby nor mruby/c
|
180
|
+
* (To the contrary, mrbc depends on mruby itself)
|
181
|
+
* Depends on only standard C library including Newlib(-nano)
|
182
|
+
* Can be integrated with both mruby and mruby/c
|
183
|
+
|
184
|
+
= Features of mmrbc
|
185
|
+
* Small (by linking to Newlib-nano)
|
186
|
+
* Fits in less than 256KB ROM (including mruby/c VM and some application code)
|
187
|
+
* Runs enough on less than 128KB RAM
|
188
|
+
|
189
|
+
= Features of mmrbc
|
190
|
+
* ((*Lemon*)) as a parser generator instead of Yacc/Bison
|
191
|
+
* Originally a parser generator of SQLite
|
192
|
+
|
193
|
+
= Yacc/Bison
|
194
|
+
* LALR(1) parser generator, typical choice of parser generator
|
195
|
+
* Yacc (Barkley Yacc)
|
196
|
+
* Non-reentrant
|
197
|
+
* Parser-Calls-Lexer style (CRuby and mruby use it)
|
198
|
+
* Bison (Gnu Bison. Modernized version of Yacc)
|
199
|
+
* Reentrant, Thread-Safe and Lexer-Calls-Parser style
|
200
|
+
* (You can also select old Yacc style)
|
201
|
+
|
202
|
+
= Lemon
|
203
|
+
* Reentrant
|
204
|
+
* Lexer-Calls-Parser style
|
205
|
+
|
206
|
+
= Parser-Calls-Lexer style (Yacc)
|
207
|
+
#enscript c
|
208
|
+
yyparse(p);
|
209
|
+
|
210
|
+
/* in y.tab.c (generated by Yacc) */
|
211
|
+
int yyparse(parser_state *p) {
|
212
|
+
yytoken = yylex(yylval, p);
|
213
|
+
/* makes AST according as you defined */
|
214
|
+
...
|
215
|
+
goto yyhogefuga;
|
216
|
+
...
|
217
|
+
}
|
218
|
+
|
219
|
+
/* yylex() is called by parser */
|
220
|
+
int yylex(void *lval, parser_state *p) {
|
221
|
+
# Find next token and return token type
|
222
|
+
return tokenType;
|
223
|
+
}
|
224
|
+
|
225
|
+
GenerateVMCode(p->ast);
|
226
|
+
|
227
|
+
= Lexer-Calls-Parser style (Lemon)
|
228
|
+
#enscript c
|
229
|
+
/* in your own Lexer */
|
230
|
+
while (hasMoreToken(rubyScript)) {
|
231
|
+
token = getToken(rubyScript);
|
232
|
+
Parse(parser, tokenType, token);
|
233
|
+
}
|
234
|
+
Parse(parser, 0, "");
|
235
|
+
|
236
|
+
/* in parse.c (generated by Lemon) */
|
237
|
+
void Parse(void *yyp, int yymajor, ...) {
|
238
|
+
/* makes AST according as you defined */
|
239
|
+
...
|
240
|
+
}
|
241
|
+
|
242
|
+
GenerateVMCode(p->ast);
|
243
|
+
|
244
|
+
= Lemon
|
245
|
+
* LALR(1) parser generator as well
|
246
|
+
* Reentrant
|
247
|
+
* Lexer-Calls-Parser style
|
248
|
+
* Generated parser is, I'm still not sure though,
|
249
|
+
* Faster than Yacc/Bison (according to its document)
|
250
|
+
* Smaller code (according to someone)
|
251
|
+
* Grammar syntax of parse.y is different from Yacc/Bison
|
252
|
+
|
253
|
+
= Lemon
|
254
|
+
(('tag:center'))
|
255
|
+
\n\n\n\n
|
256
|
+
https://sqlite.org/src/doc/trunk/doc/lemon.html
|
257
|
+
|
258
|
+
= hide-title
|
259
|
+
(('tag:center'))
|
260
|
+
\n\n
|
261
|
+
(('tag:normal:Chapter 4:'))
|
262
|
+
\n\n\n\n\n\n
|
263
|
+
(('tag:xx-large:How smaller than mrbc?'))
|
264
|
+
== prop
|
265
|
+
: hide-title
|
266
|
+
true
|
267
|
+
: background-image
|
268
|
+
images/title-background.png
|
269
|
+
: background-image-relative-width
|
270
|
+
100
|
271
|
+
: background-image-relative-height
|
272
|
+
100
|
273
|
+
|
274
|
+
= RAM consumption
|
275
|
+
* mruby's branch
|
276
|
+
* `mruby3` as of August 14th
|
277
|
+
|
278
|
+
= RAM consumption
|
279
|
+
* To make things simple, both mrbc and mmrbc are
|
280
|
+
* built for x86_64 architecture
|
281
|
+
* using (({malloc()})) and (({free()})) of glibc
|
282
|
+
* (mmrbc usually uses (({mrbc_alloc()})) to manage heap area)
|
283
|
+
* Linux file system to load Ruby script
|
284
|
+
* (microcontroller doesn't have file system)
|
285
|
+
* As a result, we can simply compare with ((*valgrind*))
|
286
|
+
|
287
|
+
= RAM consumption
|
288
|
+
* Analysis command looks like:\n(({valgrind \}))\n(({ --tool=massif \}))\n(({ --stacks=yes \}))\n(({ path/to/(mrbc|mmrbc) path/to/script.rb}))
|
289
|
+
* Showing the result:\n(({ms_print massif.out.xxxx | less}))
|
290
|
+
|
291
|
+
= RAM consumption: Case 1
|
292
|
+
(('tag:center'))
|
293
|
+
Ruby code:
|
294
|
+
|
295
|
+
# enscript ruby
|
296
|
+
# hello_world.rb
|
297
|
+
puts "Hello World!"
|
298
|
+
|
299
|
+
\n
|
300
|
+
(('tag:center'))
|
301
|
+
Output:
|
302
|
+
|
303
|
+
# enscript ruby
|
304
|
+
Hello World!
|
305
|
+
|
306
|
+
= RAM consumption: Case 1 / mrbc
|
307
|
+
# enscript ruby
|
308
|
+
--------------------------------------------------------------------------------
|
309
|
+
Command: ../mruby/build/host/bin/mrbc ./hello_world.rb
|
310
|
+
Massif arguments: --stacks=yes
|
311
|
+
ms_print arguments: massif.out.4087
|
312
|
+
--------------------------------------------------------------------------------
|
313
|
+
KB
|
314
|
+
157.8^ #
|
315
|
+
| #
|
316
|
+
| #
|
317
|
+
| #
|
318
|
+
| #
|
319
|
+
| @#
|
320
|
+
| @#
|
321
|
+
| @#
|
322
|
+
| @@@#
|
323
|
+
| @@:::::::::::@:::::::@ @#
|
324
|
+
| @:::::::@ :::: :: :: @: :: ::@ @#
|
325
|
+
| :::::@:::::@: :: ::@ :::: :: :: @: :: ::@ @#
|
326
|
+
| ::::::::::::::::::::::: : @:: ::@: :: ::@ :::: :: :: @: :: ::@ @#
|
327
|
+
| ::::: ::: ::: ::: : : ::: : @:: ::@: :: ::@ :::: :: :: @: :: ::@ @#
|
328
|
+
| : ::: ::: ::: ::: : : ::: : @:: ::@: :: ::@ :::: :: :: @: :: ::@ @#
|
329
|
+
| : ::: ::: ::: ::: : : ::: : @:: ::@: :: ::@ :::: :: :: @: :: ::@ @#
|
330
|
+
| : ::: ::: ::: ::: : : ::: : @:: ::@: :: ::@ :::: :: :: @: :: ::@ @#
|
331
|
+
| : ::: ::: ::: ::: : : ::: : @:: ::@: :: ::@ :::: :: :: @: :: ::@ @#
|
332
|
+
| : ::: ::: ::: ::: : : ::: : @:: ::@: :: ::@ :::: :: :: @: :: ::@ @#
|
333
|
+
| : ::: ::: ::: ::: : : ::: : @:: ::@: :: ::@ :::: :: :: @: :: ::@ @#
|
334
|
+
0 +----------------------------------------------------------------------->Mi
|
335
|
+
0 3.235
|
336
|
+
|
337
|
+
= RAM consumption: Case 1 / mmrbc
|
338
|
+
# enscript ruby
|
339
|
+
--------------------------------------------------------------------------------
|
340
|
+
Command: ../mmruby/build/host-production/bin/mmrbc ./hello_world.rb
|
341
|
+
Massif arguments: --stacks=yes
|
342
|
+
ms_print arguments: massif.out.1652
|
343
|
+
--------------------------------------------------------------------------------
|
344
|
+
KB
|
345
|
+
11.17^ #
|
346
|
+
| @#
|
347
|
+
| @@# ::
|
348
|
+
| @@#:::::
|
349
|
+
| @ @ :@: : :: @@#:::::
|
350
|
+
| @ :::@: :@::: :::@@#:::::
|
351
|
+
| @ :::@: :@:::@:::@@#:::::
|
352
|
+
| @:::::@:::@:::@:::@@#:::::
|
353
|
+
| @: :::@:::@:::@:::@@#:::::
|
354
|
+
| :: @: :::@:::@:::@:::@@#::::::
|
355
|
+
| :: @: :::@:::@:::@:::@@#::::::
|
356
|
+
| :: : @: :::@:::@:::@:::@@#::::::
|
357
|
+
| :: : @: :::@:::@:::@:::@@#::::::
|
358
|
+
| :::: @: :::@:::@:::@:::@@#::::::
|
359
|
+
| :::: @: :::@:::@:::@:::@@#::::::
|
360
|
+
| :::: @: :::@:::@:::@:::@@#::::::
|
361
|
+
| :::: @: :::@:::@:::@:::@@#::::::
|
362
|
+
| :::: @: :::@:::@:::@:::@@#::::::
|
363
|
+
| :::: ::::::::::::::: @:::::@::: @: :::@:::@:::@:::@@#::::::
|
364
|
+
| ::::::::::::: :: : :::::::::@:::::@::: @: :::@:::@:::@:::@@#:::::@
|
365
|
+
0 +----------------------------------------------------------------------->ki
|
366
|
+
0 224.5
|
367
|
+
|
368
|
+
= RAM consumption: Case 1 / mmrbc 👏8888
|
369
|
+
# enscript ruby
|
370
|
+
--------------------------------------------------------------------------------
|
371
|
+
Command: ../mmruby/build/host-production/bin/mmrbc ./hello_world.rb
|
372
|
+
Massif arguments: --stacks=yes
|
373
|
+
ms_print arguments: massif.out.1652
|
374
|
+
--------------------------------------------------------------------------------
|
375
|
+
KB
|
376
|
+
11.17^ #
|
377
|
+
| @#
|
378
|
+
| @@# ::
|
379
|
+
| @@#:::::
|
380
|
+
| @ @ :@: : :: @@#:::::
|
381
|
+
| @ :::@: :@::: :::@@#:::::
|
382
|
+
| @ :::@: :@:::@:::@@#:::::
|
383
|
+
| @:::::@:::@:::@:::@@#:::::
|
384
|
+
| @: :::@:::@:::@:::@@#:::::
|
385
|
+
| :: @: :::@:::@:::@:::@@#::::::
|
386
|
+
| :: @: :::@:::@:::@:::@@#::::::
|
387
|
+
| :: : @: :::@:::@:::@:::@@#::::::
|
388
|
+
| :: : @: :::@:::@:::@:::@@#::::::
|
389
|
+
| :::: @: :::@:::@:::@:::@@#::::::
|
390
|
+
| :::: @: :::@:::@:::@:::@@#::::::
|
391
|
+
| :::: @: :::@:::@:::@:::@@#::::::
|
392
|
+
| :::: @: :::@:::@:::@:::@@#::::::
|
393
|
+
| :::: @: :::@:::@:::@:::@@#::::::
|
394
|
+
| :::: ::::::::::::::: @:::::@::: @: :::@:::@:::@:::@@#::::::
|
395
|
+
| ::::::::::::: :: : :::::::::@:::::@::: @: :::@:::@:::@:::@@#:::::@
|
396
|
+
0 +----------------------------------------------------------------------->ki
|
397
|
+
0 224.5
|
398
|
+
|
399
|
+
= RAM consumption: Case 2
|
400
|
+
(('tag:center'))
|
401
|
+
Ruby code:
|
402
|
+
|
403
|
+
# enscript ruby
|
404
|
+
# idiotic_script.rb
|
405
|
+
ary = Array.new(3)
|
406
|
+
ary[0] = {a: 123e2}
|
407
|
+
ary[0][:key] = "string"
|
408
|
+
ary[1] = %w(abc ABC Hello)
|
409
|
+
ary[2] = 0x1f
|
410
|
+
ary[3] = !true
|
411
|
+
puts "my name is #{self.class}, result is #{ary[2] * ary[0][:a]}"
|
412
|
+
p ary
|
413
|
+
|
414
|
+
= RAM consumption: Case 2
|
415
|
+
(('tag:center'))
|
416
|
+
Output:
|
417
|
+
|
418
|
+
# enscript ruby
|
419
|
+
my name is Object, result is 381300
|
420
|
+
[{:a=>12300, :key=>"string"}, ["abc", "ABC", "Hello"], 31, false]
|
421
|
+
|
422
|
+
= RAM consumption: Case 2 / mrbc
|
423
|
+
# enscript ruby
|
424
|
+
--------------------------------------------------------------------------------
|
425
|
+
Command: ../mruby/build/host/bin/mrbc ./idiotic_script.rb
|
426
|
+
Massif arguments: --stacks=yes
|
427
|
+
ms_print arguments: massif.out.4133
|
428
|
+
--------------------------------------------------------------------------------
|
429
|
+
KB
|
430
|
+
162.9^ ##
|
431
|
+
| #
|
432
|
+
| @#
|
433
|
+
| @#
|
434
|
+
| @#
|
435
|
+
| @#
|
436
|
+
| @:@#
|
437
|
+
| @:@#
|
438
|
+
| @:@# :
|
439
|
+
| :::@@::::::@@@@:@# :
|
440
|
+
| :::::::@::::::::::@ :: :::@ @:@# :
|
441
|
+
| ::::@@:::::@ :: ::@:: ::: :::@ :: :::@ @:@# :
|
442
|
+
| ::::::::::::: :@ :::: @ :: ::@:: ::: :::@ :: :::@ @:@# :
|
443
|
+
| ::::::::::::: :: :: ::: :@ :::: @ :: ::@:: ::: :::@ :: :::@ @:@# :
|
444
|
+
| :: :::: ::::: :: :: ::: :@ :::: @ :: ::@:: ::: :::@ :: :::@ @:@# :
|
445
|
+
| :: :::: ::::: :: :: ::: :@ :::: @ :: ::@:: ::: :::@ :: :::@ @:@# :
|
446
|
+
| :: :::: ::::: :: :: ::: :@ :::: @ :: ::@:: ::: :::@ :: :::@ @:@# :
|
447
|
+
| :: :::: ::::: :: :: ::: :@ :::: @ :: ::@:: ::: :::@ :: :::@ @:@# :
|
448
|
+
| :: :::: ::::: :: :: ::: :@ :::: @ :: ::@:: ::: :::@ :: :::@ @:@# :
|
449
|
+
| :: :::: ::::: :: :: ::: :@ :::: @ :: ::@:: ::: :::@ :: :::@ @:@# :
|
450
|
+
0 +----------------------------------------------------------------------->Mi
|
451
|
+
0 3.470
|
452
|
+
|
453
|
+
= RAM consumption: Case 2 / mmrbc
|
454
|
+
# enscript ruby
|
455
|
+
--------------------------------------------------------------------------------
|
456
|
+
Command: ../mmruby/build/host-production/bin/mmrbc idiotic_script.rb
|
457
|
+
Massif arguments: --stacks=yes
|
458
|
+
ms_print arguments: massif.out.13414
|
459
|
+
--------------------------------------------------------------------------------
|
460
|
+
KB
|
461
|
+
53.20^ #
|
462
|
+
| #
|
463
|
+
| @# :::
|
464
|
+
| @# : :
|
465
|
+
| @# : :
|
466
|
+
| @@# : :
|
467
|
+
| @@# :: :
|
468
|
+
| @@#::: :
|
469
|
+
| @@#::: :
|
470
|
+
| @@::@@#::: :
|
471
|
+
| @@: @@#::: :
|
472
|
+
| @@:@:::@::::@@: @@#::: ::
|
473
|
+
| @::@::@ :@:: @:: :@@: @@#::: ::
|
474
|
+
| @:::@@@:@::@: @ :@:: @:: :@@: @@#::: ::
|
475
|
+
| @@:@::@:: @@ :@::@: @ :@:: @:: :@@: @@#::: ::
|
476
|
+
| ::@@@ :@: @:: @@ :@::@: @ :@:: @:: :@@: @@#::: ::
|
477
|
+
| :::::: :::::@ @ :@: @:: @@ :@::@: @ :@:: @:: :@@: @@#::: ::
|
478
|
+
| :::::@@:: :::::: ::@ @ :@: @:: @@ :@::@: @ :@:: @:: :@@: @@#::: ::
|
479
|
+
| : :: @ :: :::::: ::@ @ :@: @:: @@ :@::@: @ :@:: @:: :@@: @@#::: ::
|
480
|
+
| : :: @ :: :::::: ::@ @ :@: @:: @@ :@::@: @ :@:: @:: :@@: @@#::: ::
|
481
|
+
0 +----------------------------------------------------------------------->Mi
|
482
|
+
0 1.616
|
483
|
+
|
484
|
+
= RAM consumption: Summary
|
485
|
+
# enscript sh
|
486
|
+
━━━━━━━━━━┳━━━━━┳━━━━━
|
487
|
+
Ruby script ┃ mrbc ┃ mmrbc
|
488
|
+
━━━━━━━━━━╋━━━━━╋━━━━━
|
489
|
+
hello_world.rb ┃ 157.8KB ┃ 11.17KB
|
490
|
+
━━━━━━━━━━╋━━━━━╋━━━━━
|
491
|
+
idiotic_script.rb ┃ 162.9KB ┃ 53.20KB
|
492
|
+
━━━━━━━━━━┻━━━━━┻━━━━━
|
493
|
+
|
494
|
+
Note: These results are larger than possible results on 32bit architecture because of pointer size
|
495
|
+
|
496
|
+
= Idiotic script
|
497
|
+
# enscript ruby
|
498
|
+
# idiotic_script.rb
|
499
|
+
ary = Array.new(3)
|
500
|
+
ary[0] = {a: 123e2}
|
501
|
+
ary[0][:key] = "string"
|
502
|
+
ary[1] = %w(abc ABC Hello)
|
503
|
+
ary[2] = 0x1f
|
504
|
+
ary[3] = !true
|
505
|
+
puts "my name is #{self.class}, result is #{ary[2] * ary[0][:a]}"
|
506
|
+
p ary
|
507
|
+
|
508
|
+
=>
|
509
|
+
my name is Object, result is 381300
|
510
|
+
[{:a=>12300, :key=>"string"}, ["abc", "ABC", "Hello"], 31, false]
|
511
|
+
|
512
|
+
(('tag:center:Syntax that mmrbc can compile'))
|
513
|
+
|
514
|
+
= Syntax ✅ implemented
|
515
|
+
* lvar, $gvar, @ivar, CONSTANT
|
516
|
+
* assignment, fcall, method chain
|
517
|
+
* Literals: Array, Hash, String, Fixnum, Float, etc.
|
518
|
+
* Keywords: true, false, nil, return, self, etc.
|
519
|
+
* +, -, *, /, %, **, +=, -=, *=, /=, %=, &=, |=, ^=, **=, <<=, >>=
|
520
|
+
* !, ~, +, -, not, &, |, ^, <<, >>
|
521
|
+
* Syntax sugar: (({%w(a b c)}))
|
522
|
+
* Interpolation: (({"The answer is #{get_result(@attr)}!"}))
|
523
|
+
|
524
|
+
= Syntax 🛠 under construction
|
525
|
+
* if then elif else end, unless
|
526
|
+
* case when else then
|
527
|
+
* while, until, break, next, redo, retry, for in
|
528
|
+
* [0,1].each do |var| end
|
529
|
+
* def method_name(arg); end
|
530
|
+
* class MyClass < ParentClass; end
|
531
|
+
* rescue, ensure
|
532
|
+
* ..., etc.
|
533
|
+
|
534
|
+
= Roadmap
|
535
|
+
(('tag:center'))\n\n\n\n
|
536
|
+
https://github.com/hasumikin/mmruby/issues/6
|
537
|
+
|
538
|
+
= Code size (to estimate ROM consumption)
|
539
|
+
|
540
|
+
# enscript sh
|
541
|
+
% ls -l
|
542
|
+
(...)
|
543
|
+
.rwxrwxrwx 609k hasumi 17 Aug 7:03 mruby_machine_PSoC5LP.a
|
544
|
+
.rwxrwxrwx 903k hasumi 17 Aug 7:03 mruby_machine_PSoC5LP.elf
|
545
|
+
.rwxrwxrwx 650k hasumi 17 Aug 7:03 mruby_machine_PSoC5LP.hex
|
546
|
+
.rwxrwxrwx 425k hasumi 17 Aug 7:03 mruby_machine_PSoC5LP.map
|
547
|
+
|
548
|
+
% size mruby_machine_PSoC5LP.elf
|
549
|
+
text data bss dec hex filename
|
550
|
+
136080 320 63009 199409 30af1 mruby_machine_PSoC5LP.elf
|
551
|
+
|
552
|
+
= Code size (to estimate ROM consumption)
|
553
|
+
|
554
|
+
# enscript sh
|
555
|
+
% ls -l
|
556
|
+
(...)
|
557
|
+
.rwxrwxrwx 609k hasumi 17 Aug 7:03 mruby_machine_PSoC5LP.a
|
558
|
+
.rwxrwxrwx 903k hasumi 17 Aug 7:03 mruby_machine_PSoC5LP.elf
|
559
|
+
.rwxrwxrwx 650k hasumi 17 Aug 7:03 mruby_machine_PSoC5LP.hex
|
560
|
+
.rwxrwxrwx 425k hasumi 17 Aug 7:03 mruby_machine_PSoC5LP.map
|
561
|
+
|
562
|
+
% size mruby_machine_PSoC5LP.elf
|
563
|
+
text data bss dec hex filename
|
564
|
+
136080 320 63009 199409 30af1 mruby_machine_PSoC5LP.elf
|
565
|
+
|
566
|
+
(('tag:center'))\n
|
567
|
+
136_080 + 320 = 136_400 ≒ ((*133.2KB*)) 👍
|
568
|
+
|
569
|
+
= Summary
|
570
|
+
* mmrbc is a mini mruby compiler
|
571
|
+
* VM code runs on both mruby VM and mruby/c VM
|
572
|
+
* Still incomplete regarding syntax and memory efficiency
|
573
|
+
* mruby machine\n= mmrbc + mruby/c + shell + dirivers
|
574
|
+
* Runs on PSoC5LP { RAM: 64KB, ROM: 256KB }
|
575
|
+
|
576
|
+
= hide-title
|
577
|
+
(('tag:center'))\n\n\n
|
578
|
+
(('tag:xx-large:Thank you!'))
|
579
|
+
== prop
|
580
|
+
: hide-title
|
581
|
+
true
|
Binary file
|
data/theme.rb
ADDED
@@ -0,0 +1,139 @@
|
|
1
|
+
# puts font_families.sort
|
2
|
+
@xx_large_font_size = screen_size(10 * Pango::SCALE)
|
3
|
+
@x_large_font_size = screen_size(7 * Pango::SCALE)
|
4
|
+
@large_font_size = screen_size(6 * Pango::SCALE)
|
5
|
+
@normal_font_size = screen_size(4.5 * Pango::SCALE)
|
6
|
+
@small_font_size = screen_size(4 * Pango::SCALE)
|
7
|
+
@x_small_font_size = screen_size(3.5 * Pango::SCALE)
|
8
|
+
@xx_small_font_size = screen_size(3 * Pango::SCALE)
|
9
|
+
|
10
|
+
@font_family = find_font_family('Roboto Slab')
|
11
|
+
@monospace_font_family = 'Ricty Discord'
|
12
|
+
|
13
|
+
@default_headline_line_color = '#e5bd3e'
|
14
|
+
@default_headline_line_width = 4
|
15
|
+
@default_headline_line_expand = false
|
16
|
+
|
17
|
+
set_graffiti_color "#FF2B22"
|
18
|
+
set_graffiti_line_width 10
|
19
|
+
|
20
|
+
#@table_frame_color = "#ffffff"
|
21
|
+
#@table_fill_color = "#0f0428"
|
22
|
+
#@table_body_frame_color = "#ffffff"
|
23
|
+
#@table_body_fill_color = "#3f3468"
|
24
|
+
#@table_head_frame_color = "#ffffff"
|
25
|
+
#@table_head_fill_color = "#rf0428"
|
26
|
+
|
27
|
+
#@preformatted_fill_color = '#000000'
|
28
|
+
# @preformatted_centering = true
|
29
|
+
@space = screen_y(1)
|
30
|
+
|
31
|
+
# @margin_left = 300
|
32
|
+
|
33
|
+
@image_slide_number_start_flag_color = "#e5bd3e"
|
34
|
+
@image_slide_number_goal_flag_color = "#a81313"
|
35
|
+
|
36
|
+
include_theme('default')
|
37
|
+
|
38
|
+
match(Slide, HeadLine) do |heads|
|
39
|
+
heads.prop_set("size", @large_font_size)
|
40
|
+
heads.prop_set("weight", "normal")
|
41
|
+
set_font_family(heads)
|
42
|
+
end
|
43
|
+
match(Slide) do |slides|
|
44
|
+
slides.prop_set("foreground", "#a81313")
|
45
|
+
end
|
46
|
+
|
47
|
+
@slide_headline_hide = true
|
48
|
+
match TitleSlide do |slides|
|
49
|
+
slides.margin_left = @margin_right
|
50
|
+
end
|
51
|
+
match TitleSlide, Title do |titles|
|
52
|
+
titles.prop_set "foreground", "#e5bd3e"
|
53
|
+
titles.margin_top = 0
|
54
|
+
end
|
55
|
+
match TitleSlide, Subtitle do |subtitle|
|
56
|
+
subtitle.prop_set "foreground", "#e5bd3e"
|
57
|
+
end
|
58
|
+
match TitleSlide, Author do |authors|
|
59
|
+
authors.prop_set "foreground", "#e5bd3e"
|
60
|
+
authors.margin_top = 440
|
61
|
+
end
|
62
|
+
match TitleSlide, Date do |date|
|
63
|
+
date.prop_set "foreground", "#e5bd3e"
|
64
|
+
end
|
65
|
+
|
66
|
+
@title_slide_background_image = 'images/title-background.png'
|
67
|
+
include_theme("title-slide-background-image")
|
68
|
+
|
69
|
+
#@slide_background_image = 'images/Powerpoint Content Slide.png'
|
70
|
+
#include_theme("slide-background-image")
|
71
|
+
|
72
|
+
#@slide_logo_image = 'images/mark48.png'
|
73
|
+
#include_theme('slide-logo')
|
74
|
+
|
75
|
+
@item_image = 'images/mark48.png'
|
76
|
+
|
77
|
+
include_theme("default-item-mark")
|
78
|
+
|
79
|
+
add_image_path("rabbit-images")
|
80
|
+
|
81
|
+
slide_body = [Slide, Body]
|
82
|
+
item_list_item = [ItemList, ItemListItem]
|
83
|
+
|
84
|
+
indent = 70
|
85
|
+
|
86
|
+
match(*(slide_body + (item_list_item * 1))) do |items|
|
87
|
+
name = "item1"
|
88
|
+
items.delete_pre_draw_proc_by_name(name)
|
89
|
+
items.delete_post_draw_proc_by_name(name)
|
90
|
+
draw_image_mark(items, @item_image, name, indent: indent)
|
91
|
+
end
|
92
|
+
|
93
|
+
match(*(slide_body + (item_list_item * 2))) do |items|
|
94
|
+
name = "item2"
|
95
|
+
items.delete_pre_draw_proc_by_name(name)
|
96
|
+
items.delete_post_draw_proc_by_name(name)
|
97
|
+
draw_image_mark(items, @item_image, name, indent: indent)
|
98
|
+
end
|
99
|
+
|
100
|
+
match(*(slide_body + (item_list_item * 3))) do |items|
|
101
|
+
name = "item3"
|
102
|
+
items.delete_pre_draw_proc_by_name(name)
|
103
|
+
items.delete_post_draw_proc_by_name(name)
|
104
|
+
draw_image_mark(items, @item_image, name, indent: indent)
|
105
|
+
end
|
106
|
+
|
107
|
+
enum_list_item = [EnumList, EnumListItem]
|
108
|
+
|
109
|
+
match(*(slide_body + enum_list_item + item_list_item)) do |items|
|
110
|
+
name = "enum-item1"
|
111
|
+
items.delete_pre_draw_proc_by_name(name)
|
112
|
+
items.delete_post_draw_proc_by_name(name)
|
113
|
+
draw_image_mark(items, @item_image, name, indent: indent)
|
114
|
+
end
|
115
|
+
|
116
|
+
match(*(slide_body + enum_list_item + (item_list_item * 2))) do |items|
|
117
|
+
name = "enum-item2"
|
118
|
+
items.delete_pre_draw_proc_by_name(name)
|
119
|
+
items.delete_post_draw_proc_by_name(name)
|
120
|
+
draw_image_mark(items, @item_image, name, indent: indent)
|
121
|
+
end
|
122
|
+
|
123
|
+
# table
|
124
|
+
all_table = ["**", Table]
|
125
|
+
match(*(all_table + [TableBody, TableRow, TableCell])) do |cells|
|
126
|
+
set_font_family(cells, @monospace_font_family)
|
127
|
+
end
|
128
|
+
match(*(all_table + [TableHead, TableRow, TableHeader])) do |headers|
|
129
|
+
set_font_family(headers, @monospace_font_family)
|
130
|
+
end
|
131
|
+
|
132
|
+
# Chapter
|
133
|
+
match Slide do |slides|
|
134
|
+
slides.each do |slide|
|
135
|
+
if slide.match?(/Chapter \d/)
|
136
|
+
slide.prop_set("foreground", "white")
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
metadata
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rabbit-slide-hasumikin-RubyKaigiTakeout2020
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2020.9.4.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- HASUMI Hitoshi
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-09-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rabbit
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.0.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.0.2
|
27
|
+
description: Presentation slide for RubyKaigi Takeout 2020
|
28
|
+
email:
|
29
|
+
- hasumikin@gmail.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- ".rabbit"
|
35
|
+
- README.rd
|
36
|
+
- Rakefile
|
37
|
+
- config.yaml
|
38
|
+
- images/hasumi.jpg
|
39
|
+
- images/mark32.png
|
40
|
+
- images/mark48.png
|
41
|
+
- images/mark64.png
|
42
|
+
- images/monstarlab_webpage.png
|
43
|
+
- images/mruby_machine.png
|
44
|
+
- images/takeoutbox.png
|
45
|
+
- images/takeoutbox.svg
|
46
|
+
- images/title-background.png
|
47
|
+
- mruby-machine--An-Operating-System-for-Microcontroller.rab
|
48
|
+
- pdf/RubyKaigiTakeout2020-mruby-machine--An-Operating-System-for-Microcontroller.pdf
|
49
|
+
- theme.rb
|
50
|
+
homepage: https://slide.rabbit-shocker.org/authors/hasumikin/RubyKaigiTakeout2020/
|
51
|
+
licenses: []
|
52
|
+
metadata: {}
|
53
|
+
post_install_message:
|
54
|
+
rdoc_options: []
|
55
|
+
require_paths:
|
56
|
+
- lib
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
requirements: []
|
68
|
+
rubygems_version: 3.1.2
|
69
|
+
signing_key:
|
70
|
+
specification_version: 4
|
71
|
+
summary: mruby machine - An Operating System for Microcontroller
|
72
|
+
test_files: []
|