nabaztag_hack_kit 0.1.0.beta3 → 0.1.0.beta8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +7 -2
  3. data/.gitmodules +3 -0
  4. data/.travis.yml +2 -2
  5. data/CHANGELOG.md +17 -2
  6. data/LICENSE +21 -0
  7. data/README.md +115 -44
  8. data/Rakefile +2 -6
  9. data/bytecode/{Commands.md → _docs/commands.md} +0 -0
  10. data/bytecode/{Docs.md → _docs/grammar.md} +0 -0
  11. data/bytecode/_docs/grammar.pdf +0 -0
  12. data/bytecode/{src → _original}/README.md +0 -0
  13. data/bytecode/{src → _original}/lib/arp.mtl +0 -0
  14. data/bytecode/{src → _original}/lib/cfg.mtl +0 -0
  15. data/bytecode/{src → _original}/lib/choreos.mtl +0 -0
  16. data/bytecode/{src → _original}/lib/dhcp.mtl +0 -0
  17. data/bytecode/{src → _original}/lib/dns.mtl +0 -0
  18. data/bytecode/{src → _original}/lib/http.mtl +0 -0
  19. data/bytecode/{src → _original}/lib/tcp.mtl +0 -0
  20. data/bytecode/{src → _original}/lib/udp.mtl +0 -0
  21. data/bytecode/{src → _original}/lib/util.mtl +0 -0
  22. data/bytecode/{src → _original}/lib/var.mtl +0 -0
  23. data/bytecode/{src → _original}/lib/wav.mtl +0 -0
  24. data/bytecode/{src → _original}/lib/wifi.mtl +0 -0
  25. data/bytecode/{src → _original}/nominal-ping.mtl +0 -0
  26. data/bytecode/main.mtl +11 -11
  27. data/bytecode/test/test.mtl +8 -8
  28. data/examples/basic/Gemfile +1 -3
  29. data/examples/basic/config.ru +14 -4
  30. data/examples/record/Gemfile +0 -5
  31. data/examples/record/{config.ru.example → config.ru} +2 -2
  32. data/examples/record/server.rb +0 -2
  33. data/ext/Makefile +10 -0
  34. data/ext/bin/mtl_comp +29 -0
  35. data/{bytecode → ext}/bin/mtl_merge +0 -0
  36. data/ext/bin/mtl_simu +29 -0
  37. data/{bytecode/src/mtl → ext}/extconf.rb +0 -0
  38. data/ext/mtl_linux/.gitignore +7 -0
  39. data/ext/mtl_linux/LICENSE +21 -0
  40. data/ext/mtl_linux/Makefile +116 -0
  41. data/ext/mtl_linux/MetalC.project +196 -0
  42. data/ext/mtl_linux/conf.bin +0 -0
  43. data/{bytecode/src/mtl → ext/mtl_linux}/conf.bin.sans_password +0 -0
  44. data/{bytecode/src/mtl → ext/mtl_linux}/config.txt +0 -0
  45. data/ext/mtl_linux/inc/log.h +21 -0
  46. data/{bytecode/src/mtl → ext/mtl_linux/inc}/properties.h +0 -0
  47. data/{bytecode/src/mtl/linux_simuaudio.h → ext/mtl_linux/inc/simu/linux/simuaudio.h} +0 -0
  48. data/{bytecode/src/mtl/linux_simunet.h → ext/mtl_linux/inc/simu/linux/simunet.h} +0 -0
  49. data/{bytecode/src/mtl → ext/mtl_linux/inc/simu/win}/simuaudio.h +18 -18
  50. data/{bytecode/src/mtl → ext/mtl_linux/inc/simu/win}/simunet.h +0 -0
  51. data/ext/mtl_linux/inc/vcomp/compiler.h +200 -0
  52. data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/file.h +11 -11
  53. data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/filesystem.h +0 -0
  54. data/ext/mtl_linux/inc/vcomp/interpreter.h +121 -0
  55. data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/memory.h +120 -92
  56. data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/param.h +0 -0
  57. data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/parser.h +27 -27
  58. data/ext/mtl_linux/inc/vcomp/prodbuffer.h +42 -0
  59. data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/resource.h +1 -1
  60. data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/terminal.h +8 -8
  61. data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/util.h +7 -7
  62. data/{bytecode/src/mtl → ext/mtl_linux/inc/vm}/vaudio.h +0 -0
  63. data/{bytecode/src/mtl → ext/mtl_linux/inc/vm}/vbc.h +1 -1
  64. data/ext/mtl_linux/inc/vm/vbc_str.h +167 -0
  65. data/{bytecode/src/mtl → ext/mtl_linux/inc/vm}/vinterp.h +0 -0
  66. data/{bytecode/src/mtl → ext/mtl_linux/inc/vm}/vloader.h +0 -0
  67. data/{bytecode/src/mtl → ext/mtl_linux/inc/vm}/vlog.h +0 -0
  68. data/{bytecode/src/mtl → ext/mtl_linux/inc/vm}/vmem.h +0 -0
  69. data/{bytecode/src/mtl → ext/mtl_linux/inc/vm}/vnet.h +0 -0
  70. data/ext/mtl_linux/nominal.mtl +3959 -0
  71. data/ext/mtl_linux/src/comp/main.cpp +123 -0
  72. data/ext/mtl_linux/src/simu/dumpbc.c +2566 -0
  73. data/ext/mtl_linux/src/simu/linux/main.cpp +288 -0
  74. data/ext/mtl_linux/src/simu/linux/simu.c +309 -0
  75. data/ext/mtl_linux/src/simu/linux/simuaudio.c +44 -0
  76. data/ext/mtl_linux/src/simu/linux/simunet.c +707 -0
  77. data/ext/mtl_linux/src/simu/log.c +340 -0
  78. data/ext/mtl_linux/src/simu/properties.c +368 -0
  79. data/{bytecode/src/mtl → ext/mtl_linux/src/simu/win}/mp3/GTKANAL.H +0 -0
  80. data/{bytecode/src/mtl → ext/mtl_linux/src/simu/win}/mp3/LAYER3.C +0 -0
  81. data/{bytecode/src/mtl → ext/mtl_linux/src/simu/win}/mp3/TABINIT.C +0 -0
  82. data/ext/mtl_linux/src/simu/win/mp3/common.c +302 -0
  83. data/ext/mtl_linux/src/simu/win/mp3/dct64_i386.c +316 -0
  84. data/ext/mtl_linux/src/simu/win/mp3/decode_i386.c +160 -0
  85. data/ext/mtl_linux/src/simu/win/mp3/huffman.h +332 -0
  86. data/ext/mtl_linux/src/simu/win/mp3/interface.c +276 -0
  87. data/{bytecode/src/mtl → ext/mtl_linux/src/simu/win}/mp3/mpg123.h +34 -30
  88. data/ext/mtl_linux/src/simu/win/mp3/mpglib.h +47 -0
  89. data/ext/mtl_linux/src/simu/win/simu.c +819 -0
  90. data/ext/mtl_linux/src/simu/win/simuaudio.c +787 -0
  91. data/ext/mtl_linux/src/simu/win/simunet.c +489 -0
  92. data/ext/mtl_linux/src/vcomp/bootstrap.cpp +95 -0
  93. data/ext/mtl_linux/src/vcomp/compiler.cpp +587 -0
  94. data/ext/mtl_linux/src/vcomp/compiler_file.cpp +1253 -0
  95. data/ext/mtl_linux/src/vcomp/compiler_prog.cpp +437 -0
  96. data/ext/mtl_linux/src/vcomp/compiler_term.cpp +1500 -0
  97. data/ext/mtl_linux/src/vcomp/compiler_type.cpp +1238 -0
  98. data/ext/mtl_linux/src/vcomp/compiler_var.cpp +502 -0
  99. data/ext/mtl_linux/src/vcomp/file.cpp +100 -0
  100. data/ext/mtl_linux/src/vcomp/interpreter.cpp +93 -0
  101. data/ext/mtl_linux/src/vcomp/memory.cpp +313 -0
  102. data/ext/mtl_linux/src/vcomp/parser.cpp +584 -0
  103. data/ext/mtl_linux/src/vcomp/parser_xml.cpp +137 -0
  104. data/{bytecode/src/mtl → ext/mtl_linux/src}/vcomp/prodbuffer.cpp +57 -36
  105. data/ext/mtl_linux/src/vcomp/stdlib_core.cpp +130 -0
  106. data/ext/mtl_linux/src/vcomp/terminal.cpp +80 -0
  107. data/{bytecode/src/mtl → ext/mtl_linux/src}/vcomp/util.cpp +18 -11
  108. data/ext/mtl_linux/src/vm/vaudio.c +830 -0
  109. data/ext/mtl_linux/src/vm/vinterp.c +1780 -0
  110. data/ext/mtl_linux/src/vm/vloader.c +139 -0
  111. data/ext/mtl_linux/src/vm/vlog.c +782 -0
  112. data/ext/mtl_linux/src/vm/vmem.c +461 -0
  113. data/ext/mtl_linux/src/vm/vnet.c +298 -0
  114. data/{bytecode/src/mtl → ext/mtl_linux}/utils/correct_const.sh +0 -0
  115. data/lib/nabaztag_hack_kit/server.rb +4 -7
  116. data/lib/nabaztag_hack_kit/version.rb +1 -1
  117. data/lib/nabaztag_hack_kit.rb +2 -2
  118. data/nabaztag_hack_kit.gemspec +10 -11
  119. data/spec/integration/server_spec.rb +3 -3
  120. data/spec/spec_helper.rb +2 -0
  121. data/spec/unit/message_spec.rb +12 -18
  122. data/spec/unit/server_spec.rb +13 -10
  123. metadata +145 -137
  124. data/bytecode/bin/mtl_comp +0 -50
  125. data/bytecode/bin/mtl_simu +0 -49
  126. data/bytecode/src/mtl/Makefile +0 -42
  127. data/bytecode/src/mtl/README.md +0 -13
  128. data/bytecode/src/mtl/bc.cpp +0 -1891
  129. data/bytecode/src/mtl/dumpbc.c +0 -2566
  130. data/bytecode/src/mtl/linux_simu.c +0 -271
  131. data/bytecode/src/mtl/linux_simuaudio.c +0 -16
  132. data/bytecode/src/mtl/linux_simunet.c +0 -620
  133. data/bytecode/src/mtl/log.c +0 -297
  134. data/bytecode/src/mtl/log.h +0 -20
  135. data/bytecode/src/mtl/main_compiler.cpp +0 -104
  136. data/bytecode/src/mtl/main_simu.cpp +0 -221
  137. data/bytecode/src/mtl/mp3/common.c +0 -265
  138. data/bytecode/src/mtl/mp3/dct64_i386.c +0 -316
  139. data/bytecode/src/mtl/mp3/decode_i386.c +0 -155
  140. data/bytecode/src/mtl/mp3/huffman.h +0 -332
  141. data/bytecode/src/mtl/mp3/interface.c +0 -258
  142. data/bytecode/src/mtl/mp3/mpglib.h +0 -44
  143. data/bytecode/src/mtl/properties.c +0 -293
  144. data/bytecode/src/mtl/simu.c +0 -750
  145. data/bytecode/src/mtl/simuaudio.c +0 -662
  146. data/bytecode/src/mtl/simunet.c +0 -400
  147. data/bytecode/src/mtl/vaudio.c +0 -677
  148. data/bytecode/src/mtl/vbc_str.h +0 -166
  149. data/bytecode/src/mtl/vcomp/Makefile +0 -29
  150. data/bytecode/src/mtl/vcomp/bootstrap.cpp +0 -89
  151. data/bytecode/src/mtl/vcomp/compiler.cpp +0 -470
  152. data/bytecode/src/mtl/vcomp/compiler.h +0 -200
  153. data/bytecode/src/mtl/vcomp/compiler_file.cpp +0 -929
  154. data/bytecode/src/mtl/vcomp/compiler_prog.cpp +0 -250
  155. data/bytecode/src/mtl/vcomp/compiler_term.cpp +0 -1053
  156. data/bytecode/src/mtl/vcomp/compiler_type.cpp +0 -872
  157. data/bytecode/src/mtl/vcomp/compiler_var.cpp +0 -289
  158. data/bytecode/src/mtl/vcomp/file.cpp +0 -79
  159. data/bytecode/src/mtl/vcomp/interpreter.cpp +0 -85
  160. data/bytecode/src/mtl/vcomp/interpreter.h +0 -121
  161. data/bytecode/src/mtl/vcomp/memory.cpp +0 -241
  162. data/bytecode/src/mtl/vcomp/parser.cpp +0 -427
  163. data/bytecode/src/mtl/vcomp/parser_xml.cpp +0 -124
  164. data/bytecode/src/mtl/vcomp/prodbuffer.h +0 -42
  165. data/bytecode/src/mtl/vcomp/stdlib_core.cpp +0 -122
  166. data/bytecode/src/mtl/vcomp/terminal.cpp +0 -73
  167. data/bytecode/src/mtl/vinterp.c +0 -1349
  168. data/bytecode/src/mtl/vloader.c +0 -127
  169. data/bytecode/src/mtl/vlog.c +0 -589
  170. data/bytecode/src/mtl/vmem.c +0 -424
  171. data/bytecode/src/mtl/vnet.c +0 -255
  172. data/examples/basic/Procfile +0 -2
  173. data/examples/basic/server.rb +0 -14
