Uiua: Difference between revisions

Jump to navigation Jump to search
Fix some links; remove links that don't make sense for APL Wiki pages (particularly stack ops)
(Fix some links; remove links that don't make sense for APL Wiki pages (particularly stack ops))
Line 40: Line 40:
! Glyph !! Name !! Type !! Definition
! Glyph !! Name !! Type !! Definition
|-
|-
| <code>.</code> || [[Duplicate]] || Monadic 2-output function || Duplicate the top value on the stack
| <code>.</code> || Duplicate || Monadic 2-output function || Duplicate the top value on the stack
|-
|-
| <code>,</code> || [[Over]]|| Dyadic 3-output function || Duplicate the second-to-top value to the top of the stack  
| <code>,</code> || Over || Dyadic 3-output function || Duplicate the second-to-top value to the top of the stack  
|-
|-
| <code>:</code> || [[Flip]] || Dyadic 2-output function || Swap the top two values on the stack  
| <code>:</code> || Flip || Dyadic 2-output function || Swap the top two values on the stack  
|-
|-
| <code>◌(;)</code> || [[Pop]] ||Monadic 0-output function || Discard the top stack value
| <code>◌(;)</code> || Pop ||Monadic 0-output function || Discard the top stack value
|-
|-
| <code>?</code> || [[Stack]] || Noadic 0-output function || Debug print all stack values without popping them
| <code>?</code> || Stack || Noadic 0-output function || Debug print all stack values without popping them
|-
|-
| <code>⸮</code> || [[Trace]] || Monadic function || Debug print the top value on the stack without popping it
| <code>⸮</code> || Trace || Monadic function || Debug print the top value on the stack without popping it
|-
|-
|}
|}
Line 59: Line 59:
!Glyph !! Name !! Definition
!Glyph !! Name !! Definition
|-
|-
| <code>η</code> || [[Eta]] || The number of radians in a quarter circle
| <code>η</code> || Eta || The number of radians in a quarter circle
|-
|-
| <code>π</code> || [[Pi]] || The ratio of a circle's circumference to its diameter
| <code>π</code> || [[Pi]] || The ratio of a circle's circumference to its diameter
|-
|-
| <code>τ</code> || [[Tau]] || The ratio of a circle's circumference to its radius
| <code>τ</code> || Tau || The ratio of a circle's circumference to its radius
|-
|-
| <code>∞</code> || [[Infinity]] || The biggest number
| <code>∞</code> || [[Infinity]] || The biggest number
Line 81: Line 81:
| <code>⌵</code> || [[Absolute value]] || Get the absolute value of a number
| <code>⌵</code> || [[Absolute value]] || Get the absolute value of a number
|-
|-
| <code>√</code> || [[Sqrt]] || Take the square root of a number
| <code>√</code> || [[Square Root|Sqrt]] || Take the square root of a number
|-
|-
| <code>○</code> || [[Sine]] || Get the sine of a number
| <code>○</code> || Sine || Get the sine of a number
|-
|-
| <code>⌊</code> || [[Floor]] || Round to the nearest integer towards <code>¯∞</code>
| <code>⌊</code> || [[Floor]] || Round to the nearest integer towards <code>¯∞</code>
Line 127: Line 127:
| <code>↥</code> || [[Maximum]]/[[Logical Or]] || Take the maximum of two arrays (Can use for logical OR.) || max
| <code>↥</code> || [[Maximum]]/[[Logical Or]] || Take the maximum of two arrays (Can use for logical OR.) || max
|-
|-
| <code>∠</code> || [[Atangent]] || Take the arctangent of two numbers || atan
| <code>∠</code> || Atangent || Take the arctangent of two numbers || atan
|-
|-
| <code>ℂ</code> || [[Complex]] || Make a complex number.The first argument is the imaginary part, and the second argument is the real part || com
| <code>ℂ</code> || [[Complex (function)|Complex]] || Make a complex number.The first argument is the imaginary part, and the second argument is the real part || com
|}
|}
====  Monadic Array ====
====  Monadic Array ====
Line 141: Line 141:
| <code>△</code> || [[Shape]] || Get the dimensions of an array
| <code>△</code> || [[Shape]] || Get the dimensions of an array
|-
|-
| <code>⇡</code> || [[Range]] || Make an array of all natural numbers less than a number  
| <code>⇡</code> || [[Index Generator|Range]] || Make an array of all natural numbers less than a number  
|-
|-
| <code>⊢</code> || [[First]] || Get the first row of an array
| <code>⊢</code> || First || Get the first row of an array
|-
|-
| <code>⇌</code> || [[Reverse]] || Reverse the rows of an array
| <code>⇌</code> || [[Reverse]] || Reverse the rows of an array
Line 151: Line 151:
| <code>¤</code> || [[Fix]] || Add a length-1 axis to an array
| <code>¤</code> || [[Fix]] || Add a length-1 axis to an array
|-
|-
| <code>⋯</code> || [[Bits]] || Encode an array as bits (LSB-first)
| <code>⋯</code> || [[Encode|Bits]] || Encode an array as bits (LSB-first)
|-
|-
| <code>⍉</code> || [[Transpose]] || Rotate the shape of an array
| <code>⍉</code> || [[Transpose]] || Rotate the shape of an array
|-
|-
| <code>⍏</code> || [[Rise]] || Get the indices into an array if it were sorted ascending
| <code>⍏</code> || [[Grade|Rise]] || Get the indices into an array if it were sorted ascending
|-
|-
| <code>⍖</code> || [[Fall]] || Get the indices into an array if it were sorted descending
| <code>⍖</code> || [[Grade|Fall]] || Get the indices into an array if it were sorted descending
|-
|-
| <code>⊚</code> || [[Where]] || Get indices where array values are not equal to zero
| <code>⊚</code> || [[Where]] || Get indices where array values are not equal to zero
Line 165: Line 165:
| <code>◴</code> || [[Deduplicate]] || Remove duplicate elements from an array
| <code>◴</code> || [[Deduplicate]] || Remove duplicate elements from an array
|-
|-
| <code>◰</code> || [[Unique]] || Get a mask of first occurrences of items in an array
| <code>◰</code> || [[Nub Sieve|Unique]] || Get a mask of first occurrences of items in an array
|-
|-
| <code>□</code> || [[Box]] || Turn an array into a box. The box function is complicated, so you can look at [https://www.uiua.org/docs/box] for more information
| <code>□</code> || [[Box]] || Turn an array into a box. The box function is complicated, so you can look at [https://www.uiua.org/docs/box] for more information
Line 180: Line 180:
| <code>⊟</code> || [[Couple]] || Combine two arrays as rows of a new array
| <code>⊟</code> || [[Couple]] || Combine two arrays as rows of a new array
|-
|-
| <code>⊂</code> || [[Join]] || Append two arrays end-to-end
| <code>⊂</code> || [[Catenate|Join]] || Append two arrays end-to-end
|-
|-
| <code>⊏</code> || [[Select]] || Select multiple rows from an array
| <code>⊏</code> || [[Select]] || Select multiple rows from an array
Line 188: Line 188:
| <code>↯</code> || [[Reshape]] || Change the shape of an array
| <code>↯</code> || [[Reshape]] || Change the shape of an array
|-
|-
| <code>☇</code> || [[Rerank]] || Change the rank of an array's rows
| <code>☇</code> || Rerank || Change the rank of an array's rows
|-  
|-  
| <code>↙</code> || [[Take]] || Take the first n elements of an array
| <code>↙</code> || [[Take]] || Take the first n elements of an array
Line 198: Line 198:
| <code>◫</code> || [[Windows]] || The n-wise windows of an array
| <code>◫</code> || [[Windows]] || The n-wise windows of an array
|-
|-
| <code>▽</code> || [[Keep]] || Discard or copy some rows of an array
| <code>▽</code> || [[Replicate|Keep]] || Discard or copy some rows of an array
|-
|-
| <code>⌕</code> || [[Find]] || Find the occurrence's of one array in another
| <code>⌕</code> || [[Find]] || Find the occurrence's of one array in another
Line 204: Line 204:
| <code>∊</code> || [[Member]] || Check if each row of one array exists in another
| <code>∊</code> || [[Member]] || Check if each row of one array exists in another
|-
|-
| <code>⊗</code> || [[Indexof]] || Find the first index of each row of one array in another
| <code>⊗</code> || [[Index Of|Indexof]] || Find the first index of each row of one array in another
|}
|}


Navigation menu