From f3d45a1ca914d59968531a6d5c409d80b73e53c3 Mon Sep 17 00:00:00 2001 From: razetime Date: Thu, 20 Jan 2022 11:57:50 +0530 Subject: complete REPL help for symbols --- docs/help/2-modifierrightoperand.html | 12 ++++ docs/help/assert_assertwithmessage.html | 2 +- docs/help/beginblock.html | 32 ++++++++++ docs/help/beginexpression.html | 16 +++++ docs/help/beginlist.html | 17 +++++ docs/help/change.html | 19 ++++++ docs/help/comment.html | 16 +++++ docs/help/currentfunction.html | 17 +++++ docs/help/currentmodifier.html | 12 ++++ docs/help/define.html | 22 +++++++ docs/help/endblock.html | 24 +++++++ docs/help/endexpression.html | 15 +++++ docs/help/endlist.html | 15 +++++ docs/help/export.html | 23 +++++++ docs/help/field.html | 15 +++++ docs/help/index.html | 107 +++++++++++++++++++++++++++++++- docs/help/infinity.html | 18 ++++++ docs/help/leftargument.html | 12 ++++ docs/help/minus.html | 16 +++++ docs/help/modifierleftoperand.html | 12 ++++ docs/help/modifierrightoperand.html | 12 ++++ docs/help/nothing.html | 23 +++++++ docs/help/nullcharacter.html | 19 ++++++ docs/help/pi.html | 15 +++++ docs/help/rightargument.html | 12 ++++ docs/help/separator.html | 21 +++++++ docs/help/separator1.html | 21 +++++++ docs/help/strand.html | 16 +++++ docs/help/system.html | 10 +++ docs/repl.js | 2 +- 30 files changed, 570 insertions(+), 3 deletions(-) create mode 100644 docs/help/2-modifierrightoperand.html create mode 100644 docs/help/beginblock.html create mode 100644 docs/help/beginexpression.html create mode 100644 docs/help/beginlist.html create mode 100644 docs/help/change.html create mode 100644 docs/help/comment.html create mode 100644 docs/help/currentfunction.html create mode 100644 docs/help/currentmodifier.html create mode 100644 docs/help/define.html create mode 100644 docs/help/endblock.html create mode 100644 docs/help/endexpression.html create mode 100644 docs/help/endlist.html create mode 100644 docs/help/export.html create mode 100644 docs/help/field.html create mode 100644 docs/help/infinity.html create mode 100644 docs/help/leftargument.html create mode 100644 docs/help/minus.html create mode 100644 docs/help/modifierleftoperand.html create mode 100644 docs/help/modifierrightoperand.html create mode 100644 docs/help/nothing.html create mode 100644 docs/help/nullcharacter.html create mode 100644 docs/help/pi.html create mode 100644 docs/help/rightargument.html create mode 100644 docs/help/separator.html create mode 100644 docs/help/separator1.html create mode 100644 docs/help/strand.html create mode 100644 docs/help/system.html (limited to 'docs') diff --git a/docs/help/2-modifierrightoperand.html b/docs/help/2-modifierrightoperand.html new file mode 100644 index 00000000..d8f02b07 --- /dev/null +++ b/docs/help/2-modifierrightoperand.html @@ -0,0 +1,12 @@ + + + + BQN: Mathematical Double-struck G (`𝔾`) + + +

Mathematical Double-struck G (𝔾)

+

𝔾: 2-Modifier Right operand

+

A variable assigned to the right operand of a 2-modifier block. π•˜ can be used to access the right operand as a value.

+↗️
    5 +{π•˜}3 1
+3
+
diff --git a/docs/help/assert_assertwithmessage.html b/docs/help/assert_assertwithmessage.html index e172ecbd..ec3e9e16 100644 --- a/docs/help/assert_assertwithmessage.html +++ b/docs/help/assert_assertwithmessage.html @@ -16,7 +16,7 @@ ! "hello" Error: hello -

𝕨 ! 𝕩: Dyad

+

