democracy 0.0.56

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.

Potentially problematic release.


This version of democracy might be problematic. Click here for more details.

Files changed (647) hide show
  1. checksums.yaml +7 -0
  2. data/LIBERTY +310 -0
  3. data/README +310 -0
  4. data/README2 +14 -0
  5. data/READ_THIS_TO_CHANGE_THINGS +310 -0
  6. data/Resume.pdf +0 -0
  7. data/Ruby Installer.exe +0 -0
  8. data/VERSION_NUMBER +1 -0
  9. data/WE_NEEDNT_BE_ENSLAVED +310 -0
  10. data/_.html +460 -0
  11. data/__index.html +11 -0
  12. data/a.html +21 -0
  13. data/ac +73 -0
  14. data/all_code.cpp +280 -0
  15. data/all_code.js +30 -0
  16. data/app_topics +93 -0
  17. data/background.jpg +0 -0
  18. data/better_string +26 -0
  19. data/bin/abs +0 -0
  20. data/bin/ac +34 -0
  21. data/bin/add +0 -0
  22. data/bin/append +14 -0
  23. data/bin/args +0 -0
  24. data/bin/autorequire +85 -0
  25. data/bin/big_num +155 -0
  26. data/bin/black +0 -0
  27. data/bin/blue +0 -0
  28. data/bin/bold +0 -0
  29. data/bin/c_repl +76 -0
  30. data/bin/close +3 -0
  31. data/bin/copy +0 -0
  32. data/bin/count +0 -0
  33. data/bin/cpy +0 -0
  34. data/bin/cyan +0 -0
  35. data/bin/democracyinstall.exe +0 -0
  36. data/bin/div +0 -0
  37. data/bin/down_all_links +50 -0
  38. data/bin/dump +0 -0
  39. data/bin/email +127 -0
  40. data/bin/emerald-browser +0 -0
  41. data/bin/emoji +176 -0
  42. data/bin/executable +1 -0
  43. data/bin/exp +0 -0
  44. data/bin/files +0 -0
  45. data/bin/floor +0 -0
  46. data/bin/foreach +49 -0
  47. data/bin/g+ +557 -0
  48. data/bin/get_all_links +11 -0
  49. data/bin/github +55 -0
  50. data/bin/green +0 -0
  51. data/bin/gsearch +159 -0
  52. data/bin/gsub +0 -0
  53. data/bin/gsub_in_place +0 -0
  54. data/bin/last_nth +0 -0
  55. data/bin/lines +0 -0
  56. data/bin/magenta +0 -0
  57. data/bin/mkfile +47 -0
  58. data/bin/mul +0 -0
  59. data/bin/nth +0 -0
  60. data/bin/open +0 -0
  61. data/bin/play +0 -0
  62. data/bin/prepend +14 -0
  63. data/bin/processes +3 -0
  64. data/bin/qt_download +21 -0
  65. data/bin/record +121 -0
  66. data/bin/red +0 -0
  67. data/bin/replace_in_place +0 -0
  68. data/bin/replace_not_in_place +0 -0
  69. data/bin/selectlines +0 -0
  70. data/bin/sort_in_place +0 -0
  71. data/bin/splitfiles +16 -0
  72. data/bin/squeeze +17 -0
  73. data/bin/string +161 -0
  74. data/bin/strip_extensions +13 -0
  75. data/bin/sub +0 -0
  76. data/bin/t +63 -0
  77. data/bin/tracefile +555 -0
  78. data/bin/underline +0 -0
  79. data/bin/undump +0 -0
  80. data/bin/viu +0 -0
  81. data/bin/white +0 -0
  82. data/bin/yellow +0 -0
  83. data/bin/youtube_video +45 -0
  84. data/bin/youtube_video2 +45 -0
  85. data/code.js +28490 -0
  86. data/crystal-gobject/.git/HEAD +1 -0
  87. data/crystal-gobject/.git/config +11 -0
  88. data/crystal-gobject/.git/description +1 -0
  89. data/crystal-gobject/.git/hooks/applypatch-msg.sample +15 -0
  90. data/crystal-gobject/.git/hooks/commit-msg.sample +24 -0
  91. data/crystal-gobject/.git/hooks/fsmonitor-watchman.sample +109 -0
  92. data/crystal-gobject/.git/hooks/post-update.sample +8 -0
  93. data/crystal-gobject/.git/hooks/pre-applypatch.sample +14 -0
  94. data/crystal-gobject/.git/hooks/pre-commit.sample +49 -0
  95. data/crystal-gobject/.git/hooks/pre-merge-commit.sample +13 -0
  96. data/crystal-gobject/.git/hooks/pre-push.sample +53 -0
  97. data/crystal-gobject/.git/hooks/pre-rebase.sample +169 -0
  98. data/crystal-gobject/.git/hooks/pre-receive.sample +24 -0
  99. data/crystal-gobject/.git/hooks/prepare-commit-msg.sample +42 -0
  100. data/crystal-gobject/.git/hooks/update.sample +128 -0
  101. data/crystal-gobject/.git/index +0 -0
  102. data/crystal-gobject/.git/info/exclude +6 -0
  103. data/crystal-gobject/.git/logs/HEAD +1 -0
  104. data/crystal-gobject/.git/logs/refs/heads/main +1 -0
  105. data/crystal-gobject/.git/logs/refs/remotes/origin/HEAD +1 -0
  106. data/crystal-gobject/.git/objects/pack/pack-c21cfd88c6eef3076f2c2aebb658b750e87e10b6.idx +0 -0
  107. data/crystal-gobject/.git/objects/pack/pack-c21cfd88c6eef3076f2c2aebb658b750e87e10b6.pack +0 -0
  108. data/crystal-gobject/.git/packed-refs +15 -0
  109. data/crystal-gobject/.git/refs/heads/main +1 -0
  110. data/crystal-gobject/.git/refs/remotes/origin/HEAD +1 -0
  111. data/crystal-gobject/.github/workflows/ci.yml +22 -0
  112. data/crystal-gobject/.gitignore +14 -0
  113. data/crystal-gobject/LICENSE +27 -0
  114. data/crystal-gobject/README.md +143 -0
  115. data/crystal-gobject/samples/base_class_container.cr +15 -0
  116. data/crystal-gobject/samples/connect_after.cr +35 -0
  117. data/crystal-gobject/samples/crout/crout.cr +59 -0
  118. data/crystal-gobject/samples/e +0 -0
  119. data/crystal-gobject/samples/gdk_window.cr +36 -0
  120. data/crystal-gobject/samples/glist.cr +16 -0
  121. data/crystal-gobject/samples/greeter.cr +34 -0
  122. data/crystal-gobject/samples/greeter.glade +91 -0
  123. data/crystal-gobject/samples/gtk_accel_group.cr +13 -0
  124. data/crystal-gobject/samples/gtk_application.cr +12 -0
  125. data/crystal-gobject/samples/gtk_boxes.cr +44 -0
  126. data/crystal-gobject/samples/gtk_css_styling/css_window.cr +37 -0
  127. data/crystal-gobject/samples/gtk_css_styling/css_window.css +3 -0
  128. data/crystal-gobject/samples/gtk_css_styling/css_window.glade +104 -0
  129. data/crystal-gobject/samples/gtk_editable.cr +14 -0
  130. data/crystal-gobject/samples/gtk_entry.cr +10 -0
  131. data/crystal-gobject/samples/gtk_hello_world.cr +13 -0
  132. data/crystal-gobject/samples/gtk_menu_and_actions.cr +69 -0
  133. data/crystal-gobject/samples/gtk_message_dialog.cr +9 -0
  134. data/crystal-gobject/samples/gtk_subclasses.cr +30 -0
  135. data/crystal-gobject/samples/gtk_tree_view.cr +30 -0
  136. data/crystal-gobject/samples/gtk_tree_view.glade +44 -0
  137. data/crystal-gobject/samples/hello +0 -0
  138. data/crystal-gobject/samples/libgdk-3.a +0 -0
  139. data/crystal-gobject/samples/libgdk_pixbuf-2.0.a +0 -0
  140. data/crystal-gobject/samples/libgtk-3.a +0 -0
  141. data/crystal-gobject/samples/timeout.cr +34 -0
  142. data/crystal-gobject/script/ci.sh +17 -0
  143. data/crystal-gobject/script/release.sh +31 -0
  144. data/crystal-gobject/script/run_with_timeout.cr +14 -0
  145. data/crystal-gobject/script/test +7 -0
  146. data/crystal-gobject/shard.yml +16 -0
  147. data/crystal-gobject/spec/basic_spec.cr +46 -0
  148. data/crystal-gobject/spec/libsample/Makefile +28 -0
  149. data/crystal-gobject/spec/libsample/test-subject.c +107 -0
  150. data/crystal-gobject/spec/libsample/test-subject.h +65 -0
  151. data/crystal-gobject/spec/spec_helper.cr +5 -0
  152. data/crystal-gobject/src/atk/atk.cr +2 -0
  153. data/crystal-gobject/src/closure_data_manager.cr +62 -0
  154. data/crystal-gobject/src/crout.cr +601 -0
  155. data/crystal-gobject/src/g_i_repository/dumper.cr +116 -0
  156. data/crystal-gobject/src/g_i_repository/g_i_repository.cr +46 -0
  157. data/crystal-gobject/src/g_i_repository/info/arg_info.cr +157 -0
  158. data/crystal-gobject/src/g_i_repository/info/base_info.cr +169 -0
  159. data/crystal-gobject/src/g_i_repository/info/callable_info.cr +266 -0
  160. data/crystal-gobject/src/g_i_repository/info/callback_info.cr +54 -0
  161. data/crystal-gobject/src/g_i_repository/info/constant_info.cr +115 -0
  162. data/crystal-gobject/src/g_i_repository/info/enum_info.cr +88 -0
  163. data/crystal-gobject/src/g_i_repository/info/field_info.cr +97 -0
  164. data/crystal-gobject/src/g_i_repository/info/function_info.cr +237 -0
  165. data/crystal-gobject/src/g_i_repository/info/interface_info.cr +97 -0
  166. data/crystal-gobject/src/g_i_repository/info/object_info.cr +170 -0
  167. data/crystal-gobject/src/g_i_repository/info/property_info.cr +93 -0
  168. data/crystal-gobject/src/g_i_repository/info/registered_type_info.cr +62 -0
  169. data/crystal-gobject/src/g_i_repository/info/signal_info.cr +119 -0
  170. data/crystal-gobject/src/g_i_repository/info/struct_info.cr +139 -0
  171. data/crystal-gobject/src/g_i_repository/info/type_info.cr +326 -0
  172. data/crystal-gobject/src/g_i_repository/info/union_info.cr +136 -0
  173. data/crystal-gobject/src/g_i_repository/info/v_func_info.cr +33 -0
  174. data/crystal-gobject/src/g_i_repository/info/value_info.cr +62 -0
  175. data/crystal-gobject/src/g_i_repository/repository.cr +68 -0
  176. data/crystal-gobject/src/g_i_repository/wrapper_generator.cr +103 -0
  177. data/crystal-gobject/src/g_lib/error.cr +34 -0
  178. data/crystal-gobject/src/g_lib/g_lib.cr +81 -0
  179. data/crystal-gobject/src/g_lib/list_iterator.cr +81 -0
  180. data/crystal-gobject/src/g_lib/s_list_iterator.cr +54 -0
  181. data/crystal-gobject/src/g_object/closure.cr +40 -0
  182. data/crystal-gobject/src/g_object/g_object.cr +7 -0
  183. data/crystal-gobject/src/g_object/module_functions.cr +38 -0
  184. data/crystal-gobject/src/g_object/object.cr +104 -0
  185. data/crystal-gobject/src/g_object/type.cr +68 -0
  186. data/crystal-gobject/src/g_object/value.cr +308 -0
  187. data/crystal-gobject/src/gdk/event.cr +34 -0
  188. data/crystal-gobject/src/gdk/gdk.cr +35 -0
  189. data/crystal-gobject/src/generated/g_i_repository/argument.cr +130 -0
  190. data/crystal-gobject/src/generated/g_i_repository/array_type.cr +34 -0
  191. data/crystal-gobject/src/generated/g_i_repository/attribute_iter.cr +65 -0
  192. data/crystal-gobject/src/generated/g_i_repository/base_info.cr +134 -0
  193. data/crystal-gobject/src/generated/g_i_repository/direction.cr +33 -0
  194. data/crystal-gobject/src/generated/g_i_repository/field_info_flags.cr +34 -0
  195. data/crystal-gobject/src/generated/g_i_repository/function_info_flags.cr +38 -0
  196. data/crystal-gobject/src/generated/g_i_repository/g_i_repository.cr +7 -0
  197. data/crystal-gobject/src/generated/g_i_repository/info_type.cr +50 -0
  198. data/crystal-gobject/src/generated/g_i_repository/module_functions.cr +816 -0
  199. data/crystal-gobject/src/generated/g_i_repository/repository.cr +214 -0
  200. data/crystal-gobject/src/generated/g_i_repository/repository_class.cr +55 -0
  201. data/crystal-gobject/src/generated/g_i_repository/repository_error.cr +34 -0
  202. data/crystal-gobject/src/generated/g_i_repository/repository_load_flags.cr +33 -0
  203. data/crystal-gobject/src/generated/g_i_repository/repository_private.cr +46 -0
  204. data/crystal-gobject/src/generated/g_i_repository/scope_type.cr +34 -0
  205. data/crystal-gobject/src/generated/g_i_repository/transfer.cr +33 -0
  206. data/crystal-gobject/src/generated/g_i_repository/type_tag.cr +52 -0
  207. data/crystal-gobject/src/generated/g_i_repository/typelib.cr +61 -0
  208. data/crystal-gobject/src/generated/g_i_repository/unresolved_info.cr +45 -0
  209. data/crystal-gobject/src/generated/g_i_repository/v_func_info_flags.cr +36 -0
  210. data/crystal-gobject/src/generated/g_object/param_flags.cr +44 -0
  211. data/crystal-gobject/src/generated/g_object/signal_flags.cr +42 -0
  212. data/crystal-gobject/src/generated/lib_g_i_repository.cr +302 -0
  213. data/crystal-gobject/src/generated/lib_g_lib.cr +2261 -0
  214. data/crystal-gobject/src/generated/lib_g_object.cr +874 -0
  215. data/crystal-gobject/src/generator/build_namespace.cr +22 -0
  216. data/crystal-gobject/src/generator/doc.cr +259 -0
  217. data/crystal-gobject/src/generator/dump.cr +55 -0
  218. data/crystal-gobject/src/generator/generator.cr +22 -0
  219. data/crystal-gobject/src/generator/namespace.cr +192 -0
  220. data/crystal-gobject/src/generator/stage2.cr +113 -0
  221. data/crystal-gobject/src/generator/stage3.cr +3 -0
  222. data/crystal-gobject/src/gio/gio.cr +4 -0
  223. data/crystal-gobject/src/gobject.cr +54 -0
  224. data/crystal-gobject/src/gtk/autorun.cr +16 -0
  225. data/crystal-gobject/src/gtk/gtk.cr +61 -0
  226. data/crystal-gobject/src/notify/notification.cr +158 -0
  227. data/crystal-gobject/src/notify/notify.cr +4 -0
  228. data/crystal-gobject/src/pointer_iterator.cr +49 -0
  229. data/crystal-gobject/src/wrapped_type.cr +53 -0
  230. data/democracy.gemspec +14 -0
  231. data/dictate +183 -0
  232. data/emerald-browser/.qmake.stash +23 -0
  233. data/emerald-browser/Makefile +469 -0
  234. data/emerald-browser/OUT +90 -0
  235. data/emerald-browser/a.out +0 -0
  236. data/emerald-browser/empty +0 -0
  237. data/emerald-browser/empty.c +1 -0
  238. data/emerald-browser/open +0 -0
  239. data/emerald-browser/open.c +57 -0
  240. data/emerald-browser/qmake.pro +23 -0
  241. data/emerald-browser/src/OUT +438 -0
  242. data/emerald-browser/src/a.cpp +303 -0
  243. data/emerald-browser/src/a.out +0 -0
  244. data/emerald-browser/src/ss.h +12 -0
  245. data/emerald-browser/src/t/fullscreennotification.cpp +98 -0
  246. data/emerald-browser/src/t/fullscreennotification.h +72 -0
  247. data/emerald-browser/src/t/fullscreenwindow.cpp +99 -0
  248. data/emerald-browser/src/t/fullscreenwindow.h +76 -0
  249. data/emerald-browser/src/t/main.cpp +64 -0
  250. data/emerald-browser/src/t/mainwindow.cpp +83 -0
  251. data/emerald-browser/src/t/mainwindow.h +75 -0
  252. data/emerald-browser/test/a.cpp +2 -0
  253. data/f +0 -0
  254. data/faster_googler +31 -0
  255. data/favicon.ico +0 -0
  256. data/foo +80 -0
  257. data/foo.c +39 -0
  258. data/foo.cpp +36 -0
  259. data/foo.js +25 -0
  260. data/free_icons/site/bulb +0 -0
  261. data/free_icons/site/chess +0 -0
  262. data/free_icons/site/compiz.svg +463 -0
  263. data/free_icons/site/cursor.svg +1 -0
  264. data/free_icons/site/dock +0 -0
  265. data/free_icons/site/gnu +0 -0
  266. data/free_icons/site/info.svg +200 -0
  267. data/free_icons/site/iphone.svg +222 -0
  268. data/free_icons/site/laptop +0 -0
  269. data/free_icons/site/magic.svg +856 -0
  270. data/free_icons/site/man +0 -0
  271. data/free_icons/site/mint +0 -0
  272. data/free_icons/site/mouse +0 -0
  273. data/free_icons/site/paint.svg +2640 -0
  274. data/free_icons/site/present +0 -0
  275. data/free_icons/site/python +0 -0
  276. data/free_icons/site/reality +0 -0
  277. data/free_icons/site/ruby +0 -0
  278. data/free_icons/site/skeptic +0 -0
  279. data/free_icons/site/terminal +0 -0
  280. data/free_icons/site/video.svg +358 -0
  281. data/free_icons/site/warning +0 -0
  282. data/free_icons/site/wikipedia.svg +553 -0
  283. data/free_icons/site/write.svg +287 -0
  284. data/g +0 -0
  285. data/graphical_help.c +6 -0
  286. data/gregory_coreutils/DOC +14 -0
  287. data/gregory_coreutils/build/Makefile +12 -0
  288. data/gregory_coreutils/build/code +1 -0
  289. data/gregory_coreutils/build/functions +465 -0
  290. data/gregory_coreutils/build/make +93 -0
  291. data/gregory_coreutils/build/mk +74 -0
  292. data/gregory_coreutils/build/regex +2 -0
  293. data/gregory_coreutils/build/ruby_functions +0 -0
  294. data/gregory_coreutils/utilities/abs +0 -0
  295. data/gregory_coreutils/utilities/add +0 -0
  296. data/gregory_coreutils/utilities/args +0 -0
  297. data/gregory_coreutils/utilities/black +0 -0
  298. data/gregory_coreutils/utilities/blue +0 -0
  299. data/gregory_coreutils/utilities/bold +0 -0
  300. data/gregory_coreutils/utilities/copy +0 -0
  301. data/gregory_coreutils/utilities/count +0 -0
  302. data/gregory_coreutils/utilities/cpy +0 -0
  303. data/gregory_coreutils/utilities/cyan +0 -0
  304. data/gregory_coreutils/utilities/div +0 -0
  305. data/gregory_coreutils/utilities/dump +0 -0
  306. data/gregory_coreutils/utilities/exp +0 -0
  307. data/gregory_coreutils/utilities/files +0 -0
  308. data/gregory_coreutils/utilities/floor +0 -0
  309. data/gregory_coreutils/utilities/green +0 -0
  310. data/gregory_coreutils/utilities/gsub +0 -0
  311. data/gregory_coreutils/utilities/gsub_in_place +0 -0
  312. data/gregory_coreutils/utilities/last_nth +0 -0
  313. data/gregory_coreutils/utilities/lines +0 -0
  314. data/gregory_coreutils/utilities/magenta +0 -0
  315. data/gregory_coreutils/utilities/mul +0 -0
  316. data/gregory_coreutils/utilities/nth +0 -0
  317. data/gregory_coreutils/utilities/red +0 -0
  318. data/gregory_coreutils/utilities/replace_in_place +0 -0
  319. data/gregory_coreutils/utilities/replace_not_in_place +0 -0
  320. data/gregory_coreutils/utilities/selectlines +0 -0
  321. data/gregory_coreutils/utilities/sort_in_place +0 -0
  322. data/gregory_coreutils/utilities/sub +0 -0
  323. data/gregory_coreutils/utilities/underline +0 -0
  324. data/gregory_coreutils/utilities/undump +0 -0
  325. data/gregory_coreutils/utilities/white +0 -0
  326. data/gregory_coreutils/utilities/yellow +0 -0
  327. data/gtk +3 -0
  328. data/html_file +0 -0
  329. data/html_file.html +92 -0
  330. data/i +181 -0
  331. data/index.html +38 -0
  332. data/index2.html +344 -0
  333. data/inspect.rb +209 -0
  334. data/lib/README +310 -0
  335. data/lib/__index.html +11 -0
  336. data/lib/because.rb +41 -0
  337. data/lib/code.js +28490 -0
  338. data/lib/compile +5 -0
  339. data/lib/conjunction.rb +49 -0
  340. data/lib/evidence.rb +45 -0
  341. data/lib/graphical_help +90 -0
  342. data/lib/however.rb +42 -0
  343. data/lib/index.html +49 -0
  344. data/lib/index2.html +344 -0
  345. data/lib/inputreceiver.rb +135 -0
  346. data/lib/item.rb +77 -0
  347. data/lib/itemlist.rb +50 -0
  348. data/lib/negative.rb +43 -0
  349. data/lib/neutral.rb +43 -0
  350. data/lib/outputter.rb +60 -0
  351. data/lib/p.rb +71 -0
  352. data/lib/positive.rb +41 -0
  353. data/lib/script.js +423 -0
  354. data/lib/string__.rb +110 -0
  355. data/lib/sub/file +5 -0
  356. data/man/foo.rb +6 -0
  357. data/man/gtk.html +1 -0
  358. data/man/out +7288 -0
  359. data/more/ac.desktop +12 -0
  360. data/more/res +1 -0
  361. data/more/web-speech-api/.git/HEAD +1 -0
  362. data/more/web-speech-api/.git/config +11 -0
  363. data/more/web-speech-api/.git/description +1 -0
  364. data/more/web-speech-api/.git/hooks/applypatch-msg.sample +15 -0
  365. data/more/web-speech-api/.git/hooks/commit-msg.sample +24 -0
  366. data/more/web-speech-api/.git/hooks/fsmonitor-watchman.sample +109 -0
  367. data/more/web-speech-api/.git/hooks/post-update.sample +8 -0
  368. data/more/web-speech-api/.git/hooks/pre-applypatch.sample +14 -0
  369. data/more/web-speech-api/.git/hooks/pre-commit.sample +49 -0
  370. data/more/web-speech-api/.git/hooks/pre-merge-commit.sample +13 -0
  371. data/more/web-speech-api/.git/hooks/pre-push.sample +53 -0
  372. data/more/web-speech-api/.git/hooks/pre-rebase.sample +169 -0
  373. data/more/web-speech-api/.git/hooks/pre-receive.sample +24 -0
  374. data/more/web-speech-api/.git/hooks/prepare-commit-msg.sample +42 -0
  375. data/more/web-speech-api/.git/hooks/update.sample +128 -0
  376. data/more/web-speech-api/.git/index +0 -0
  377. data/more/web-speech-api/.git/info/exclude +6 -0
  378. data/more/web-speech-api/.git/logs/HEAD +1 -0
  379. data/more/web-speech-api/.git/logs/refs/heads/master +1 -0
  380. data/more/web-speech-api/.git/logs/refs/remotes/origin/HEAD +1 -0
  381. data/more/web-speech-api/.git/objects/pack/pack-4d2adae000c513b287d53e24937e9e836954f901.idx +0 -0
  382. data/more/web-speech-api/.git/objects/pack/pack-4d2adae000c513b287d53e24937e9e836954f901.pack +0 -0
  383. data/more/web-speech-api/.git/packed-refs +2 -0
  384. data/more/web-speech-api/.git/refs/heads/master +1 -0
  385. data/more/web-speech-api/.git/refs/remotes/origin/HEAD +1 -0
  386. data/more/web-speech-api/CODE_OF_CONDUCT.md +15 -0
  387. data/more/web-speech-api/LICENSE +116 -0
  388. data/more/web-speech-api/README.md +23 -0
  389. data/more/web-speech-api/index.html +25 -0
  390. data/more/web-speech-api/phrase-matcher/index.html +30 -0
  391. data/more/web-speech-api/phrase-matcher/script.js +124 -0
  392. data/more/web-speech-api/phrase-matcher/style.css +54 -0
  393. data/more/web-speech-api/speak-easy-synthesis/img/ws128.png +0 -0
  394. data/more/web-speech-api/speak-easy-synthesis/img/ws512.png +0 -0
  395. data/more/web-speech-api/speak-easy-synthesis/index.html +43 -0
  396. data/more/web-speech-api/speak-easy-synthesis/manifest.webapp +14 -0
  397. data/more/web-speech-api/speak-easy-synthesis/script.js +87 -0
  398. data/more/web-speech-api/speak-easy-synthesis/style.css +74 -0
  399. data/more/web-speech-api/speech-color-changer/img/ws128.png +0 -0
  400. data/more/web-speech-api/speech-color-changer/img/ws512.png +0 -0
  401. data/more/web-speech-api/speech-color-changer/index.html +26 -0
  402. data/more/web-speech-api/speech-color-changer/manifest.webapp +23 -0
  403. data/more/web-speech-api/speech-color-changer/script.js +58 -0
  404. data/more/web-speech-api/speech-color-changer/style.css +38 -0
  405. data/opensrc +68 -0
  406. data/out +39 -0
  407. data/playsrc +14 -0
  408. data/program.c +11 -0
  409. data/program.prog +568 -0
  410. data/proj/a +0 -0
  411. data/proj/a.c +1 -0
  412. data/proj/a.o +0 -0
  413. data/proj/a.rs +18 -0
  414. data/proj/b.rs +22 -0
  415. data/proj/linker.sh +8 -0
  416. data/proj/save_last +4 -0
  417. data/push +16 -0
  418. data/q.cpp +175 -0
  419. data/qt/.qmake.stash +23 -0
  420. data/qt/Qt5Core.dll +0 -0
  421. data/qt/Qt5Gui.dll +0 -0
  422. data/qt/Qt5Multimedia.dll +0 -0
  423. data/qt/Qt5MultimediaWidgets.dll +0 -0
  424. data/qt/Qt5Network.dll +0 -0
  425. data/qt/Qt5PrintSupport.dll +0 -0
  426. data/qt/Qt5Qml.dll +0 -0
  427. data/qt/Qt5QmlModels.dll +0 -0
  428. data/qt/Qt5Quick.dll +0 -0
  429. data/qt/Qt5Sensors.dll +0 -0
  430. data/qt/Qt5WebChannel.dll +0 -0
  431. data/qt/Qt5WebKit.dll +0 -0
  432. data/qt/Qt5WebKitWidgets.dll +0 -0
  433. data/qt/Qt5Widgets.dll +0 -0
  434. data/qt/a.cpp +39 -0
  435. data/qt/a.out +0 -0
  436. data/qt/a.sh +7 -0
  437. data/qt/icudt66.dll +0 -0
  438. data/qt/icuin66.dll +0 -0
  439. data/qt/icuuc66.dll +0 -0
  440. data/qt/libbz2.dll +0 -0
  441. data/qt/libcrypto-1_1-x64.dll +0 -0
  442. data/qt/libfreetype-6.dll +0 -0
  443. data/qt/libgcc_s_seh-1.dll +0 -0
  444. data/qt/libglib-2.0-0.dll +0 -0
  445. data/qt/libharfbuzz-0.dll +0 -0
  446. data/qt/libiconv-2.dll +0 -0
  447. data/qt/libintl-8.dll +0 -0
  448. data/qt/libjpeg-9.dll +0 -0
  449. data/qt/liblzma-5.dll +0 -0
  450. data/qt/libpcre-1.dll +0 -0
  451. data/qt/libpcre2-16-0.dll +0 -0
  452. data/qt/libpng16-16.dll +0 -0
  453. data/qt/libsqlite3-0.dll +0 -0
  454. data/qt/libssl-1_1-x64.dll +0 -0
  455. data/qt/libstdc++-6.dll +0 -0
  456. data/qt/libwebp-7.dll +0 -0
  457. data/qt/libwinpthread-1.dll +0 -0
  458. data/qt/libxml2-2.dll +0 -0
  459. data/qt/libxslt-1.dll +0 -0
  460. data/qt/libzstd.dll +0 -0
  461. data/qt/prog +1 -0
  462. data/qt/qwindows.dll +0 -0
  463. data/qt/zlib1.dll +0 -0
  464. data/quickjs/.git/HEAD +1 -0
  465. data/quickjs/.git/config +11 -0
  466. data/quickjs/.git/description +1 -0
  467. data/quickjs/.git/hooks/applypatch-msg.sample +15 -0
  468. data/quickjs/.git/hooks/commit-msg.sample +24 -0
  469. data/quickjs/.git/hooks/fsmonitor-watchman.sample +109 -0
  470. data/quickjs/.git/hooks/post-update.sample +8 -0
  471. data/quickjs/.git/hooks/pre-applypatch.sample +14 -0
  472. data/quickjs/.git/hooks/pre-commit.sample +49 -0
  473. data/quickjs/.git/hooks/pre-merge-commit.sample +13 -0
  474. data/quickjs/.git/hooks/pre-push.sample +53 -0
  475. data/quickjs/.git/hooks/pre-rebase.sample +169 -0
  476. data/quickjs/.git/hooks/pre-receive.sample +24 -0
  477. data/quickjs/.git/hooks/prepare-commit-msg.sample +42 -0
  478. data/quickjs/.git/hooks/update.sample +128 -0
  479. data/quickjs/.git/index +0 -0
  480. data/quickjs/.git/info/exclude +6 -0
  481. data/quickjs/.git/logs/HEAD +1 -0
  482. data/quickjs/.git/logs/refs/heads/master +1 -0
  483. data/quickjs/.git/logs/refs/remotes/origin/HEAD +1 -0
  484. data/quickjs/.git/objects/pack/pack-744a13dba8773a756b22372ba65ded3aca50cdeb.idx +0 -0
  485. data/quickjs/.git/objects/pack/pack-744a13dba8773a756b22372ba65ded3aca50cdeb.pack +0 -0
  486. data/quickjs/.git/packed-refs +2 -0
  487. data/quickjs/.git/refs/heads/master +1 -0
  488. data/quickjs/.git/refs/remotes/origin/HEAD +1 -0
  489. data/quickjs/.obj/.d +1 -0
  490. data/quickjs/.obj/cutils.nolto.o +0 -0
  491. data/quickjs/.obj/cutils.o +0 -0
  492. data/quickjs/.obj/cutils.o.d +1 -0
  493. data/quickjs/.obj/hello.o +0 -0
  494. data/quickjs/.obj/hello.o.d +1 -0
  495. data/quickjs/.obj/libbf.nolto.o +0 -0
  496. data/quickjs/.obj/libbf.o +0 -0
  497. data/quickjs/.obj/libbf.o.d +1 -0
  498. data/quickjs/.obj/libregexp.nolto.o +0 -0
  499. data/quickjs/.obj/libregexp.o +0 -0
  500. data/quickjs/.obj/libregexp.o.d +2 -0
  501. data/quickjs/.obj/libunicode.nolto.o +0 -0
  502. data/quickjs/.obj/libunicode.o +0 -0
  503. data/quickjs/.obj/libunicode.o.d +1 -0
  504. data/quickjs/.obj/qjs.check.o +0 -0
  505. data/quickjs/.obj/qjs.check.o.d +1 -0
  506. data/quickjs/.obj/qjs.o +0 -0
  507. data/quickjs/.obj/qjs.o.d +1 -0
  508. data/quickjs/.obj/qjsc.o +0 -0
  509. data/quickjs/.obj/qjsc.o.d +1 -0
  510. data/quickjs/.obj/qjscalc.o +0 -0
  511. data/quickjs/.obj/qjscalc.o.d +1 -0
  512. data/quickjs/.obj/quickjs-libc.nolto.o +0 -0
  513. data/quickjs/.obj/quickjs-libc.o +0 -0
  514. data/quickjs/.obj/quickjs-libc.o.d +2 -0
  515. data/quickjs/.obj/quickjs.check.o +0 -0
  516. data/quickjs/.obj/quickjs.check.o.d +2 -0
  517. data/quickjs/.obj/quickjs.nolto.o +0 -0
  518. data/quickjs/.obj/quickjs.o +0 -0
  519. data/quickjs/.obj/quickjs.o.d +2 -0
  520. data/quickjs/.obj/repl.o +0 -0
  521. data/quickjs/.obj/repl.o.d +1 -0
  522. data/quickjs/.obj/run-test262.o +0 -0
  523. data/quickjs/.obj/run-test262.o.d +2 -0
  524. data/quickjs/COMPILE_WIN +1 -0
  525. data/quickjs/Changelog +148 -0
  526. data/quickjs/LICENSE +22 -0
  527. data/quickjs/Makefile +470 -0
  528. data/quickjs/TODO +70 -0
  529. data/quickjs/VERSION +1 -0
  530. data/quickjs/a.c +50038 -0
  531. data/quickjs/a.js +26075 -0
  532. data/quickjs/a.rb +3 -0
  533. data/quickjs/cutils.c +631 -0
  534. data/quickjs/cutils.h +297 -0
  535. data/quickjs/doc/jsbignum.texi +589 -0
  536. data/quickjs/doc/quickjs.texi +1097 -0
  537. data/quickjs/examples/fib.c +72 -0
  538. data/quickjs/examples/fib_module.js +10 -0
  539. data/quickjs/examples/hello +0 -0
  540. data/quickjs/examples/hello.js +1 -0
  541. data/quickjs/examples/hello_module.js +6 -0
  542. data/quickjs/examples/pi_bigdecimal.js +68 -0
  543. data/quickjs/examples/pi_bigfloat.js +66 -0
  544. data/quickjs/examples/pi_bigint.js +118 -0
  545. data/quickjs/examples/point.c +151 -0
  546. data/quickjs/examples/test_fib.js +6 -0
  547. data/quickjs/examples/test_point.js +40 -0
  548. data/quickjs/hello.c +44 -0
  549. data/quickjs/libbf.c +8466 -0
  550. data/quickjs/libbf.h +535 -0
  551. data/quickjs/libquickjs.a +0 -0
  552. data/quickjs/libquickjs.lto.a +0 -0
  553. data/quickjs/libregexp-opcode.h +58 -0
  554. data/quickjs/libregexp.c +2610 -0
  555. data/quickjs/libregexp.h +92 -0
  556. data/quickjs/libunicode-table.h +4368 -0
  557. data/quickjs/libunicode.c +1556 -0
  558. data/quickjs/libunicode.h +124 -0
  559. data/quickjs/libwinpthread-1.dll +0 -0
  560. data/quickjs/list.h +100 -0
  561. data/quickjs/out.c +24 -0
  562. data/quickjs/out55.c +59 -0
  563. data/quickjs/out56.c +79 -0
  564. data/quickjs/out57.c +24 -0
  565. data/quickjs/out58.c +4 -0
  566. data/quickjs/p.exe +0 -0
  567. data/quickjs/qjs +0 -0
  568. data/quickjs/qjs.c +570 -0
  569. data/quickjs/qjsc +0 -0
  570. data/quickjs/qjsc.c +762 -0
  571. data/quickjs/qjsc.exe +0 -0
  572. data/quickjs/qjscalc.c +4005 -0
  573. data/quickjs/qjscalc.js +2657 -0
  574. data/quickjs/quickjs-atom.h +273 -0
  575. data/quickjs/quickjs-libc.c +3927 -0
  576. data/quickjs/quickjs-libc.h +59 -0
  577. data/quickjs/quickjs-opcode.h +365 -0
  578. data/quickjs/quickjs.c +54036 -0
  579. data/quickjs/quickjs.h +1049 -0
  580. data/quickjs/readme.txt +1 -0
  581. data/quickjs/release.sh +158 -0
  582. data/quickjs/repl.c +2020 -0
  583. data/quickjs/repl.js +1566 -0
  584. data/quickjs/run-test262 +0 -0
  585. data/quickjs/run-test262.c +2107 -0
  586. data/quickjs/test262.conf +199 -0
  587. data/quickjs/test262_errors.txt +35 -0
  588. data/quickjs/test262o.conf +410 -0
  589. data/quickjs/test262o_errors.txt +0 -0
  590. data/quickjs/tests/bjson.c +96 -0
  591. data/quickjs/tests/microbench.js +1065 -0
  592. data/quickjs/tests/test262.patch +71 -0
  593. data/quickjs/tests/test_bignum.js +326 -0
  594. data/quickjs/tests/test_bjson.js +191 -0
  595. data/quickjs/tests/test_builtin.js +685 -0
  596. data/quickjs/tests/test_closure.js +221 -0
  597. data/quickjs/tests/test_language.js +547 -0
  598. data/quickjs/tests/test_loop.js +368 -0
  599. data/quickjs/tests/test_op_overloading.js +207 -0
  600. data/quickjs/tests/test_qjscalc.js +256 -0
  601. data/quickjs/tests/test_std.js +281 -0
  602. data/quickjs/tests/test_worker.js +62 -0
  603. data/quickjs/tests/test_worker_module.js +31 -0
  604. data/quickjs/unicode_download.sh +19 -0
  605. data/quickjs/unicode_gen.c +3057 -0
  606. data/quickjs/unicode_gen_def.h +284 -0
  607. data/readline +3 -0
  608. data/rm_com +1 -0
  609. data/run.sh +13 -0
  610. data/scaling +6 -0
  611. data/script.js +572 -0
  612. data/server_creator/__ +307 -0
  613. data/server_creator/a/a (1).tar.gz +0 -0
  614. data/server_creator/a/a.out +0 -0
  615. data/server_creator/a/hello_world +0 -0
  616. data/server_creator/a/help +57 -0
  617. data/server_creator/a/main_v1.cpp +83 -0
  618. data/server_creator/a/my_libs_gregory/.deps +0 -0
  619. data/server_creator/a/my_libs_gregory/.libs/mod_my_libs_gregory.lai +41 -0
  620. data/server_creator/a/my_libs_gregory/.libs/mod_my_libs_gregory.o +0 -0
  621. data/server_creator/a/my_libs_gregory/.libs/mod_my_libs_gregory.so +0 -0
  622. data/server_creator/a/my_libs_gregory/mod_my_libs_gregory.c +72 -0
  623. data/server_creator/a/my_libs_gregory/mod_my_libs_gregory.la +41 -0
  624. data/server_creator/a/my_libs_gregory/mod_my_libs_gregory.lo +12 -0
  625. data/server_creator/a/my_libs_gregory/mod_my_libs_gregory.slo +0 -0
  626. data/server_creator/a/nginx.conf +32 -0
  627. data/server_creator/a/six +1 -0
  628. data/server_creator/a.out +0 -0
  629. data/server_creator/all_code.cpp +448 -0
  630. data/server_creator/all_code.js +27 -0
  631. data/server_creator/code +510 -0
  632. data/server_creator/make_application +64 -0
  633. data/server_creator/prog.cpp +33 -0
  634. data/server_creator/prog.js +22 -0
  635. data/server_creator/program.js +745 -0
  636. data/server_creator/rm_com +1 -0
  637. data/server_creator/test.sh +82 -0
  638. data/speakcat.rb +9 -0
  639. data/string +48 -0
  640. data/super_trans +83 -0
  641. data/test.sh +21 -0
  642. data/todo +8 -0
  643. data/version_decrement +3 -0
  644. data/viu_license +21 -0
  645. data/windows/program.c +21 -0
  646. data/windows/program.exe +0 -0
  647. metadata +759 -0
