Skip to content

Commit 6746cc8

Browse files
authored
update docs to use , instead of __ for subscripts (#807)
1 parent ef09758 commit 6746cc8

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

site/src/other.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ pub fn Subscripts() -> impl IntoView {
660660
<Title text=format!("Subscripts - {} Docs", lang())/>
661661
<h1>"Subscripts"</h1>
662662
<p>"By suffixing some functions or modifiers with a subscript number, their behavior can be modified."</p>
663-
<p>"Subscript numbers are typed with a "<code>"__"</code>" followed by some digits. The formatter will turn them into subscript digit characters."</p>
663+
<p>"Subscript numbers are typed with a "<code>","</code>" followed by some digits. The formatter will turn them into subscript digit characters."</p>
664664
<p>"The following functions and modifiers are supported. Not all are stable."</p>
665665
<table class="header-centered-table cell-centered-table" style="width: 100%">
666666
<tr>
@@ -683,7 +683,7 @@ pub fn Subscripts() -> impl IntoView {
683683

684684
<Hd id="sided">"Sided Subscripts"</Hd>
685685
<p>"Sided subscripts augment a modifier or function in a way that can be thought of as having a \"side\"."</p>
686-
<p>"Sided subscripts are typed like normal subscripts with "<code>"__"</code>", but followed by "<code>"<"</code>" for left or "<code>">"</code>" for right. The formatter will turn them into "<code>"⌞"</code>" and "<code>"⌟"</code>" respectively."</p>
686+
<p>"Sided subscripts are typed like normal subscripts with "<code>","</code>", but followed by "<code>"<"</code>" for left or "<code>">"</code>" for right. The formatter will turn them into "<code>"⌞"</code>" and "<code>"⌟"</code>" respectively."</p>
687687
<table class="header-centered-table cell-centered-table" style="width: 100%">
688688
<tr>
689689
<th>"Primitive"</th>

site/src/other_tutorial.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ fn EvenMoreStack() -> impl IntoView {
352352

353353
<Hd id="sided-subscripts">"Sided Subscripts"</Hd>
354354
<p>"Normal "<A href="/docs/subscripts">"numeric subscripts"</A>" change the behavior of a function or modifier based on a number. There is another kind of subscripts that captures the idea of an operation having a certain \"orientation\" to the left or right."</p>
355-
<p>"These "<em>"sided"</em>" subscripts use "<code>"⌞"</code>" to denote \"leftness\" or "<code>"⌟"</code>" to denote \"rightness\". They are formatted from the normal subscript "<code>"__"</code>" followed by a "<code>"<"</code>" or "<code>">"</code>"."</p>
355+
<p>"These "<em>"sided"</em>" subscripts use "<code>"⌞"</code>" to denote \"leftness\" or "<code>"⌟"</code>" to denote \"rightness\". They are formatted from the normal subscript "<code>","</code>" followed by a "<code>"<"</code>" or "<code>">"</code>"."</p>
356356
<p>"Currently, the only modifiers that support sided subscripts are "<Prim prim=Both/>" and "<Prim prim=Bracket/>". Instead of passing two separate sets of arguments to the modifier's function(s), one of the arguments will be passed to both function calls. Let's see some examples to get a better idea of how this works."</p>
357357
<p>"Normal "<Prim prim=Both/>" calls its function on two sets of arguments."</p>
358358
<Editor example="{∩⊟ 1 2 3 4}"/>

site/src/tutorial.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -654,8 +654,8 @@ fn TutorialBindings() -> impl IntoView {
654654
<p><em>"Warning"</em>": It is not guaranteed that any particular non-alphanumeric character will not be used for a built-in function in the future. Use them at your own risk. Emojis are safe though."</p>
655655
<p>"Unlike most programming languages, binding names in "{lang}" "<em>"cannot"</em>" contain numbers or underscores."</p>
656656
<Editor example="Variable_1 ← 5"/> // Should fail
657-
<p>"Bindings "<em>"can"</em>" contain subscript numbers. These will format from "<code>"__"</code>" followed by some digits. Try formatting the example below!"</p>
658-
<Editor example="X__1 = 5\nSha__256 = \"TODO\""/>
657+
<p>"Bindings "<em>"can"</em>" contain subscript numbers. These will format from "<code>","</code>" followed by some digits. Try formatting the example below!"</p>
658+
<Editor example="X,1 = 5\nSha,256 = \"TODO\""/>
659659
<p>"Subscripts are only allowed at the end of a binding name."</p>
660660
<p><strong>"Bindings are case-sensitive."</strong></p>
661661
<p>"The parser can sometimes mistake all-lowercase binding names for unformatted built-in functions."</p>
@@ -846,10 +846,10 @@ fn TutorialMoreStack() -> impl IntoView {
846846

847847
<Hd id="Subscripts">"Subscripts"</Hd>
848848
<p>"Subscripts are a special syntax that allows you to augment some functions and modifiers with a number."</p>
849-
<p>"Subscripts are typed with "<code>"__"</code>" followed by some digits. The formatter will turn them into subscript digit characters. A leading negative sign is allowed."</p>
849+
<p>"Subscripts are typed with "<code>","</code>" followed by some digits. The formatter will turn them into subscript digit characters. A leading negative sign is allowed."</p>
850850
<p>"Several functions and modifiers are supported, but we'll only cover some stack-related ones here. You can find a full list of subscript-compatible functions "<A href="/docs/subscripts">"here"</A>"."</p>
851851
<p>"Subscripted "<Prim prim=Both/>" calls its function on N sets of arguments."</p>
852-
<Editor example="[∩+ 1 2 3 4]\n[∩__3+ 1 2 3 4 5 6]\n[∩__4+ 1 2 3 4 5 6 7 8] # Try formatting!"/>
852+
<Editor example="[∩+ 1 2 3 4]\n[∩,3+ 1 2 3 4 5 6]\n[∩,4+ 1 2 3 4 5 6 7 8] # Try formatting!"/>
853853
<p>"Subscripted "<Prim prim=Couple/>" collects N values from the stack into an array."</p>
854854
<Editor example="⊟₄ 1 2 3 4 5"/>
855855
<p><Prim prim=Box/>" has similar behavior, but it boxes each value."</p>

site/text/more_array.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Needing [fix]() or `dipfix` with [rows]() is extremely common. However, it can b
9393

9494
For this reason, [rows]() supports *sided* subscripts. This syntax allows you to specify a "side" for a modifier or function.
9595

96-
Sided subscripts are typed with `__` followed by a `<` for left or a `>` for right. The formatter will turn them into subscript bottom corner characters.
96+
Sided subscripts are typed with `,` followed by a `<` for left or a `>` for right. The formatter will turn them into subscript bottom corner characters.
9797

9898
Left [rows]() [fix]()es the first argument and right [rows]() [fix]()es the last argument.
9999

@@ -108,7 +108,7 @@ A number can be specified after the side to [fix]() multiple arguments.
108108

109109
```uiua
110110
# Try formatting!
111-
__<2(⊂⊂) "ui" "ua" "ns"
111+
,<2(⊂⊂) "ui" "ua" "ns"
112112
```
113113

114114
While [fix]() is still necessary for certain complex cases, sided subscripts should work about 95% of the time.

0 commit comments

Comments
 (0)