diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-10-17 15:26:58 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-10-17 15:26:58 -0400 |
| commit | 5c6c1c73832759cfa1e89705a26b4f90b140a819 (patch) | |
| tree | 2631b4fbeb6a7afb907fdd563c1bbdd2db69c4fc | |
| parent | 2d381ac8c137d5fc3eb33213c1684c25d6d6e5de (diff) | |
Remove unnecessary uses of •path now that •Import imcorporates it
| -rwxr-xr-x | dc.bqn | 4 | ||||
| -rw-r--r-- | md.bqn | 10 | ||||
| -rwxr-xr-x | src/cjs.bqn | 8 | ||||
| -rwxr-xr-x | src/pr.bqn | 2 | ||||
| -rwxr-xr-x | test/dz_comp | 6 | ||||
| -rwxr-xr-x | test/dz_rt | 6 | ||||
| -rwxr-xr-x | wcshim.bqn | 2 |
7 files changed, 19 insertions, 19 deletions
@@ -4,8 +4,8 @@ # multiple bodies, and use variable names instead of counts. # Rearrange and make up some names so the bytecode can be run. -compile ← •Import •path∾"src/c.bqn" -prims ← (•Import •path∾"dzref"){𝔽} "⟨ +compile ← •Import "src/c.bqn" +prims ← (•Import "dzref"){𝔽} "⟨ +,-,×,÷,⋆,√,⌊,⌈,|,¬,∧,∨,<,>,≠,=,≤,≥,≡,≢,⊣,⊢,⥊,∾,≍,↑,↓,↕,«,»,⌽,⍉,/,⍋,⍒,⊏,⊑,⊐,⊒,∊,⍷,⊔,! ˙,˜,˘,¨,⌜,⁼,´,˝,` ∘,○,⊸,⟜,⌾,⊘,◶,⎉,⚇,⍟ @@ -173,7 +173,7 @@ blobURL ← repoURL∾"/blob/master/" # Environments _getCodeExec ← {𝕗⋄⍎} -_getSvgExec ← {𝕗⋄⟨•path∾"svg.bqn","⍎"⟩ •Import •path∾"dzref"} +_getSvgExec ← {𝕗⋄⟨"svg.bqn","⍎"⟩ •Import "dzref"} ################################ @@ -319,7 +319,7 @@ Markdown ← {filename𝕊𝕩: useRepl←0 ⋄ GetRepl ← {𝕩⋄ useRepl↩1 ⋄ repl} ProcComment ← ⟨"<!--REPL-->"⟩⊸≢◶GetRepl‿{ n←≠s←"<!--SVG" ⋄ l←¯3↓⍟(1=≠𝕩)⊑𝕩 ⋄ a←s≡n↑l - Source ← {((0<≠)◶<‿(•LNS •path∾path∾⊢) Trim n↓l) ∾ 1↓¯1↓𝕩} + Source ← {((0<≠)◶<‿(•LNS path∾⊢) Trim n↓l) ∾ 1↓¯1↓𝕩} SvgExec⍟a JoinLines Source⍟a 𝕩 } ProcHtml ← { @@ -519,7 +519,7 @@ Markdown ← {filename𝕊𝕩: # Uses the test cases at https://spec.commonmark.org/0.29/spec.json # since Github doesn't seem to have published theirs TestSections ← { - tests ← ¯2 ↓˘ 8⊸(÷˜⟜≠∾⊣)⊸⥊2↓•LNS •path∾"spec.json" + tests ← ¯2 ↓˘ 8⊸(÷˜⟜≠∾⊣)⊸⥊ 2↓•LNS"spec.json" tests ↩ ((⊑2+⊐⟜':')¨∘⊏ ((-','=¯1⊑⊢)↓↓)¨⎉1 ⊢) tests testSection ← (1↓¯1↓⊢)¨ 5⊏˘tests UnEscape ← { @@ -632,7 +632,7 @@ GetMultiHighlights ← { ################################ # Format an array to a character matrix # Won't work on functions until we can catch errors -fmtm ← ⟨•path∾"src/fmt.bqn"⟩ •Import •path∾"dzref" +fmtm ← ⟨"src/fmt.bqn"⟩ •Import "dzref" Fmt ← ⍕ _fmtm @@ -646,7 +646,7 @@ ConvertFile ← { fileout ← ".html" ∾˜ (¯6⊸↓∾"index"˙)⍟("README"⊸MatchEnd) ¯3↓𝕩 # Contents of file to convert - md ← •LNS •path∾𝕩 + md ← •LNS 𝕩 # Verify and remove the html link line: the output *is* the html file. ! ("*View this file"⊸MatchStart ∧ (siteURL∾fileout∾").*")⊸MatchEnd) ⊑md out ← 𝕩 Markdown 2↓md diff --git a/src/cjs.bqn b/src/cjs.bqn index b481cdc0..3e6aaabf 100755 --- a/src/cjs.bqn +++ b/src/cjs.bqn @@ -1,6 +1,6 @@ #! /usr/bin/env dbqn -compile ← •Import •path∾"c.bqn" +compile ← •Import "c.bqn" Comp ← ((<"runtime["∾⍕∾"]"˙)¨↕62)⊸Compile FP ← ∞⊸=◶⟨⍕,"Infinity"⟩ Esc ← (⟨"\t","\n","\r","\'","\"""⟩∾<∘⥊)⊑˜("'"""∾˜@+9‿10‿13)⊑∘⊐⊢ @@ -13,8 +13,8 @@ Fout ← ⟨⊢,Fconst,L⟩ {L𝕎¨𝕩}¨ ⊢ Frun ← ("provide.concat("∾∾⟜")")⌾(1⊸⊑) Fout Long ← ∾ (1‿2/⟨" new Uint8Array("∾∾⟜")"⋄((@+10)∾" ,")⊸∾⟩) {𝕎𝕩}¨ ⊢ • ← (⊑"r"‿"c"‿"fmt"⊐⊏)◶⟨ - {𝕩⋄ref‿len←•Import•path∾"pr.bqn"⋄Long Frun len⊸↓⌾(1⊸⊑)Comp ref} - {𝕩⋄Long Fout Comp J •LNS •path∾"c.bqn"} - {𝕩⋄Long Fout Comp J •LNS •path∾"fmt.bqn"} + {𝕩⋄ref‿len←•Import"pr.bqn"⋄Long Frun len⊸↓⌾(1⊸⊑)Comp ref} + {𝕩⋄Long Fout Comp J •LNS "c.bqn"} + {𝕩⋄Long Fout Comp J •LNS "fmt.bqn"} ¯1 ↓ · J L∘Fout∘Comp¨ ⟩ •args @@ -2,7 +2,7 @@ # Process BQN runtime -impl ← •LNS •path∾"r.bqn" +impl ← •LNS "r.bqn" chrs←⟨ "+-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!" diff --git a/test/dz_comp b/test/dz_comp index 73806102..251d7232 100755 --- a/test/dz_comp +++ b/test/dz_comp @@ -1,8 +1,8 @@ #! /usr/bin/env dbqn -⟨DRun⟩ ← •Import •path∾"../dc.bqn" -c ← ∾(•LNS •path∾∾⟜"cases.bqn")¨""‿"b" -{𝕩: c ∾↩ (¬":"⊑∘∊⊢)¨⊸/ "1 %"⊸∾¨ (3≤≠)◶0‿(('#'≠2⊸⊑)∧" "≡2⊸↑)¨⊸/ •LNS •path∾"prim.bqn" }⍟⊢⊑(<"-prim")∊•args +⟨DRun⟩ ← •Import "../dc.bqn" +c ← ∾(•LNS ∾⟜"cases.bqn")¨""‿"b" +{𝕩: c ∾↩ (¬":"⊑∘∊⊢)¨⊸/ "1 %"⊸∾¨ (3≤≠)◶0‿(('#'≠2⊸⊑)∧" "≡2⊸↑)¨⊸/ •LNS "prim.bqn" }⍟⊢⊑(<"-prim")∊•args M ← {e‿b: (⍎e)⊸≢◶""‿{(@+10)∾˜""""∾b∾""": expected "∾e∾" but received "∾⍕𝕩} DRun b} r ← '%' M∘((+`-2⊸×)∘=⊔⊢)¨ c • ← ("All "∾(⍕≠c)∾" passed!")⍟(0=≠) ∾r @@ -2,9 +2,9 @@ # Compile and run the primitive implementations, and prim.bqn -impl ← •LNS •path∾"../src/r.bqn" +impl ← •LNS "../src/r.bqn" -⟨DRun⟩ ← •Import •path∾"../dc.bqn" +⟨DRun⟩ ← •Import "../dc.bqn" chrs←⟨ "!+-×÷⋆√⌊⌈∧∨¬|=≠≤<>≥≡≢⊣⊢⥊∾≍↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔" @@ -55,6 +55,6 @@ E_redef ← { # handles [fmd] [←↩] } pre ∾↩ E_isdef◶E_proc‿E_redef¨ impl -t ← (¬∘⊑':'∊⊢)¨⊸/ 3⊸↓⌾(3⊸⊑) •LNS •path∾"prim.bqn" +t ← (¬∘⊑':'∊⊢)¨⊸/ 3⊸↓⌾(3⊸⊑) •LNS "prim.bqn" res ← DRun ∾ ∾⟜(@+10)¨ pre ∾ E_proc¨ t • ← ("All "∾(⍕≠res)∾" passed!")⍟(0=≠) /res @@ -1,3 +1,3 @@ #! /usr/bin/env dbqn -((<•path∾"wc.bqn")∾•args) •Import •path∾"dzref" +((<•path∾"wc.bqn")∾•args) •Import "dzref" |