metadata CHANGED
@@ -1,104 +1,123 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nabaztag_hack_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.beta3
5
- prerelease: 6
4
+ version: 0.1.0.beta8
6
5
  platform: ruby
7
6
  authors:
8
7
  - RngTng - Tobias Bielohlawek
9
8
  autorequire:
10
- bindir: bytecode/bin
9
+ bindir: ext/bin
11
10
  cert_chain: []
12
- date: 2013-01-07 00:00:00.000000000 Z
11
+ date: 2017-12-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: sinatra
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
- version: '0'
19
+ version: '2.0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: '0'
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rack
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '2.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '2.0'
30
41
  - !ruby/object:Gem::Dependency
31
42
  name: rake
32
43
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
44
  requirements:
35
- - - ! '>='
45
+ - - ">="
36
46
  - !ruby/object:Gem::Version
37
- version: '0'
47
+ version: '11.2'
38
48
  type: :development
39
49
  prerelease: false
40
50
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
51
  requirements:
43
- - - ! '>='
52
+ - - ">="
44
53
  - !ruby/object:Gem::Version
45
- version: '0'
54
+ version: '11.2'
46
55
  - !ruby/object:Gem::Dependency
47
56
  name: rspec
48
57
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
58
  requirements:
51
- - - ! '>='
59
+ - - ">="
52
60
  - !ruby/object:Gem::Version
