diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-11-01 16:04:45 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-11-01 16:04:54 -0400 |
| commit | 0a5ec5b2c31eccda5e00239df80ae3675a51b0a2 (patch) | |
| tree | b11c548a680f5118f85489ba63299f498c6983d3 /dzref | |
| parent | acd2159e1778893ff9d97da1120fb0c6e43a6fc1 (diff) | |
Remove dzref
Diffstat (limited to 'dzref')
| -rwxr-xr-x | dzref | 98 |
1 files changed, 0 insertions, 98 deletions
@@ -1,98 +0,0 @@ -#!/usr/bin/env dbqn - -impl ← " -#⌜ -# LAYER 4: Operators - -ValidateRanks←{ - ! 1≥=𝕩 - 𝕩↩⥊𝕩 - ! (1⊸≤∧≤⟜3)≠𝕩 - ! ∧´⌊⊸=⌜𝕩 - 𝕩 -} -_ranks ← {⟨2⟩⊘⟨1,0⟩ ((⊣-1+|)˜⟜≠⊑¨<∘⊢) ValidateRanks∘𝔽} -_depthOp_←{ - neg←0>n←𝕨𝔾_ranks𝕩 ⋄ F←𝔽 - _d←{ - R←(𝕗+neg)_d - 𝕨(2⥊(neg∧𝕗≥0)∨(0⌈𝕗)≥≍○<○≡)◶(⟨R¨⋄R⟜𝕩¨∘⊣⟩≍⟨(𝕨R⊢)¨∘⊢⋄F⟩)𝕩 - } - 𝕨 n _d 𝕩 -} -⚇ ← _depthOp_ - - -#⌜ -# LAYER 5: Structural functions - -Windows←{ - Nat←(1=•Type)◶⟨0,0⊸≤∧⌊⊸=⟩ - ! 0=•Type 𝕩 - ! 1≥=𝕨 - ! 𝕨≤○≠≢𝕩 - ! ∧´Nat¨⥊𝕨 - s←(≠𝕨)↑≢𝕩 - ! ∧´𝕨≤1+s - 𝕨{(∾⟜(𝕨≠⊸↓≢𝕩)∘≢⥊>)<¨⊸⊏⟜𝕩¨s(¬+⌜○↕⊢)⥊𝕨}⍟(0<≠𝕨)𝕩 -} -↕ ↩ ↕ ⊘ Windows - - -#⌜ -# LAYER 6: Everything else - -# Searching -IndexOf←(1<⌈○=)◶⊐‿{ - c←1-˜=𝕨 - ! 0≤c - 𝕨 (0<≠𝕨)◶⟨0⎉c∘⊢,(+˝∧`)≢⎉c⎉c‿∞⟩ 𝕩 -} -MarkFirst←{ - ! 1≤=𝕩 - u←0↑𝕩 - {(≠u)>⊑u IndexOf 𝕩}◶{u↩u∾𝕩⋄1}‿0˘𝕩 -} -Find←{ - r←=𝕨 - ! r≤=𝕩 - 0 •FillFn 𝕨 ≡⎉r ((1+r-⊸↑≢𝕩)⌊≢𝕨)⊸↕⎉r 𝕩 -} - -⊐ ↩ ⊐ ⊘ IndexOf -∊ ← MarkFirst ⊘ (⊐˜<≠∘⊢) -⍷ ← ∊⊸/ ⊘ Find - -OccurrenceCount ← ⊐˜(⊢-⊏)⍋∘⍋ -ProgressiveIndexOf ← {𝕨⊐○(((≢∾2˙)⥊≍˘⟜OccurrenceCount∘⥊)𝕨⊸⊐)𝕩} - -⊒ ← OccurrenceCount⊘ ProgressiveIndexOf -" - -raw ← {•Eval} -X ← {F:≤4} -_withRef ← ˙ -{v: - chrs←⟨ - "↕⊐⊒∊⍷" - "" - "⚇" - ⟩ - - # built-in assumptions - GetRepls ← { - c‿n ← 𝕩 ⋄ k←"↕⊐" - ⟨c,(⥊¨k)⌾(((⊑¨c)⊐k)⊸⊏)n⟩ ∾⟜<¨ ⟨"•Eval","(•Eval _withRef)"⟩ - } - - ⟨E_proc⟩ ← chrs‿GetRepls •Import "src/pp.bqn" - E_nodef ← 0⊸E_proc - - ExecFile←{ - ((•path⊸∾⌾⊑(2∾˜∧`⌾⌽'/'≠𝕩)⊔𝕩)∾⟨𝕨⟩) Raw E_nodef •FChars 𝕩 - } - _withRef ↩ {𝔽∘E_nodef⊘(𝔽⟜E_nodef)} - X↩Raw _withRef - Raw E_proc impl - (1⊸↓ ExecFile ⊑) •args -} |
