rabbit-slide-hasumikin-RAGrant2021Report 2022.7.12.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/PicoRuby_ep2.rab +666 -0
- data/README.rd +24 -0
- data/Rakefile +17 -0
- data/config.yaml +24 -0
- data/images/Monstarlab_Logo_Grey_CMYK.png +0 -0
- data/images/Monstarlab_Logo_Yellow_CMYK.png +0 -0
- data/images/architecture_1.png +0 -0
- data/images/architecture_2.png +0 -0
- data/images/architecture_3.png +0 -0
- data/images/c3p0_icon-icons.com_76936.png +0 -0
- data/images/ewok_icon-icons.com_76943.png +0 -0
- data/images/hasumi.jpg +0 -0
- data/images/mark_g.png +0 -0
- data/images/mark_y.png +0 -0
- data/images/matz.jpg +0 -0
- data/images/r2d2_icon-icons.com_76952.png +0 -0
- data/images/rubyconf_1.png +0 -0
- data/images/rubyconf_2.png +0 -0
- data/images/rubykaigi_1.png +0 -0
- data/images/rubykaigi_2.png +0 -0
- data/images/star-background.jpg +0 -0
- data/images/title-background.png +0 -0
- data/pdf/RAGrant2021Report-PicoRuby_ep2.pdf +0 -0
- data/theme.rb +172 -0
- metadata +82 -0
    
        checksums.yaml
    ADDED
    
    | @@ -0,0 +1,7 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            SHA256:
         | 
| 3 | 
            +
              metadata.gz: 6ffe035a609cd1155483f71ae7e96a69cfbe1466771e5efbc4bdc0aa1231b021
         | 
| 4 | 
            +
              data.tar.gz: fdf7b7fe2d59d7b05082e0ca784ff5d06463f272a75faf96275e2c2fd8c330eb
         | 
| 5 | 
            +
            SHA512:
         | 
| 6 | 
            +
              metadata.gz: 2a62ba2184750a955219535d31938ca6ed946b335b5049ba5ee679b55369b30f07edccfffa220caf34e30a8179686b7cd76adeda1f5376528833dd69820d7bdd
         | 
| 7 | 
            +
              data.tar.gz: e3aaf589b1ac46a249391d381ebdd98c30c9516eae43596494089e695c1756fd78f518385c7e1d096684bd5d84a65e9585c7ca1173bf8553b7b92c6965c6678b
         | 
    
        data/.rabbit
    ADDED
    
    | @@ -0,0 +1 @@ | |
| 1 | 
            +
            PicoRubyCompiler.rab
         | 
    
        data/PicoRuby_ep2.rab
    ADDED
    
    | @@ -0,0 +1,666 @@ | |
| 1 | 
            +
            = pico
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            : subtitle
         | 
| 4 | 
            +
              ruby
         | 
| 5 | 
            +
            : author
         | 
| 6 | 
            +
              Episode Ⅱ\nATTACK OF THE RAKE
         | 
| 7 | 
            +
            : content-source
         | 
| 8 | 
            +
               Ruby Association Grant 2021 Report
         | 
| 9 | 
            +
            : institution
         | 
| 10 | 
            +
               hasumikin>&Monstarlab
         | 
| 11 | 
            +
            : date
         | 
| 12 | 
            +
               July 12, 2022
         | 
| 13 | 
            +
            : allotted-time
         | 
| 14 | 
            +
               28m
         | 
| 15 | 
            +
            : theme
         | 
| 16 | 
            +
               theme
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            = Chapter
         | 
| 19 | 
            +
            (('tag:center'))
         | 
| 20 | 
            +
            Episode  Ⅱ\n
         | 
| 21 | 
            +
            (('tag:large:ATTACK OF THE RAKE'))
         | 
| 22 | 
            +
            \n\n
         | 
| 23 | 
            +
            It is a patient time to the PicoRuby. Although the PRK Firmware has been released and it brought the First Prize of the Fukuoka Ruby Award and a Final nomination to the Ruby Prize, problems are piling up such as a lack of syntax rules and an inconsistent build system with mruby.
         | 
| 24 | 
            +
            \n
         | 
| 25 | 
            +
            \n
         | 
| 26 | 
            +
            Hasumikin, an apprentice to a Rubyist, is strugglingly writing the compiler to compile mrblib of mruby under the coaching of Master MATZ to restore freedom to the micon galaxy....
         | 
| 27 | 
            +
            == prop
         | 
| 28 | 
            +
            : hide-title
         | 
| 29 | 
            +
               true
         | 
| 30 | 
            +
             | 
| 31 | 
            +
            = What happened in Episode Ⅰ
         | 
| 32 | 
            +
              # image
         | 
| 33 | 
            +
              # src = images/architecture_1.png
         | 
| 34 | 
            +
              # relative_width = 100
         | 
| 35 | 
            +
              # relative_margin_top = 3
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            = What happened in Episode Ⅰ
         | 
| 38 | 
            +
              # image
         | 
| 39 | 
            +
              # src = images/architecture_2.png
         | 
| 40 | 
            +
              # relative_width = 100
         | 
| 41 | 
            +
              # relative_margin_top = 3
         | 
| 42 | 
            +
            (('tag:center'))
         | 
| 43 | 
            +
            PicoRuby compiler for one-chip microcontrollers
         | 
| 44 | 
            +
             | 
| 45 | 
            +
            = What happened between Episode Ⅰ & Ⅱ
         | 
| 46 | 
            +
             | 
| 47 | 
            +
            = What happened between Episode Ⅰ & Ⅱ
         | 
| 48 | 
            +
              # image
         | 
| 49 | 
            +
              # src = images/rubykaigi_1.png
         | 
| 50 | 
            +
              # relative_width = 85
         | 
| 51 | 
            +
              # relative_margin_top = 0
         | 
| 52 | 
            +
             | 
| 53 | 
            +
            = What happened between Episode Ⅰ & Ⅱ
         | 
| 54 | 
            +
              # image
         | 
| 55 | 
            +
              # src = images/rubykaigi_2.png
         | 
| 56 | 
            +
              # relative_width = 85
         | 
| 57 | 
            +
              # relative_margin_top = 0
         | 
| 58 | 
            +
             | 
| 59 | 
            +
            = What happened between Episode Ⅰ & Ⅱ
         | 
| 60 | 
            +
              # image
         | 
| 61 | 
            +
              # src = images/rubyconf_1.png
         | 
| 62 | 
            +
              # relative_width = 85
         | 
| 63 | 
            +
              # relative_margin_top = 0
         | 
| 64 | 
            +
             | 
| 65 | 
            +
            = What happened between Episode Ⅰ & Ⅱ
         | 
| 66 | 
            +
              # image
         | 
| 67 | 
            +
              # src = images/rubyconf_2.png
         | 
| 68 | 
            +
              # relative_width = 85
         | 
| 69 | 
            +
              # relative_margin_top = 0
         | 
| 70 | 
            +
             | 
| 71 | 
            +
            = What happened between Episode Ⅰ & Ⅱ
         | 
| 72 | 
            +
              # enscript ruby
         | 
| 73 | 
            +
             | 
| 74 | 
            +
              kbd = Keyboard.new
         | 
| 75 | 
            +
              kbd.init_pins(
         | 
| 76 | 
            +
                [ 29, 28, 27, 26, 22, 20, 23 ],
         | 
| 77 | 
            +
                [ 3, 4, 5, 6, 7, 8, 9]
         | 
| 78 | 
            +
              )
         | 
| 79 | 
            +
             | 
| 80 | 
            +
              kbd.add_layer :default, %i[
         | 
| 81 | 
            +
                KC_ESCAPE KC_Q    KC_W    KC_E        KC_R    KC_T                          KC_Y    KC_U      KC_I     KC_O     KC_P      KC_MINUS
         | 
| 82 | 
            +
                KC_TAB    KC_A    KC_S    KC_D        KC_F    KC_G                          KC_H    KC_J      KC_K     KC_L     KC_SCOLON KC_BSPACE
         | 
| 83 | 
            +
                KC_LSFT   KC_Z    KC_X    KC_C        KC_V    KC_B      KC_NO     KC_NO     KC_N    KC_M      KC_COMMA KC_DOT   KC_SLASH  KC_RSFT
         | 
| 84 | 
            +
                                          KC_NO       KC_LALT KC_LCTL   LOWER_SPC RAISE_ENT SPC_CTL KC_RGUI   KC_NO
         | 
| 85 | 
            +
              ]
         | 