53
- version: '0'
61
+ version: '3.5'
54
62
  type: :development
55
63
  prerelease: false
56
64
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
65
  requirements:
59
- - - ! '>='
66
+ - - ">="
60
67
  - !ruby/object:Gem::Version
61
- version: '0'
68
+ version: '3.5'
62
69
  - !ruby/object:Gem::Dependency
63
70
  name: rack-test
64
71
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
72
  requirements:
67
- - - ! '>='
73
+ - - ">="
68
74
  - !ruby/object:Gem::Version
69
- version: '0'
75
+ version: '0.6'
70
76
  type: :development
71
77
  prerelease: false
72
78
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
79
  requirements:
75
- - - ! '>='
80
+ - - ">="
76
81
  - !ruby/object:Gem::Version
77
- version: '0'
82
+ version: '0.6'
78
83
  description: Sinatra server api framework to run custom bytecode on Nabaztag v1/v2.
79
84
  Sources + Compiler included (linux only)
80
85
  email:
81
- - tobi@soundcloud.com
86
+ - tobi@rngtng.com
82
87
  executables:
83
88
  - mtl_comp
84
89
  - mtl_simu
85
90
  - mtl_merge
86
91
  extensions:
87
- - bytecode/src/mtl/extconf.rb
92
+ - ext/extconf.rb
88
93
  extra_rdoc_files: []