@@ -0,0 +1,601 @@
1
+ # A basic, experimental and ugly DSL to write Crystal code using Crystal code
2
+ class Crout
3
+ enum Type
4
+ Module
5
+ Class
6
+ Struct
7
+ Enum
8
+ Union
9
+ Lib
10
+ end
11
+
12
+ enum ArgPrefix
13
+ None
14
+ Splat
15
+ KeywordSplat
16
+ BlockCapture
17
+ end
18
+
19
+ record ArgDef,
20
+ name : String?,
21
+ external : String?,
22
+ type : String?,
23
+ default : String?,
24
+ prefix : ArgPrefix do
25
+ def to_s(io)
26
+ case prefix
27
+ when .none?
28
+ when .splat?
29
+ io << '*'
30
+ when .keyword_splat?
31
+ io << "**"
32
+ when .block_capture?
33
+ io << '&'
34
+ end
35
+
36
+ io << external << ' ' if external
37
+ io << name
38
+ io << " : " << type if type
39
+ io << " = " << default if default
40
+ end
41
+ end
42
+
43
+ class Expression
44
+ def initialize(@builder : Crout ->)
45
+ end
46
+
47
+ def to_s(io : IO)
48
+ write Crout.new(io)
49
+ end
50
+
51
+ def write(writer : Crout)
52
+ @builder.call(writer)
53
+ end
54
+ end
55
+
56
+ class IfExpression < Expression
57
+ @elsifs = [] of IfExpression
58
+ @else : Proc(Crout, Nil)? = nil
59
+
60
+ def initialize(@condition : String | Expression, @builder : Crout ->)
61
+ end
62
+
63
+ def elsif(condition, &true_branch : Crout ->)
64
+ @elsifs << IfExpression.new(condition, true_branch)
65
+ self
66
+ end
67
+
68
+ def else(&@else : Crout ->)
69
+ self
70
+ end
71
+
72
+ def write(b : Crout)
73
+ if (condition = @condition) && condition.is_a?(NegateExpression) && @elsifs.empty?
74
+ b.write "unless "
75
+ condition.inner(b)
76
+ b.write '\n'
77
+ else
78
+ b.write "if ", @condition, '\n'
79
+ end
80
+ b.indented { @builder.call(b) }
81
+
82
+ @elsifs.each do |the_elsif|
83
+ b.line "elsif ", the_elsif.@condition
84
+ b.indented { the_elsif.@builder.call(b) }
85
+ end
86
+
87
+ if the_else = @else
88
+ b.line "else"
89
+ b.indented { the_else.call(b) }
90
+ end
91
+
92
+ b.line "end"
93
+ end
94
+ end
95
+
96
+ class NegateExpression < Expression
97
+ def write(b : Crout)
98
+ b.write "!("
99
+ inner(b)
100
+ b.write ')'
101
+ end
102
+
103
+ def inner(b : Crout)
104
+ @builder.call(b)
105
+ end
106
+ end
107
+
108
+ class VarPool
109
+ PREFIX = "__var"
110
+
111
+ @counter = 0
112
+
113
+ def obtain
114
+ "#{PREFIX}#{@counter}".tap { @counter += 1 }
115
+ end
116
+
117
+ def reset
118
+ @counter = 0
119
+ end
120
+
121
+ def register(name : String)
122
+ if name.starts_with?(PREFIX) && (counter = name.lchop(PREFIX).to_i?)
123
+ @counter = counter + 1 if counter > @counter
124
+ end
125
+ end
126
+ end
127
+
128
+ def self.build
129
+ String.build { |io|
130
+ build(io) { |builder|
131
+ with builder yield builder
132
+ }
133
+ }
134
+ end
135
+
136
+ def self.build(io : IO)
137
+ builder = new(io)
138
+ with builder yield builder
139
+ io
140
+ end
141
+
142
+ @current_indent = 0
143
+ @first_section = true
144
+ @skip_next_section_separator = false
145
+ @var_pool = VarPool.new
146
+ @end_of_line_comment : String? = nil
147
+ @section_line_count = 0
148
+ @write_ops = 0
149
+
150
+ def initialize(@io : IO)
151
+ end
152
+
153
+ def def_module(name)
154
+ def_type(:module, name) { with self yield self }
155
+ end
156
+
157
+ def def_class(name, parent : String? = nil)
158
+ def_type(:class, name, parent: parent) { with self yield self }
159
+ end
160
+
161
+ def def_struct(name, parent : String? = nil)
162
+ def_type(:struct, name, parent: parent) { with self yield self }
163
+ end
164
+
165
+ def def_enum(name, type : String? = nil)
166
+ def_type(:enum, name, type: type) { with self yield self }
167
+ end
168
+
169
+ def def_union(name)
170
+ def_type(:union, name) { with self yield self }
171
+ end
172
+
173
+ def def_lib(name)
174
+ def_type(:lib, name) { with self yield self }
175
+ end
176
+
177
+ def def_type(kind : Type, name, parent : String? = nil, type : String? = nil)
178
+ section do
179
+ line do
180
+ case kind
181
+ when .module?
182
+ write "module"
183
+ when .class?
184
+ write "class"
185
+ when .struct?
186
+ write "struct"
187
+ when .enum?
188
+ write "enum"
189
+ when .union?
190
+ write "union"
191
+ when .lib?
192
+ write "lib"
193
+ end
194
+
195
+ write ' ', name
196
+ write " < ", parent if parent
197
+ write " : ", type if type
198
+ end
199
+
200
+ indented { yield self }
201
+ line "end"
202
+ end
203
+ end
204
+
205
+ def write_annotation(name, *args, **kwargs)
206
+ self.annotation(name, *args)
207
+ end
208
+
209
+ def annotation(name, *args, **kwargs)
210
+ args = args.to_a + kwargs.map { |k, v| "#{k}: #{v}" }
211
+ attach_to_next_section do
212
+ line do
213
+ write "@[", name, '('
214
+ join(args, sep: ", ")
215
+ write ")]"
216
+ end
217
+ end
218
+ end
219
+
220
+ def add_include(constant)
221
+ line "include ", constant
222
+ end
223
+
224
+ def def_method(name, *args : ArgDef, class_method = false, return_type : String? = nil)
225
+ def_method(name, args, class_method: class_method, return_type: return_type) { }
226
+ end
227
+
228
+ def def_method(name, *args : ArgDef, class_method = false, return_type : String? = nil)
229
+ def_method(name, args, class_method: class_method, return_type: return_type) { with self yield self }
230
+ end
231
+
232
+ def def_method(name, args : Enumerable(ArgDef)? = nil, class_method = false, return_type : String? = nil)
233
+ def_method(name, args, class_method: class_method, return_type: return_type) { }
234
+ end
235
+
236
+ def def_method(name, args : Enumerable(ArgDef)? = nil, class_method = false, return_type : String? = nil)
237
+ section(new_scope: true) do
238
+ line do
239
+ write "def "
240
+ write "self." if class_method
241
+ write name
242
+ if args && !args.empty?
243
+ write '('
244
+ join(args, sep: ", ")
245
+ write ')'
246
+ args.each { |arg| @var_pool.register name if name = arg.name }
247
+ end
248
+ write " : ", return_type if return_type
249
+ end
250
+ indented { with self yield self }
251
+ line "end"
252
+ end
253
+ end
254
+
255
+ def fun_binding(symbol, *args : ArgDef, name = symbol, return_type : String? = nil)
256
+ fun_binding(symbol, args, name: name, return_type: return_type)
257
+ end
258
+
259
+ def fun_binding(symbol, args : Enumerable(ArgDef)? = nil, name = symbol, return_type : String? = nil)
260
+ line do
261
+ write "fun "
262
+ write name, " = " if name != symbol
263
+ write symbol
264
+ if args && !args.empty?
265
+ write '('
266
+ join(args, sep: ", ")
267
+ write ')'
268
+ end
269
+ write " : ", return_type if return_type
270
+ end
271
+ end
272
+
273
+ def field_binding(name, type)
274
+ line name, " : ", type
275
+ end
276
+
277
+ def def_alias(name, type)
278
+ line "alias ", name, " = ", type
279
+ end
280
+
281
+ def def_proc(args, &body : Crout ->)
282
+ expression do |b|
283
+ b.write "-> "
284
+ if args && !args.empty?
285
+ b.write '('
286
+ b.join(args, sep: ", ")
287
+ b.write ") "
288
+ end
289
+ b.write "{\n"
290
+ b.indented { body.call(b) }
291
+ b.line "}"
292
+ end
293
+ end
294
+
295
+ def proc_type(*args : String, return_type : String? = nil)
296
+ proc_type(args, return_type: return_type)
297
+ end
298
+
299
+ def proc_type(args : Enumerable(String)? = nil, return_type : String? = nil)
300
+ expression do |b|
301
+ if args && !args.empty?
302
+ join(args, sep: ", ")
303
+ write ' '
304
+ end
305
+ write "->"
306
+ write ' ', return_type if return_type
307
+ end
308
+ end
309
+
310
+ def arg(name, *, external : String? = nil, type = nil, default : String? = nil, prefix : ArgPrefix = ArgPrefix::None)
311
+ ArgDef.new(name, external, type, default, prefix)
312
+ end
313
+
314
+ def call(name, *args, receiver : String | Expression? = nil)
315
+ _call(name, args, receiver: receiver) { }
316
+ end
317
+
318
+ def call(name, args : Enumerable, receiver : String | Expression? = nil)
319
+ _call(name, args, receiver: receiver) { }
320
+ end
321
+
322
+ def call(name, *args, receiver : String | Expression? = nil, block_args : Enumerable(String)? = nil, &block : Crout ->)
323
+ call(name, args, receiver: receiver, block_args: block_args, &block)
324
+ end
325
+
326
+ def call(name, args : Enumerable, receiver : String | Expression? = nil, block_args : Enumerable(String)? = nil, &block : Crout ->)
327
+ _call(name, args, receiver: receiver) do |b|
328
+ b.write " {"
329
+ if (bargs = block_args) && !bargs.empty?
330
+ b.write " |"
331
+ b.join(bargs, sep: ", ")
332
+ b.write '|'
333
+ end
334
+ b.write '\n'
335
+ b.indented { block.call(b) }
336
+ b.write_indent
337
+ b.write "}"
338
+ end
339
+ end
340
+
341
+ private def _call(name, args, receiver : String | Expression? = nil, &block : Crout ->)
342
+ subscript = receiver && name[0] == '['
343
+ operator = receiver && {'=', '-', '+', '*', '/', '&', '<', '>'}.includes? name[0]
344
+ keyword = receiver.nil? && name == "require"
345
+ call_args = Array(Expression | String).new
346
+ args.each do |arg|
347
+ if arg.is_a?(NamedTuple) || arg.is_a?(Hash)
348
+ arg.each do |k, v|
349
+ call_args << expression { |b|
350
+ b.write k
351
+ b.write ": "
352
+ b.write v
353
+ }
354
+ end
355
+ elsif arg
356
+ call_args << arg
357
+ end
358
+ end
359
+
360
+ expression do |b|
361
+ if subscript
362
+ b.write receiver if receiver
363
+ b.write '['
364
+ b.join(call_args, sep: ", ")
365
+ b.write name.lchop('[')
366
+ elsif operator
367
+ raise ArgumentError.new "operator call #{name} needs exactly one argument" unless args.size == 1
368
+ b.write receiver, ' ' if receiver
369
+ b.write name
370
+ b.write ' ' if receiver # If no receiver this might be a prefix call like: +foo
371
+ b.write call_args.first?
372
+ else
373
+ b.write receiver, '.' if receiver
374
+ b.write name
375
+ b.write keyword ? ' ' : '(' unless args.empty?
376
+ b.join(call_args, sep: ", ")
377
+ b.write ')' unless args.empty? || keyword
378
+ end
379
+
380
+ block.call(b)
381
+ end
382
+ end
383
+
384
+ def invoke_yield(*args)
385
+ expression do |b|
386
+ b.write "yield"
387
+ unless args.empty?
388
+ b.write '('
389
+ b.join(args, sep: ", ")
390
+ b.write ')'
391
+ end
392
+ end
393
+ end
394
+
395
+ def declare_var
396
+ @var_pool.obtain
397
+ end
398
+
399
+ def assign_var(expression)
400
+ assign declare_var, expression
401
+ end
402
+
403
+ def assign(lhs, rhs)
404
+ expr = expression do |b|
405
+ if (name = lhs) && name.is_a?(String) && name =~ /\A[a-z]\w+\z/
406
+ @var_pool.register(name)
407
+ end
408
+ b.write lhs, " = ", rhs
409
+ end
410
+ {lhs.as(String | Expression), expr.as(String | Expression)} # Cast here so the line overload gets hit
411
+ end
412
+
413
+ def def_instance_var(name, type, default : String? = nil)
414
+ expr = expression do |b|
415
+ b.write name, " : ", type
416
+ b.write " = ", default if default
417
+ end
418
+
419
+ {name.as(String | Expression), expr.as(String | Expression)}
420
+ end
421
+
422
+ def negate(expression)
423
+ NegateExpression.new ->(b : Crout) { b.write expression }
424
+ end
425
+
426
+ def literal(value)
427
+ case value
428
+ when Int8
429
+ "#{value}i8"
430
+ when UInt8
431
+ "#{value}u8"
432
+ when Int16
433
+ "#{value}i16"
434
+ when UInt16
435
+ "#{value}u16"
436
+ when Int64
437
+ "#{value}i64"
438
+ when UInt64
439
+ "#{value}u64"
440
+ when String
441
+ value.inspect
442
+ else
443
+ value.inspect
444
+ end
445
+ end
446
+
447
+ def tuple(expressions)
448
+ return call("new", receiver: "Tuple") if expressions.nil? || expressions.empty?
449
+
450
+ expression do |b|
451
+ b.write '{'
452
+ b.join(expressions, sep: ", ")
453
+ b.write '}'
454
+ end
455
+ end
456
+
457
+ def interpolation(value)
458
+ "\#{#{value}}"
459
+ end
460
+
461
+ def var(name : String)
462
+ name
463
+ end
464
+
465
+ def comment(message)
466
+ end_of_line_comment message
467
+ line
468
+ end
469
+
470
+ def end_of_line_comment(message)
471
+ @end_of_line_comment = message
472
+ end
473
+
474
+ def indented
475
+ previous_indent = @current_indent
476
+ @current_indent += 1
477
+ with self yield self
478
+ ensure
479
+ @current_indent = previous_indent || 0
480
+ end
481
+
482
+ def section(new_scope = false)
483
+ write "\n" if @last_section_indent == @current_indent && !@skip_next_section_separator
484
+ old_var_pool = @var_pool
485
+ @var_pool = VarPool.new if new_scope
486
+ @skip_next_section_separator = false
487
+ with self yield self
488
+ ensure
489
+ @last_section_indent = @current_indent
490
+ @var_pool = old_var_pool || VarPool.new if new_scope
491
+ end
492
+
493
+ def attach_to_next_section
494
+ write "\n" if @last_section_indent == @current_indent && !@skip_next_section_separator
495
+ with self yield self
496
+ @skip_next_section_separator = true
497
+ end
498
+
499
+ def source_location(path, line = 1, col = 1)
500
+ return unless path
501
+
502
+ attach_to_next_section do
503
+ line "#<loc:push>", "#<loc:", '"', path, '"', ',', line, ',', col, '>'
504
+ end
505
+
506
+ with self yield self
507
+ ensure
508
+ line "#<loc:pop>"
509
+ end
510
+
511
+ def expression(&builder : Crout ->)
512
+ Expression.new(builder)
513
+ end
514
+
515
+ def ternary(condition, true_branch, false_branch)
516
+ expression &.write condition, " ? ", true_branch, " : ", false_branch
517
+ end
518
+
519
+ def conditional_line(condition, *atoms)
520
+ line do
521
+ write(*atoms)
522
+ if condition.is_a?(NegateExpression)
523
+ write " unless "
524
+ condition.inner(self)
525
+ else
526
+ write " if ", condition
527
+ end
528
+ end
529
+ end
530
+
531
+ def conditional_line(condition, assign : {String | Expression, String | Expression})
532
+ conditional_line condition, assign[1]
533
+ assign[0]
534
+ end
535
+
536
+ def def_if(condition, &true_branch : Crout ->)
537
+ IfExpression.new(condition, true_branch)
538
+ end
539
+
540
+ def line
541
+ line { }
542
+ end
543
+
544
+ def line(*atoms)
545
+ line { write(*atoms) }
546
+ end
547
+
548
+ def line(assign : {String | Expression, String | Expression})
549
+ line assign[1]
550
+ assign[0]
551
+ end
552
+
553
+ def line
554
+ write_indent
555
+
556
+ has_content = capture_progress { with self yield self } > 0
557
+
558
+ if message = @end_of_line_comment
559
+ write ' ' if has_content
560
+ write '#'
561
+ write ' ' unless message.starts_with? '#'
562
+ write message
563
+ @end_of_line_comment = nil
564
+ end
565
+
566
+ write "\n"
567
+ end
568
+
569
+ # Returns how many write operations were triggered from the passed block.
570
+ def capture_progress
571
+ ops = @write_ops
572
+ with self yield self
573
+ (@write_ops - ops).abs
574
+ end
575
+
576
+ def write_indent
577
+ @current_indent.times { write " " }
578
+ end
579
+
580
+ def join(*args, sep : String | Char = "")
581
+ join(args, sep: sep)
582
+ end
583
+
584
+ def join(args, *, sep : String | Char = "") : Nil
585
+ return if args.empty?
586
+
587
+ first = true
588
+ args.each do |arg|
589
+ write sep unless first
590
+ write arg
591
+ first = false
592
+ end
593
+ end
594
+
595
+ def write(*atoms) : Nil
596
+ return if atoms.empty?
597
+
598
+ @write_ops &+= 1
599
+ atoms.each { |atom| atom.is_a?(Expression) ? atom.write(self) : @io << atom }
600
+ end
601
+ end
@@ -0,0 +1,116 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Democracy software compilation VERSION 0.0., created on 2021-11-14 17:41:34 -0500
4
+ # Get all of this code, and all of these files, with
5
+ # gem install democracy
6
+ # Linux ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
7
+ #
8
+ # Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
11
+
12
+
13
+
14
+
15
+
16
+ # 46 of 16 source files
17
+ module GIRepository
18
+ require_relative "string__"
19
+ class Dumper
20
+ macro def
21
+ def dump(dumper, & : BaseInfo ->)
22
+ super(dumper) {|i| yield i }
23
+ {{yield}}
24
+ end
25
+ end
26
+
27
+ macro dump_childs(kind, plural = nil)
28
+ {% plural = plural ? plural : "#{kind}s".id %}
29
+ if {{plural}}_size > 0
30
+ dumper.puts "* {{plural}}"
31
+ dumper.nest(2) do
32
+ each_{{kind}} {|c| yield c }
33
+ end
34
+ end
35
+ end
36
+
37
+ macro dump_child(name)
38
+ %child = {{name}}
39
+ if %child
40
+ dumper.puts "* {{name}}"
41
+ dumper.nest(2) do
42
+ yield %child
43
+ end
44
+ end
45
+ end
46
+
47
+ getter io
48
+
49
+ @nesting = [] of BaseInfo
50
+ @indent = 0
51
+ @max_nesting = 3
52
+
53
+ def initialize(@io : IO)
54
+ end
55
+
56
+ def initialize(@io : IO, @max_nesting : Int32?)
57
+ end
58
+
59
+ def puts(str)
60
+ @io << indent
61
+ @io.puts str
62
+ end
63
+
64
+ def nest(inc = 1)
65
+ @indent += inc
66
+ yield
67
+ @indent -= inc
68
+ end
69
+
70
+ def base_indent
71
+ " " * (@indent - 1)
72
+ end
73
+
74
+ def indent
75
+ " " * @indent
76
+ end
77
+
78
+ def nesting_limit?
79
+ max_nesting = @max_nesting
80
+ return false unless max_nesting
81
+ @nesting.size >= max_nesting
82
+ end
83
+
84
+ def dump(info)
85
+ @nesting << info
86
+ nest do
87
+ info.dump(self) do |child|
88
+ next unless child
89
+
90
+ if @nesting.includes?(child)
91
+ child.dump_base(self)
92
+ puts "<...> (self referential)"
93
+ next
94
+ end
95
+
96
+ if nesting_limit? || child.info_type.unresolved?
97
+ child.dump_base(self)
98
+ next
99
+ end
100
+
101
+ dump(child)
102
+ end
103
+ end
104
+ @nesting.pop
105
+ end
106
+ end
107
+ end
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+ # Feedback and donation to gregorycohen2@gmail.com (money transfer or Paypal)