diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-09-07 12:12:46 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-09-07 12:13:59 -0400 |
| commit | 176c78f51809ba3648d7a4cdedc78553df5904ae (patch) | |
| tree | 556619a931598fdb2a49b706351821ac4d044886 | |
| parent | 7cb25167c2f4eb3cd0858f23d9662d9853d54cb6 (diff) | |
Use a new scope for execution in dzref
| -rwxr-xr-x | dzref | 8 | ||||
| -rw-r--r-- | md.bqn | 3 | ||||
| -rw-r--r-- | src/c.bqn | 6 |
3 files changed, 10 insertions, 7 deletions
@@ -80,7 +80,8 @@ ProgressiveIndexOf ← {𝕨⊐○(≍˘⟜OccurrenceCount𝕨⊸⊐)𝕩} ⊒ ← OccurrenceCount⊘ ProgressiveIndexOf " -X←Raw←{F:≤4} +raw ← {⍎} +X ← {F:≤4} {v: chrs←⟨ "∾↕⊐⊒∊⍷" @@ -104,7 +105,7 @@ X←Raw←{F:≤4} # built-in assumptions Mod ← {((⊑chr⊐𝕨)⊑names) ∾ " ← " ∾ 𝕩} - ⍎¨ ⟨ + Raw¨ ⟨ "IsArray ← 0≠≡" ⟩∾Mod⟜⥊¨ "↕∾⊐" @@ -127,13 +128,12 @@ X←Raw←{F:≤4} lf ← @+10 pre ← E_isdef◶E_proc‿E_redef¨ lf((⊢-˜¬×+`)∘=⊔⊢)impl - Raw↩⍎ ExecFile←{ path ← "dot_path←" ∾ '"' (⊣∾⊣∾˜(1+=)/⊢) (∨`⌾⌽'/'=𝕩)/𝕩 src ← "•path"•_r_"dot_path"∘E_proc¨ •LNS 𝕩 Raw ∾ ∾⟜lf¨ path <⊸∾ src } X↩Raw∘E_proc - ⍎ ∾ ∾⟜lf¨ pre + Raw ∾ ∾⟜lf¨ pre ≠◶(X˙)‿{ExecFile ⊑𝕩}‿{ExecFile ⊑𝕩 ⋄ X 1⊑𝕩} •args } @@ -22,6 +22,9 @@ ################################ # Utilities +# Linefeed +lf ← @+10 + # Shift cells 𝕨 into array 𝕩, maintaining its total length Shl ← ≠∘⊢ ↑ ∾ # From the left Shr ← -∘≠∘⊢ ↑ ∾˜ # From the right @@ -1,9 +1,9 @@ -nl←@+10 +lf←@+10 charSet‿cgl←(∾ ≍○< ≠¨)⟨ "+-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!" # Function "˙˜˘¨⌜⁼´˝`" # Modifier "∘○⊸⟜⌾⊘◶⎉⚇⍟" # Composition - nl∾"⋄," # Separator + lf∾"⋄," # Separator "←↩→" # Gets "(){}⟨⟩" # Bracket "‿" # Ligature @@ -34,7 +34,7 @@ spc←⥊3‿5‿6-⌜3‿0 Tokenize←{ r←𝕩='#'⋄s←/(≠↑2⊸↓)⊸∧𝕩='''⋄d←/dm←𝕩='"' g←⍋q←∾⟨ s⋄¯1↓d⋄/r⟩ ⋄q↩g⊏q - e← g⊏∾⟨2+s⋄ 1↓d⋄(⊢-¯1↓0∾⊢)∘⊏⟜(0∾+`r)⊸//(𝕩=nl)∾1⟩ + e← g⊏∾⟨2+s⋄ 1↓d⋄(⊢-¯1↓0∾⊢)∘⊏⟜(0∾+`r)⊸//(𝕩=lf)∾1⟩ Se←{(⊏˜𝕨)Se 1¨⌾((𝕩/𝕨)⊸⊏)𝕩}⍟{0=⊑⌽𝕩} st←¯1↓Se⟜(1↑˜≠)∾⟜≠q⍋e⋄b←st/q∾˘e ToI←¯1↓·/⁼(≠𝕩)∾˜⥊ |