89
94
  files:
90
- - .gitignore
91
- - .travis.yml
95
+ - ".gitignore"
96
+ - ".gitmodules"
97
+ - ".travis.yml"
92
98
  - CHANGELOG.md
93
99
  - Gemfile
100
+ - LICENSE
94
101
  - README.md
95
102
  - Rakefile
96
- - bytecode/Commands.md
97
- - bytecode/Docs.md
98
103
  - bytecode/Rakefile
99
- - bytecode/bin/mtl_comp
100
- - bytecode/bin/mtl_merge
101
- - bytecode/bin/mtl_simu
104
+ - bytecode/_docs/commands.md
105
+ - bytecode/_docs/grammar.md
106
+ - bytecode/_docs/grammar.pdf
107
+ - bytecode/_original/README.md
108
+ - bytecode/_original/lib/arp.mtl
109
+ - bytecode/_original/lib/cfg.mtl
110
+ - bytecode/_original/lib/choreos.mtl
111
+ - bytecode/_original/lib/dhcp.mtl
112
+ - bytecode/_original/lib/dns.mtl
113
+ - bytecode/_original/lib/http.mtl
114
+ - bytecode/_original/lib/tcp.mtl
115
+ - bytecode/_original/lib/udp.mtl
116
+ - bytecode/_original/lib/util.mtl
117
+ - bytecode/_original/lib/var.mtl
118
+ - bytecode/_original/lib/wav.mtl
119
+ - bytecode/_original/lib/wifi.mtl
120
+ - bytecode/_original/nominal-ping.mtl
102
121
  - bytecode/lib/buffer.mtl
103
122
  - bytecode/lib/button.mtl
104
123
  - bytecode/lib/data_helper.mtl
@@ -111,106 +130,96 @@ files:
111
130
  - bytecode/lib/record.mtl
112
131
  - bytecode/lib/rfid.mtl
113
132
  - bytecode/main.mtl
