basedpl 0.1.45__tar.gz → 0.1.46__tar.gz

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.
Files changed (431) hide show
  1. {basedpl-0.1.45 → basedpl-0.1.46}/Cargo.lock +7 -7
  2. {basedpl-0.1.45 → basedpl-0.1.46}/Cargo.toml +2 -2
  3. {basedpl-0.1.45 → basedpl-0.1.46}/DEV.md +8 -8
  4. {basedpl-0.1.45 → basedpl-0.1.46}/PKG-INFO +1 -1
  5. {basedpl-0.1.45 → basedpl-0.1.46}/lib/array.bpl +2 -2
  6. {basedpl-0.1.45 → basedpl-0.1.46}/lib/dyalog.bpl +4 -4
  7. {basedpl-0.1.45 → basedpl-0.1.46}/lib/graph.bpl +2 -2
  8. {basedpl-0.1.45 → basedpl-0.1.46}/lib/numeric.bpl +1 -1
  9. {basedpl-0.1.45 → basedpl-0.1.46}/lib/tree.bpl +2 -2
  10. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/arrays.ipynb +2 -2
  11. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/comparison.qmd +1 -1
  12. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/evaluation.qmd +2 -1
  13. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/gallery/phyllotaxis.bpl +1 -1
  14. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/ceiling.qmd +1 -1
  15. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/circle.qmd +6 -2
  16. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/floor.qmd +1 -1
  17. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/key.qmd +2 -2
  18. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/stencil.qmd +3 -3
  19. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/keyed.ipynb +1 -1
  20. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/llms.txt +2 -2
  21. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/syntax.qmd +3 -2
  22. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/decompose.qmd +8 -1
  23. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/prefs.qmd +4 -0
  24. {basedpl-0.1.45 → basedpl-0.1.46}/src/array/storage.rs +14 -4
  25. {basedpl-0.1.45 → basedpl-0.1.46}/src/array/text.rs +2 -2
  26. {basedpl-0.1.45 → basedpl-0.1.46}/src/array.rs +121 -49
  27. {basedpl-0.1.45 → basedpl-0.1.46}/src/data.rs +3 -3
  28. {basedpl-0.1.45 → basedpl-0.1.46}/src/display.rs +12 -4
  29. {basedpl-0.1.45 → basedpl-0.1.46}/src/element.rs +15 -16
  30. {basedpl-0.1.45 → basedpl-0.1.46}/src/eval/binder.rs +124 -66
  31. {basedpl-0.1.45 → basedpl-0.1.46}/src/eval/operators.rs +58 -11
  32. {basedpl-0.1.45 → basedpl-0.1.46}/src/eval/session.rs +8 -3
  33. {basedpl-0.1.45 → basedpl-0.1.46}/src/eval.rs +4 -2
  34. {basedpl-0.1.45 → basedpl-0.1.46}/src/execution.rs +7 -6
  35. {basedpl-0.1.45 → basedpl-0.1.46}/src/fusion.rs +59 -34
  36. {basedpl-0.1.45 → basedpl-0.1.46}/src/image.rs +4 -2
  37. {basedpl-0.1.45 → basedpl-0.1.46}/src/keyed.rs +1 -1
  38. {basedpl-0.1.45 → basedpl-0.1.46}/src/lib.rs +1 -1
  39. {basedpl-0.1.45 → basedpl-0.1.46}/src/number.rs +4 -12
  40. {basedpl-0.1.45 → basedpl-0.1.46}/src/number_theory.rs +7 -7
  41. {basedpl-0.1.45 → basedpl-0.1.46}/src/pervasive.rs +127 -86
  42. {basedpl-0.1.45 → basedpl-0.1.46}/src/plot.rs +1 -1
  43. {basedpl-0.1.45 → basedpl-0.1.46}/src/polynomial.rs +5 -5
  44. {basedpl-0.1.45 → basedpl-0.1.46}/src/primitive/indexing.rs +3 -3
  45. {basedpl-0.1.45 → basedpl-0.1.46}/src/primitive/numeric.rs +125 -28
  46. {basedpl-0.1.45 → basedpl-0.1.46}/src/primitive/search.rs +22 -18
  47. {basedpl-0.1.45 → basedpl-0.1.46}/src/primitive/structural.rs +12 -14
  48. {basedpl-0.1.45 → basedpl-0.1.46}/src/primitive.rs +5 -5
  49. {basedpl-0.1.45 → basedpl-0.1.46}/src/search.rs +19 -5
  50. {basedpl-0.1.45 → basedpl-0.1.46}/src/selection.rs +1 -1
  51. {basedpl-0.1.45 → basedpl-0.1.46}/src/syntax.rs +16 -5
  52. {basedpl-0.1.45 → basedpl-0.1.46}/src/system.rs +1 -1
  53. {basedpl-0.1.45 → basedpl-0.1.46}/tests/core.rs +8 -0
  54. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/aplcart.bpl +33 -33
  55. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/april.bpl +3 -3
  56. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/bqn.bpl +12 -12
  57. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/core.bpl +23 -10
  58. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/ngn.bpl +3 -3
  59. {basedpl-0.1.45 → basedpl-0.1.46}/tests/speed.txt +171 -163
  60. {basedpl-0.1.45 → basedpl-0.1.46}/.cargo/config.toml +0 -0
  61. {basedpl-0.1.45 → basedpl-0.1.46}/.gitattributes +0 -0
  62. {basedpl-0.1.45 → basedpl-0.1.46}/.github/workflows/ci.yml +0 -0
  63. {basedpl-0.1.45 → basedpl-0.1.46}/.github/workflows/docs.yml +0 -0
  64. {basedpl-0.1.45 → basedpl-0.1.46}/.github/workflows/speed.yml +0 -0
  65. {basedpl-0.1.45 → basedpl-0.1.46}/.github/workflows/test.yml +0 -0
  66. {basedpl-0.1.45 → basedpl-0.1.46}/.gitignore +0 -0
  67. {basedpl-0.1.45 → basedpl-0.1.46}/CONTRIBUTING.md +0 -0
  68. {basedpl-0.1.45 → basedpl-0.1.46}/LICENSE +0 -0
  69. {basedpl-0.1.45 → basedpl-0.1.46}/README.md +0 -0
  70. {basedpl-0.1.45 → basedpl-0.1.46}/_config.yml +0 -0
  71. {basedpl-0.1.45 → basedpl-0.1.46}/_layouts/default.html +0 -0
  72. {basedpl-0.1.45 → basedpl-0.1.46}/build.rs +0 -0
  73. {basedpl-0.1.45 → basedpl-0.1.46}/editors/jetbrains/BPL.tmbundle/Syntaxes/bpl.tmLanguage.json +0 -0
  74. {basedpl-0.1.45 → basedpl-0.1.46}/editors/jetbrains/BPL.tmbundle/info.plist +0 -0
  75. {basedpl-0.1.45 → basedpl-0.1.46}/editors/jetbrains/BPL.xml +0 -0
  76. {basedpl-0.1.45 → basedpl-0.1.46}/editors/jetbrains/README.md +0 -0
  77. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-de.bundle/Contents/Info.plist +0 -0
  78. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-de.bundle/Contents/Resources/BasedPL-de.icns +0 -0
  79. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-de.bundle/Contents/Resources/BasedPL-de.keylayout +0 -0
  80. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-de.bundle/Contents/Resources/en.lproj/InfoPlist.strings +0 -0
  81. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-de.bundle/Contents/version.plist +0 -0
  82. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-de.txt +0 -0
  83. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-es.bundle/Contents/Info.plist +0 -0
  84. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-es.bundle/Contents/Resources/BasedPL-es.icns +0 -0
  85. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-es.bundle/Contents/Resources/BasedPL-es.keylayout +0 -0
  86. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-es.bundle/Contents/Resources/en.lproj/InfoPlist.strings +0 -0
  87. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-es.bundle/Contents/version.plist +0 -0
  88. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-es.txt +0 -0
  89. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-fr.bundle/Contents/Info.plist +0 -0
  90. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-fr.bundle/Contents/Resources/BasedPL-fr.icns +0 -0
  91. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-fr.bundle/Contents/Resources/BasedPL-fr.keylayout +0 -0
  92. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-fr.bundle/Contents/Resources/en.lproj/InfoPlist.strings +0 -0
  93. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-fr.bundle/Contents/version.plist +0 -0
  94. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-fr.txt +0 -0
  95. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-uk.bundle/Contents/Info.plist +0 -0
  96. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-uk.bundle/Contents/Resources/BasedPL-uk.icns +0 -0
  97. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-uk.bundle/Contents/Resources/BasedPL-uk.keylayout +0 -0
  98. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-uk.bundle/Contents/Resources/en.lproj/InfoPlist.strings +0 -0
  99. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-uk.bundle/Contents/version.plist +0 -0
  100. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-uk.txt +0 -0
  101. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-us.bundle/Contents/Info.plist +0 -0
  102. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-us.bundle/Contents/Resources/BasedPL-us.icns +0 -0
  103. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-us.bundle/Contents/Resources/BasedPL-us.keylayout +0 -0
  104. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-us.bundle/Contents/Resources/en.lproj/InfoPlist.strings +0 -0
  105. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-us.bundle/Contents/version.plist +0 -0
  106. {basedpl-0.1.45 → basedpl-0.1.46}/editors/macos/BasedPL-us.txt +0 -0
  107. {basedpl-0.1.45 → basedpl-0.1.46}/editors/vim/ftdetect/bpl.vim +0 -0
  108. {basedpl-0.1.45 → basedpl-0.1.46}/editors/vim/syntax/bpl.vim +0 -0
  109. {basedpl-0.1.45 → basedpl-0.1.46}/editors/windows/README.md +0 -0
  110. {basedpl-0.1.45 → basedpl-0.1.46}/editors/windows/build.ps1 +0 -0
  111. {basedpl-0.1.45 → basedpl-0.1.46}/editors/windows/install.ps1 +0 -0
  112. {basedpl-0.1.45 → basedpl-0.1.46}/editors/windows/keyboard.c +0 -0
  113. {basedpl-0.1.45 → basedpl-0.1.46}/editors/windows/keyboard.def +0 -0
  114. {basedpl-0.1.45 → basedpl-0.1.46}/editors/windows/keyboard.rc +0 -0
  115. {basedpl-0.1.45 → basedpl-0.1.46}/editors/windows/layout.h +0 -0
  116. {basedpl-0.1.45 → basedpl-0.1.46}/index_files/figure-commonmark/cell-17-output-1.svg +0 -0
  117. {basedpl-0.1.45 → basedpl-0.1.46}/index_files/figure-commonmark/cell-18-output-1.svg +0 -0
  118. {basedpl-0.1.45 → basedpl-0.1.46}/index_files/figure-html/cell-17-output-1.svg +0 -0
  119. {basedpl-0.1.45 → basedpl-0.1.46}/index_files/figure-html/cell-18-output-1.svg +0 -0
  120. {basedpl-0.1.45 → basedpl-0.1.46}/lib/LICENSE-april +0 -0
  121. {basedpl-0.1.45 → basedpl-0.1.46}/lib/README.md +0 -0
  122. {basedpl-0.1.45 → basedpl-0.1.46}/lib/power.bpl +0 -0
  123. {basedpl-0.1.45 → basedpl-0.1.46}/lib/regex.bpl +0 -0
  124. {basedpl-0.1.45 → basedpl-0.1.46}/lib/string.bpl +0 -0
  125. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/.gitignore +0 -0
  126. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/_quarto.yml +0 -0
  127. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/assignment.ipynb +0 -0
  128. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/bpl.xml +0 -0
  129. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/bqn.xml +0 -0
  130. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/bracket-types.ipynb +0 -0
  131. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/cli.qmd +0 -0
  132. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/data.ipynb +0 -0
  133. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/dfns.ipynb +0 -0
  134. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/distributions.ipynb +0 -0
  135. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/driver.js +0 -0
  136. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/dyalog.ipynb +0 -0
  137. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/dyalog.xml +0 -0
  138. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/fonts/LICENSE-SAX2 +0 -0
  139. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/fonts/README.md +0 -0
  140. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/fonts/SAX2B.ttf +0 -0
  141. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/fonts/SAX2B.woff2 +0 -0
  142. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/fonts.css +0 -0
  143. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/gallery/attractor.bpl +0 -0
  144. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/gallery/boids.bpl +0 -0
  145. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/gallery/dragon.bpl +0 -0
  146. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/gallery/flow.bpl +0 -0
  147. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/gallery/mandelbrot.bpl +0 -0
  148. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/gallery/mandelbrot32.bpl +0 -0
  149. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/gallery/orbits.bpl +0 -0
  150. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/gallery/prefs.bpl +0 -0
  151. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/gallery/reaction.bpl +0 -0
  152. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/gallery.qmd +0 -0
  153. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/getting-started.ipynb +0 -0
  154. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/_metadata.yml +0 -0
  155. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/add.qmd +0 -0
  156. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/after.qmd +0 -0
  157. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/agenda.qmd +0 -0
  158. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/alpha-underbar.qmd +0 -0
  159. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/alpha.qmd +0 -0
  160. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/and.qmd +0 -0
  161. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/assign.qmd +0 -0
  162. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/atop.qmd +0 -0
  163. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/axis.qmd +0 -0
  164. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/backslash-bar.qmd +0 -0
  165. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/backslash.qmd +0 -0
  166. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/before.qmd +0 -0
  167. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/braces.qmd +0 -0
  168. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/brackets.qmd +0 -0
  169. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/bullet.qmd +0 -0
  170. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/colon.qmd +0 -0
  171. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/comma.qmd +0 -0
  172. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/comment.qmd +0 -0
  173. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/commute.qmd +0 -0
  174. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/dash.qmd +0 -0
  175. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/decode.qmd +0 -0
  176. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/del-diaeresis.qmd +0 -0
  177. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/del.qmd +0 -0
  178. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/derivative.qmd +0 -0
  179. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/diamond.qmd +0 -0
  180. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/div.qmd +0 -0
  181. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/domino.qmd +0 -0
  182. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/dot.qmd +0 -0
  183. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/drop.qmd +0 -0
  184. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/each.qmd +0 -0
  185. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/enclose.qmd +0 -0
  186. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/encode.qmd +0 -0
  187. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/equal.qmd +0 -0
  188. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/error-guard.qmd +0 -0
  189. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/execute.qmd +0 -0
  190. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/factor.qmd +0 -0
  191. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/factorial.qmd +0 -0
  192. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/find.qmd +0 -0
  193. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/format.qmd +0 -0
  194. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/grade-down.qmd +0 -0
  195. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/grade-up.qmd +0 -0
  196. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/greater-or-equal.qmd +0 -0
  197. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/greater.qmd +0 -0
  198. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/hash.qmd +0 -0
  199. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/infinity.qmd +0 -0
  200. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/intersection.qmd +0 -0
  201. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/inverse-pair.qmd +0 -0
  202. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/inverted-question.qmd +0 -0
  203. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/iota.qmd +0 -0
  204. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/left.qmd +0 -0
  205. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/less-or-equal.qmd +0 -0
  206. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/less.qmd +0 -0
  207. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/log.qmd +0 -0
  208. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/match.qmd +0 -0
  209. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/member.qmd +0 -0
  210. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/mix.qmd +0 -0
  211. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/mul.qmd +0 -0
  212. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/nand.qmd +0 -0
  213. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/nest.qmd +0 -0
  214. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/nor.qmd +0 -0
  215. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/not-equal.qmd +0 -0
  216. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/omega-underbar.qmd +0 -0
  217. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/omega.qmd +0 -0
  218. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/or.qmd +0 -0
  219. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/outer-product.qmd +0 -0
  220. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/over.qmd +0 -0
  221. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/overbar.qmd +0 -0
  222. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/parentheses.qmd +0 -0
  223. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/pi.qmd +0 -0
  224. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/polynomial.qmd +0 -0
  225. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/power.qmd +0 -0
  226. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/prime.qmd +0 -0
  227. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/quad.qmd +0 -0
  228. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/question.qmd +0 -0
  229. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/quote.qmd +0 -0
  230. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/range.qmd +0 -0
  231. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/rank.qmd +0 -0
  232. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/reverse-first.qmd +0 -0
  233. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/reverse.qmd +0 -0
  234. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/rho.qmd +0 -0
  235. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/right.qmd +0 -0
  236. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/root.qmd +0 -0
  237. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/slash-bar.qmd +0 -0
  238. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/slash.qmd +0 -0
  239. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/squad.qmd +0 -0
  240. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/star.qmd +0 -0
  241. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/stile.qmd +0 -0
  242. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/table.qmd +0 -0
  243. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/take.qmd +0 -0
  244. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/tally.qmd +0 -0
  245. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/tilde.qmd +0 -0
  246. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/transpose.qmd +0 -0
  247. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/under.qmd +0 -0
  248. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/union.qmd +0 -0
  249. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/valences.qmd +0 -0
  250. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/where.qmd +0 -0
  251. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/windows.qmd +0 -0
  252. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs/zilde.qmd +0 -0
  253. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/glyphs.qmd +0 -0
  254. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/index.ipynb +0 -0
  255. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/introspection.ipynb +0 -0
  256. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/keyboard.qmd +0 -0
  257. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/magics.ipynb +0 -0
  258. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/modules.qmd +0 -0
  259. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/nbdev.yml +0 -0
  260. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/notebooks.ipynb +0 -0
  261. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/numbers.qmd +0 -0
  262. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/overview.ipynb +0 -0
  263. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/papers/aplwiki-arrays.md +0 -0
  264. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/papers/brickman-depth-1-scalars.md +0 -0
  265. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/papers/mercer-based-system.md +0 -0
  266. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/playground/bpl.js +0 -0
  267. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/playground/gallery.js +0 -0
  268. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/playground/monaco-worker.js +0 -0
  269. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/playground/page.js +0 -0
  270. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/playground/worker.js +0 -0
  271. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/playground.qmd +0 -0
  272. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/plot.ipynb +0 -0
  273. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/principles.ipynb +0 -0
  274. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/processes.qmd +0 -0
  275. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/puppy.jpg +0 -0
  276. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/python.ipynb +0 -0
  277. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/regex.ipynb +0 -0
  278. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/repl.qmd +0 -0
  279. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/scripts.ipynb +0 -0
  280. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/sidebar.yml +0 -0
  281. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/strings.ipynb +0 -0
  282. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/styles.css +0 -0
  283. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/_metadata.yml +0 -0
  284. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/c.qmd +0 -0
  285. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/canvas.qmd +0 -0
  286. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/constants.qmd +0 -0
  287. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/copy.qmd +0 -0
  288. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/csv.qmd +0 -0
  289. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/date.qmd +0 -0
  290. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/deflate.qmd +0 -0
  291. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/delay.qmd +0 -0
  292. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/distribution.qmd +0 -0
  293. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/element.qmd +0 -0
  294. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/ex.qmd +0 -0
  295. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/fetch.qmd +0 -0
  296. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/float.qmd +0 -0
  297. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/hash.qmd +0 -0
  298. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/host.qmd +0 -0
  299. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/image.qmd +0 -0
  300. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/js.qmd +0 -0
  301. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/json.qmd +0 -0
  302. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/literal.qmd +0 -0
  303. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/load.qmd +0 -0
  304. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/metadata.qmd +0 -0
  305. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/mime.qmd +0 -0
  306. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/mkdir.qmd +0 -0
  307. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/nc.qmd +0 -0
  308. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/nget.qmd +0 -0
  309. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/nl.qmd +0 -0
  310. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/normalize.qmd +0 -0
  311. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/nput.qmd +0 -0
  312. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/path.qmd +0 -0
  313. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/plot.qmd +0 -0
  314. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/r.qmd +0 -0
  315. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/rand.qmd +0 -0
  316. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/readdir.qmd +0 -0
  317. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/remove.qmd +0 -0
  318. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/rename.qmd +0 -0
  319. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/signal.qmd +0 -0
  320. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/src.qmd +0 -0
  321. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/storage.qmd +0 -0
  322. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/svg.qmd +0 -0
  323. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/time.qmd +0 -0
  324. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/ucs.qmd +0 -0
  325. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/uuid.qmd +0 -0
  326. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/vfi.qmd +0 -0
  327. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system/xml.qmd +0 -0
  328. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/system-functions.qmd +0 -0
  329. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/terms.qmd +0 -0
  330. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/web.ipynb +0 -0
  331. {basedpl-0.1.45 → basedpl-0.1.46}/nbs/xml.ipynb +0 -0
  332. {basedpl-0.1.45 → basedpl-0.1.46}/provenance/README.md +0 -0
  333. {basedpl-0.1.45 → basedpl-0.1.46}/provenance/aplcart.jsonl +0 -0
  334. {basedpl-0.1.45 → basedpl-0.1.46}/provenance/april.jsonl +0 -0
  335. {basedpl-0.1.45 → basedpl-0.1.46}/provenance/bqn.jsonl +0 -0
  336. {basedpl-0.1.45 → basedpl-0.1.46}/provenance/core.jsonl +0 -0
  337. {basedpl-0.1.45 → basedpl-0.1.46}/provenance/dyalog.jsonl +0 -0
  338. {basedpl-0.1.45 → basedpl-0.1.46}/provenance/ngn.jsonl +0 -0
  339. {basedpl-0.1.45 → basedpl-0.1.46}/py/Cargo.toml +0 -0
  340. {basedpl-0.1.45 → basedpl-0.1.46}/py/build.rs +0 -0
  341. {basedpl-0.1.45 → basedpl-0.1.46}/py/src/lib.rs +0 -0
  342. {basedpl-0.1.45 → basedpl-0.1.46}/pyproject.toml +0 -0
  343. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/__init__.py +0 -0
  344. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/_modidx.py +0 -0
  345. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/bpl.tmLanguage.json +0 -0
  346. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/bpltests.py +0 -0
  347. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/dyalog.py +0 -0
  348. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/editors.py +0 -0
  349. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/font.py +0 -0
  350. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/fonts.css +0 -0
  351. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/functions.py +0 -0
  352. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/input.js +0 -0
  353. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/ipython.py +0 -0
  354. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/keyboards.json +0 -0
  355. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/keyboards.py +0 -0
  356. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/layout.json +0 -0
  357. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/lb.js +0 -0
  358. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/notebook_runner.py +0 -0
  359. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/notebooks.py +0 -0
  360. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/printing.py +0 -0
  361. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/reference.py +0 -0
  362. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/syntax.py +0 -0
  363. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/windows_keyboard.py +0 -0
  364. {basedpl-0.1.45 → basedpl-0.1.46}/python/basedpl/worker.py +0 -0
  365. {basedpl-0.1.45 → basedpl-0.1.46}/rustfmt.toml +0 -0
  366. {basedpl-0.1.45 → basedpl-0.1.46}/scripts/install-macos.sh +0 -0
  367. {basedpl-0.1.45 → basedpl-0.1.46}/scripts/prep.py +0 -0
  368. {basedpl-0.1.45 → basedpl-0.1.46}/src/agreement.rs +0 -0
  369. {basedpl-0.1.45 → basedpl-0.1.46}/src/canvas.js +0 -0
  370. {basedpl-0.1.45 → basedpl-0.1.46}/src/canvas.rs +0 -0
  371. {basedpl-0.1.45 → basedpl-0.1.46}/src/csv.rs +0 -0
  372. {basedpl-0.1.45 → basedpl-0.1.46}/src/date.rs +0 -0
  373. {basedpl-0.1.45 → basedpl-0.1.46}/src/distribution.rs +0 -0
  374. {basedpl-0.1.45 → basedpl-0.1.46}/src/error.rs +0 -0
  375. {basedpl-0.1.45 → basedpl-0.1.46}/src/eval/assign.rs +0 -0
  376. {basedpl-0.1.45 → basedpl-0.1.46}/src/eval/dissect.rs +0 -0
  377. {basedpl-0.1.45 → basedpl-0.1.46}/src/files.rs +0 -0
  378. {basedpl-0.1.45 → basedpl-0.1.46}/src/host.rs +0 -0
  379. {basedpl-0.1.45 → basedpl-0.1.46}/src/host_web.rs +0 -0
  380. {basedpl-0.1.45 → basedpl-0.1.46}/src/inspection.rs +0 -0
  381. {basedpl-0.1.45 → basedpl-0.1.46}/src/js.rs +0 -0
  382. {basedpl-0.1.45 → basedpl-0.1.46}/src/json.rs +0 -0
  383. {basedpl-0.1.45 → basedpl-0.1.46}/src/protocol.rs +0 -0
  384. {basedpl-0.1.45 → basedpl-0.1.46}/src/reference.rs +0 -0
  385. {basedpl-0.1.45 → basedpl-0.1.46}/src/regex.rs +0 -0
  386. {basedpl-0.1.45 → basedpl-0.1.46}/src/symbols.rs +0 -0
  387. {basedpl-0.1.45 → basedpl-0.1.46}/src/timing.rs +0 -0
  388. {basedpl-0.1.45 → basedpl-0.1.46}/src/xml.rs +0 -0
  389. {basedpl-0.1.45 → basedpl-0.1.46}/tests/conftest.py +0 -0
  390. {basedpl-0.1.45 → basedpl-0.1.46}/tests/highlighting.mjs +0 -0
  391. {basedpl-0.1.45 → basedpl-0.1.46}/tests/input.mjs +0 -0
  392. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/LICENSE-aplcart +0 -0
  393. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/LICENSE-april +0 -0
  394. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/LICENSE-bqn +0 -0
  395. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/LICENSE-bqncrate +0 -0
  396. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/LICENSE-dyalog +0 -0
  397. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/LICENSE-ngn +0 -0
  398. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/README.md +0 -0
  399. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/distributions.bpl +0 -0
  400. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/dyalog.bpl +0 -0
  401. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/graphics.bpl +0 -0
  402. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/lib.bpl +0 -0
  403. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/regex.bpl +0 -0
  404. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/support/april.bpl +0 -0
  405. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/support/avl.bpl +0 -0
  406. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/support/redblack.bpl +0 -0
  407. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/support/sbst.bpl +0 -0
  408. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference/support/splay.bpl +0 -0
  409. {basedpl-0.1.45 → basedpl-0.1.46}/tests/reference.rs +0 -0
  410. {basedpl-0.1.45 → basedpl-0.1.46}/tests/scaling.rs +0 -0
  411. {basedpl-0.1.45 → basedpl-0.1.46}/tests/speed.rs +0 -0
  412. {basedpl-0.1.45 → basedpl-0.1.46}/tests/test_api.py +0 -0
  413. {basedpl-0.1.45 → basedpl-0.1.46}/tests/test_basic.py +0 -0
  414. {basedpl-0.1.45 → basedpl-0.1.46}/tests/test_bpltests.py +0 -0
  415. {basedpl-0.1.45 → basedpl-0.1.46}/tests/test_glyphs.py +0 -0
  416. {basedpl-0.1.45 → basedpl-0.1.46}/tests/test_graphics.py +0 -0
  417. {basedpl-0.1.45 → basedpl-0.1.46}/tests/test_ipython.py +0 -0
  418. {basedpl-0.1.45 → basedpl-0.1.46}/tests/test_kernel.py +0 -0
  419. {basedpl-0.1.45 → basedpl-0.1.46}/tests/test_keylayout.py +0 -0
  420. {basedpl-0.1.45 → basedpl-0.1.46}/tests/test_notebooks.py +0 -0
  421. {basedpl-0.1.45 → basedpl-0.1.46}/tests/test_reference.py +0 -0
  422. {basedpl-0.1.45 → basedpl-0.1.46}/tests/test_repl.py +0 -0
  423. {basedpl-0.1.45 → basedpl-0.1.46}/tests/test_windows_keyboard.py +0 -0
  424. {basedpl-0.1.45 → basedpl-0.1.46}/tests/test_worker.py +0 -0
  425. {basedpl-0.1.45 → basedpl-0.1.46}/tests/timing-lock.mjs +0 -0
  426. {basedpl-0.1.45 → basedpl-0.1.46}/tests/units.rs +0 -0
  427. {basedpl-0.1.45 → basedpl-0.1.46}/tests/wasm-pkg.mjs +0 -0
  428. {basedpl-0.1.45 → basedpl-0.1.46}/tests/wasm-speed.mjs +0 -0
  429. {basedpl-0.1.45 → basedpl-0.1.46}/tests/wasm.mjs +0 -0
  430. {basedpl-0.1.45 → basedpl-0.1.46}/tests/windows_keyboard.c +0 -0
  431. {basedpl-0.1.45 → basedpl-0.1.46}/wheel/data/share/jupyter/kernels/bpl/kernel.json +0 -0