| 86 | 
            +
              kbd.add_layer :raise, %i[
         | 
| 87 | 
            +
                KC_GRAVE  KC_EXLM KC_AT   KC_HASH     KC_DLR  KC_PERC                       KC_CIRC KC_AMPR   KC_ASTER KC_LPRN  KC_RPRN   KC_EQUAL
         | 
| 88 | 
            +
                KC_TAB    KC_LABK KC_LCBR KC_LBRACKET KC_LPRN KC_QUOTE                      KC_LEFT KC_DOWN   KC_UP    KC_RIGHT KC_UNDS   KC_PIPE
         | 
| 89 | 
            +
                KC_LSFT   KC_RABK KC_RCBR KC_RBRACKET KC_RPRN KC_DQUO   KC_NO     KC_NO     KC_TILD KC_BSLASH KC_COMMA KC_DOT   KC_SLASH  KC_RSFT
         | 
| 90 | 
            +
                                          KC_NO       KC_LALT KC_LCTL   ADJUST    RAISE_ENT SPC_CTL KC_RGUI   BOOTSEL
         | 
| 91 | 
            +
              ]
         | 
| 92 | 
            +
             | 
| 93 | 
            +
              kbd.define_composite_key :SPC_CTL, %i[KC_SPACE KC_RCTL]
         | 
| 94 | 
            +
             | 
| 95 | 
            +
              kbd.define_mode_key :RAISE_ENT, [ :KC_ENTER, :raise, 150, 150 ]
         | 
| 96 | 
            +
             | 
| 97 | 
            +
              rgb = RGB.new(0, 9, 0, false)
         | 
| 98 | 
            +
              rgb.effect = :breath
         | 
| 99 | 
            +
              kbd.append rgb
         | 
| 100 | 
            +
             | 
| 101 | 
            +
              kbd.output_report_changed do |output|
         | 
| 102 | 
            +
                rgb.hue = (output & Keyboard::LED_CAPSLOCK > 0) ? 100 : 0
         | 
| 103 | 
            +
              end
         | 
| 104 | 
            +
             | 
| 105 | 
            +
              kbd.start!
         | 
| 106 | 
            +
             | 
| 107 | 
            +
            = What happened between Episode Ⅰ & Ⅱ
         | 
| 108 | 
            +
              * PRK Firmware
         | 
| 109 | 
            +
                * Compiling and applying a `keymap.rb` on a microcontroller without rebooting
         | 
| 110 | 
            +
             | 
| 111 | 
            +
            = What happened between Episode Ⅰ & Ⅱ
         | 
| 112 | 
            +
              * PRK Firmware
         | 
| 113 | 
            +
                * Compiling and applying a `keymap.rb` on a microcontroller without rebooting
         | 
| 114 | 
            +
              * IRB in keyboard
         | 
| 115 | 
            +
                * Any text editor becomes an IRB
         | 
| 116 | 
            +
             | 
| 117 | 
            +
            = What happened between Episode Ⅰ & Ⅱ
         | 
| 118 | 
            +
              * PRK Firmware
         | 
| 119 | 
            +
                * Compiling and applying a `keymap.rb` on a microcontroller without rebooting
         | 
| 120 | 
            +
              * IRB in keyboard
         | 
| 121 | 
            +
                * Any text editor becomes an IRB
         | 
| 122 | 
            +
              * Presentations available on YouTube
         | 
| 123 | 
            +
                * Japanese -> RubyKaigi Takeout 2021
         | 
| 124 | 
            +
                * English -> RubyConf 2021
         | 
| 125 | 
            +
             | 
| 126 | 
            +
            = Targets in Episode Ⅱ
         | 
| 127 | 
            +
             | 
| 128 | 
            +
            = Targets in Episode Ⅱ
         | 
| 129 | 
            +
              * Rake
         | 
| 130 | 
            +
                * Integrating PicoRuby with mruby's build system
         | 
| 131 | 
            +
             | 
| 132 | 
            +
            = Targets in Episode Ⅱ
         | 
| 133 | 
            +
              * Rake
         | 
| 134 | 
            +
                * Integrating PicoRuby with mruby's build system
         | 
| 135 | 
            +
              * Syntax
         | 
| 136 | 
            +
                * Improving parser and generator to compile mrblib
         | 
| 137 | 
            +
             | 
| 138 | 
            +
            = Targets in Episode Ⅱ
         | 
| 139 | 
            +
              * Rake
         | 
| 140 | 
            +
                * Integrating PicoRuby with mruby's build system
         | 
| 141 | 
            +
              * Syntax
         | 
| 142 | 
            +
                * Improving parser and generator to compile mrblib
         | 
| 143 | 
            +
              * Presym
         | 
| 144 | 
            +
                * Embedding mrblib in ROM
         | 
| 145 | 
            +
             | 
| 146 | 
            +
            = Targets in Episode Ⅱ
         | 
| 147 | 
            +
              * Rake
         | 
| 148 | 
            +
                * Integrating PicoRuby with mruby's build system
         | 
| 149 | 
            +
              * Syntax
         | 
| 150 | 
            +
                * Improving parser and generator to compile mrblib
         | 
| 151 | 
            +
              * Presym
         | 
| 152 | 
            +
                * Embedding mrblib in ROM
         | 
| 153 | 
            +
              * MicroRuby
         | 
| 154 | 
            +
                * PicoRuby compiler + mruby VM
         | 
| 155 | 
            +
             | 
| 156 | 
            +
            = chapter
         | 
| 157 | 
            +
            rake
         | 
| 158 | 
            +
            == prop
         | 
| 159 | 
            +
            : hide-title
         | 
| 160 | 
            +
               true
         | 
| 161 | 
            +
             | 
| 162 | 
            +
            = Rake
         | 
| 163 | 
            +
              * mruby takes advandage of Rake to be built
         | 
| 164 | 
            +
                * Fairly complicated (for me)
         | 
