diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-04-25 21:26:27 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-04-25 21:26:27 -0400 |
| commit | c15a166a65d55c806aea9f28f8b5bfc36954a757 (patch) | |
| tree | a5d3ccf952d4d6e39594c5f128f5cc3442548029 /src/pr.bqn | |
| parent | 676bc61b903c9c3201913ac1b11ae2d3e0ad6e1d (diff) | |
Use a custom primitive set to compile the runtime
Diffstat (limited to 'src/pr.bqn')
| -rwxr-xr-x | src/pr.bqn | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -4,20 +4,20 @@ # All primitives chrs←•Import "glyphs.bqn" -glyphs ⇐ ∾chrs +glyphs ← ∾chrs # Provided values, to be passed in through the constants array -def ← ⟨"Type","Fill","Log","GroupLen","GroupOrd","_fillBy_"⟩ +alias‿def ← (⊑¨ ≍○< 1⊸↓¨) ⟨"?Type","∩Fill","⍣Log", + "$GroupLen","%GroupOrd","⍝_fillBy_"⟩ keep ← "!+-×÷⋆⌊=≤≢⥊⊑↕⌜`⊘⎊" -len ⇐ def+○≠keep + +type ← ((+´·∧`'_'=0‿¯1⊸⊏)¨def) ∾ chrs((+`≠¨)∘⊣⍋∾⊸⊐)keep +prims ⇐ type ⊔ alias∾keep GetRepls ← { c‿n ← 𝕩 ki ← (⊑¨c)⊐keep - dt ← ⊔⟜⊒ (+´·∧`'_'=0‿¯1⊸⊏)¨ def - ns ← » ne←+`≠¨chrs - kt ← ∾ (ns+≠¨dt) + ⊔⟜⊒ne⍋ki - ⟨c,(kt⊏c)⌾(ki⊸⊏)n⟩∾¨⟨def,(∾ns+dt)⊏c⟩ + ⟨c,c⊣⌾(ki⊸⊏)n⟩∾¨⟨def,⥊¨alias⟩ } ⟨E_proc⟩ ← chrs‿GetRepls •Import "pp.bqn" |