@@ -93,7 +93,7 @@ checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
93
93
 
94
94
  [[package]]
95
95
  name = "basedpl"
96
- version = "0.1.45"
96
+ version = "0.1.46"
97
97
  dependencies = [
98
98
  "base64 0.23.1",
99
99
  "bytemuck",
@@ -139,7 +139,7 @@ dependencies = [
139
139
 
140
140
  [[package]]
141
141
  name = "basedpl-cli"
142
- version = "0.1.45"
142
+ version = "0.1.46"
143
143
  dependencies = [
144
144
  "async-trait",
145
145
  "basedpl",
@@ -153,7 +153,7 @@ dependencies = [
153
153
 
154
154
  [[package]]
155
155
  name = "basedpl-py"
156
- version = "0.1.45"
156
+ version = "0.1.46"
157
157
  dependencies = [
158
158
  "basedpl",
159
159
  "bytemuck",
@@ -168,7 +168,7 @@ dependencies = [
168
168
 
169
169
  [[package]]
170
170
  name = "basedpl-wasm"
171
- version = "0.1.45"
171
+ version = "0.1.46"
172
172
  dependencies = [
173
173
  "basedpl",
174
174
  "js-sys",
@@ -1398,9 +1398,9 @@ dependencies = [
1398
1398
 
1399
1399
  [[package]]
1400
1400
  name = "rustymath"
1401
- version = "0.1.14"
1401
+ version = "0.1.15"
1402
1402
  source = "registry+https://github.com/rust-lang/crates.io-index"
1403
- checksum = "9c4b9032437f945f3db8fa14a4382bec40d21cb4edf1adb8711af6c43b1bb4c5"
1403
+ checksum = "b46e74f7d197774cef564fcf8f4f73984857abbf67c406b09d199f130821a642"
1404
1404
  dependencies = [
1405
1405
  "half",
1406
1406
  "hashbrown 0.17.1",
@@ -2052,7 +2052,7 @@ checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc"
2052
2052
 
2053
2053
  [[package]]
2054
2054
  name = "xtask"
2055
- version = "0.1.45"
2055
+ version = "0.1.46"
2056
2056
  dependencies = [
2057
2057
  "anyhow",
2058
2058
  "serde_json",
@@ -2,7 +2,7 @@
2
2
  members = ["py"]
3
3
 
4
4
  [workspace.package]
5
- version = "0.1.45"
5
+ version = "0.1.46"
6
6
  edition = "2021"
7
7
  rust-version = "1.98"
8
8
  license = "Apache-2.0"
@@ -51,7 +51,7 @@ num-complex = { version = ">=0.4.6, <1", features = ["bytemuck"] }
51
51
  num-bigint = ">=0.4.6, <0.5"
52
52
  num-traits = ">=0.2.19, <1"
53
53
  half = { version = ">=2.7.1, <3", features = ["num-traits", "bytemuck"] }
54
- rustymath = ">=0.1.14, <1"
54
+ rustymath = ">=0.1.15, <1"
55
55
  strength_reduce = ">=0.2.4, <1"
56
56
  rand = ">=0.10.2, <1"
57
57
  # AnswerDotAI's fork measures text with a canvas, which works in a Web Worker: plotters-rs/plotters#746.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Keep the language concise to write, simple to read and consistent to understand. A design rule is a plan on trial. Discuss it when applying it makes a useful expression harder to read, removes something expressible or requires another special case. APL familiarity and compatibility are not costs in that decision. Change callers with an API change instead of adding compatibility layers.
4
4
 
5
- Speed and simplicity come before edge cases no real user meets. Follow IEEE, Rust and CPU behaviour where it gives a reasonable result. Don't add precision, sign normalization or defensive passes without an agreed need.
5
+ Speed and simplicity come before edge cases no real user meets. Follow IEEE, Rust and CPU behaviour where it gives a reasonable result. The last bits of a result can differ between thread counts, platforms, builds and runs. Never spend speed, memory or code to make them agree. Don't add precision, sign normalization or defensive passes without an agreed need.
6
6
 
7
7
  ## You MUST read this ENTIRE section in FULL first
8
8
 
@@ -20,9 +20,9 @@ Build nothing else without discussion: no scratch crates, alternate target direc
20
20
 
21
21
  An already-running Python process retains its loaded extension. In a kernel, use `from basedpl.worker import fresh; fresh(code)` to check the installed `bpl` in a fresh worker instead of restarting the kernel. A BPL error raises `BplError`. Check one expression and read its result before building on it. `basedpl.bpltests.check_file` and `check_page` check reference files and documentation through the worker without building Rust.
22
22
 
23
- Measure with `BASEDPL_COSTS=1 cargo test --test speed -- --nocapture` or `basedpl.bpltests.time_cases(cases)`. Both use copies of the same data as the unit. Budgets are single-thread measurements. Use `time_cases(..., threads=...)` separately for scaling. `speed_costs()` reads the cases in `tests/speed.txt`; `cases=` selects expressions and `wasm=DIR` selects a browser build. `logged_costs(log)` reads CI output, and `cargo_costs(path)` runs either project's speed test. `set_budgets(native, wasm, run)` applies the rule in the budget file; `path=` selects rustymath's `tests/speed.txt`. The manual `Speed` workflow measures the native and wasm builds on CI.
23
+ Measure with `BASEDPL_COSTS=1 cargo test --test speed -- --nocapture` or `basedpl.bpltests.time_cases(cases)`. Both use copies of the same data as the unit. Budgets are single-thread measurements. Use `time_cases(..., threads=...)` separately for scaling. `speed_costs()` reads the cases in `tests/speed.txt`; `cases=` selects expressions and `wasm=DIR` selects a browser build. `logged_costs(log)` reads CI output, and `cargo_costs(path)` runs either project's speed test. `set_budgets(native, wasm, run)` applies the rule in the budget file; `path=` selects rustymath's `tests/speed.txt`. The manual `Speed` workflow measures the native and wasm builds on CI. To compare a change with the build before it, copy the installed `bpl` before the change, then time both copies in turn through `basedpl.worker.Worker(command=(path, '--worker'))` with the `costs` request that `speed_costs` sends. Don't restore old code in the shared tree to get a baseline.
24
24
 
25
- Cooperating tools share `/tmp/aai-ws-timing.lock`. Timings take it exclusively. `cargo develop`, `cargo wasm`, the reference test and pytest take it shared. Other Rust tests and bare Cargo commands do not all take it. After five minutes a timing fails; a build/test proceeds without the lock. Never hold it in the shared kernel process or coordinate timings manually. A timing launched there would block behind the hold and stall other agents' kernel calls. Native timings set rustymath's current-thread count to one and request user-interactive macOS QoS to favour performance cores. QoS is not CPU affinity.
25
+ Cooperating tools share `/tmp/aai-ws-timing.lock`. Timings take it exclusively. `cargo develop`, `cargo wasm`, the reference test and pytest take it shared. Other Rust tests and bare Cargo commands do not all take it. After five minutes a timing fails; a build/test proceeds without the lock. After 30 seconds, an exclusive wait prints the processes with the lock file open. The list can include processes that are only waiting for the lock. Never hold it in the shared kernel process or coordinate timings manually. A timing launched there would block behind the hold and stall other agents' kernel calls. Native timings set rustymath's current-thread count to one and request user-interactive macOS QoS to favour performance cores. QoS is not CPU affinity.
26
26
 
27
27
  Run `cargo wasm` during development only for browser work. Agents use `cargo wasm --out DIR` and set `BASEDPL_WASM=DIR` when running `node --test tests/wasm.mjs` and `node --no-liftoff --test tests/wasm-speed.mjs`. This avoids replacing a module another agent is using. For other edits under `cfg(web)` or `host_web.rs`, check compilation with `cargo check -p basedpl --target wasm32-unknown-unknown`.
28
28
 
@@ -66,7 +66,7 @@ LTO-off incremental builds keep an edit from recompiling every caller that inlin
66
66
 
67
67
  Generic loop instances can concentrate in the defining module's codegen unit. Mark loop helpers `#[inline]` when their instances need to compile with the caller's kernel table, including nested helpers. Kernel tables have separate modules: `booleans`, `wholes`, `float_arithmetic`, `float_kernels` and `complex_kernels`. `at_widths!` gives the concrete widths their own modules. Keep new tables separate and add kernel specializations only for measured gains.
68
68
 
69
- Use `cargo build --lib --bins --profile test --timings` to inspect the normal build. Its report under `target/cargo-timings/` separates frontend and codegen time. `BASEDPL_UNITS=1 cargo test --test units -- --nocapture` lists large units and their functions. `BASEDPL_SIZES=pattern cargo test --test units -- --nocapture` measures machine code matching a demangled-name regex. These commands diagnose the current compilation arrangement; don't create scratch builds to approximate it.
69
+ Use `cargo build --lib --bins --profile test --timings` to inspect the normal build. Its report under `target/cargo-timings/` separates frontend and codegen time. `BASEDPL_UNITS=1 cargo test --test units -- --nocapture` lists large units and their functions. `BASEDPL_SIZES=pattern cargo test --test units -- --nocapture` measures machine code matching a demangled-name regex. `BASEDPL_SIZES` sees only basedpl's own codegen units. `BASEDPL_SIZES_DIFF=old:new cargo test --test units machine_code_growth -- --nocapture` compares two binaries, such as copies of `bpl` from before and after a change, by generic function across every crate. These commands diagnose the current compilation arrangement; don't create scratch builds to approximate it.
70
70
 
71
71
  ## Code map
72
72
 
@@ -107,7 +107,7 @@ Tail calls reuse frames while preserving lexical dependencies. Handlers disable
107
107
 
108
108
  ## Values, layouts and assignment
109
109
 
110
- `Value` holds a number, character, function, operator or shared array. Compact storage holds Booleans, narrow integers, width-specific floats/complex numbers or characters. Mixed storage holds `Value`s and memoizes its prototype and innermost lexical dependency. Other properties are computed when needed. A layout and its shared `Arc<Storage>` can be copied separately; changing axes need not copy items. `Buffer`, `Value::buffer` and `from_buffer` are the public width-preserving frontend boundary.
110
+ `Value` holds a number, character, function, operator or shared array. Compact storage holds Booleans, narrow integers, width-specific floats/complex numbers or characters. Mixed storage holds `Value`s and memoizes its prototype and innermost lexical dependency. Other properties are computed when needed. An array holds its layout and its storage in one allocation. Its `Shape` holds ranks 0 to 2 inline, so a small array allocates no shape. Constructors take `impl Into<Shape>`: pass a slice, or an array such as `[n]`, rather than building a `Vec`. A shape, key or name change on a shared array makes a view of the base array's storage and copies no items. `Buffer`, `Value::buffer` and `from_buffer` are the public width-preserving frontend boundary.
111
111
 
112
112
  Atoms, rank-0 arrays and singleton vectors are distinct. Function nodes retain handles, not lexical frames or Python objects. Functions match by their parts; dfns and generators match by identity. Operators can be values and can cross the native Python boundary. Values and function nodes are `Send + Sync`.
113
113
 
@@ -141,7 +141,7 @@ Floats use IEEE NaN, infinity and signed zero. Comparison treats NaN as unequal;
141
141
 
142
142
  Only f64 comparisons use the session tolerance, from 0 to `1E-14`. f32/f16 compare exactly except fixed-point convergence, which uses four ulps; f64 convergence uses `1E-14` independently of the preference. Index/count/Boolean/character-offset conversion uses `near_integer` with the fixed default tolerance, not the comparison preference. The tolerant types and objects come from rustymath. Keep independent inside/outside-tolerance tests with exact/mixed controls; don't use language comparison as its own oracle.
143
143
 
144
- `search.rs` selects compact exact or tolerant backends. Exact integer/Boolean/character storage uses keys; float searches use their width. Integer haystacks accept the whole-number shortcut only for exactly whole float needles. Tolerant indexing validates whole-key matches unless the haystack is exactly whole and falls back to buckets on mismatch. Classification intentionally chains tolerance through sorted runs, so it need not match every member to one representative. Other cells use exact hashes or first-number buckets with `Value::matches` confirmation, falling back to pairwise comparison where indexing is unsuitable. Grade is stable. Position buffers use u32 and become integer storage without another pass.
144
+ `search.rs` selects compact exact or tolerant backends. Exact integer/Boolean/character storage uses keys; float searches use their width. Integer haystacks accept the whole-number shortcut only for exactly whole float needles. Tolerant indexing validates whole-key matches unless the haystack is exactly whole and falls back to buckets on mismatch. Classification intentionally chains tolerance through sorted runs, so it need not match every member to one representative. Other cells use exact hashes or first-number buckets with `Value::matches` confirmation, falling back to pairwise comparison where indexing is unsuitable. Grade is stable. Position buffers use u32 and become integer storage without another pass. `⍷` and monadic Key take each class's positions from `search::class_positions`, which keeps a class's own buffer for 32-bit positions and copies narrower ones once from the shared buffer. Dyadic Key selects rows through `Grouped::each` slices. Key with the operand `≢⊢`, which `≢∘⊢` also builds, counts its classes through `search::class_counts` and builds no positions.
145
145
 
146
146
  `Domain` and `with_field!` select working reals, Complex64 or BigRational for generic numeric algorithms. Compact storage selects the domain without scanning its items. `number::read` converts once; `Field::array` builds compact float/complex results without a `Number` per item. Each caller lists the domains it supports. Compact complex input does not take a real path merely because all imaginary parts are zero; results built through `Value::complex` can normalize to float storage.
147
147
 
@@ -165,7 +165,7 @@ A failed compact kernel leaves placeholder results and triggers a wider/exact/co
165
165
 
166
166
  Folds by algebraic float operations can regroup. Contiguous subtraction/division folds use `Alternating`; quotients fall back to item-by-item folding if their products leave the normal range. Boolean scans compose truth-table maps; comparison scans compute both possible totals in bulk and use `reduce::chosen`. Seeds, axis lanes and scalar fallback preserve the language's accumulation direction. Generic reductions stay right-associated and preserve operand call order/effects. Monadic `f.g` is the exception: it memoizes each minor's expansion, and a cached minor does not repeat operand calls or their effects. Determinant/permanent fast paths use the appropriate rustymath backend.
167
167
 
168
- The automatic Rayon scheduler currently serves rustymath elementwise `many` and `pairs`, not general matrix products, factorizations or reduction loops. It adapts to call cost, uses `RAYON_NUM_THREADS` by default and accepts current-thread overrides through `parallel::set_threads` (0 default, 1 serial). Nested Rayon work does not split again; wasm is serial. Small converted chunks and fusion's serial outer traversal limit the work available to it. Don't infer multicore execution from a large array alone.
168
+ The automatic Rayon scheduler serves rustymath elementwise `many` and `pairs`, folds through `reduce::along`, fused chains and matrix products. Scans don't split. Decompositions split in the products of their blocked updates, the passes of their Hermitian and bidiagonal reductions, and their divide-and-conquer merges. `rank` sends dyadic `+.×` and `⌹`, monadic `⌹` and `-.×`, and `•decompose` over the 2-cells of an unkeyed stack with compact storage to `primitive::stacked` and `stacked_decompositions`. They run each cell through the rustymath function it uses alone. Rustymath's `parallel::stack_with` splits whole cells across threads in rounds, with `check_now` between rounds. A caller whose checks run far apart, such as a round or a rustymath `_with` callback, calls `check_now`, because `Context::check` reads the clock only on every 64th call. The scheduler adapts to call cost, uses `RAYON_NUM_THREADS` by default and accepts current-thread overrides through `parallel::set_threads` (0 default, 1 serial). `Session::evaluation` applies a session's `•prefs ["threads":n]` to each of its evaluations, then restores the thread's own setting. A session that never sets it keeps the evaluating thread's setting, such as the timing harness's one thread. Nested Rayon work does not split again; wasm is serial. A fused chain splits in pieces of whole blocks: an elementwise chain through `parallel::extended`, and a folded one through `reduce::fold_pieces`. On one thread an elementwise chain appends straight to its result, because copying each block into a piece's slots cost up to 1.2 copies there. Small converted chunks limit the work available to the scheduler. Don't infer multicore execution from a large array alone.
169
169
 
170
170
  Packed numeric, Boolean and equality-count inner products use `rustymath::linalg`. Integer calls use `Inner::checked` before relying on an exact compact result. Structural gather/compress and interval index also reuse rustymath. Measure generic/backend changes in both projects; callers' codegen and layout determine costs that isolated kernels miss.
171
171
 
@@ -201,7 +201,7 @@ The Jupyter adapter in `cli/src/kernel.rs` uses kernmini and a `ThreadWorker`. I
201
201
 
202
202
  ### Browser
203
203
 
204
- `cargo wasm` builds an incremental release-profile npm package with wasm-bindgen glue, language/input assets, grammar and canvas support. `--out DIR` leaves the docs' local playground assets alone; `--strip` removes function-name metadata for distribution. Keep wasm-bindgen glue and crate versions aligned through the workspace lock. Avoid fat LTO here because rebuild cost and enlarged stack frames conflict with browser development and recursion limits.
204
+ `cargo wasm` builds an incremental release-profile npm package with wasm-bindgen glue, language/input assets, grammar and canvas support. `--out DIR` leaves the docs' local playground assets alone; `--strip` removes function-name metadata for distribution. Keep wasm-bindgen glue and crate versions aligned through the workspace lock. Avoid fat LTO here because rebuild cost and enlarged stack frames conflict with browser development and recursion limits. `wasm-objdump -h DIR/basedpl_wasm_bg.wasm` lists the module's section sizes, including `name`. `twiggy diff` matches functions by full name, including crate hashes that change between builds. To compare two builds by function, compare their `twiggy top -n 1000000 -f json` listings with the hashes removed.
205
205
 
206
206
  Browser `Session.run` streams MIME events and returns a protocol error or null. `eval` transfers values through `js.rs` but discards output and cannot export BPL functions/operators; `bind` imports page values/functions. Typed arrays transfer without another page-worker copy. JavaScript functions live in a thread-local registry and core function nodes hold slots, preserving Send/Sync values. `host_web.rs` implements the browser's clock, synchronous I/O/fetch and RegExp behaviour. File/URL reads resolve against the configured base. Unsupported native filesystem/locale operations stay unavailable; browser `•nput` writes only stdout and `•js` is browser-only.
207
207
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: basedpl
3
- Version: 0.1.45
3
+ Version: 0.1.46
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Requires-Dist: fastcore
@@ -270,7 +270,7 @@ in ← { ⍝ Locations of item ⍺ in array ⍵.
270
270
  ⍬{ ⍝ ⍺ is pick-path
271
271
  item≡⍵?,⊂⍺; ⍝ match: path
272
272
  D≥≡⍵?⍬; ⍝ give up
273
- paths←(⍺↣,⊂)¨⍳⍴⍵ ⍝ extended paths
273
+ paths←⍺↣,⊂ ¨⍳⍴⍵ ⍝ extended paths
274
274
  ,/, paths ∇¨ ⍵
275
275
  }⍵ ⍝ ⍵ is searched-in array
276
276
  }
@@ -439,5 +439,5 @@ subs ← { ⍝ Vector substitution.
439
439
  ⍝ From http://dfns.dyalog.com/c_lcase.htm and http://dfns.dyalog.com/c_ucase.htm
440
440
  letters ← ["abcdefghijklmnopqrstuvwxyzåäöàæéñøü" "ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖÀÆÉÑØÜ"] ⍝ Lower and upper case, at matching positions.
441
441
  recase ← {[from to]←⍺ ⋄ [(from,,⍵)⍳⍵]⌷to,,⍵} ⍝ Simple array ⍵, with each letter from ⍺'s first list replaced by its second.
442
- lcase ← (⌽letters)↣recase ⍝ Lower-casification.
442
+ lcase ← ⌽letters ↣recase ⍝ Lower-casification.
443
443
  ucase ← letters↣recase ⍝ Upper-casification.
@@ -16,7 +16,7 @@ life←{[1 ⍵]∨.∧3 4=¨⊂+/,¯1 0 1⊖⊗¯1 0 1⌽⊗⊂⍵}
16
16
  ⍝ From https://dfns.dyalog.com/c_rmcm.htm
17
17
  rmcm←{ ⍝ Replace comments with blanks.
18
18
  cm←∨\(⍵='⍝')>≠\⍵='''
19
- ' '@(⍸cm) ⍵
19
+ ' '@ ⍸cm ⍵
20
20
  }
21
21
 
22
22
  ⍝ From https://dfns.dyalog.com/c_ripple.htm
@@ -141,7 +141,7 @@ dots←{ ⍝ Show indentation with white dots.
141
141
  spcs←∧\' '=⍵
142
142
  xdents←ends∧1,0 ¯1↓spcs
143
143
  flood←(⍪1 2){hits←⍺⍷⍵ ⋄ ~1∊,hits?⍵;⍺ ∇ hits+⍵}spcs+⊽xdents
144
- ⍺@(⍸2=flood-xdents) ⍵
144
+ ⍺@ ⍸2=flood-xdents ⍵
145
145
  }
146
146
 
147
147
  ⍝ From https://dfns.dyalog.com/c_logic.htm
@@ -363,7 +363,7 @@ baby←{ ⍝ Manchester Small Scale Experimental Machine.
363
363
  fetch←{,(yshift ⍵)#⍺}
364
364
  store←{⍶@ 1⍳⍨yshift⍹ ⍵}
365
365
  decode←{(⍳≢⍵ ∊ 0 5 13 16)⊂⍵}
366
- yshift←(0=⍳≢⍵)↣{~1∊⍵?⍺;(¯1⌽⍺) ∇ dec ⍵}
366
+ yshift←0=⍳≢⍵ ↣{~1∊⍵?⍺;(¯1⌽⍺) ∇ dec ⍵}
367
367
  addsub←{c←⍺ ⍶ ⍵ ⋄ ~1∊c?⍺ ⍹ ⍵;(⍺≠⍵) ∇ 0,¯1↓c}
368
368
  add←∧addsub∨
369
369
  sub←<addsub>
@@ -507,7 +507,7 @@ sudoku←{ ⍝ All solutions, with square or ⍺-shaped groups.
507
507
  inx←↓(,wid⊥¨grp↣ר⍳⌽grp)+⊗,wid⊥¨⍳grp
508
508
  inx,←{(↓⍵),↓⍵ᵀ}(⍴⍵)⍴⍳wid²
509
509
  bas←(≢,⍵)⍴⊂set
510
- (,⍵)↣{q←[⍵]⌷⍺ ⋄ (q=0 # q)←⊂set~,/q ⋄ bas.[⍵]∩←,¨q}¨inx
510
+ ,⍵ ↣{q←[⍵]⌷⍺ ⋄ (q=0 # q)←⊂set~,/q ⋄ bas.[⍵]∩←,¨q}¨inx
511
511
  ∆sqz←{
512
512
  0=≢⍵?⍺;i←↑⍵ ⋄ q←⍺
513
513
  b←1<≢¨[i]⌷⍺ ⋄ ~∨/b?⍺ ∇ 1↓⍵;
@@ -234,7 +234,7 @@ stpaths ← { ⍝ Spanning tree paths.
234
234
  (⊂⍬)∧.≡next?⍺; ⍝ all null: finished.
235
235
  exts←⊂¨⍵⊃¨⊂⍺ ,¨¨ next ⍝ paths to next tree level.
236
236
  indx←,/next
237
- paths←(,/exts)@indx ⍺
237
+ paths←,/exts @indx ⍺
238
238
  paths ∇ indx ⍝ advance to next tree level.
239
239
  }root ⍝ index of starting vertex.
240
240
  }
@@ -272,7 +272,7 @@ sudokuMatrix ← { ⍝ Matrix for ⍵ ⍵-Sudoku puzzle.
272
272
  col←↓0 0 1 1 1 1 1 1 1 1#⍠¯1⊃z
273
273
  box←↓1 0 1 0 1 1 1 1 1 1#⍠¯1⊃z
274
274
  all←↓1 1 1 1 0 0 1 1 1 1#⍠¯1⊃z
275
- same←≡/∘(1 0 0 0 1 0 0 0⊂) ⍝ matching pairs.
275
+ same←≡/∘ 1 0 0 0 1 0 0 0⊂ ⍝ matching pairs.
276
276
  same¨row,col,box,all ⍝ constraints matrix for ⍵ ⍵-puzzle.
277
277
  }
278
278
 
@@ -277,7 +277,7 @@ kcell ← { ⍝ Relationship between point and k-cell.
277
277
  ⍺←(≢⍵)#⍠¯1 [2 1]⍴0 1 ⍝ Default is unit k-cell.
278
278
  b←,⍠(2=⍴⍴⍺ # 0)⍺
279
279
  p←(2⌊⍴⍴⍺ ↓ 1 1,⍴⍵)⍴⍵ ⍝ Points to evaluate.
280
- d←(,⍶⌿)⍤1 ⍉×-b,.-p
280
+ d←,⍶⌿ ⍤1 ⍉×-b,.-p
281
281
  ⍶/⍬?⌈/d;5⊥d
282
282
  }
283
283
 
@@ -486,7 +486,7 @@ tfmt ← { ⍝ Char matrix from tree.
486
486
  ⍺←"" ⍝ default: no indentation.
487
487
  1=≡,⍵?⊃,↓⍺,⍵;
488
488
  node←⍺,↑⍵
489
- subs←(⍺,4↑'·')↣∇¨1↓⍵ ⍝ subtrees.
489
+ subs←⍺,4↑'·' ↣∇¨1↓⍵ ⍝ subtrees.
490
490
  ⊃(⊂node),,/↓¨subs
491
491
  }
492
492
 
@@ -496,7 +496,7 @@ tnest ← { ⍝ Array from TreeView style tree.
496
496
  [dvec ivec]←⍵ ⍝ depth and items vectors.
497
497
  1=≢dvec?↑ivec;
498
498
  node←1↑ivec ⍝ tree: node value.
499
- [dsub isub]←(1=dvec)↣⊂¨⍵ ⍝ sub treeviews.
499
+ [dsub isub]←1=dvec ↣⊂¨⍵ ⍝ sub treeviews.
500
500
  node,∇¨↓⍉[≤dsub⋄isub]
501
501
  }
502
502
 
@@ -712,7 +712,7 @@
712
712
  }
713
713
  ],
714
714
  "source": [
715
- "(≥⍳)⍤0 [2 4]"
715
+ "≥⍳ ⍤0 [2 4]"
716
716
  ]
717
717
  },
718
718
  {
@@ -740,7 +740,7 @@
740
740
  }
741
741
  ],
742
742
  "source": [
743
- "(≥⍳)¨[2 4]"
743
+ "≥⍳ ¨[2 4]"
744
744
  ]
745
745
  },
746
746
  {
@@ -383,7 +383,7 @@ The operand ends at the space. `1 2 3 4` is in brackets to keep it out of the op
383
383
  ```
384
384
 
385
385
  ```bpl
386
- (+/⊢)⌺3 [1 2 3 4] ⍝ 3 6 9 7
386
+ +/⊢ ⌺3 [1 2 3 4] ⍝ 3 6 9 7
387
387
  +/¯3↕1 2 3 4 ⍝ 3 6 9 7
388
388
  ```
389
389
 
@@ -27,12 +27,13 @@ Operators bind before functions apply. An operator's left [operand](terms.qmd#te
27
27
 
28
28
  A numeric operand and numeric argument need an explicit separator. `f⍣¯25` has operand `¯25`, while `f⍣¯2 5` has operand `¯2 5`. Use `f⍣¯2(5)` or `f⍣¯2⊢5` to give operand `¯2` and argument `5`.
29
29
 
30
- Each run acts as a parenthesised group, which is one token, so an operator at the end of a run takes the next run as its right operand, as it takes a touching token. A name that holds a dyadic operator counts. In `⌊@ 10× x`, the right operand of `@` is the run `10×`.
30
+ Each run counts as one token, as a parenthesised group does. An operator at the end of a run takes the next run as its right operand, as it takes a touching token: in `⌊@ 10× x`, the right operand of `@` is the run `10×`. An operator at the start of a run takes the previous run as its left operand: in `≢⊢ ⌸x`, the left operand of `⌸` is the run `≢⊢`. Names that hold operators count in both places.
31
31
 
32
32
  ```bpl
33
33
  m←2 3⍴⍳6 ⋄ +/⍤1 m ⍝ 3 12
34
34
  m←2 3⍴⍳6 ⋄ +/⍤1m ⍝ 3 12
35
35
  ⌊@ 10× 1.25 2.78 ⍝ 1.2 2.7
36
+ x←0 1 1 0 1 1 ⋄ ≢⊢ ⌸x ⍝ [2 4]ₓ
36
37
  x←5 ⋄ ≥⍣3 x ⍝ 8
37
38
  ≥⍣3(5) ⍝ 8
38
39
  ≥⍣3⊢5 ⍝ 8
@@ -8,6 +8,6 @@ z←50ⱼ50+1.8×(√i)×○i×golden
8
8
  size←0.4+1.1×t
9
9
  hue←300×t
10
10
  seed←{["cx":⍵₀;"cy":⍵₁;"r":⍵₂;"fill":"hsl(",(⍕⍵₃),",80%,60%)"] circle ""}
11
- seeds←(⊂seed)⍤1 (∨z),⍉[size⋄hue]
11
+ seeds←⊂seed ⍤1 (∨z),⍉[size⋄hue]
12
12
  back←["width":100;"height":100;"fill":"#111"] rect ""
13
13
  ["width":500;"height":500] •svg [back],seeds
@@ -9,7 +9,7 @@ Keys: `Alt-s`. Ranks: `0` monadic, `0 0` dyadic
9
9
  ⌈3r2 ⍝ 2ₓ
10
10
  ```
11
11
 
12
- `X⌈Y` takes the real maximum. Pervasive. Beside NaN it gives NaN, as NumPy's `maximum` does. Empty reduction identity: `¯∞`.
12
+ `X⌈Y` takes the real maximum. Pervasive. Beside NaN it gives `Y`'s item. Beside NaN, `⌈/` and `⌈\` give NaN or the greatest other item, depending on the processor. Empty reduction identity: `¯∞`.
13
13
 
14
14
  ```bpl
15
15
  3⌈1 5 ⍝ 3 5
@@ -29,9 +29,13 @@ Keys: `Alt-o`. Ranks: `0` monadic, `0 0` dyadic
29
29
  | 7 | tanh | arctanh |
30
30
  | 8 | `√(-1−y²)` | `-√(-1−y²)` |
31
31
 
32
- Uses complex continuation where needed.
32
+ Uses complex continuation where needed. The cuts of `3○⁻¹` and `5○⁻¹` lie on the imaginary axis. As in C99 and NumPy, the sign of a zero real part chooses the side of these cuts: `3○⁻¹ 0j2` and `3○⁻¹ ¯0j2` give results on opposite sides. On a cut along the real axis, results always come from the side above the cut, because BPL turns a number whose imaginary part is zero, `¯0` included, into a real. For example, `2j¯0` is `2`. A real argument computes with an imaginary part of +0:
33
33
 
34
- APL difference: there are no negative codes or codes 9 to 12. Write `¯k○Y` as `k○⁻¹Y`. `∨Y` gives the real and imaginary parts, `|Y` the magnitude, and `∧Y` the magnitude and phase.
34
+ ```bpl
35
+ 1○⁻¹2 ⍝ 1.5707963267948966j1.3169578969248166
36
+ ```
37
+
38
+ APL difference: there are no negative codes or codes 9 to 12. Write `¯k○Y` as `k○⁻¹Y`. `∨Y` gives the real and imaginary parts, `|Y` the magnitude, and `∧Y` the magnitude and phase. On a branch cut, APL takes the side below the cut for a positive real argument.
35
39
 
36
40
  ## Inverse
37
41
 
@@ -15,7 +15,7 @@ Complex floor uses APL's Gaussian-integer rule.
15
15
  ⌊1.5j0.5 ⍝ 1j1
16
16
  ```
17
17
 
18
- `X⌊Y` takes the real minimum. Pervasive. Beside NaN it gives NaN, as NumPy's `minimum` does. Empty reduction identity: `∞`.
18
+ `X⌊Y` takes the real minimum. Pervasive. Beside NaN it gives `Y`'s item. Beside NaN, `⌊/` and `⌊\` give NaN or the least other item, depending on the processor. Empty reduction identity: `∞`.
19
19
 
20
20
  ```bpl
21
21
  3⌊1 5 ⍝ 1 3
@@ -8,10 +8,10 @@ Keys: `Alt-q =`
8
8
  1 1 2{+/⍵}⌸10 20 30 ⍝ 30 30
9
9
  ```
10
10
 
11
- `f⌸Y` uses `Y` as keys and their positions as values.
11
+ `f⌸Y` uses `Y` as keys and their positions as values. `≢⊢ ⌸Y` counts the items with each key, without building the groups.
12
12
 
13
13
  ```bpl
14
- {≢⍵}⌸"banana" ⍝ [1 3 2]ₓ
14
+ ≢⊢ ⌸"banana" ⍝ [1 3 2]ₓ
15
15
  ```
16
16
 
17
17
  Keys match with [tolerance](../evaluation.qmd#equality-and-ordering), as in `≠`. Results assemble with fill. Empty input calls `f` once for its prototype.
@@ -7,13 +7,13 @@ Keys: `Alt-q Backtick`
7
7
  Negative sizes in [Windows](windows.qmd) return the same windows as one array.
8
8
 
9
9
  ```bpl
10
- (+/⊢)⌺3 [1 2 3 4] ⍝ 3 6 9 7
10
+ +/⊢ ⌺3 [1 2 3 4] ⍝ 3 6 9 7
11
11
  ```
12
12
 
13
13
  `⍵` is the window. `⍺` gives signed padding counts per axis: positive at the start, negative at the end. The two-chain `(+/⊢)` discards `⍺`. A two-row specification gives sizes then movements.
14
14
 
15
15
  ```bpl
16
- (+/⊢)⌺[[3]⋄[2]]⍳8 ⍝ 1 6 12 18
16
+ +/⊢ ⌺[[3]⋄[2]]⍳8 ⍝ 1 6 12 18
17
17
  ```
18
18
 
19
19
  Results assemble with fill.
@@ -21,7 +21,7 @@ Results assemble with fill.
21
21
  A function right operand computes the specification from the argument: `f⌺g Y` is `f⌺(g Y) Y`. [Rank](rank.qmd) and [Axis](axis.qmd) take a function right operand in the same way. Here the window size is the square root of the length, rounded up:
22
22
 
23
23
  ```bpl
24
- (+/⊢)⌺{⌈√≢⍵} ⍳9 ⍝ 1 3 6 9 12 15 18 21 15
24
+ +/⊢ ⌺{⌈√≢⍵} ⍳9 ⍝ 1 3 6 9 12 15 18 21 15
25
25
  ```
26
26
 
27
27
  ## Errors
@@ -1906,7 +1906,7 @@
1906
1906
  }
1907
1907
  ],
1908
1908
  "source": [
1909
- "(+/⊢)⌺3 w\n",
1909
+ "+/⊢ ⌺3 w\n",
1910
1910
  "{⍳⍠0⍵ ≡ \"aa\" \"bb\" \"cc\"}⌺3 w"
1911
1911
  ]
1912
1912
  },
@@ -50,7 +50,7 @@ Undo and Under follow BQN's inferred-properties spec. Inverse operations are wri
50
50
 
51
51
  ## Grouping, selection and keys
52
52
 
53
- Spaces group as if each unspaced run were parenthesised, after literal strands join: `a+b × c+d` is `(a+b)(×)(c+d)`, and `1 2+3` is `(1 2)+3`. Names don't join strands. A run ending in a function is an APL-style train: `+/÷≢ x` is mean, but `+/÷≢x` is not. A subject before a function binds the one part after it: `2×` doubles, `2|#⊢` is `(2|)#⊢`, `2+/` binds `+/`, and `2(+×-)` binds the whole train. An operator takes the whole function on its left and one token on its right, and a literal strand counts as one token. Each run acts as a parenthesised group, so an operator that ends a run takes the next run: in `⌊@ 10× x`, the operand is `10×`. Only spaces build strands: in `f⍣3'b'` and `f⍤1[2 3]`, the touching literal is the argument. Separate a numeric argument from a numeric operand with parentheses or `⊢`.
53
+ Spaces group as if each unspaced run were parenthesised, after literal strands join: `a+b × c+d` is `(a+b)(×)(c+d)`, and `1 2+3` is `(1 2)+3`. Names don't join strands. A run ending in a function is an APL-style train: `+/÷≢ x` is mean, but `+/÷≢x` is not. A subject before a function binds the one part after it: `2×` doubles, `2|#⊢` is `(2|)#⊢`, `2+/` binds `+/`, and `2(+×-)` binds the whole train. An operator takes the whole function on its left and one token on its right, and a literal strand counts as one token. Each run acts as a parenthesised group, so an operator that ends a run takes the next run: in `⌊@ 10× x`, the operand is `10×`. An operator that starts a run takes the previous run as its left operand: `≢⊢ ⌸x` is `(≢⊢)⌸x`. Only spaces build strands: in `f⍣3'b'` and `f⍤1[2 3]`, the touching literal is the argument. Separate a numeric argument from a numeric operand with parentheses or `⊢`.
54
54
 
55
55
  Names use letters, `∆`, `⍙`; `_` escapes the next character (and following digits). `f2` calls `f`; `f_2` is a name. No BQN casing rules; names take their runtime value's role. Lone `_` discards an assignment.
56
56
 
@@ -81,7 +81,7 @@ Plain assignment is local; modified/selective updates change the nearest binding
81
81
 
82
82
  Use lowercase `j` in complex literals throughout tests and examples, including adapted reference cases. Reserve uppercase `J` for explicit input-alias tests. Keep archived upstream source unchanged. Write literal matrices in array notation, `[10 20 30⋄40 50 60]`, not as a reshape. Keep `⍴` where the example is about reshape. A `⋄` that separates rows has no spaces around it. A `⋄` that separates statements has a space on each side.
83
83
 
84
- Brackets are the usual way to write a list, and to build an array from names or expressions. A bare literal list, such as `1 2 3`, is a shorthand. Write a list of names in brackets, as in `[a b]`, even where `a b` would also work. Write `[n 2]⍴0`, `[x],y`, `[a⋄b]` and `f⍤1 m`, not APL's `(n,2)⍴0`, `(⊂x),y`, `⊃[a b]` and `⊃f¨↓m`. End an operand with a space where possible. After a dyadic operator and a space, the whole next run is the operand. For example, `⌊@ 10× x` needs no parentheses. Where a literal operand would run into the argument, a vector argument goes in touching brackets: `f⍤1[2 3]`. For a simple numeric argument, `f⍣¯2⊢5` can read more clearly than `f⍣¯2(5)`. Keep parentheses when they clarify grouping. Judge each line by how it reads. Report any case where none of these forms works.
84
+ Brackets are the usual way to write a list, and to build an array from names or expressions. A bare literal list, such as `1 2 3`, is a shorthand. Write a list of names in brackets, as in `[a b]`, even where `a b` would also work. Write `[n 2]⍴0`, `[x],y`, `[a⋄b]` and `f⍤1 m`, not APL's `(n,2)⍴0`, `(⊂x),y`, `⊃[a b]` and `⊃f¨↓m`. End an operand with a space where possible. After a dyadic operator and a space, the whole next run is the operand. For example, `⌊@ 10× x` and `≢⊢ ⌸x` need no parentheses. When both operands of a dyadic operator are compound, keep both in parentheses, as in `(•ucs 9)@(⍸tabs) ⍵`. An operand keeps its parentheses when a left argument comes before it, as in `tree (⍺⍢)/ next`. Where a literal operand would run into the argument, a vector argument goes in touching brackets: `f⍤1[2 3]`. For a simple numeric argument, `f⍣¯2⊢5` can read more clearly than `f⍣¯2(5)`. Keep parentheses when they clarify grouping. Judge each line by how it reads. Report any case where none of these forms works.
85
85
 
86
86
  A name applied to a literal touches it, as a glyph does: `fib10` and `1+⌽f5`. Write it that way where it's shorter and needs no new parentheses. Keep the space where the literal would join the next part of the expression. A left argument must be in the same run as its function: prefer `32•float∞` to `32 •float ∞`. `32 •float∞` gives the two items `32 ∞`. Between two names, keep both spaces: `x f 5`, not `x f5`.
87
87
 
@@ -34,7 +34,7 @@ Literals separated by spaces form a [strand](terms.qmd#term-strand), which is on
34
34
 
35
35
  ## Runs
36
36
 
37
- Outside brackets, spaces divide a statement into [runs](terms.qmd#term-run). A group in brackets, parentheses or braces counts as one token, even when it contains spaces. Each run must give one value: a subject, a function, or a lone operator such as the `/` in `+ / x`. A run that gives anything else is a `SYNTAX` error.
37
+ Outside brackets, spaces divide a statement into [runs](terms.qmd#term-run). A group in brackets, parentheses or braces counts as one token, even when it contains spaces. Apart from the two operator rules below, each run must give one value: a subject, a function, or a lone operator such as the `/` in `+ / x`. A run that gives anything else is a `SYNTAX` error.
38
38
 
39
39
  BPL reads a statement in three steps:
40
40
 
@@ -42,7 +42,7 @@ BPL reads a statement in three steps:
42
42
  2. Each remaining run is wrapped in parentheses.
43
43
  3. The result reads as ordinary APL, right to left.
44
44
 
45
- So `a+b × c+d` is `(a+b)(×)(c+d)`, and `1 2+3` is `(1 2)+3`, not `(1)(2+3)`. A run that ends in a dyadic operator still needs a right operand, so it takes the run after it, which acts as one token: `⌊@ 10× x` is `(⌊@)(10×)(x)`, where `10×` is the operand of `@`. [Evaluation](evaluation.qmd) explains operands.
45
+ So `a+b × c+d` is `(a+b)(×)(c+d)`, and `1 2+3` is `(1 2)+3`, not `(1)(2+3)`. A run that ends in a dyadic operator takes the next run as its right operand: `⌊@ 10× x` is `(⌊@)(10×)(x)`, where `10×` is the operand of `@`. A run that starts with an operator takes the previous run as its left operand: `≢⊢ ⌸x` is `(≢⊢)(⌸x)`, where `≢⊢` is the operand of `⌸`. [Evaluation](evaluation.qmd) explains operands.
46
46
 
47
47
  ```bpl
48
48
  a←1 ⋄ b←2 ⋄ c←3 ⋄ d←4 ⋄ a+b × c+d ⍝ 21
@@ -51,6 +51,7 @@ a←1 ⋄ b←2 ⋄ c←3 ⋄ d←4 ⋄ a+b × c+d ⍝ 21
51
51
  2×1 + 1 ⍝ 3
52
52
  x←3 ⋄ x+1 ÷ 2 ⍝ 2
53
53
  + / 1 2 3 ⍝ 6
54
+ x←0 1 1 0 1 1 ⋄ ≢⊢ ⌸x ⍝ [2 4]ₓ
54
55
  ```
55
56
 
56
57
  ## Brackets, parentheses and braces
@@ -24,6 +24,13 @@ Where option `vectors` is false, `"svd"` and `"eigen"` give only `s` or `values`
24
24
  ⍴(["kind":"qr" "complete":$t]•decompose [1 2⋄3 4⋄5 6]).q ⍝ [3 3]ₓ
25
25
  ```
26
26
 
27
+ Option `rank`, a positive integer, makes `"svd"` give only the first `rank` singular values, with their vectors unless `vectors` is false. A randomized method computes them, in far less time than the full SVD of a large matrix takes. The result is an approximation. The faster the singular values beyond the `rank`th decay, the smaller its error. For a `rank` within 10 of the matrix's smaller side, the result is the full SVD's first `rank` columns.
28
+
29
+ ```bpl
30
+ (["kind":"svd" "rank":1]•decompose [1 2⋄3 4⋄5 6]).s ⍝ [9.525518091565104]
31
+ ⍴(["kind":"svd" "rank":1]•decompose [1 2⋄3 4⋄5 6]).v ⍝ [2 1]ₓ
32
+ ```
33
+
27
34
  The determinant is `-.×m`. The `"lu"` factors give its sign, and the logarithm of its magnitude, which can't overflow:
28
35
 
29
36
  ```bpl
@@ -41,4 +48,4 @@ f←"cholesky" •decompose [4 2⋄2 3]
41
48
  "cholesky" •decompose⁻¹ f ⍝ [4 2⋄2 3]
42
49
  ```
43
50
 
44
- Errors: `RANK` for an argument that isn't a matrix, or a factor of the wrong rank; `LENGTH` for `"eigen"`, `"cholesky"` or `"lu"` of a matrix that isn't square, or factors whose sizes don't agree; `DOMAIN` for an unknown decomposition or option, a `vectors` of false for a kind other than `"svd"` and `"eigen"`, a `complete` of true for a kind other than `"qr"`, an empty or nonnumeric matrix, `"cholesky"` of a matrix that isn't Hermitian positive definite, a missing factor, eigenvectors that aren't independent, or a `p` that doesn't hold each position once.
51
+ Errors: `RANK` for an argument that isn't a matrix, or a factor of the wrong rank; `LENGTH` for `"eigen"`, `"cholesky"` or `"lu"` of a matrix that isn't square, or factors whose sizes don't agree; `DOMAIN` for an unknown decomposition or option, a `vectors` of false for a kind other than `"svd"` and `"eigen"`, a `complete` of true for a kind other than `"qr"`, a `rank` that isn't a positive integer or that's given for a kind other than `"svd"`, an empty or nonnumeric matrix, `"cholesky"` of a matrix that isn't Hermitian positive definite, a missing factor, eigenvectors that aren't independent, or a `p` that doesn't hold each position once.
@@ -14,6 +14,7 @@
14
14
  | `width` | The widest line display shows. `∞` allows any width | The terminal's width in the REPL, `∞` elsewhere |
15
15
  | `tolerance` | The relative tolerance of approximate comparison of 64-bit floats, from 0 to `1E¯14`. Narrower floats compare exactly | `1E¯14` |
16
16
  | `float` | The width of new floats in bits, 16, 32 or 64 | `64` |
17
+ | `threads` | The number of threads that large calls split across. `0` gives the default. `1` keeps every call on one thread | `0` |
17
18
 
18
19
  Display shows part of an array of more than `limit` items: the first and last `edges` positions of each axis longer than twice `edges`. `…` replaces the hidden columns, `⋮` the hidden rows, and `⋱` sits where they cross. A nested array follows the same rule on its own. A line wider than `width` hides columns in the same way, keeping as many at each end as fit. `⎕←` always shows every item, and rounds floats to `prec` as display does. [`⍕`](../glyphs/format.qmd) and source text always hold every item and every digit.
19
20
 
@@ -21,12 +22,15 @@ Display shows part of an array of more than `limit` items: the first and last `e
21
22
 
22
23
  `float` sets the default width of floats, in bits: the width of bare numbers in code parsed after the change, of numbers that `•csv`, `•json`, `•vfi` and `•image` read, of random numbers, and of floats that a function gives from exact arguments. Code already parsed keeps its numbers. A change partway through some code therefore applies from the next input, or from text that [`⍎`](../glyphs/execute.qmd) parses later. Leading `•prefs` calls on a literal record are the exception. They run before the rest of their code is parsed, as in the examples below. A script, a notebook cell or a line typed at the REPL can set its own width this way. In a module that [`•load`](load.qmd) runs, they run in order with the rest of its code. See [Numbers](../numbers.qmd#float-widths).
23
24
 
25
+ `threads` sets how many threads this session's large calls split across. A call splits only when it has enough work to repay the extra threads. Float results can differ in their last bits between thread counts. The default, 0, uses the number in the `RAYON_NUM_THREADS` environment variable where it's set, and one thread for each core otherwise. 1 runs every call on the thread that evaluates the code. When several BPL processes run at once, such as a pool of Python workers, set 1 in each of them to keep them from competing for the cores. The browser build runs every call on one thread, whatever the setting.
26
+
24
27
  ```bpl
25
28
  •prefs ["tolerance":0] ⋄ 0.3=0.1+0.2 ⍝ $f
26
29
  •prefs ["tolerance":1E¯14] ⋄ 0.3=0.1+0.2 ⍝ $t
27
30
  •prefs ["tolerance":1E¯14] ⋄ 1ₛ=1.0000001ₛ ⍝ $f
28
31
  •prefs ["float":32] ⋄ •storage 1.5 ⍝ "float32"
29
32
  •prefs ["float":64] ⋄ •storage 1.5 ⍝ "float64"
33
+ •prefs ["threads":1] ⋄ "threads"⊃•prefs ⍬ ⍝ 1ₓ
30
34
  ```
31
35
 
32
36
  Errors: `DOMAIN` for an unknown setting or an invalid value.
@@ -127,13 +127,15 @@ pub(crate) use with_int_pair;
127
127
  impl Width {
128
128
  /// The bytes that one integer of this width takes.
129
129
  fn bytes(self) -> usize { with_width!(self, T => std::mem::size_of::<T>()) }
130
- /// Whether this width holds `n`.
130
+ /// Whether this width holds `n`. It is `#[inline]`, so that the incremental build doesn't call it for each width `narrowest` tries.
131
+ #[inline]
131
132
  fn holds(self, n: i64) -> bool { with_width!(self, T => T::narrowed(n).is_some()) }
132
133
  /// The narrowest width that holds `min`, `max` and every integer between. Every width holds the empty range, where `min` is above
133
134
  /// `max`.
134
135
  pub(crate) fn narrowest<T: Int>(min: T, max: T) -> Self {
135
136
  let (min, max) = (min.to_i64(), max.to_i64());
136
- [Self::U8, Self::I16, Self::I32, Self::I64].into_iter().find(|w| min > max || w.holds(min) && w.holds(max)).expect("64 bits hold every integer")
137
+ for w in [Self::U8, Self::I16, Self::I32] { if min > max || w.holds(min) && w.holds(max) { return w } }
138
+ Self::I64
137
139
  }
138
140
  /// The narrowest width that holds every position below `bound`.
139
141
  pub(crate) fn below(bound: usize) -> Self { Self::narrowest(0, bound as i64 - 1) }
@@ -236,7 +238,7 @@ impl Kind {
236
238
  /// The compact kind of `source`'s items.
237
239
  fn source_kind(source: &Value) -> Option<Kind> {
238
240
  match source {
239
- Value::Array(a) => a.data.items().kind(),
241
+ Value::Array(a) => a.storage().items().kind(),
240
242
  atom => item_kind(atom),
241
243
  }
242
244
  }
@@ -414,6 +416,14 @@ impl Storage {
414
416
  let mut kinds = data.iter().map(item_kind);
415
417
  let Some(kind) = kinds.next().flatten().and_then(|first| kinds.try_fold(first, |k, i| k.join(i?, widening))) else { return Self::mixed(data) };
416
418
  // Collecting from `data.iter()` sizes the compact buffer exactly. Consuming `data` would reuse its larger allocation.
419
+ Self::of_kind(kind, &data)
420
+ }
421
+ /// One item, in the compact storage of its own kind when it has one, as `compact` would hold it.
422
+ pub(super) fn one(item: &Value) -> Self {
423
+ match item_kind(item) { Some(kind) => Self::of_kind(kind, std::slice::from_ref(item)), None => Self::mixed(vec![item.clone()]) }
424
+ }
425
+ /// Compact storage of `kind` for `data`, whose items all have that kind or one it holds.
426
+ fn of_kind(kind: Kind, data: &[Value]) -> Self {
417
427
  match kind {
418
428
  Kind::Boolean => Self::Boolean(data.iter().map(|e| number(e).unwrap().as_bool().unwrap()).collect()),
419
429
  // The widest of the items' own widths holds every item.
@@ -728,7 +738,7 @@ impl Gather {
728
738
  }
729
739
  /// The gathered array, laid out by `layout`. An empty array takes `prototype`.
730
740
  pub(crate) fn finish(self, layout: Layout, prototype: impl Prototype) -> Result<Value, ErrorKind> {
731
- let shape = layout.shape().to_vec();
741
+ let shape = crate::Shape::from(layout.shape());
732
742
  let value = match self.data {
733
743
  Storage::Mixed(ref d, _) if d.is_empty() && !self.open => Value::empty_of(shape, prototype.value(), true)?,
734
744
  data if data.len() == 0 => Value::empty(shape, prototype.value())?,
@@ -39,7 +39,7 @@ impl Value {
39
39
  if self.is_unit() {
40
40
  if let Value::Function(f) = self.at(0) {
41
41
  let text = f.to_string();
42
- return Self::characters(vec![text.chars().count()], text.chars().collect());
42
+ return Self::characters([text.chars().count()], text.chars().collect());
43
43
  }
44
44
  }
45
45
  // A keyed array formats as its display text, so its keys stay visible.
@@ -91,7 +91,7 @@ impl Value {
91
91
 
92
92
  fn formatted_cells(&self) -> Result<Self, ErrorKind> {
93
93
  use crate::display::{grid, Cell, Style};
94
- if self.is_empty() { return Self::empty(vec![0], Value::Character(' ')); }
94
+ if self.is_empty() { return Self::empty([0], Value::Character(' ')); }
95
95
  let rank = self.shape().len();
96
96
  let columns = self.shape().last().copied().unwrap_or(1);
97
97
  let (mut size, mut matrix, mut rows) = (0, rank > 1, Vec::new());