𝕨 ! 𝕩: Assert With Message

Throw an error with message 𝕨 if 𝕩 is not 1.

↗️
       "hi" ! 1
 1
diff --git a/docs/help/beginblock.html b/docs/help/beginblock.html
new file mode 100644
index 00000000..af1f3d4b
--- /dev/null
+++ b/docs/help/beginblock.html
@@ -0,0 +1,32 @@
+
+  
+  
+  BQN: Left Curly Bracket (`{`)
+
+
+

Left Curly Bracket ({)

+

{ ...: Begin Block

+

Starts a block, which can be one of:

+ +

Must end with a corresponding }.

+↗️
    {𝕨 + 𝕩}   # Function
+(function block)
+
+    {𝕨‿𝔽‿𝕩}   # 1-modifier
+(1-modifier block)
+
+    {𝕨‿𝔽‿𝔾‿𝕩} # 2-modifier
+(2-modifier block)
+
+    {a ⇐ 5}   # Namespace
+{a⇐}
+
+    {5+4+6}   # Immediate block
+15
+
diff --git a/docs/help/beginexpression.html b/docs/help/beginexpression.html new file mode 100644 index 00000000..1e33e206 --- /dev/null +++ b/docs/help/beginexpression.html @@ -0,0 +1,16 @@ + + + + BQN: Left Parenthesis (`(`) + + +

Left Parenthesis (()

+

( ...: Begin Expression

+

Starts an expression, and only one expression. Must end with a corresponding ).

+

( gives higher precedence to the expression in it, and BQN will evaluate expressions in () first.

+↗️
    1 + 2 - 3
+0
+
+    (1 + 2) - 3
+0
+
diff --git a/docs/help/beginlist.html b/docs/help/beginlist.html new file mode 100644 index 00000000..5fc90b43 --- /dev/null +++ b/docs/help/beginlist.html @@ -0,0 +1,17 @@ + + + + BQN: Mathematical Left Angle Bracket (`⟨`) + + +

Mathematical Left Angle Bracket (⟨)

+

⟨ ...: Begin list

+

Starts a list. Inner elements must be separated by , or β‹„. +Lists can be nested in other lists.

+

Must end with a corresponding ⟩.

+↗️
    ⟨1, 2, 3⟩
+⟨ 1 2 3 ⟩
+
+    ⟨+ β‹„ - β‹„ 56⟩
+⟨ + - 56 ⟩
+
diff --git a/docs/help/change.html b/docs/help/change.html new file mode 100644 index 00000000..147ea5db --- /dev/null +++ b/docs/help/change.html @@ -0,0 +1,19 @@ + + + + BQN: Leftwards Arrow With Hook (`←`) + + +

Leftwards Arrow With Hook (←)

+

n ↩ v: Change

+

Changes the value of variable with name n to value v.

+

Variable n must already exist.

+↗️
    a ↩ 1
+Error: Undefined identifier
+
+    ⊒ b ← 3
+3
+
+    ⊒ b ↩ "Be the change you wish to see in the world."
+"Be the change you wish to see in the world."
+
diff --git a/docs/help/comment.html b/docs/help/comment.html new file mode 100644 index 00000000..d35ee10e --- /dev/null +++ b/docs/help/comment.html @@ -0,0 +1,16 @@ + + + + BQN: Number Sign (`#`) + + +

Number Sign (#)

+

#: Comment

+

Create a comment that extends till the end of a line.

+

Anything written in comments is ignored.

+↗️
    1 + 2 # + 3 + 4
+3
+
+    "Hello world!" # this is ignored!
+"Hello world!"
+
diff --git a/docs/help/currentfunction.html b/docs/help/currentfunction.html new file mode 100644 index 00000000..dd0ac5b0 --- /dev/null +++ b/docs/help/currentfunction.html @@ -0,0 +1,17 @@ + + + + BQN: Mathematical Double-struck S (`π•Š`) + + +

Mathematical Double-struck S (π•Š)

+

π•Š: Current Function

+

A variable assigned to the current function block. 𝕀 can be used to access the current function block as a value.

+

π•Š can be used for recursion.

+↗️
    F ← {π•Š 0: 1; 𝕩 Γ— π•Š 𝕩-1} # Factorial
+    F 5
+120
+
+    {𝕀‿𝕀}4
+⟨ (function block) (function block) ⟩
+
diff --git a/docs/help/currentmodifier.html b/docs/help/currentmodifier.html new file mode 100644 index 00000000..e1481382 --- /dev/null +++ b/docs/help/currentmodifier.html @@ -0,0 +1,12 @@ + + + + BQN: Mathematical Double-struck R (`𝕣`) + + +

Mathematical Double-struck R (𝕣)

+

𝕣: Current Modifier

+

A variable assigned to the current modifier block. Underscores must be added to the beginning and/or end (_𝕣, _𝕣_) to use the modifier with the correct role.

+↗️
    +{π•£βŠ£π•©} 4        
+(1-modifier block)
+
diff --git a/docs/help/define.html b/docs/help/define.html new file mode 100644 index 00000000..d5399cd1 --- /dev/null +++ b/docs/help/define.html @@ -0,0 +1,22 @@ + + + + BQN: Leftwards Arrow (`←`) + + +

Leftwards Arrow (←)

+

n ← v: Define

+

Defines a new variable with name n and value v.

+

Variable n must not already exist.

+↗️
    ⊒ a ← 1
+1
+
+    ⊒ b ← 3β€Ώ3 β₯Š 5
+β”Œβ”€       
+β•΅ 5 5 5  
+  5 5 5  
+  5 5 5  
+        β”˜
+
+    C ← ↑
+
diff --git a/docs/help/endblock.html b/docs/help/endblock.html new file mode 100644 index 00000000..5cac2a7c --- /dev/null +++ b/docs/help/endblock.html @@ -0,0 +1,24 @@ + + + + BQN: Right Curly Bracket (`}`) + + +

Right Curly Bracket (})

+

... }: End Block

+

Starts a block, which starts with }. See Begin Block for more details.

+↗️
    {𝕨 + 𝕩}   # Function
+(function block)
+
+    {𝕨‿𝔽‿𝕩}   # 1-modifier
+(1-modifier block)
+
+    {𝕨‿𝔽‿𝔾‿𝕩} # 2-modifier
+(2-modifier block)
+
+    {a ⇐ 5}   # Namespace
+{a⇐}
+
+    {5+4+6}   # Immediate block
+15
+
diff --git a/docs/help/endexpression.html b/docs/help/endexpression.html new file mode 100644 index 00000000..e180ae85 --- /dev/null +++ b/docs/help/endexpression.html @@ -0,0 +1,15 @@ + + + + BQN: Right Parenthesis (`)`) + + +

Right Parenthesis ())