| 165 | 
            +
                * Too hard to migrate to Make (at least I can't)
         | 
| 166 | 
            +
             | 
| 167 | 
            +
            = Rake
         | 
| 168 | 
            +
              * mruby takes advandage of Rake to be built
         | 
| 169 | 
            +
                * Fairly complicated (for me)
         | 
| 170 | 
            +
                * Too hard to migrate to Make (at least I can't)
         | 
| 171 | 
            +
              * PicoRuby used to use Make
         | 
| 172 | 
            +
                * PicoRuby compiler can't be integrated with mruby as it is
         | 
| 173 | 
            +
                * Should be "Rakenized"
         | 
| 174 | 
            +
             | 
| 175 | 
            +
            = Rake
         | 
| 176 | 
            +
              * Build process of mruby
         | 
| 177 | 
            +
                * libmruby_core.a
         | 
| 178 | 
            +
                  * Includes mruby-compiler and murby's core objects implemented in C
         | 
| 179 | 
            +
             | 
| 180 | 
            +
            = Rake
         | 
| 181 | 
            +
              * Build process of mruby
         | 
| 182 | 
            +
                * libmruby_core.a
         | 
| 183 | 
            +
                  * Includes mruby-compiler and murby's core objects implemented in C
         | 
| 184 | 
            +
                * mrbc
         | 
| 185 | 
            +
                  * An executable of mruby-compiler
         | 
| 186 | 
            +
             | 
| 187 | 
            +
            = Rake
         | 
| 188 | 
            +
              * Build process of mruby
         | 
| 189 | 
            +
                * libmruby_core.a
         | 
| 190 | 
            +
                  * Includes mruby-compiler and murby's core objects implemented in C
         | 
| 191 | 
            +
                * mrbc
         | 
| 192 | 
            +
                  * An executable of mruby-compiler
         | 
| 193 | 
            +
                * mrblib.c
         | 
| 194 | 
            +
                  * From `mrblib/*.rb`
         | 
| 195 | 
            +
             | 
| 196 | 
            +
            = Rake
         | 
| 197 | 
            +
              * Build process of mruby
         | 
| 198 | 
            +
                * libmruby_core.a
         | 
| 199 | 
            +
                  * Includes mruby-compiler and murby's core objects implemented in C
         | 
| 200 | 
            +
                * mrbc
         | 
| 201 | 
            +
                  * An executable of mruby-compiler
         | 
| 202 | 
            +
                * mrblib.c
         | 
| 203 | 
            +
                  * From `mrblib/*.rb`
         | 
| 204 | 
            +
                * libmruby.a
         | 
| 205 | 
            +
                  * Core objects, mrblib, mruby-compiler and mrbgems
         | 
| 206 | 
            +
             | 
| 207 | 
            +
            = Rake
         | 
| 208 | 
            +
              * Build process of mruby
         | 
| 209 | 
            +
                * libmruby_core.a
         | 
| 210 | 
            +
                  * Includes mruby-compiler and murby's core objects implemented in C
         | 
| 211 | 
            +
                * mrbc
         | 
| 212 | 
            +
                  * An executable of mruby-compiler
         | 
| 213 | 
            +
                * mrblib.c
         | 
| 214 | 
            +
                  * From `mrblib/*.rb`
         | 
| 215 | 
            +
                * libmruby.a
         | 
| 216 | 
            +
                  * Core objects, mrblib, mruby-compiler and mrbgems
         | 
| 217 | 
            +
                * mruby and mirb
         | 
| 218 | 
            +
             | 
| 219 | 
            +
            = Rakenized PicoRuby
         | 
| 220 | 
            +
              picoruby/
         | 
| 221 | 
            +
              ├─Rakefile    # modified `mruby/Rakefile`
         | 
| 222 | 
            +
              ├─bin/
         | 
| 223 | 
            +
              ├─build/
         | 
| 224 | 
            +
              ├─build_config/
         | 
| 225 | 
            +
              ├─include/
         | 
| 226 | 
            +
              ├─lib/        # cp from `mruby/lib`
         | 
| 227 | 
            +
              └─mrbgems/
         | 
| 228 | 
            +
                  ├─ mruby-bin-picoirb/
         | 
| 229 | 
            +
                  ├─ mruby-bin-picorbc/
         | 
| 230 | 
            +
                  ├─ mruby-bin-picoruby/
         | 
| 231 | 
            +
                  ├─ mruby-mrubyc/
         | 
| 232 | 
            +
                  └─ mruby-pico-compiler/
         | 
| 233 | 
            +
             | 
| 234 | 
            +
            = chapter
         | 
| 235 | 
            +
            syntax
         | 
| 236 | 
            +
            == prop
         | 
| 237 | 
            +
            : hide-title
         | 
| 238 | 
            +
               true
         | 
| 239 | 
            +
             | 
| 240 | 
            +
            = Syntax
         | 
| 241 | 
            +
              * As of Episode Ⅰ, PicoRuby has minimum syntax rules to implement PRK Firmware
         | 
| 242 | 
            +
             | 
| 243 | 
            +
            = Syntax
         | 
| 244 | 
            +
              * As of Episode Ⅰ, PicoRuby has minimum syntax rules to implement PRK Firmware
         | 
| 245 | 
            +
              * It's not enough to compile mrblib
         | 
| 246 | 
            +
             | 
| 247 | 
            +
            = Syntax
         | 
| 248 | 
            +
              * As of Episode Ⅰ, PicoRuby has minimum syntax rules to implement PRK Firmware
         | 
| 249 | 
            +
              * It's not enough to compile mrblib
         | 
| 250 | 
            +
            \n\n\n
         | 
| 251 | 
            +
            (('tag:center'))
         | 
| 252 | 
            +
            (('tag:x-large:mrblib?'))
         | 
| 253 | 
            +
             | 
| 254 | 
            +
            = Syntax
         | 
| 255 | 
            +
              mruby/
         | 
| 256 | 
            +
              └─mrblib/
         | 
| 257 | 
            +
                  ├─ 00class.rb
         | 
| 258 | 
            +
                  ├─ 10error.rb
         | 
| 259 | 
            +
                  ├─ array.rb
         | 
| 260 | 
            +
                  ├─ compar.rb
         | 
| 261 | 
            +
                  ├─ enum.rb
         | 
| 262 | 
            +
                  ├─ hash.rb
         | 
| 263 | 
            +
                  ├─ kernel.rb
         | 
| 264 | 
            +
                  ├─ numeric.rb
         | 
| 265 | 
            +
                  ├─ range.rb
         | 
| 266 | 
            +
                  ├─ string.rb
         | 
| 267 | 
            +
                  └─ symbol.rb
         | 
| 268 | 
            +
             | 
| 269 | 
            +
            = Syntax added
         | 
| 270 | 
            +
              * Singleton method
         | 
| 271 | 
            +
              * rescue-else-ensure-retry and rescue modifier
         | 
| 272 | 
            +
              * Reswords (keyword as an identifier). eg) `next`
         | 
| 273 | 
            +
              * Mass assignment
         | 
| 274 | 
            +
              * Splat `*args` `**args`
         | 
| 275 | 
            +
              * Assignable `p = p; p p #=> nil`
         | 
| 276 | 
            +
              * `-2 ** 2 #=> -4`
         | 
| 277 | 
            +
              * etc.
         | 
| 278 | 
            +
             | 
| 279 | 
            +
            = chapter
         | 
| 280 | 
            +
            presym
         | 
| 281 | 
            +
            == prop
         | 
| 282 | 
            +
            : hide-title
         | 
| 283 | 
            +
               true
         | 
| 284 | 
            +
             | 
| 285 | 
            +
            = Presym
         | 
| 286 | 
            +
              * mruby 3.0 introduced ((*preallocated symbols*)) to save RAM
         | 
| 287 | 
            +
                * Presym is created in compilation time and located in ROM
         | 
| 288 | 
            +
             | 
| 289 | 
            +
            = Presym
         | 
| 290 | 
            +
              * mruby 3.0 introduced ((*preallocated symbols*)) to save RAM
         | 
| 291 | 
            +
                * Presym is created in compilation time and located in ROM
         | 
| 292 | 
            +
              * From the compiler's point of view, presym is a described IREP
         | 
| 293 | 
            +
             | 
| 294 | 
            +
            = Presym
         | 
| 295 | 
            +
              * mruby 3.0 introduced ((*preallocated symbols*)) to save RAM
         | 
| 296 | 
            +
                * Presym is created in compilation time and located in ROM
         | 
| 297 | 
            +
              * From the compiler's point of view, presym is a described IREP
         | 
| 298 | 
            +
              * IREP: Internal representation
         | 
| 299 | 
            +
                * One IREP corresponds to a "Proc" in Ruby script
         | 
| 300 | 
            +
             | 
| 301 | 
            +
            = Presym
         | 
| 302 | 
            +
              # enscript ruby
         | 
| 303 | 
            +
             | 
| 304 | 
            +
              class MyClass
         | 
| 305 | 
            +
                def my_method(ary = [])
         | 
| 306 | 
            +
                  ary.each { |e| do_something }
         | 
| 307 | 
            +
                end
         | 
| 308 | 
            +
              end
         | 
| 309 | 
            +
             | 
| 310 | 
            +
            (('tag:center'))
         | 
| 311 | 
            +
            This Ruby script has four IREPs ("Procs") nested.
         | 
| 312 | 
            +
             | 
| 313 | 
            +
            = Presym
         | 
| 314 | 
            +
              # enscript c
         | 
| 315 | 
            +
             | 
| 316 | 
            +
              #include <mruby.h>
         | 
| 317 | 
            +
              #include <mruby/proc.h>
         | 
| 318 | 
            +
              #include <mruby/presym.h>
         | 
| 319 | 
            +
              
         | 
| 320 | 
            +
              #define mrb_BRACED(...) {__VA_ARGS__}
         | 
| 321 | 
            +
              #define mrb_DEFINE_SYMS_VAR(name, len, syms, qualifier) \
         | 
| 322 | 
            +
                static qualifier mrb_sym name[len] = mrb_BRACED syms
         | 
| 323 | 
            +
              
         | 
| 324 | 
            +
              static const mrb_code mrblib_proc_iseq_20[24] = {
         | 
| 325 | 
            +
              0x35,0x04,0x00,0x00,0x14,0x03,0x01,0x04,0x01,0x43,0x03,0x27,0x03,0x00,0x05,0x16,0x03,0x25,0x00,0x02,0x15,0x03,0x39,0x03,};
         | 
| 326 | 
            +
              mrb_DEFINE_SYMS_VAR(mrblib_proc_lv_20, 2, (MRB_SYM(other), MRB_OPSYM(and), ), const);
         | 
| 327 | 
            +
              static const mrb_irep mrblib_proc_irep_20 = {
         | 
| 328 | 
            +
                3,6,0,
         | 
| 329 | 
            +
                MRB_IREP_STATIC,mrblib_proc_iseq_20,
         | 
| 330 | 
            +
                NULL,NULL,NULL,
         | 
| 331 | 
            +
                mrblib_proc_lv_20,
         | 
| 332 | 
            +
                NULL,					/* debug_info */
         | 
| 333 | 
            +
                24,0,0,0,0
         | 
| 334 | 
            +
              };
         | 
| 335 | 
            +
              static const mrb_irep *mrblib_proc_reps_1[1] = {
         | 
| 336 | 
            +
                &mrblib_proc_irep_20,
         | 
| 337 | 
            +
              };
         | 
| 338 | 
            +
              mrb_DEFINE_SYMS_VAR(mrblib_proc_syms_1, 1, (MRB_OPSYM(neq), ), const);
         | 
| 339 | 
            +
              static const mrb_code mrblib_proc_iseq_1[13] = {
         | 
| 340 | 
            +
              0x68,0x01,0x5b,0x02,0x00,0x64,0x01,0x00,0x11,0x01,0x00,0x39,0x01,};
         | 
| 341 | 
            +
              static const mrb_irep mrblib_proc_irep_1 = {
         | 
| 342 | 
            +
                1,3,0,
         | 
| 343 | 
            +
                MRB_IREP_STATIC,mrblib_proc_iseq_1,
         | 
| 344 | 
            +
                NULL,mrblib_proc_syms_1,mrblib_proc_reps_1,
         | 
| 345 | 
            +
                NULL,					/* lv */
         | 
| 346 | 
            +
                NULL,					/* debug_info */
         | 
| 347 | 
            +
                13,0,1,1,0
         | 
| 348 | 
            +
              };
         | 
| 349 | 
            +
              // ... goes on
         | 
| 350 | 
            +
             | 
| 351 | 
            +
            = Presym
         | 
| 352 | 
            +
              # enscript c
         | 
| 353 | 
            +
             | 
| 354 | 
            +
              /* Program data array struct */
         | 
| 355 | 
            +
              typedef struct mrb_irep {
         | 
| 356 | 
            +
                uint16_t nlocals;        /* Number of local variables */
         | 
| 357 | 
            +
                uint16_t nregs;          /* Number of register variables */
         | 
| 358 | 
            +
                uint16_t clen;           /* Number of catch handlers */
         | 
| 359 | 
            +
                uint8_t flags;
         | 
| 360 | 
            +
             | 
| 361 | 
            +
                const mrb_code *iseq;
         | 
| 362 | 
            +
                /*
         | 
| 363 | 
            +
                * A catch handler table is placed after the iseq entity.
         | 
| 364 | 
            +
                * The reason it doesn't add fields to the structure is to keep the mrb_irep structure from bloating.
         | 
| 365 | 
            +
                * The catch handler table can be obtained with `mrb_irep_catch_handler_table(irep)`.
         | 
| 366 | 
            +
                */
         | 
| 367 | 
            +
                const mrb_pool_value *pool;
         | 
| 368 | 
            +
                const mrb_sym *syms;
         | 
| 369 | 
            +
                const struct mrb_irep * const *reps;
         | 
| 370 | 
            +
             | 
| 371 | 
            +
                const mrb_sym *lv;
         | 
| 372 | 
            +
                /* debug info */
         | 
| 373 | 
            +
                struct mrb_irep_debug_info* debug_info;
         | 
| 374 | 
            +
             | 
| 375 | 
            +
                uint32_t ilen;
         | 
| 376 | 
            +
                uint16_t plen, slen;
         | 
| 377 | 
            +
                uint16_t rlen;
         | 
| 378 | 
            +
                uint16_t refcnt;
         | 
| 379 | 
            +
              } mrb_irep;
         | 
| 380 | 
            +
             | 
| 381 | 
            +
            = Presym
         | 
| 382 | 
            +
              # enscript c
         | 
| 383 | 
            +
              typedef struct scope {
         | 
| 384 | 
            +
                uint32_t irep_parameters; /* bbb */
         | 
| 385 | 
            +
                uint32_t nest_stack; /* Initial: 00000000 00000000 00000000 00000001 */
         | 
| 386 | 
            +
                Scope *upper;
         | 
| 387 | 
            +
                Scope *first_lower;
         | 
| 388 | 
            +
                Scope *next;
         | 
| 389 | 
            +
                bool lvar_top;
         | 
| 390 | 
            +
                uint16_t next_lower_number;
         | 
| 391 | 
            +
                uint16_t nlowers;  /* irep.rlen in mruby/c (num of child IREP block) */
         | 
| 392 | 
            +
                CodePool *first_code_pool;
         | 
| 393 | 
            +
                CodePool *current_code_pool;
         | 
| 394 | 
            +
                unsigned int nlocals;
         | 
| 395 | 
            +
                Symbol *symbol;
         | 
| 396 | 
            +
                Lvar *lvar;
         | 
| 397 | 
            +
                Literal *literal;
         | 
| 398 | 
            +
                GenLiteral *gen_literal; /* Exceptional literals in generator */
         | 
| 399 | 
            +
                unsigned int sp;
         | 
| 400 | 
            +
                uint32_t ilen; /* irep length */
         | 
| 401 | 
            +
                uint16_t slen; /* symbol length */
         | 
| 402 | 
            +
                uint16_t plen; /* pool length */
         | 
| 403 | 
            +
                uint16_t clen; /* exception handler length */
         | 
| 404 | 
            +
                uint16_t vm_code_size;
         | 
| 405 | 
            +
                uint8_t *vm_code;
         | 
| 406 | 
            +
                BreakStack *break_stack;
         | 
| 407 | 
            +
                RetryStack *retry_stack;
         | 
| 408 | 
            +
                AssignSymbol *last_assign_symbol;
         | 
| 409 | 
            +
                Backpatch *backpatch; /* for backpatching of JMP label */
         | 
| 410 | 
            +
                int nargs_before_splat;
         | 
| 411 | 
            +
                uint8_t gen_splat_status;
         | 
| 412 | 
            +
                uint8_t gen_array_status;
         | 
| 413 | 
            +
                uint8_t gen_array_count;
         | 
| 414 | 
            +
                ExcHandler *exc_handler;
         | 
| 415 | 
            +
              } Scope;
         | 
| 416 | 
            +
             | 
| 417 | 
            +
            = chapter
         | 
| 418 | 
            +
            microruby
         | 
| 419 | 
            +
            == prop
         | 
| 420 | 
            +
            : hide-title
         | 
| 421 | 
            +
               true
         | 
| 422 | 
            +
             | 
| 423 | 
            +
            = MicroRuby
         | 
| 424 | 
            +
              # enscript ruby
         | 
| 425 | 
            +
              # mruby/build_config/microruby.rb
         | 
| 426 | 
            +
              MRuby::Build.new do |conf|
         | 
| 427 | 
            +
                conf.toolchain
         | 
| 428 | 
            +
                conf.mrbcfile = "#{conf.build_dir}/bin/picorbc"
         | 
| 429 | 
            +
                conf.gem git: "https://github.com/hasumikin/mruby-bin-picorbc.git", branch: "master"
         | 
| 430 | 
            +
                conf.gem git: "https://github.com/hasumikin/mruby-pico-compiler.git", branch: "master"
         | 
| 431 | 
            +
                conf.gem git: "https://github.com/hasumikin/mruby-bin-microruby.git", branch: "master"
         | 
| 432 | 
            +
                conf.gem core: "mruby-print"
         | 
| 433 | 
            +
                conf.cc.defines << "MICRORUBY"
         | 
| 434 | 
            +
                conf.cc.defines << "NDEBUG"
         | 
| 435 | 
            +
                conf.cc.defines << "MRBC_ALLOC_LIBC"
         | 
| 436 | 
            +
                conf.cc.defines << "REGEX_USE_ALLOC_LIBC"
         | 
| 437 | 
            +
              end
         | 
| 438 | 
            +
             | 
| 439 | 
            +
            (('tag:center'))
         | 
| 440 | 
            +
             | 
| 441 | 
            +
              cd mruby && git checkout 3.0.0
         | 
| 442 | 
            +
              MRUBY_CONFIG=microruby rake
         | 
| 443 | 
            +
             | 
| 444 | 
            +
            = MicroRuby
         | 
| 445 | 
            +
              * Build process of MicroRuby
         | 
| 446 | 
            +
                * libmruby_core.a
         | 
| 447 | 
            +
                  * Doesn't include an mruby-related object
         | 
| 448 | 
            +
             | 
| 449 | 
            +
            = MicroRuby
         | 
| 450 | 
            +
              * Build process of MicroRuby
         | 
| 451 | 
            +
                * libmruby_core.a
         | 
| 452 | 
            +
                  * Doesn't include an mruby-related object
         | 
| 453 | 
            +
                * picorbc
         | 
| 454 | 
            +
                  * An executable of picoruby-compiler
         | 
| 455 | 
            +
             | 
| 456 | 
            +
            = MicroRuby
         | 
| 457 | 
            +
              * Build process of MicroRuby
         | 
| 458 | 
            +
                * libmruby_core.a
         | 
| 459 | 
            +
                  * Doesn't include an mruby-related object
         | 
| 460 | 
            +
                * picorbc
         | 
| 461 | 
            +
                  * An executable of picoruby-compiler
         | 
| 462 | 
            +
                * mrblib.c
         | 
| 463 | 
            +
                  * From `mrblib/*.rb` compiled by picorbc
         | 
| 464 | 
            +
             | 
| 465 | 
            +
            = MicroRuby
         | 
| 466 | 
            +
              * Build process of MicroRuby
         | 
| 467 | 
            +
                * libmruby_core.a
         | 
| 468 | 
            +
                  * Doesn't include an mruby-related object
         | 
| 469 | 
            +
                * picorbc
         | 
| 470 | 
            +
                  * An executable of picoruby-compiler
         | 
| 471 | 
            +
                * mrblib.c
         | 
| 472 | 
            +
                  * From `mrblib/*.rb` compiled by picorbc
         | 
| 473 | 
            +
                * libmruby.a
         | 
| 474 | 
            +
                  * Core objects of mruby, mrblib and picoruby-compiler
         | 
| 475 | 
            +
             | 
| 476 | 
            +
            = MicroRuby
         | 
| 477 | 
            +
              * Build process of MicroRuby
         | 
| 478 | 
            +
                * libmruby_core.a
         | 
| 479 | 
            +
                  * Doesn't include an mruby-related object
         | 
| 480 | 
            +
                * picorbc
         | 
| 481 | 
            +
                  * An executable of picoruby-compiler
         | 
| 482 | 
            +
                * mrblib.c
         | 
| 483 | 
            +
                  * From `mrblib/*.rb` compiled by picorbc
         | 
| 484 | 
            +
                * libmruby.a
         | 
| 485 | 
            +
                  * Core objects of mruby, mrblib and picoruby-compiler
         | 
| 486 | 
            +
                * microruby executable
         | 
| 487 | 
            +
                  * microirb, not yet
         | 
| 488 | 
            +
             | 
| 489 | 
            +
            = MicroRuby
         | 
| 490 | 
            +
              # image
         | 
| 491 | 
            +
              # src = images/architecture_2.png
         | 
| 492 | 
            +
              # relative_width = 100
         | 
| 493 | 
            +
              # relative_margin_top = 3
         | 
| 494 | 
            +
             | 
| 495 | 
            +
            = MicroRuby
         | 
| 496 | 
            +
              # image
         | 
| 497 | 
            +
              # src = images/architecture_3.png
         | 
| 498 | 
            +
              # relative_width = 100
         | 
| 499 | 
            +
              # relative_margin_top = 3
         | 
| 500 | 
            +
             | 
| 501 | 
            +
            = chapter
         | 
| 502 | 
            +
            massif
         | 
| 503 | 
            +
            == prop
         | 
| 504 | 
            +
            : hide-title
         | 
| 505 | 
            +
               true
         | 
| 506 | 
            +
             | 
| 507 | 
            +
            = massif
         | 
| 508 | 
            +
              $ valgrind                           \
         | 
| 509 | 
            +
                 --tool=massif                     \
         | 
| 510 | 
            +
                 --stacks=yes                      \
         | 
| 511 | 
            +
                 path/to/(mruby|microrby|picoruby) \
         | 
| 512 | 
            +
                 -e 'puts "Hello World"'
         | 
| 513 | 
            +
             | 
| 514 | 
            +
              $ ms_print massif.out.xxx | less
         | 
| 515 | 
            +
             | 
| 516 | 
            +
            = massif
         | 
| 517 | 
            +
              mruby -e 'puts "Hello World"'
         | 
| 518 | 
            +
             | 
| 519 | 
            +
                  KB
         | 
| 520 | 
            +
              136.1^                                                                     #
         | 
| 521 | 
            +
                  |                                                                      #
         | 
| 522 | 
            +
                  |                                                                      #
         | 
| 523 | 
            +
                  |                                                                      #
         | 
| 524 | 
            +
                  |                                                                      #
         | 
| 525 | 
            +
                  |                                                                     @#
         | 
| 526 | 
            +
                  |                                                                     @#
         | 
| 527 | 
            +
                  |                                                                     @#
         | 
| 528 | 
            +
                  |                                                          @::::@:::::@#:
         | 
| 529 | 
            +
                  |                                                    @@@@:@@::::@:::::@#:
         | 
| 530 | 
            +
                  |                                   ::@:::::@:::::@::@@@@:@@::::@:::::@#:
         | 
| 531 | 
            +
                  |                      :@:::@:::::::@:@:::::@:::::@::@@@@:@@::::@:::::@#:
         | 
| 532 | 
            +
                  |            @@@::::::::@:::@:::::: @:@:::::@:::::@::@@@@:@@::::@:::::@#:
         | 
| 533 | 
            +
                  |            @  ::::::::@:::@:::::: @:@:::::@:::::@::@@@@:@@::::@:::::@#:
         | 
| 534 | 
            +
                  |            @  ::::::::@:::@:::::: @:@:::::@:::::@::@@@@:@@::::@:::::@#:
         | 
| 535 | 
            +
                  |            @  ::::::::@:::@:::::: @:@:::::@:::::@::@@@@:@@::::@:::::@#:
         | 
| 536 | 
            +
                  |            @  ::::::::@:::@:::::: @:@:::::@:::::@::@@@@:@@::::@:::::@#:
         | 
| 537 | 
            +
                  |            @  ::::::::@:::@:::::: @:@:::::@:::::@::@@@@:@@::::@:::::@#:
         | 
| 538 | 
            +
                  |            @  ::::::::@:::@:::::: @:@:::::@:::::@::@@@@:@@::::@:::::@#:
         | 
| 539 | 
            +
                  |            @  ::::::::@:::@:::::: @:@:::::@:::::@::@@@@:@@::::@:::::@#:
         | 
| 540 | 
            +
                0 +----------------------------------------------------------------------->Mi
         | 
| 541 | 
            +
                  0                                                                   1.160
         | 
| 542 | 
            +
             | 
| 543 | 
            +
            = massif
         | 
| 544 | 
            +
              microruby -e 'puts "Hello World"'
         | 
| 545 | 
            +
             | 
| 546 | 
            +
                  KB
         | 
| 547 | 
            +
              88.05^                                                                     :
         | 
| 548 | 
            +
                  |                                                              @  :::#:::
         | 
| 549 | 
            +
                  |                                                       :::::::@:::::#:::
         | 
| 550 | 
            +
                  |                                                    ::::: ::: @:::::#:::
         | 
| 551 | 
            +
                  |                                      :@@:@@:@@:@::::: :: ::: @:::::#:::
         | 
| 552 | 
            +
                  |                                  :::::@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 553 | 
            +
                  |                       :@@:@@:::::::: :@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 554 | 
            +
                  |            @@@:::::::::@ :@ :: : ::: :@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 555 | 
            +
                  |            @  :: : :: :@ :@ :: : ::: :@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 556 | 
            +
                  |            @  :: : :: :@ :@ :: : ::: :@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 557 | 
            +
                  |            @  :: : :: :@ :@ :: : ::: :@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 558 | 
            +
                  |            @  :: : :: :@ :@ :: : ::: :@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 559 | 
            +
                  |            @  :: : :: :@ :@ :: : ::: :@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 560 | 
            +
                  |            @  :: : :: :@ :@ :: : ::: :@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 561 | 
            +
                  |            @  :: : :: :@ :@ :: : ::: :@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 562 | 
            +
                  |            @  :: : :: :@ :@ :: : ::: :@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 563 | 
            +
                  |            @  :: : :: :@ :@ :: : ::: :@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 564 | 
            +
                  |            @  :: : :: :@ :@ :: : ::: :@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 565 | 
            +
                  |            @  :: : :: :@ :@ :: : ::: :@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 566 | 
            +
                  |            @  :: : :: :@ :@ :: : ::: :@ :@@:@ :@::::: :: ::: @:::::#:::
         | 
| 567 | 
            +
                0 +----------------------------------------------------------------------->Mi
         | 
| 568 | 
            +
                  0                                                                   1.174
         | 
| 569 | 
            +
             | 
| 570 | 
            +
            = massif
         | 
| 571 | 
            +
              picoruby -e 'puts "Hello World"'
         | 
| 572 | 
            +
             | 
| 573 | 
            +
                  KB
         | 
| 574 | 
            +
              10.86^                                                                      #
         | 
| 575 | 
            +
                   |                                                                      #
         | 
| 576 | 
            +
                   |                                                                      #
         | 
| 577 | 
            +
                   |                                                                      #
         | 
| 578 | 
            +
                   |                                                                @@    #
         | 
| 579 | 
            +
                   |                                                              ::@ ::@:#
         | 
| 580 | 
            +
                   |                                                              ::@ ::@:#
         | 
| 581 | 
            +
                   |       @                                                      ::@ ::@:#
         | 
| 582 | 
            +
                   |       @                                                      ::@ ::@:#
         | 
| 583 | 
            +
                   |       @                                                      ::@ ::@:#
         | 
| 584 | 
            +
                   |       @                                                      ::@ ::@:#
         | 
| 585 | 
            +
                   |       @                                                 :::  ::@ ::@:#
         | 
| 586 | 
            +
                   |       @                                               ::::   ::@ ::@:#
         | 
| 587 | 
            +
                   |       @                                              :: ::  :::@ ::@:#:
         | 
| 588 | 
            +
                   |       @::::                                         ::: :: ::::@ ::@:#:
         | 
| 589 | 
            +
                   |       @: ::                                        :::: :: ::::@ ::@:#:
         | 
| 590 | 
            +
                   |       @: ::                                        :::: :: ::::@ ::@:#:
         | 
| 591 | 
            +
                   |       @: ::         :                   :    ::    :::: :: ::::@ ::@:#:
         | 
| 592 | 
            +
                   |       @: ::     ::::::::::::::::@::::::::::@:: :: ::::: :: ::::@ ::@:#:
         | 
| 593 | 
            +
                   |       @: :::::::: ::::::: :::: :@: ::: ::: @:: :: ::::: :: ::::@ ::@:#:
         | 
| 594 | 
            +
                 0 +----------------------------------------------------------------------->ki
         | 
| 595 | 
            +
                   0                                                                   285.0
         | 
| 596 | 
            +
             | 
| 597 | 
            +
            = massif
         | 
| 598 | 
            +
              # (mruby|microruby|picoruby) \
         | 
| 599 | 
            +
              #  -e 'puts "Hello World"'
         | 
| 600 | 
            +
              ------------------------------------
         | 
| 601 | 
            +
                 mruby      MicroRuby    PicoRuby
         | 
| 602 | 
            +
              ====================================
         | 
| 603 | 
            +
                136.1 KB    88.05 KB     10.86 KB
         | 
| 604 | 
            +
              ------------------------------------
         | 
| 605 | 
            +
             | 
| 606 | 
            +
            (('tag:center'))
         | 
| 607 | 
            +
            (Note)
         | 
| 608 | 
            +
            \n
         | 
| 609 | 
            +
            All the figures on 64-bit architecture with glibc
         | 
| 610 | 
            +
            \n
         | 
| 611 | 
            +
            They're probably 25-35% smaller on 32-bit
         | 
| 612 | 
            +
             | 
| 613 | 
            +
            = chapter
         | 
| 614 | 
            +
            episode iii?
         | 
| 615 | 
            +
            == prop
         | 
| 616 | 
            +
            : hide-title
         | 
| 617 | 
            +
               true
         | 
| 618 | 
            +
             | 
| 619 | 
            +
            = Episode Ⅲ?
         | 
| 620 | 
            +
              * Struct "mrb_context" now bothers me
         | 
| 621 | 
            +
                * Holds information like local variables so to IRB work
         | 
| 622 | 
            +
             | 
| 623 | 
            +
            = Episode Ⅲ?
         | 
| 624 | 
            +
              * Struct "mrb_context" now bothers me
         | 
| 625 | 
            +
                * Holds information like local variables so to IRB work
         | 
| 626 | 
            +
                * Hard to handle due to intricate dependency among mrb_state, mrb_context and mrb_irep
         | 
| 627 | 
            +
             | 
| 628 | 
            +
            = Episode Ⅲ?
         | 
| 629 | 
            +
              * Struct "mrb_context" now bothers me
         | 
| 630 | 
            +
                * Holds information like local variables so to IRB work
         | 
| 631 | 
            +
                * Hard to handle due to intricate dependency among mrb_state, mrb_context and mrb_irep
         | 
| 632 | 
            +
                * PicoRuby compiler doesn't want to include mruby's header files
         | 
| 633 | 
            +
             | 
| 634 | 
            +
            = Episode Ⅲ?
         | 
| 635 | 
            +
              * Struct "mrb_context" now bothers me
         | 
| 636 | 
            +
                * Holds information like local variables so to IRB work
         | 
| 637 | 
            +
                * Hard to handle due to intricate dependency among mrb_state, mrb_context and mrb_irep
         | 
| 638 | 
            +
                * PicoRuby compiler doesn't want to include mruby's header files
         | 
| 639 | 
            +
              * Possible solutions:\n
         | 
| 640 | 
            +
                1. Fixing mruby\n
         | 
| 641 | 
            +
                2. Fixing PicoRuby compiler to make an IREP that can be cast into mrb_irep
         | 
| 642 | 
            +
             | 
| 643 | 
            +
            = Episode Ⅲ?
         | 
| 644 | 
            +
            (('tag:center'))
         | 
| 645 | 
            +
            (('tag:large:\\n\\n'))
         | 
| 646 | 
            +
            (('tag:xx-large'))
         | 
| 647 | 
            +
            THE IREP STRIKES BACK
         | 
| 648 | 
            +
            == prop
         | 
| 649 | 
            +
            : hide-title
         | 
| 650 | 
            +
               true
         | 
| 651 | 
            +
             | 
| 652 | 
            +
            = chapter
         | 
| 653 | 
            +
            we're hiring!
         | 
| 654 | 
            +
              # image
         | 
| 655 | 
            +
              # src = images/Monstarlab_Logo_Yellow_CMYK.png
         | 
| 656 | 
            +
              # relative_width = 30
         | 
| 657 | 
            +
              # relative_margin_top = 1
         | 
| 658 | 
            +
            == prop
         | 
| 659 | 
            +
            : hide-title
         | 
| 660 | 
            +
               true
         | 
| 661 | 
            +
             | 
| 662 | 
            +
            = chapter
         | 
| 663 | 
            +
            (('tag:x-large:may the source\\nbe with you'))
         | 
| 664 | 
            +
            == prop
         | 
| 665 | 
            +
            : hide-title
         | 
| 666 | 
            +
               true
         | 
    
        data/README.rd
    ADDED
    
    | @@ -0,0 +1,24 @@ | |
| 1 | 
            +
            = PicoRuby epsode 2
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            Presentation slide for Ruby Association Grant 2021 Report
         | 
| 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-RAGrant2021Report
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            === Show
         | 
| 22 | 
            +
             | 
| 23 | 
            +
              rabbit rabbit-slide-hasumikin-RAGrant2021Report.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: RAGrant2021Report
         | 
| 3 | 
            +
            base_name: PicoRuby_ep2
         | 
| 4 | 
            +
            tags:
         | 
| 5 | 
            +
              - PicoRuby
         | 
| 6 | 
            +
              - MicroRuby
         | 
| 7 | 
            +
              - mruby
         | 
| 8 | 
            +
            presentation_date: '2022-07-12'
         | 
| 9 | 
            +
            presentation_start_time: 
         | 
| 10 | 
            +
            presentation_end_time: 
         | 
| 11 | 
            +
            version: 2022.7.12.0
         | 
| 12 | 
            +
            licenses: ["MIT License"]
         | 
| 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: 
         | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
    
        data/images/hasumi.jpg
    ADDED
    
    | Binary file | 
    
        data/images/mark_g.png
    ADDED
    
    | Binary file | 
    
        data/images/mark_y.png
    ADDED
    
    | Binary file | 
    
        data/images/matz.jpg
    ADDED
    
    | Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
    
        data/theme.rb
    ADDED
    
    | @@ -0,0 +1,172 @@ | |
| 1 | 
            +
            # puts font_families.sort
         | 
| 2 | 
            +
            @xxx_large_font_size = screen_size(22 * Pango::SCALE)
         | 
| 3 | 
            +
            @xx_large_font_size = screen_size(16 * Pango::SCALE)
         | 
| 4 | 
            +
            @x_large_font_size = screen_size(12 * Pango::SCALE)
         | 
| 5 | 
            +
            @large_font_size = screen_size(6 * Pango::SCALE)
         | 
| 6 | 
            +
            @normal_font_size = screen_size(4.5 * Pango::SCALE)
         | 
| 7 | 
            +
            @small_font_size = screen_size(4 * Pango::SCALE)
         | 
| 8 | 
            +
            @x_small_font_size = screen_size(3.5 * Pango::SCALE)
         | 
| 9 | 
            +
            @xx_small_font_size = screen_size(3 * Pango::SCALE)
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            @font_family = find_font_family('Franklin Gothic Medium')
         | 
| 12 | 
            +
            @monospace_font_family = 'Ricty Discord'
         | 
| 13 | 
            +
            @title_font_family = find_font_family('Star Jedi Hollow')
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            @default_headline_line_color = '#ffff00'
         | 
| 16 | 
            +
            @default_headline_line_width = 2
         | 
| 17 | 
            +
            @default_headline_line_expand = false
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            @default_emphasis_color = "#ff0000"
         | 
| 20 | 
            +
            @default_emphasis_level2_color = "#ffffff"
         | 
| 21 | 
            +
             | 
| 22 | 
            +
            set_graffiti_color "#FF2B22"
         | 
| 23 | 
            +
            set_graffiti_line_width 5
         | 
| 24 | 
            +
             | 
| 25 | 
            +
            #@table_frame_color = "#ffffff"
         | 
| 26 | 
            +
            #@table_fill_color = "#0f0428"
         | 
| 27 | 
            +
            #@table_body_frame_color = "#ffffff"
         | 
| 28 | 
            +
            #@table_body_fill_color = "#3f3468"
         | 
| 29 | 
            +
            #@table_head_frame_color = "#ffffff"
         | 
| 30 | 
            +
            #@table_head_fill_color = "#rf0428"
         | 
| 31 | 
            +
             | 
| 32 | 
            +
            @preformatted_fill_color = '#000000'
         | 
| 33 | 
            +
            # @preformatted_centering = true
         | 
| 34 | 
            +
            @space = screen_y(1)
         | 
| 35 | 
            +
             | 
| 36 | 
            +
            # @margin_left = 300
         | 
| 37 | 
            +
             | 
| 38 | 
            +
            @image_slide_number_start_flag_color = "#53575a"
         | 
| 39 | 
            +
            @image_slide_number_goal_flag_color = "#a81313"
         | 
| 40 | 
            +
             | 
| 41 | 
            +
            #@slide_headline_hide = true
         | 
| 42 | 
            +
             | 
| 43 | 
            +
            @slide_background_image = 'images/star-background.jpg'
         | 
| 44 | 
            +
            include_theme("slide-background-image")
         | 
| 45 | 
            +
             | 
| 46 | 
            +
            @title_slide_background_image = 'images/star-background.jpg'
         | 
| 47 | 
            +
            include_theme("title-slide-background-image")
         | 
| 48 | 
            +
             | 
| 49 | 
            +
            include_theme('default')
         | 
| 50 | 
            +
             | 
| 51 | 
            +
            match(Slide, HeadLine) do |heads|
         | 
| 52 | 
            +
              #heads.prop_set("size", 0)
         | 
| 53 | 
            +
              heads.prop_set("weight", "normal")
         | 
| 54 | 
            +
              set_font_family(heads)
         | 
| 55 | 
            +
            end
         | 
| 56 | 
            +
            match(Slide) do |slides|
         | 
| 57 | 
            +
              slides.prop_set("foreground", "#ffff00")
         | 
| 58 | 
            +
            end
         | 
| 59 | 
            +
             | 
| 60 | 
            +
            match TitleSlide do |slides|
         | 
| 61 | 
            +
              slides.margin_left = @margin_right
         | 
| 62 | 
            +
              slides.prop_set("foreground", "#ffff00")
         | 
| 63 | 
            +
            end
         | 
| 64 | 
            +
            match TitleSlide, Title do |title|
         | 
| 65 | 
            +
              title.margin_top = -100
         | 
| 66 | 
            +
              title.prop_set "size", @xxx_large_font_size
         | 
| 67 | 
            +
              title.prop_set "font-family", @title_font_family
         | 
| 68 | 
            +
              title.prop_set "weight", "normal"
         | 
| 69 | 
            +
            end
         | 
| 70 | 
            +
            match TitleSlide, Subtitle do |subtitle|
         | 
| 71 | 
            +
              subtitle.margin_top = -270
         | 
| 72 | 
            +
              subtitle.prop_set "size", @xxx_large_font_size
         | 
| 73 | 
            +
              subtitle.prop_set "font-family", @title_font_family
         | 
| 74 | 
            +
            end
         | 
| 75 | 
            +
            match TitleSlide, Author do |authors|
         | 
| 76 | 
            +
              authors.margin_top = -35
         | 
| 77 | 
            +
            end
         | 
| 78 | 
            +
            match TitleSlide, ContentSource do |cs|
         | 
| 79 | 
            +
              cs.margin_top = 30
         | 
| 80 | 
            +
              cs.prop_set "size", @xx_small_font_size
         | 
| 81 | 
            +
              cs.prop_set "style", "normal"
         | 
| 82 | 
            +
            end
         | 
| 83 | 
            +
            match TitleSlide, Date do |date|
         | 
| 84 | 
            +
              date.prop_set "size", @xx_small_font_size
         | 
| 85 | 
            +
              date.prop_set "style", "normal"
         | 
| 86 | 
            +
            end
         | 
| 87 | 
            +
            match TitleSlide, Institution do |i|
         | 
| 88 | 
            +
              i.prop_set "size", @xx_small_font_size
         | 
| 89 | 
            +
              i.prop_set "style", "normal"
         | 
| 90 | 
            +
            end
         | 
| 91 | 
            +
             | 
| 92 | 
            +
            #@slide_logo_image = 'images/mark_g.png'
         | 
| 93 | 
            +
            #include_theme('slide-logo')
         | 
| 94 | 
            +
             | 
| 95 | 
            +
            @item_image_1 = 'images/r2d2_icon-icons.com_76952.png'
         | 
| 96 | 
            +
            @item_image_2 = 'images/c3p0_icon-icons.com_76936.png'
         | 
| 97 | 
            +
            @item_image_3 = 'images/ewok_icon-icons.com_76943.png'
         | 
| 98 | 
            +
             | 
| 99 | 
            +
            include_theme("default-item-mark")
         | 
| 100 | 
            +
             | 
| 101 | 
            +
            add_image_path("rabbit-images")
         | 
| 102 | 
            +
             | 
| 103 | 
            +
            slide_body = [Slide, Body]
         | 
| 104 | 
            +
            item_list_item = [ItemList, ItemListItem]
         | 
| 105 | 
            +
             | 
| 106 | 
            +
            indent = 30
         | 
| 107 | 
            +
             | 
| 108 | 
            +
            match(*(slide_body + (item_list_item * 1))) do |items|
         | 
| 109 | 
            +
              name = "item1"
         | 
| 110 | 
            +
              items.delete_pre_draw_proc_by_name(name)
         | 
| 111 | 
            +
              items.delete_post_draw_proc_by_name(name)
         | 
| 112 | 
            +
              draw_image_mark(items, @item_image_1, name, indent: indent)
         | 
| 113 | 
            +
            end
         | 
| 114 | 
            +
             | 
| 115 | 
            +
            match(*(slide_body + (item_list_item * 2))) do |items|
         | 
| 116 | 
            +
              name = "item2"
         | 
| 117 | 
            +
              items.delete_pre_draw_proc_by_name(name)
         | 
| 118 | 
            +
              items.delete_post_draw_proc_by_name(name)
         | 
| 119 | 
            +
              draw_image_mark(items, @item_image_2, name, indent: indent)
         | 
| 120 | 
            +
            end
         | 
| 121 | 
            +
             | 
| 122 | 
            +
            match(*(slide_body + (item_list_item * 3))) do |items|
         | 
| 123 | 
            +
              name = "item3"
         | 
| 124 | 
            +
              items.delete_pre_draw_proc_by_name(name)
         | 
| 125 | 
            +
              items.delete_post_draw_proc_by_name(name)
         | 
| 126 | 
            +
              draw_image_mark(items, @item_image_3, name, indent: indent)
         | 
| 127 | 
            +
            end
         | 
| 128 | 
            +
             | 
| 129 | 
            +
            enum_list_item = [EnumList, EnumListItem]
         | 
| 130 | 
            +
             | 
| 131 | 
            +
            match(*(slide_body + enum_list_item + item_list_item)) do |items|
         | 
| 132 | 
            +
              name = "enum-item1"
         | 
| 133 | 
            +
              items.delete_pre_draw_proc_by_name(name)
         | 
| 134 | 
            +
              items.delete_post_draw_proc_by_name(name)
         | 
| 135 | 
            +
              draw_image_mark(items, @item_image_1, name, indent: indent)
         | 
| 136 | 
            +
            end
         | 
| 137 | 
            +
             | 
| 138 | 
            +
            match(*(slide_body + enum_list_item + (item_list_item * 2))) do |items|
         | 
| 139 | 
            +
              name = "enum-item2"
         | 
| 140 | 
            +
              items.delete_pre_draw_proc_by_name(name)
         | 
| 141 | 
            +
              items.delete_post_draw_proc_by_name(name)
         | 
| 142 | 
            +
              draw_image_mark(items, @item_image_2, name, indent: indent)
         | 
| 143 | 
            +
            end
         | 
| 144 | 
            +
             | 
| 145 | 
            +
            # table
         | 
| 146 | 
            +
            all_table = ["**", Table]
         | 
| 147 | 
            +
            match(*(all_table + [TableBody, TableRow, TableCell])) do |cells|
         | 
| 148 | 
            +
              set_font_family(cells, @monospace_font_family)
         | 
| 149 | 
            +
            end
         | 
| 150 | 
            +
            match(*(all_table + [TableHead, TableRow, TableHeader])) do |headers|
         | 
| 151 | 
            +
              set_font_family(headers, @monospace_font_family)
         | 
| 152 | 
            +
            end
         | 
| 153 | 
            +
             | 
| 154 | 
            +
            match("**", Emphasis, Emphasis) do |texts|
         | 
| 155 | 
            +
              texts.prop_set("foreground", @default_emphasis_level2_color)
         | 
| 156 | 
            +
              texts.prop_set("weight", "normal")
         | 
| 157 | 
            +
            end
         | 
| 158 | 
            +
             | 
| 159 | 
            +
            # Chapter
         | 
| 160 | 
            +
            match Slide do |slides|
         | 
| 161 | 
            +
              slides.each do |slide|
         | 
| 162 | 
            +
                if slide.match?(/chapter/)
         | 
| 163 | 
            +
                  set_font_family slide, @title_font_family
         | 
| 164 | 
            +
                  slide.prop_set "size", @xx_large_font_size
         | 
| 165 | 
            +
                  slide.horizontal_centering = true
         | 
| 166 | 
            +
                end
         | 
| 167 | 
            +
              end
         | 
| 168 | 
            +
            end
         | 
| 169 | 
            +
             | 
| 170 | 
            +
            match("**", PreformattedBlock) do |blocks|
         | 
| 171 | 
            +
              blocks.prop_set("foreground", "#00FFAF")
         | 
| 172 | 
            +
            end
         | 
    
        metadata
    ADDED
    
    | @@ -0,0 +1,82 @@ | |
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 | 
            +
            name: rabbit-slide-hasumikin-RAGrant2021Report
         | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 2022.7.12.0
         | 
| 5 | 
            +
            platform: ruby
         | 
| 6 | 
            +
            authors:
         | 
| 7 | 
            +
            - HASUMI Hitoshi
         | 
| 8 | 
            +
            autorequire:
         | 
| 9 | 
            +
            bindir: bin
         | 
| 10 | 
            +
            cert_chain: []
         | 
| 11 | 
            +
            date: 2022-11-10 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 Ruby Association Grant 2021 Report
         | 
| 28 | 
            +
            email:
         | 
| 29 | 
            +
            - hasumikin@gmail.com
         | 
| 30 | 
            +
            executables: []
         | 
| 31 | 
            +
            extensions: []
         | 
| 32 | 
            +
            extra_rdoc_files: []
         | 
| 33 | 
            +
            files:
         | 
| 34 | 
            +
            - ".rabbit"
         | 
| 35 | 
            +
            - PicoRuby_ep2.rab
         | 
| 36 | 
            +
            - README.rd
         | 
| 37 | 
            +
            - Rakefile
         | 
| 38 | 
            +
            - config.yaml
         | 
| 39 | 
            +
            - images/Monstarlab_Logo_Grey_CMYK.png
         | 
| 40 | 
            +
            - images/Monstarlab_Logo_Yellow_CMYK.png
         | 
| 41 | 
            +
            - images/architecture_1.png
         | 
| 42 | 
            +
            - images/architecture_2.png
         | 
| 43 | 
            +
            - images/architecture_3.png
         | 
| 44 | 
            +
            - images/c3p0_icon-icons.com_76936.png
         | 
| 45 | 
            +
            - images/ewok_icon-icons.com_76943.png
         | 
| 46 | 
            +
            - images/hasumi.jpg
         | 
| 47 | 
            +
            - images/mark_g.png
         | 
| 48 | 
            +
            - images/mark_y.png
         | 
| 49 | 
            +
            - images/matz.jpg
         | 
| 50 | 
            +
            - images/r2d2_icon-icons.com_76952.png
         | 
| 51 | 
            +
            - images/rubyconf_1.png
         | 
| 52 | 
            +
            - images/rubyconf_2.png
         | 
| 53 | 
            +
            - images/rubykaigi_1.png
         | 
| 54 | 
            +
            - images/rubykaigi_2.png
         | 
| 55 | 
            +
            - images/star-background.jpg
         | 
| 56 | 
            +
            - images/title-background.png
         | 
| 57 | 
            +
            - pdf/RAGrant2021Report-PicoRuby_ep2.pdf
         | 
| 58 | 
            +
            - theme.rb
         | 
| 59 | 
            +
            homepage: https://slide.rabbit-shocker.org/authors/hasumikin/RAGrant2021Report/
         | 
| 60 | 
            +
            licenses:
         | 
| 61 | 
            +
            - MIT License
         | 
| 62 | 
            +
            metadata: {}
         | 
| 63 | 
            +
            post_install_message:
         | 
| 64 | 
            +
            rdoc_options: []
         | 
| 65 | 
            +
            require_paths:
         | 
| 66 | 
            +
            - lib
         | 
| 67 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 68 | 
            +
              requirements:
         | 
| 69 | 
            +
              - - ">="
         | 
| 70 | 
            +
                - !ruby/object:Gem::Version
         | 
| 71 | 
            +
                  version: '0'
         | 
| 72 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 73 | 
            +
              requirements:
         | 
| 74 | 
            +
              - - ">="
         | 
| 75 | 
            +
                - !ruby/object:Gem::Version
         | 
| 76 | 
            +
                  version: '0'
         | 
| 77 | 
            +
            requirements: []
         | 
| 78 | 
            +
            rubygems_version: 3.3.7
         | 
| 79 | 
            +
            signing_key:
         | 
| 80 | 
            +
            specification_version: 4
         | 
| 81 | 
            +
            summary: PicoRuby epsode 2
         | 
| 82 | 
            +
            test_files: []
         |