114
- - bytecode/src/README.md
115
- - bytecode/src/lib/arp.mtl
116
- - bytecode/src/lib/cfg.mtl
117
- - bytecode/src/lib/choreos.mtl
118
- - bytecode/src/lib/dhcp.mtl
119
- - bytecode/src/lib/dns.mtl
120
- - bytecode/src/lib/http.mtl
121
- - bytecode/src/lib/tcp.mtl
122
- - bytecode/src/lib/udp.mtl
123
- - bytecode/src/lib/util.mtl
124
- - bytecode/src/lib/var.mtl
125
- - bytecode/src/lib/wav.mtl
126
- - bytecode/src/lib/wifi.mtl
127
- - bytecode/src/mtl/Makefile
128
- - bytecode/src/mtl/README.md
129
- - bytecode/src/mtl/bc.cpp
130
- - bytecode/src/mtl/conf.bin.sans_password
131
- - bytecode/src/mtl/config.txt
132
- - bytecode/src/mtl/dumpbc.c
133
- - bytecode/src/mtl/extconf.rb
134
- - bytecode/src/mtl/linux_simu.c
135
- - bytecode/src/mtl/linux_simuaudio.c
136
- - bytecode/src/mtl/linux_simuaudio.h
137
- - bytecode/src/mtl/linux_simunet.c
138
- - bytecode/src/mtl/linux_simunet.h
139
- - bytecode/src/mtl/log.c
140
- - bytecode/src/mtl/log.h
141
- - bytecode/src/mtl/main_compiler.cpp
142
- - bytecode/src/mtl/main_simu.cpp
143
- - bytecode/src/mtl/mp3/GTKANAL.H
144
- - bytecode/src/mtl/mp3/LAYER3.C
145
- - bytecode/src/mtl/mp3/TABINIT.C
146
- - bytecode/src/mtl/mp3/common.c
147
- - bytecode/src/mtl/mp3/dct64_i386.c
148
- - bytecode/src/mtl/mp3/decode_i386.c
149
- - bytecode/src/mtl/mp3/huffman.h
150
- - bytecode/src/mtl/mp3/interface.c
151
- - bytecode/src/mtl/mp3/mpg123.h
152
- - bytecode/src/mtl/mp3/mpglib.h
153
- - bytecode/src/mtl/properties.c
154
- - bytecode/src/mtl/properties.h
155
- - bytecode/src/mtl/simu.c
156
- - bytecode/src/mtl/simuaudio.c
157
- - bytecode/src/mtl/simuaudio.h
158
- - bytecode/src/mtl/simunet.c
159
- - bytecode/src/mtl/simunet.h
160
- - bytecode/src/mtl/utils/correct_const.sh
161
- - bytecode/src/mtl/vaudio.c
162
- - bytecode/src/mtl/vaudio.h
163
- - bytecode/src/mtl/vbc.h
164
- - bytecode/src/mtl/vbc_str.h
165
- - bytecode/src/mtl/vcomp/Makefile
166
- - bytecode/src/mtl/vcomp/bootstrap.cpp
167
- - bytecode/src/mtl/vcomp/compiler.cpp
168
- - bytecode/src/mtl/vcomp/compiler.h
169
- - bytecode/src/mtl/vcomp/compiler_file.cpp
170
- - bytecode/src/mtl/vcomp/compiler_prog.cpp
171
- - bytecode/src/mtl/vcomp/compiler_term.cpp
172
- - bytecode/src/mtl/vcomp/compiler_type.cpp
173
- - bytecode/src/mtl/vcomp/compiler_var.cpp
174
- - bytecode/src/mtl/vcomp/file.cpp
175
- - bytecode/src/mtl/vcomp/file.h
176
- - bytecode/src/mtl/vcomp/filesystem.h
177
- - bytecode/src/mtl/vcomp/interpreter.cpp
178
- - bytecode/src/mtl/vcomp/interpreter.h
179
- - bytecode/src/mtl/vcomp/memory.cpp
180
- - bytecode/src/mtl/vcomp/memory.h
181
- - bytecode/src/mtl/vcomp/param.h
182
- - bytecode/src/mtl/vcomp/parser.cpp
183
- - bytecode/src/mtl/vcomp/parser.h
184
- - bytecode/src/mtl/vcomp/parser_xml.cpp
185
- - bytecode/src/mtl/vcomp/prodbuffer.cpp
186
- - bytecode/src/mtl/vcomp/prodbuffer.h
187
- - bytecode/src/mtl/vcomp/resource.h
188
- - bytecode/src/mtl/vcomp/stdlib_core.cpp
189
- - bytecode/src/mtl/vcomp/terminal.cpp
190
- - bytecode/src/mtl/vcomp/terminal.h
191
- - bytecode/src/mtl/vcomp/util.cpp
192
- - bytecode/src/mtl/vcomp/util.h
193
- - bytecode/src/mtl/vinterp.c
194
- - bytecode/src/mtl/vinterp.h
195
- - bytecode/src/mtl/vloader.c
196
- - bytecode/src/mtl/vloader.h
197
- - bytecode/src/mtl/vlog.c
198
- - bytecode/src/mtl/vlog.h
199
- - bytecode/src/mtl/vmem.c
200
- - bytecode/src/mtl/vmem.h
201
- - bytecode/src/mtl/vnet.c
202
- - bytecode/src/mtl/vnet.h
203
- - bytecode/src/nominal-ping.mtl
204
133
  - bytecode/test/helper.mtl
