Skip to content

Commit 2bebccf

Browse files
committed
change fix glyph
1 parent e8629ee commit 2bebccf

File tree

9 files changed

+30
-31
lines changed

9 files changed

+30
-31
lines changed

changelog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ If you are reading this on the website, then these changes are live here.
1313
- [`fold` ``](https://uiua.org/docs/fold) no longer takes a rank list
1414
- Add the [`rerank` ``](https://uiua.org/docs/rerank) function, which changes the rank of an array's rows
1515
- This fills the void left by [`level` ``](https://uiua.org/docs/level) and [`combinate` ``](https://uiua.org/docs/combinate)
16-
- Add the [`fix` ``](https://uiua.org/docs/fix) function, which adds a length 1 axis to an array
16+
- Add the [`fix` `¤`](https://uiua.org/docs/fix) function, which adds a length 1 axis to an array
1717
- [`rows` ``](https://uiua.org/docs/rows) now repeats the rows of an arrays that have exactly 1 row
18-
- This in combination with [`fix` ``](https://uiua.org/docs/fix) fills the void left by [`tribute` ``](https://uiua.org/docs/tribute) and [`distribute` ``](https://uiua.org/docs/distribute)
18+
- This in combination with [`fix` `¤`](https://uiua.org/docs/fix) fills the void left by [`tribute` ``](https://uiua.org/docs/tribute) and [`distribute` ``](https://uiua.org/docs/distribute)
1919
- [`cross` ``](https://uiua.org/docs/cross) can now take more than 2 arguments
2020
- Switch functions are now less strict about branch signature compatibility and can take arrays as conditions
2121
- A single switch function can now be used as a list of functions for dyadic modifiers

examples/life.ua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Life ← ↥⊙↧∩=3,2-,/+≡↻☇1-1⇡3_3.
1+
Life ← ↥⊙↧∩=3,2-,/+≡↻☇1-1⇡3_3¤.
22
↯:⁅[⍥⚂]/×.⁅×2_0.5&ts
33
⍥(&sl0.2&ims.Life)∞

examples/n-body.ua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Steps ← 120
44

55
Step ← (
66
⊞≠.⇡⧻. # Make comparison matrix
7-
⊃(≡▽⊙)⋅∘ # Make others
8-
⊃≡(≡-)∘: # Get diffs
7+
⊃(≡▽⊙¤)⋅∘ # Make others
8+
⊃≡(≡-¤)∘: # Get diffs
99
÷⍜(☇1|≡/+×.). # Inverse square
1010
≡/+×G # Get accs
1111
⊃⟜+⋅∘ ×Dt # Apply accs
@@ -16,7 +16,7 @@ Step ← (
1616
⊃∘(↯:0⊂:2⧻) # Init vels
1717

1818
⁅×0.5⇌[⊙;⍥(Step ,:)Steps] # Run
19-
⍜⊙(☇1)≡-/↧☇1. # Normalize
19+
⍜⊙(☇1)≡-¤/↧☇1. # Normalize
2020
⬚0≡(⍘⊚) # Plot
2121
≡(⍜(☇2)≡(/↥/↥) ◫3_3) # Upscale
2222

site/src/examples.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Xy ← ⍘⍉⊞⊟. ÷÷2: -÷2,⇡.200
2323
Rgb ← [:⍘⊟×.Xy ↯△⊢Xy0.5]
2424
u ← ↥<0.2:>0.7.+×2 ×.:⍘⊟Xy
2525
c ← <:⍜⍘√/+ Xy
26-
⍉⊂:-¬u c1 +0.1 ≡↧c0.95Rgb";
26+
⍉⊂:-¬u c1 +0.1 ≡↧¤c0.95Rgb";
2727
const CHORD: &str = "\
2828
[0 4 7 10] # Notes
2929
×220 ⁿ:2÷12 # Freqs
@@ -32,7 +32,7 @@ const CHORD: &str = "\
3232
const SPIRAL: &str = "\
3333
⇌×τ÷⊃∘⇡20 # Frame times
3434
⍉.↯:×20-1×2÷:⇡..300 # x and y
35-
≡(-⊃∠(-π◿τ+⍜∩⍘√+))∩ # Generate
35+
≡(-⊃∠(-π◿τ+⍜∩⍘√+))∩¤ # Generate
3636
<0.2⌵ # Threshold";
3737
const QUADRATIC: &str = "\
3838
Disc ← +×.⊙(×ׯ4):
@@ -56,7 +56,7 @@ const MANDELBROT: &str = "\
5656
×2 ⊞ℂ∶-1/4. ÷⊙-⊃⊃∘(÷2)⇡ 300 # Init
5757
>2 ⌵ ⊙;⍥⊃(+×.)⋅∘ 50 0 # Run";
5858
const LIFE: &str = "\
59-
Life ← ↥⊙↧∩=3,2-,/+≡↻☇1-1⇡3_3.
59+
Life ← ↥⊙↧∩=3,2-,/+≡↻☇1-1⇡3_3¤.
6060
⁅×0.6∵⋅⚂↯⊟.30 0 # Init
6161
⇌;⍥(⊃∘⊂Life)100⊃∘(↯1) # Run
6262
≡(▽↯⧻,:⍉▽↯⧻,,:5) # Upscale";

site/src/tutorial.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,13 +1011,13 @@ fn TutorialAdvancedArray() -> impl IntoView {
10111011
<p>"Notice that the second argument here is a 2D array with 1 row of 2 elements. It will be repeated just like the scalars above."</p>
10121012
<Editor example="≡⊟ [1_2 3_4 5_6] [¯1_0]"/>
10131013
<p>"If we want to combine each row of one array with copies of another, we can turn one of the arrays into a single row array with "<Prim prim=Fix/>". "<Prim prim=Fix/>" adds a 1 to the front of the shape of an array."</p>
1014-
<Editor example=".1_2_3"/>
1014+
<Editor example="¤.1_2_3"/>
10151015
<p>"Here, we "<Prim prim=Fix/>" "<code>"1_2_3"</code>" so that it is reused for each row of "<code>"4_5_6"</code>"."</p>
1016-
<Editor example="≡⊂ 1_2_3 4_5_6"/>
1016+
<Editor example="≡⊂ ¤ 1_2_3 4_5_6"/>
10171017
<p>"If we have a bunch of arrays and want to choose which ones are fixed and which are not, be can use planet notation."</p>
1018-
<Editor example="≡⊂ ⊙ 1_2_3 4_5_6"/>
1019-
<Editor example="≡(⊂⊂⊂) ⊓⊓⊓∘⌀⌀∘ 1_2_3 4_5_6 7_8_9 10_11_12"/>
1020-
<Editor example="≡(⊂⊂⊂) ⊙∩ 1_2_3 4_5_6 7_8_9 10_11_12"/>
1018+
<Editor example="≡⊂ ⊙¤ 1_2_3 4_5_6"/>
1019+
<Editor example="≡(⊂⊂⊂) ⊓⊓⊓∘¤¤∘ 1_2_3 4_5_6 7_8_9 10_11_12"/>
1020+
<Editor example="≡(⊂⊂⊂) ⊙∩¤ 1_2_3 4_5_6 7_8_9 10_11_12"/>
10211021

10221022
<h2 id="rerank"><Prim prim=Rerank/></h2>
10231023
<p>"The above examples dig into an array from the top down. But what if you want to think about the array from the "<em>"bottom up"</em>"?"</p>
@@ -1058,7 +1058,7 @@ fn TutorialAdvancedArray() -> impl IntoView {
10581058
number=1
10591059
prompt="adds the first argument list to each row of the second argument matrix"
10601060
example="1_2_3 [4_5_6 7_8_9]"
1061-
answer="≡+"
1061+
answer="≡+¤"
10621062
tests={&["10_20 10_20 ↯4_2⇡8", "\"Wow\" ¯[10_0_10 19_14_19]"]}
10631063
hidden="1_2 [3_4]"/>
10641064

site/src/uiuisms.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ uiuisms!(
175175
/// Remove the nth element from an array
176176
"⍜↻(↘1) 4 [1 4 2 0 5 4 3]",
177177
/// Remove all instances of a row from an array
178-
"▽¬≡≍⊙. 2_0 [1_4 2_0 5_3 2_0]",
178+
"▽¬≡≍¤⊙. 2_0 [1_4 2_0 5_3 2_0]",
179179
/// Filter by a fixed predicate
180180
"▽ =0◿2 . ⇡10",
181181
/// Find the most common row in an array

src/primitive/defs.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -538,15 +538,15 @@ primitive!(
538538
/// See also: [reshape]
539539
(1, Deshape, MonadicArray, ("deshape", '♭')),
540540
/// Add a length-1 axis to an array
541-
/// ex: 5
542-
/// ex: ⌀⌀5
543-
/// ex: [1 2 3]
544-
/// ex: ⌀⌀[1 2 3]
541+
/// ex: ¤5
542+
/// ex: ¤¤5
543+
/// ex: ¤[1 2 3]
544+
/// ex: ¤¤[1 2 3]
545545
/// This is useful when combine with [rows] or [cross] to re-use an entire array for each row of others.
546-
/// ex: ≡⊂ 1_2_3 4_5_6
546+
/// ex: ≡⊂ ¤ 1_2_3 4_5_6
547547
/// [fix]'s name come from the way it "fixes" an array in this way.
548548
/// See the [Advanced Array Manipulation Tutorial](/docs/advancedarray) for more information on this use case.
549-
(1, Fix, MonadicArray, ("fix", '')),
549+
(1, Fix, MonadicArray, ("fix", '¤')),
550550
/// Encode an array as bits (big-endian)
551551
///
552552
/// The result will always be 1 rank higher than the input.
@@ -1046,8 +1046,8 @@ primitive!(
10461046
/// ex: ≡⊂ 1 2_3_4
10471047
/// ex: ≡(⊂⊂) 1 2_3_4 5
10481048
/// You can use [fix] to take advantage of this functionailty and re-use an entire array for each row of another.
1049-
/// ex: ≡⊂ 1_2_3 4_5_6
1050-
/// ex: ≡⊂ ⊙ 1_2_3 4_5_6
1049+
/// ex: ≡⊂ ¤ 1_2_3 4_5_6
1050+
/// ex: ≡⊂ ⊙¤ 1_2_3 4_5_6
10511051
([1], Rows, IteratingModifier, ("rows", '≡')),
10521052
/// Apply a function to a fixed value and each row of an array
10531053
///

tests/loops.ua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
⍤⊃⋅∘≍ [1_2 1_3 1_4] ≡⊂ 1 2_3_4
3030
⍤⊃⋅∘≍ [1_4 2_4 3_4] ≡⊂ 1_2_3 4
3131
⍤⊃⋅∘≍ [1_4_7 2_5_8 3_6_9] ≡(⊂⊂) 1_2_3 4_5_6 7_8_9
32-
⍤⊃⋅∘≍ [1_2_3_4_7 1_2_3_5_8 1_2_3_6_9] ≡(⊂⊂) 1_2_3 4_5_6 7_8_9
33-
⍤⊃⋅∘≍ [1_4_5_6_7 2_4_5_6_8 3_4_5_6_9] ≡(⊂⊂) ⊙ 1_2_3 4_5_6 7_8_9
34-
⍤⊃⋅∘≍ [1_4_7_8_9 2_5_7_8_9 3_6_7_8_9] ≡(⊂⊂) ⊙⊙ 1_2_3 4_5_6 7_8_9
32+
⍤⊃⋅∘≍ [1_2_3_4_7 1_2_3_5_8 1_2_3_6_9] ≡(⊂⊂) ¤ 1_2_3 4_5_6 7_8_9
33+
⍤⊃⋅∘≍ [1_4_5_6_7 2_4_5_6_8 3_4_5_6_9] ≡(⊂⊂) ⊙¤ 1_2_3 4_5_6 7_8_9
34+
⍤⊃⋅∘≍ [1_4_7_8_9 2_5_7_8_9 3_6_7_8_9] ≡(⊂⊂) ⊙⊙¤ 1_2_3 4_5_6 7_8_9
3535

3636
⍤⊃⋅∘≍ ⇡6 ⊜⊂ [] [1 1 2 2 3 3] ⇡6
3737
⍤⊃⋅∘≍ ⇡6 /⊂⊜∘[1 1 2 2 3 3] ⇡6

todo.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# Uiua Todo
22
Within each section, items are ordered (roughly) by decreasing priority.
33

4-
## Next Version
5-
- Join any scalar
6-
- Update fix glyph
7-
84
## Features
5+
- Update fix glyph
6+
- Join any scalar
7+
- Negative windows
98
- Multimedia
109
- Sound input
1110
- Webcam input

0 commit comments

Comments
 (0)