aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-11-01 16:04:45 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-11-01 16:04:54 -0400
commit0a5ec5b2c31eccda5e00239df80ae3675a51b0a2 (patch)
treeb11c548a680f5118f85489ba63299f498c6983d3
parentacd2159e1778893ff9d97da1120fb0c6e43a6fc1 (diff)
Remove dzref
-rw-r--r--docs/running.html2
-rwxr-xr-xdzref98
-rw-r--r--running.md4
-rw-r--r--src/README.txt5
-rw-r--r--src/pp.bqn4
5 files changed, 4 insertions, 109 deletions
diff --git a/docs/running.html b/docs/running.html
index 3e247156..b78b10ad 100644
--- a/docs/running.html
+++ b/docs/running.html
@@ -31,7 +31,5 @@
<span class='Value'>java</span> <span class='Function'>-</span><span class='Value'>jar</span> <span class='Function'>/</span><span class='Value'>path</span><span class='Function'>/</span><span class='Value'>to</span><span class='Function'>/</span><span class='Value'>dzaima</span><span class='Function'>/BQN/BQN</span><span class='Value'>.jar</span> <span class='String'>&quot;$@&quot;</span>
</pre>
<p>If compiled with Native Image, <code><span class='Value'>nBQN</span></code> can be used directly instead.</p>
-<h4 id="dzaimareference-bqn"><a class="header" href="#dzaimareference-bqn">dzaima+reference BQN</a></h4>
-<p>This repository contains a dzaima/BQN script <code><span class='Value'>dzref</span></code> that fills in gaps in primitive support with BQN implementations. It was used for md.bqn for a while and is no longer used now. The command-line arguments are a script to run and followed by the <code><span class='Value'>•args</span></code> to supply to it.</p>
<h3 id="bqn2ngn"><a class="header" href="#bqn2ngn">BQN2NGN</a></h3>
<p><a href="https://github.com/mlochbaum/BQN2NGN">BQN2NGN</a> is a prototype implementation in Javascript build to experiment with the langauge, which is now abandoned.</p>
diff --git a/dzref b/dzref
deleted file mode 100755
index 4996aae4..00000000
--- a/dzref
+++ /dev/null
@@ -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
-}
diff --git a/running.md b/running.md
index 46ef90aa..98790c04 100644
--- a/running.md
+++ b/running.md
@@ -42,10 +42,6 @@ In this repository and elsewhere, dzaima/BQN scripts are called with `#! /usr/bi
If compiled with Native Image, `nBQN` can be used directly instead.
-#### dzaima+reference BQN
-
-This repository contains a dzaima/BQN script `dzref` that fills in gaps in primitive support with BQN implementations. It was used for md.bqn for a while and is no longer used now. The command-line arguments are a script to run and followed by the `•args` to supply to it.
-
### BQN2NGN
[BQN2NGN](https://github.com/mlochbaum/BQN2NGN) is a prototype implementation in Javascript build to experiment with the langauge, which is now abandoned.
diff --git a/src/README.txt b/src/README.txt
index 5b2f659b..769bf4f5 100644
--- a/src/README.txt
+++ b/src/README.txt
@@ -27,6 +27,5 @@ e.bqn and p.bqn also require the definitions from svg.bqn; they are
attached cjs.bqn.
Some of these files are also used elsewhere: pp.bqn preprocesses other
-primitive-defining code in ../test/ref.bqn and ../dzref, and f.bqn is
-used to format results in markdown while e.bqn generates diagrams for
-the tutorials.
+primitive-defining code in ../test/ref.bqn, and f.bqn is used to format
+results in markdown while e.bqn generates diagrams for the tutorials.
diff --git a/src/pp.bqn b/src/pp.bqn
index ee8713de..6ce99f12 100644
--- a/src/pp.bqn
+++ b/src/pp.bqn
@@ -1,6 +1,6 @@
# Primitive processor
-# Used in dzref and pr.bqn for handling source code with primitive
-# redefinitions.
+# Used in pr.bqn and ../test/ref.bqn for handling source code with
+# primitive redefinitions.
# Defining a primitive shadows previous definitions, so earlier uses
# of the primitive still use the old definition.
# This is handled by using a new name each time it's defined.