205
134
  - bytecode/test/native.mtl
206
135
  - bytecode/test/test.mtl
207
136
  - examples/basic/Gemfile
208
- - examples/basic/Procfile
209
137
  - examples/basic/config.ru
210
- - examples/basic/server.rb
211
138
  - examples/record/Gemfile
212
- - examples/record/config.ru.example
139
+ - examples/record/config.ru
213
140
  - examples/record/server.rb
141
+ - ext/Makefile
142
+ - ext/bin/mtl_comp
143
+ - ext/bin/mtl_merge
144
+ - ext/bin/mtl_simu
145
+ - ext/extconf.rb
146
+ - ext/mtl_linux/.gitignore
147
+ - ext/mtl_linux/LICENSE
148
+ - ext/mtl_linux/Makefile
149
+ - ext/mtl_linux/MetalC.project
150
+ - ext/mtl_linux/conf.bin
151
+ - ext/mtl_linux/conf.bin.sans_password
152
+ - ext/mtl_linux/config.txt
153
+ - ext/mtl_linux/inc/log.h
154
+ - ext/mtl_linux/inc/properties.h
155
+ - ext/mtl_linux/inc/simu/linux/simuaudio.h
156
+ - ext/mtl_linux/inc/simu/linux/simunet.h
157
+ - ext/mtl_linux/inc/simu/win/simuaudio.h
158
+ - ext/mtl_linux/inc/simu/win/simunet.h
159
+ - ext/mtl_linux/inc/vcomp/compiler.h
160
+ - ext/mtl_linux/inc/vcomp/file.h
161
+ - ext/mtl_linux/inc/vcomp/filesystem.h
162
+ - ext/mtl_linux/inc/vcomp/interpreter.h
163
+ - ext/mtl_linux/inc/vcomp/memory.h
164
+ - ext/mtl_linux/inc/vcomp/param.h
165
+ - ext/mtl_linux/inc/vcomp/parser.h
166
+ - ext/mtl_linux/inc/vcomp/prodbuffer.h
167
+ - ext/mtl_linux/inc/vcomp/resource.h
168
+ - ext/mtl_linux/inc/vcomp/terminal.h
169
+ - ext/mtl_linux/inc/vcomp/util.h
170
+ - ext/mtl_linux/inc/vm/vaudio.h
171
+ - ext/mtl_linux/inc/vm/vbc.h
172
+ - ext/mtl_linux/inc/vm/vbc_str.h
173
+ - ext/mtl_linux/inc/vm/vinterp.h
174
+ - ext/mtl_linux/inc/vm/vloader.h
175
+ - ext/mtl_linux/inc/vm/vlog.h
176
+ - ext/mtl_linux/inc/vm/vmem.h
177
+ - ext/mtl_linux/inc/vm/vnet.h
178
+ - ext/mtl_linux/nominal.mtl
179
+ - ext/mtl_linux/src/comp/main.cpp
180
+ - ext/mtl_linux/src/simu/dumpbc.c
181
+ - ext/mtl_linux/src/simu/linux/main.cpp
182
+ - ext/mtl_linux/src/simu/linux/simu.c
183
+ - ext/mtl_linux/src/simu/linux/simuaudio.c
184
+ - ext/mtl_linux/src/simu/linux/simunet.c
185
+ - ext/mtl_linux/src/simu/log.c
186
+ - ext/mtl_linux/src/simu/properties.c
187
+ - ext/mtl_linux/src/simu/win/mp3/GTKANAL.H
188
+ - ext/mtl_linux/src/simu/win/mp3/LAYER3.C
189
+ - ext/mtl_linux/src/simu/win/mp3/TABINIT.C
190
+ - ext/mtl_linux/src/simu/win/mp3/common.c
191
+ - ext/mtl_linux/src/simu/win/mp3/dct64_i386.c
192
+ - ext/mtl_linux/src/simu/win/mp3/decode_i386.c
193
+ - ext/mtl_linux/src/simu/win/mp3/huffman.h
194
+ - ext/mtl_linux/src/simu/win/mp3/interface.c
195
+ - ext/mtl_linux/src/simu/win/mp3/mpg123.h
196
+ - ext/mtl_linux/src/simu/win/mp3/mpglib.h
197
+ - ext/mtl_linux/src/simu/win/simu.c
198
+ - ext/mtl_linux/src/simu/win/simuaudio.c
199
+ - ext/mtl_linux/src/simu/win/simunet.c
200
+ - ext/mtl_linux/src/vcomp/bootstrap.cpp
201
+ - ext/mtl_linux/src/vcomp/compiler.cpp
202
+ - ext/mtl_linux/src/vcomp/compiler_file.cpp
203
+ - ext/mtl_linux/src/vcomp/compiler_prog.cpp
204
+ - ext/mtl_linux/src/vcomp/compiler_term.cpp
205
+ - ext/mtl_linux/src/vcomp/compiler_type.cpp
206
+ - ext/mtl_linux/src/vcomp/compiler_var.cpp
207
+ - ext/mtl_linux/src/vcomp/file.cpp
208
+ - ext/mtl_linux/src/vcomp/interpreter.cpp
209
+ - ext/mtl_linux/src/vcomp/memory.cpp
210
+ - ext/mtl_linux/src/vcomp/parser.cpp
211
+ - ext/mtl_linux/src/vcomp/parser_xml.cpp
212
+ - ext/mtl_linux/src/vcomp/prodbuffer.cpp
213
+ - ext/mtl_linux/src/vcomp/stdlib_core.cpp
214
+ - ext/mtl_linux/src/vcomp/terminal.cpp
215
+ - ext/mtl_linux/src/vcomp/util.cpp
216
+ - ext/mtl_linux/src/vm/vaudio.c
217
+ - ext/mtl_linux/src/vm/vinterp.c
218
+ - ext/mtl_linux/src/vm/vloader.c
219
+ - ext/mtl_linux/src/vm/vlog.c
220
+ - ext/mtl_linux/src/vm/vmem.c
221
+ - ext/mtl_linux/src/vm/vnet.c
222
+ - ext/mtl_linux/utils/correct_const.sh
214
223
  - lib/nabaztag_hack_kit.rb