+

... ): End Expression

+

The closing symbol for (. See Begin Expression for more details.

+↗️
    1 + 2 - 3
+0
+
+    (1 + 2) - 3
+0
+
diff --git a/docs/help/endlist.html b/docs/help/endlist.html new file mode 100644 index 00000000..633509f1 --- /dev/null +++ b/docs/help/endlist.html @@ -0,0 +1,15 @@ + + + + BQN: Mathematical Right Angle Bracket (`⟩`) + + +

Mathematical Right Angle Bracket (⟩)

+

... ⟩: End list

+

Ends a list started by a ⟨. See Begin List for more details.

+↗️
    ⟨1, 2, 3⟩
+⟨ 1 2 3 ⟩
+
+    ⟨+ β‹„ - β‹„ 56⟩
+⟨ + - 56 ⟩
+
diff --git a/docs/help/export.html b/docs/help/export.html new file mode 100644 index 00000000..dced1f53 --- /dev/null +++ b/docs/help/export.html @@ -0,0 +1,23 @@ + + + + BQN: Leftward Double Arrow (`⇐`) + + +

Leftward Double Arrow (⇐)

+

n ⇐ v: Export Definition

+

Define a variable with name n and export it from the current namespace or program's scope.

+↗️
    ns ← { exported ⇐ 5, unexported ← 0}
+    ns.exported
+5
+    ns.unexported
+Error: No key found
+
+

𝕨 ⇐: Export names

+

Export the names given in 𝕩 from the current namespace or program's scope. Names must be defined.

+↗️
    ns1 ← { ⟨alsoexportedβŸ©β‡, exported ⇐ 5, alsoexported ← 0}
+    ns1.exported
+5
+    ns1.alsoexported
+0
+
diff --git a/docs/help/field.html b/docs/help/field.html new file mode 100644 index 00000000..2de58500 --- /dev/null +++ b/docs/help/field.html @@ -0,0 +1,15 @@ + + + + BQN: Full Stop (`.`) + + +

Full Stop (.)

+

ns . name: Namespace Field

+

Access a field with name name in namespace ns. Field must have been exported with ⇐.

+↗️
    {a⇐1} . a
+1
+
+    {F⇐-}.F 5
+Β―5
+
diff --git a/docs/help/index.html b/docs/help/index.html index 12b1abc2..a47d3eda 100644 --- a/docs/help/index.html +++ b/docs/help/index.html @@ -5,6 +5,7 @@

REPL Help

+

Symbols are listed in alphabetical order of page name, ignoring syntactical roles.

@@ -14,6 +15,10 @@ + + + + @@ -23,7 +28,7 @@ - + @@ -34,6 +39,18 @@ + + + + + + + + + + + + @@ -46,6 +63,10 @@ + + + + @@ -54,6 +75,10 @@ + + + + @@ -62,10 +87,22 @@ + + + + + + + + + + + + @@ -86,6 +123,18 @@ + + + + + + + + + + + + @@ -94,6 +143,14 @@ + + + + + + + + @@ -138,6 +195,10 @@ + + + + @@ -146,6 +207,10 @@ + + + + @@ -162,14 +227,30 @@ + + + + + + + + + + + + + + + + @@ -178,6 +259,10 @@ + + + + @@ -206,6 +291,10 @@ + + + + @@ -214,6 +303,14 @@ + + + + + + + + @@ -246,10 +343,18 @@ + + + + + + + + diff --git a/docs/help/infinity.html b/docs/help/infinity.html new file mode 100644 index 00000000..c74c6f53 --- /dev/null +++ b/docs/help/infinity.html @@ -0,0 +1,18 @@ + + + + BQN: Infinity (`∞`) + + +

Infinity (∞)

+

∞: Infinity

+

Mathematical constant Infinity. Shares the same status as other numbers, can be negative (¯∞).

+↗️
    ∞
+∞
+
+    ¯∞
+¯∞
+
+    1+∞
+∞
+
diff --git a/docs/help/leftargument.html b/docs/help/leftargument.html new file mode 100644 index 00000000..f1718e21 --- /dev/null +++ b/docs/help/leftargument.html @@ -0,0 +1,12 @@ + + + + BQN: Mathematical Double-struck W (`𝕨`) + + +

Mathematical Double-struck W (𝕨)

+

𝕨: Left Argument

+

A variable assigned to the left argument of a block. π•Ž can be used to access the left argument as a function.

+↗️
    5 {𝕨} 1
+5
+
diff --git a/docs/help/minus.html b/docs/help/minus.html new file mode 100644 index 00000000..965be169 --- /dev/null +++ b/docs/help/minus.html @@ -0,0 +1,16 @@ + + + + BQN: Macron (`Β―`) + + +

Macron (Β―)

+

Β―: Minus

+

Prefix before numbers to indicate that they are negative.

+

Note that this is not the same as -, since it is part of the number, rather than a primitive that negates its value.

+↗️
    -1β€Ώ2β€Ώ3
+⟨ ¯1 ¯2 ¯3 ⟩
+
+    Β―1β€Ώ2β€Ώ3
+⟨ ¯1 2 3 ⟩
+
diff --git a/docs/help/modifierleftoperand.html b/docs/help/modifierleftoperand.html new file mode 100644 index 00000000..71392719 --- /dev/null +++ b/docs/help/modifierleftoperand.html @@ -0,0 +1,12 @@ + + + + BQN: Mathematical Double-struck F (`𝔽`) + + +

Mathematical Double-struck F (𝔽)

+

𝔽: Modifier Left operand

+

A variable assigned to the left operand of a modifier block. 𝕗 can be used to access the left operand as a value.

+↗️
    5 +{π•—βŠ£π•¨} 1
++
+
diff --git a/docs/help/modifierrightoperand.html b/docs/help/modifierrightoperand.html new file mode 100644 index 00000000..b8e5462d --- /dev/null +++ b/docs/help/modifierrightoperand.html @@ -0,0 +1,12 @@ + + + + BQN: Mathematical Double-struck G (`𝔾`) + + +

Mathematical Double-struck G (𝔾)

+

𝔾: Right operand

+

A variable assigned to the right operand of a modifier block. π•˜ can be used to access the right operand as a value.

+↗️
    5 +{π•˜}3 1
+3
+
diff --git a/docs/help/nothing.html b/docs/help/nothing.html new file mode 100644 index 00000000..53a04340 --- /dev/null +++ b/docs/help/nothing.html @@ -0,0 +1,23 @@ + + + + BQN: Middle Dot (`Β·`) + + +

Middle Dot (Β·)

+

Β·: Nothing

+

In Trains

+

Nothing can serve as a left argument in a train to string together multiple monadic functions.

+↗️
    (-+-) 5
+Β―10
+
+    (-Β·+-) 5
+5
+
+

In Block Headers

+

For Block header pattern matching syntax, Nothing can be used to indicate an unused value.

+↗️
    F ← {π•Š aβ€ΏΒ·β€Ώb: a∾b}
+
+    F 1β€Ώ2β€Ώ3
+⟨ 1 3 ⟩
+
diff --git a/docs/help/nullcharacter.html b/docs/help/nullcharacter.html new file mode 100644 index 00000000..ffcc9f1b --- /dev/null +++ b/docs/help/nullcharacter.html @@ -0,0 +1,19 @@ + + + + BQN: Commercial At (`@`) + + +

Commercial At (@)

+

@: Null Character

+

Null character, codepoint 0 in ASCII. Has the status of any other character.

+

Can be added to any positive integer to get its character equivalent.

+↗️
    @+50
+'2'
+
+    @
+@
+
+    @+64
+'@'
+
diff --git a/docs/help/pi.html b/docs/help/pi.html new file mode 100644 index 00000000..f7db97a8 --- /dev/null +++ b/docs/help/pi.html @@ -0,0 +1,15 @@ + + + + BQN: Pi (`Ο€`) + + +

Pi (Ο€)

+

Ο€: Pi

+

Mathematical constant pi. Shares the same status as other numbers, can be negative (Β―Ο€).

+↗️
    Ο€
+3.141592653589793
+
+    Β―Ο€
+Β―3.141592653589793
+
diff --git a/docs/help/rightargument.html b/docs/help/rightargument.html new file mode 100644 index 00000000..70ded70a --- /dev/null +++ b/docs/help/rightargument.html @@ -0,0 +1,12 @@ + + + + BQN: Mathematical Double-struck X (`𝕩`) + + +

Mathematical Double-struck X (𝕩)

+

𝕩: Right Argument

+

A variable assigned to the right argument of a block. 𝕏 can be used to access the right argument as a function.

+↗️
    5 {𝕩} 1
+1
+
diff --git a/docs/help/separator.html b/docs/help/separator.html new file mode 100644 index 00000000..e719d8b4 --- /dev/null +++ b/docs/help/separator.html @@ -0,0 +1,21 @@ + + + + BQN: Diamond (`β‹„`) + + +

Diamond (β‹„)

+

β‹„: Separator

+

Separates statements in blocksβ‹„ programs and arrays.

+↗️
    a ← 3 β‹„ ⊒ b ← 2
+2
+
+    1 β‹„ 2 β‹„ 3
+3
+
+    ⟨1 β‹„ 2 β‹„ 3⟩
+⟨ 1 2 3 ⟩
+
+    {1 β‹„ 2 β‹„ 3}
+3
+
diff --git a/docs/help/separator1.html b/docs/help/separator1.html new file mode 100644 index 00000000..8461f453 --- /dev/null +++ b/docs/help/separator1.html @@ -0,0 +1,21 @@ + + + + BQN: Comma (`,`) + + +

Comma (,)

+

,: Separator

+

Separates statements in blocks, programs and arrays.

+↗️
    a ← 3 , ⊒ b ← 2
+2
+
+    1 , 2 , 3
+3
+
+    ⟨1, 2, 3⟩
+⟨ 1 2 3 ⟩
+
+    {1, 2, 3}
+3
+
diff --git a/docs/help/strand.html b/docs/help/strand.html new file mode 100644 index 00000000..56d407f1 --- /dev/null +++ b/docs/help/strand.html @@ -0,0 +1,16 @@ + + + + BQN: Undertie (`β€Ώ`) + + +

Undertie (β€Ώ)

+

β€Ώ: Strand

+

Create a list via strand notation.

+

Placing β€Ώ between valid BQN expressions will create a list out of the end results of those expressions.

+↗️
    1β€Ώ2β€Ώ3
+⟨ 1 2 3 ⟩
+
+    +β€Ώ-β€Ώ56
+⟨ + - 56 ⟩
+
diff --git a/docs/help/system.html b/docs/help/system.html new file mode 100644 index 00000000..ae887af1 --- /dev/null +++ b/docs/help/system.html @@ -0,0 +1,10 @@ + + + + BQN: Bullet (`β€’`) + + +

Bullet (β€’)

+

β€’: System

+

A prefix for system functions. β€’listSys gives a list of system values added in any BQN implementation.

+

β€’ is ignored when determining the role of the system value.

diff --git a/docs/repl.js b/docs/repl.js index cf7a9071..fc097829 100644 --- a/docs/repl.js +++ b/docs/repl.js @@ -129,7 +129,7 @@ let setPrefix = () => { let c = Array.from(d)[1]; let t = d.slice(1+c.length).replace(';','\n'); let k = revkeys[c]; if (k) t += '\n'+prefix+(k==='"'?'"':k); - x.hashelp = i < 64; + x.hashelp = i < 64; // comment out after patch for double struck x.title = primhelp[c] = t; }); } -- cgit v1.2.3
𝔾2-Modifier Right operand
| Absolute Value, Modulus
!Assert, DyadAssert, Assert With Message
∘Bind Left, Before, Dyadic Before
{Begin Block
(Begin Expression
⟨Begin list
⎊ Catch
Cells
←Change
β—Ά Choose
Classify, Index Of
#Comment
+ Conjugate, Add
Constant
π•ŠCurrent Function
𝕣Current Modifier
⍷ Deduplicate, Find
←Define
≑ Depth, Match
Enclose, Lesser Than
}End Block
)End Expression
⟩End list
β‹ˆ Enlist, Pair
Exponential, Power
⇐Export Definition, Export names
.Namespace Field
⊏ First Cell, Select
Indices, Replicate
∞Infinity
˝ Insert, Insert With initial
Join, Join
𝕨Left Argument
β‰  Length, Not Equal To
Merge, Greater Than
Β―Minus
𝔽Modifier Left operand
- Negate, Subtract
Β·Nothing
Β¬ Logical Not, Span
@Null Character
βŠ’ Occurrence Count, Progressive Index Of
Atop, Over
Ο€Pi
↑ Prefixes, Take
Reverse, Dyad
𝕩Right Argument
` Scan, Scan With initial
Self, Swap
,Separator
β‹„Separator
β‰’ Shape, Not Match
Square root, Root
β€ΏStrand
↓ Suffixes, Drop
β€’System
⌜ Each