diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-09-04 18:43:56 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-09-04 18:43:56 -0400 |
| commit | cf072f50d2e1c600c788d37645721a94c55377c8 (patch) | |
| tree | 4db511aff5d7ae99838d23f5b0b1022a3fd28e71 | |
| parent | 399c717259ae8b310a3503d4098acec3b9b65486 (diff) | |
Let's never use •UCS again
| -rwxr-xr-x | c.bqn | 6 | ||||
| -rwxr-xr-x | dzref | 6 | ||||
| -rwxr-xr-x | dzref_full | 6 | ||||
| -rwxr-xr-x | src/cjs.bqn | 6 | ||||
| -rwxr-xr-x | src/pr.bqn | 6 | ||||
| -rwxr-xr-x | test/bt | 2 | ||||
| -rwxr-xr-x | test/cmpref.bqn | 6 |
7 files changed, 19 insertions, 19 deletions
@@ -81,7 +81,7 @@ ReadNum←{ m←(n=⊑)◶⟨Pos,-·Pos 1⊸↓⟩e↑𝕩 𝕩×⟜(10⋆·Int(e+1)↓⊣)˜⍟(e<≠𝕩)m } -LitVal←(⊑((⊑bU)∾"'""")⊐⊏)◶⟨•UCS 0,1⊸⊑,1⊸↓,ReadNum⟩ +LitVal←(⊑((⊑bU)∾"'""")⊐⊏)◶⟨@,1⊸⊑,1⊸↓,ReadNum⟩ GenF64←{ 0:8⥊0; l←2(⌊⋆⁼)𝕩 @@ -123,10 +123,10 @@ Gen←{ C←LEB∘≠⊸∾ S←∾⟜C V←≠∾∾ - I←C∘•UCS + I←C-⟜@ t‿n‿b←𝕩 ∾⟨ - 0∾(•UCS"asm")∾4↑1 + 0∾("asm"-@)∾4↑1 1 S V (96∾⟜∾C¨)¨t 3 S V ⥊¨↕≠b 7 S V ⥊<"fn"I⊸(⊣∾0∾⊢)n @@ -109,12 +109,12 @@ X←Raw←{F:≤4} init ← " "⊸∾¨(/⟜"_"¨nc/0‿1‿1)∾¨(nc/"FMD")∾¨(nc+´⊸↑⥊"AB"∾⌜•a) post ← ∾⟜" "¨/⟜"_"¨nc/0‿0‿1 - names ← init∾¨(•UCS 48)∾¨post + names ← init∾¨'0'∾¨post Inc ← { i←⊑chr⊐𝕩 n←0 ⋄ itr↩{n↩1+𝕩}⌾(i⊑⊢)itr - names↩((i⊑init)∾(•UCS 48+n)∾i⊑post)⌾(i⊑⊢)names + names↩((i⊑init)∾('0'+n)∾i⊑post)⌾(i⊑⊢)names } # built-in assumptions @@ -141,7 +141,7 @@ X←Raw←{F:≤4} (E_proc 1↑𝕩) ∾ "←" ∾ tail } - lf ← •UCS 10 + lf ← @+10 pre ← E_isdef◶E_proc‿E_redef¨ lf((⊢-˜¬×+`)∘=⊔⊢)impl Raw↩⍎ ExecFile←{Raw ∾ ∾⟜lf¨ E_proc¨ •LNS 𝕩} @@ -20,12 +20,12 @@ X←Raw←{F:≤4} init ← " "⊸∾¨(/⟜"_"¨nc/0‿1‿1)∾¨(nc/"FMD")∾¨(nc+´⊸↑⥊"ABC"∾⌜•a) post ← ∾⟜" "¨/⟜"_"¨nc/0‿0‿1 - names ← init∾¨(•UCS 48)∾¨post + names ← init∾¨'0'∾¨post Inc ← { i←⊑chr⊐𝕩 n←0 ⋄ itr↩{n↩1+𝕩}⌾(i⊑⊢)itr - names↩((i⊑init)∾(•UCS 48+n)∾i⊑post)⌾(i⊑⊢)names + names↩((i⊑init)∾('0'+n)∾i⊑post)⌾(i⊑⊢)names } # built-in assumptions @@ -57,7 +57,7 @@ X←Raw←{F:≤4} (E_proc 1↑𝕩) ∾ "←" ∾ tail } - lf ← •UCS 10 + lf ← @+10 pre ← E_isdef◶E_proc‿E_redef¨ impl Raw↩⍎ ExecFile←{Raw ∾ ∾⟜lf¨ E_proc¨ •LNS 𝕩} diff --git a/src/cjs.bqn b/src/cjs.bqn index aa69f4b0..e4f3ccf4 100755 --- a/src/cjs.bqn +++ b/src/cjs.bqn @@ -3,15 +3,15 @@ compile ← ⟨•path∾"../c.bqn"⋄"DGenFn"⟩ •EX •path∾"../dzref" Comp ← ((<"runtime["∾⍕∾"]"˜)¨↕60)⊸Compile FP ← ∞⊸=◶⟨⍕,"Infinity"⟩ -Esc ← (⟨"\t","\n","\r","\'"⟩∾<∘⥊)⊑˜("'"∾˜•UCS 9‿10‿13)⊑∘⊐⊢ +Esc ← (⟨"\t","\n","\r","\'"⟩∾<∘⥊)⊑˜("'"∾˜@+9‿10‿13)⊑∘⊐⊢ Str ← "str("""∾(∾Esc¨)∾""")"˜ Char ← "'"(∾∾⊣)Esc Fconst ← ≡◶⟨(⊑⍋)∘(∾⟜∞)◶⟨0⊸≤◶⟨"-"∾FP∘|,FP⟩,Char⟩⋄Str⋄⊑⟩ L ← "["∾"]"∾˜1↓·∾","⊸∾⟜⍕¨ -J ← ∾∾⟜(•UCS 10)¨ +J ← ∾∾⟜(@+10)¨ Fout ← ⟨L∾⟜25,L Fconst¨,L⟨⊑"fmd"⊸⊐,⊢,⊢,≠⟩⊸(L{𝕎𝕩}¨)¨⟩ {𝕎𝕩}¨ 0‿1‿3 ⊏ ⊢ Frun ← ("provide.concat("∾∾⟜")")⌾(1⊸⊑) Fout -Long ← ∾ (1‿2/⟨" new Uint8Array("∾∾⟜")"⋄((•UCS 10)∾" ,")⊸∾⟩) {𝕎𝕩}¨ ⊢ +Long ← ∾ (1‿2/⟨" new Uint8Array("∾∾⟜")"⋄((@+10)∾" ,")⊸∾⟩) {𝕎𝕩}¨ ⊢ • ← (⊑"r"‿"c"‿"fmt"⊐⊏)◶⟨ {𝕩⋄Long Frun {𝕩⊸↓⌾(1⊸⊑)Comp𝕨}´ •EX •path∾"pr.bqn"} {𝕩⋄Long Fout Comp J •LNS •path∾"c.bqn"} @@ -15,12 +15,12 @@ itr ← 0⥊˜≠chr init ← " "⊸∾¨(/⟜"_"¨nc/0‿1‿1)∾¨(nc/"FMD")∾¨(nc+´⊸↑⥊"ABC"∾⌜•a) post ← ∾⟜" "¨/⟜"_"¨nc/0‿0‿1 -names ← init∾¨(•UCS 48)∾¨post +names ← init∾¨'0'∾¨post Inc ← { i←⊑chr⊐𝕩 n←0 ⋄ itr↩{n↩1+𝕩}⌾(i⊑⊢)itr - names↩((i⊑init)∾(•UCS 48+n)∾i⊑post)⌾(i⊑⊢)names + names↩((i⊑init)∾('0'+n)∾i⊑post)⌾(i⊑⊢)names } # Required functionality passed in as an argument @@ -43,5 +43,5 @@ E_redef ← { # handles [fmd] [←↩] (E_proc 1↑𝕩) ∾ "←" ∾ tail } -ref ← ∾∾⟜(•UCS 10)¨ E_isdef◶E_proc‿E_redef¨ impl∾<"⟨"∾"⟩"∾˜1↓⥊","⊸∾˘chr +ref ← ∾∾⟜(@+10)¨ E_isdef◶E_proc‿E_redef¨ impl∾<"⟨"∾"⟩"∾˜1↓⥊","⊸∾˘chr ⟨ref, def+○≠keep⟩ @@ -3,6 +3,6 @@ dRun ← ⟨"dRun"⟩ •EX •path∾"../cshim.bqn" c ← ∾(•LNS •path∾∾⟜"cases.bqn")¨""‿"b" {𝕩: c ∾↩ (¬":"⊑∘∊⊢)¨⊸/ "1 %"⊸∾¨ (3≤≠)◶0‿(('#'≠2⊸⊑)∧" "≡2⊸↑)¨⊸/ •LNS •path∾"testref.bqn" }⍟⊢⊑(<"-ref")∊•args -M ← {e‿b: (⍎e)⊸≢◶""‿{(•UCS 10)∾˜""""∾b∾""": expected "∾e∾" but received "∾⍕𝕩} DRun b} +M ← {e‿b: (⍎e)⊸≢◶""‿{(@+10)∾˜""""∾b∾""": expected "∾e∾" but received "∾⍕𝕩} DRun b} r ← '%' M∘((+`-2⊸×)∘=⊔⊢)¨ c • ← ("All "∾(⍕≠c)∾" passed!")⍟(0=≠) ∾r diff --git a/test/cmpref.bqn b/test/cmpref.bqn index afe5f959..aa71661d 100755 --- a/test/cmpref.bqn +++ b/test/cmpref.bqn @@ -17,12 +17,12 @@ itr ← 0⥊˜≠chr init ← " "⊸∾¨(/⟜"_"¨nc/0‿1‿1)∾¨(nc/"FMD")∾¨(nc+´⊸↑⥊"ABC"∾⌜•a) post ← ∾⟜" "¨/⟜"_"¨nc/0‿0‿1 -names ← init∾¨(•UCS 48)∾¨post +names ← init∾¨'0'∾¨post Inc ← { i←⊑chr⊐𝕩 n←0 ⋄ itr↩{n↩1+𝕩}⌾(i⊑⊢)itr - names↩((i⊑init)∾(•UCS 48+n)∾i⊑post)⌾(i⊑⊢)names + names↩((i⊑init)∾('0'+n)∾i⊑post)⌾(i⊑⊢)names } # built-in assumptions @@ -56,5 +56,5 @@ E_redef ← { # handles [fmd] [←↩] pre ∾↩ E_isdef◶E_proc‿E_redef¨ impl t ← (¬∘⊑':'∊⊢)¨⊸/ 3⊸↓⌾(3⊸⊑) •LNS •path∾"testref.bqn" -res ← DRun ∾ ∾⟜(•UCS 10)¨ pre ∾ E_proc¨ t +res ← DRun ∾ ∾⟜(@+10)¨ pre ∾ E_proc¨ t • ← ("All "∾(⍕≠res)∾" passed!")⍟(0=≠) /res |