215
224
  - lib/nabaztag_hack_kit/bunny.rb
216
225
  - lib/nabaztag_hack_kit/message.rb
@@ -232,29 +241,28 @@ files:
232
241
  - spec/spec_helper.rb
233
242
  - spec/unit/message_spec.rb
234
243
  - spec/unit/server_spec.rb
235
- homepage: https://github.com/rngtng/nabaztag_hack_kit
244
+ homepage: https://github.com/rngtng/NabaztagHackKit
236
245
  licenses: []
246
+ metadata: {}
237
247
  post_install_message:
238
248
  rdoc_options: []
239
249
  require_paths:
240
250
  - lib
241
251
  required_ruby_version: !ruby/object:Gem::Requirement
242
- none: false
243
252
  requirements:
244
- - - ! '>='
253
+ - - ">="
245
254
  - !ruby/object:Gem::Version
246
255
  version: '0'
247
256
  required_rubygems_version: !ruby/object:Gem::Requirement
248
- none: false
249
257
  requirements:
250
- - - ! '>'
258
+ - - ">"
251
259
  - !ruby/object:Gem::Version
252
260
  version: 1.3.1
253
261
  requirements: []
254
262
  rubyforge_project:
255
- rubygems_version: 1.8.24
263
+ rubygems_version: 2.5.1
256
264
  signing_key:
257
- specification_version: 3
265
+ specification_version: 4
258
266
  summary: Sinatra server to run custom Nabaztag bytecode
259
267
  test_files:
260
268
  - spec/integration/server_spec.rb
