aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/cjs.bqn11
-rwxr-xr-xsrc/pr.bqn14
-rw-r--r--src/r0.bqn2
3 files changed, 14 insertions, 13 deletions
diff --git a/src/cjs.bqn b/src/cjs.bqn
index ecdb2990..ed5f112a 100755
--- a/src/cjs.bqn
+++ b/src/cjs.bqn
@@ -28,15 +28,16 @@ Fout ← (≠↑⟨F,Fconst,L F¨,F⟩˙) {L𝕎¨𝕩}¨ ⊢
Long ← ∾ (≠↑1‿3/⟨" "⊸∾⋄((@+10)∾" ,")⊸∾⟩˙) {𝕎𝕩}¨ ⊢
LFC ← Long∘Fout∘Comp
-RT ← {𝕩
- src‿need←•Import"pr.bqn" ⋄ l←≠∾need
- Long "provide"⊸Cat⌾(1⊸⊑) Fout l⊸↓⌾(1⊸⊑) (↕l) need _getComp src
+RT ← {
+ src‿need‿inputs←𝕩•Import"pr.bqn"
+ pr←"runtime_0"‿"provide"{(∾𝕨<⊸(<∘Ind⟜F¨)⟜(↕≠)¨𝕩)⊏˜(∾𝕩)⊐∾need}○((-1+0<𝕩)⊸↑)inputs
+ Long Fout pr need _getComp src
}
CArg ← {J (¯5⊸↓∾𝕩˙)⌾⊑ •FLines "c.bqn"}
SVG ← {∾⟨"Modify←GetHighlights←⊢⋄"⟩∾ •FChars∘∾⟜".bqn"¨ "../svg"‿𝕩}
-•Out (⊑"r"‿"c"‿"cc"‿"f"‿"e"‿"p"⊐⊏)◶⟨
- RT
+•Out (⊑"r"‿"r0"‿"r1"‿"c"‿"cc"‿"f"‿"e"‿"p"⊐⊏)◶⟨
+ RT∘⟨⟩, RT∘0, RT∘1
{𝕩⋄LFC CArg "⟨"∾"⟩"«∾","⊸∾¨'"'(⊣∾∾˜)¨glyphs}
{𝕩⋄LFC "{"∾"}"∾˜CArg"𝕩"}
{𝕩⋄LFC •FChars "f.bqn"}
diff --git a/src/pr.bqn b/src/pr.bqn
index d8d1c8e6..560dd2b0 100755
--- a/src/pr.bqn
+++ b/src/pr.bqn
@@ -11,15 +11,15 @@ alias‿def ← (⊑¨ ≍○< 1⊸↓¨) ⟨"?Type","∩Fill","⍣Log",
"$GroupLen","%GroupOrd","⍝_fillBy_"⟩
keep ← "!+-×÷⋆⌊=≤≢⥊⊑↕⌜`⊘⎊"
chrext ← glyphs ∾¨ ((+´·∧`'_'=0‿¯1⊸⊏)¨def) ⊔ alias
+Typ ← chrext⊸((+`≠¨)∘⊣⍋∾⊸⊐)
-in‿out ← rtt ⊑ {
- in0‿out0 ← ⟨"∩⍝+-×⌊=≤≢⥊⊑↕⌜", "⌊⌈|<>≠≥⊢⊣∾↑↓⊏˙˜´∘○⊸⟜◶⍟"⟩
- in1 ← ⍷ out0 ∾˜ in2 ← alias∾keep
- out2 ← ∾glyphs
- ⟨ in0‿out0, in1‿out2, in2‿out2 ⟩
-}
+in0‿out0 ← ⟨"∩⍝+-×⌊=≤≢⥊⊑↕⌜⊘", "⌊⌈|<>≠≥⊢⊣∾↑↓⊏˙˜´∘○⊸⟜◶⍟"⟩
+in2 ← alias∾keep
+out2 ← ∾glyphs
+in‿out ← rtt ⊑ ⟨in0,out0⟩‿⟨⍷in2∾out0,out2⟩‿⟨in2,out2⟩
-need ⇐ chrext⊸((+`≠¨)∘⊣⍋∾⊸⊐)⊸⊔ in
+inputs ⇐ ⟨out0, (⍋Typ)⊸⊏in2⟩
+need ⇐ Typ⊸⊔ in
GetRepls ← { c‿n←𝕩 ⋄ ⟨c,c⊣⌾((c∊⥊¨in)⊸/)n⟩∾¨⟨def,⥊¨alias⟩ }
diff --git a/src/r0.bqn b/src/r0.bqn
index 2dc08d62..8347f8bf 100644
--- a/src/r0.bqn
+++ b/src/r0.bqn
@@ -1,6 +1,6 @@
# BQN runtime part 0. Requires:
# Fill _fillBy_
-# +-×⌊=≤≢⥊⊑↕⌜
+# +-×⌊=≤≢⥊⊑↕⌜⊘
# Provides:
# ⌊⌈|<>≠≥⊢⊣∾↑↓⊏˙˜´∘○⊸⟜◶⍟
# ^^^^^^^ ^^^^ ^ ^^ are limited, suitable for r1