@@ -1,50 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- MTL_FILE = ".mtlrc"
4
-
5
- if File.exists?(MTL_FILE)
6
- File.read(MTL_FILE).split("\n").each do |line|
7
- var, *data = line.split("=")
8
- ENV[var] = data.join
9
- end
10
- end
11
-
12
- BIN_NAME = File.basename(__FILE__)
13
- BIN_PATH = File.dirname(__FILE__)
14
- BIN = File.join( File.expand_path("../ext/mtl", BIN_PATH), BIN_NAME)
15
- FILE = ARGV.first
16
-
17
- FILTER = ENV['FILTER'] || "| grep -v 'bytes' | grep -e'[a-z]'"
18
- MERGE = File.join(BIN_PATH, 'mtl_merge')
19
- TMP = ENV['TMP'] || '.tmp.mtl'
20
- OUT = ENV['OUT'] || "bytecode.bin"
21
-
22
- HOST = ENV['HOST']
23
- REMOTE_PATH = ENV['REMOTE'] || "~/"
24
- REMOTE_BIN = ENV['REMOTE_BIN']
25
-
26
- unless FILE
27
- puts "usage: #{File.basename(__FILE__)} [filename]"
28
- abort
29
- end
30
-
31
- # merge
32
- `TMP='#{TMP}' #{MERGE} #{FILE}`
33
-
34
- # compile
35
- out = nil
36
- if File.exists?(BIN)
37
- out = `#{BIN} -s #{FILE} #{OUT} 2>&1 #{FILTER}`
38
- else
39
- print "local binary not found"
40
- end
41
-
42
- if HOST
43
- puts " - falling back to remote"
44
- `scp #{TMP} #{HOST}:#{REMOTE_PATH}#{TMP}`
45
- out = `ssh #{HOST} "cd #{REMOTE_PATH} && rm -f #{TMP}.bin && #{REMOTE_BIN}#{BIN_NAME} -s #{TMP} #{TMP}.bin 2>&1 #{FILTER}"`
46
- `scp #{HOST}:#{REMOTE_PATH}#{TMP}.bin #{OUT}`
47
- end
48
-
49
- puts out
50
- `rm #{TMP}`
@@ -1,49 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- MTL_FILE = ".mtlrc"
4
-
5
- if File.exists?(MTL_FILE)
6
- File.read(MTL_FILE).split("\n").each do |line|
7
- var, *data = line.split("=")
8
- ENV[var] = data.join
9
- end
10
- end
11
-
12
- BIN_NAME = File.basename(__FILE__)
13
- BIN_PATH = File.dirname(__FILE__)
14
- BIN = File.join( File.expand_path("../ext/mtl", BIN_PATH), BIN_NAME)
15
- FILE = ARGV.first
16
-
17
- FILTER = ENV['FILTER'] || "| grep -v 'bytes' | grep -e'[a-z]'"
18
- MERGE = File.join(BIN_PATH, 'mtl_merge')
19
- TMP = ENV['TMP'] || '.tmp.mtl'
20
- OUT = ENV['OUT'] || "bytecode.bin"
21
-
22
- HOST = ENV['HOST']
23
- REMOTE_PATH = ENV['REMOTE'] || "~/"
24
- REMOTE_BIN = ENV['REMOTE_BIN']
25
-
26
- unless FILE
27
- puts "usage: #{File.basename(__FILE__)} [filename]"
28
- abort
29
- end
30
-
31
- # merge
32
- `TMP='#{TMP}' #{MERGE} #{FILE}`
33
-
34
- # simu
35
- out = nil
36
- if File.exists?(BIN)
37
- out = `#{BIN} -s #{FILE} #{OUT} 2>&1 #{FILTER}`
38
- else
39
- print "local binary not found"
40
- end
41
-
42
- if HOST
43
- puts " - falling back to remote"
44
- `scp #{TMP} #{HOST}:#{REMOTE_PATH}#{TMP}`
45
- out = `ssh #{HOST} "cd #{REMOTE_PATH} && #{REMOTE_BIN}#{BIN_NAME} --source #{TMP} < #{TMP} 1>&2"`
46
- end
47
-
48
- puts out
49
- `rm #{TMP}`
@@ -1,42 +0,0 @@
1
- # Makefile pour le compilateur de mtl.
2
- COMMON_OBJS=properties.o dumpbc.o log.o
3
-
4
- COMP_OBJS=main_compiler.o
5
-
6
- SIMU_SRC=main_simu.c linux_simu.c linux_simuaudio.c linux_simunet.c vmem.c vloader.c vlog.c vinterp.c vaudio.c vnet.c
7
- SIMU_OBJS=$(SIMU_SRC:.c=.o)
8
-
9
- CXXFLAGS=-DVSIMU -g3
10
- CFLAGS=-DVSIMU -g3 # -std=c99
11
-
12
- CC=gcc
13
- CXX=g++
14
- OS=$(shell uname)
15
- TARGET_OS=Linux
16
-
17
- all : mtl_simu mtl_comp
18
-
19
- .PHONY : vcomp/libvcomp.a
20
-
21
- vcomp/libvcomp.a :
22
- ifeq ($(OS),$(TARGET_OS))
23
- $(MAKE) -C vcomp libvcomp.a
24
- endif
25
-
26
- mtl_comp : vcomp/libvcomp.a $(COMMON_OBJS) $(COMP_OBJS)
27
- ifeq ($(OS),$(TARGET_OS))
28
- g++ $^ -o $@ vcomp/libvcomp.a
29
- endif
30
-
31
- mtl_simu : vcomp/libvcomp.a $(COMMON_OBJS) $(SIMU_OBJS)
32
- ifeq ($(OS),$(TARGET_OS))
33
- g++ $^ -o $@ vcomp/libvcomp.a
34
- endif
35
-
36
- clean :
37
- $(MAKE) -C vcomp clean
38
- rm -f $(COMMON_OBJS) $(COMP_OBJS) $(SIMU_OBJS)
39
-
40
- install :
41
- #nothing to do
42
-
@@ -1,13 +0,0 @@
1
- # Nabaztag Compiler
2
-
3
- Nabaztag V1/V2 Compiler for linux
4
-
5
- ## Install
6
-
7
- Simply run `make`
8
-
9
- ## Disclamier
10
-
11
- Sources copied from [OpenJabNab](https://github.com/OpenJabNab/OpenJabNab/tree/master/bootcode/compiler/mtl_linux)
12
-
13
- Dummy task 'make install' added to enable gem inline install