Uiua is not yet stable.
You can find the release announcement here.
- Breaking Change -
minimum ↧
andmaximum ↥
now compare boxes lexicographically- This makes them consistent with comparison functions like
less than <
- This makes them consistent with comparison functions like
- Breaking Change -
gen
now takes a shape argument and no longer outputs a new seed - Breaking Change -
&clip
now unifies&clget
and&clset
- Breaking Change -
type
numbers are now:0
for normal numbers1
for characters2
for boxes3
for complex numbers- This orders the types more or less as you're likely to need to handle them
- In the future, if another number type is added, it can go at the end next to complex numbers
- The experimental
chunks ⑄
function's behavior has been moved to an extension onwindows ◫
- This also allows the specification of "stride"
- This is inspired by APL's
stencil ⌺
behavior chunks ⑄
has been deprecated
- Stabilize
orient ⤸
- Change its glyph to something with broader font support
⮌
will continue to work and will be formatted as⤸
- Add
anti ⌝
modifier, which simplifies choosing certain inverses - Add
obverse ⌅
modifier, which unifies the specification of inverses un °
by ⊸
can now be used to access the "undo" part of a function'sunder ⍜
functionality- Stabilize
below ◡
- Rename
⤙ but
and⤚ with
towith ⤙
andoff ⤚
with ⤙
has been stabilized
- "Stack macros" are now called "index macros"
- Stabilize existing placeholder indexing syntax (
^0
,^1
, etc.) - Deprecate existing stack-based macro placeholders (
^!
,^.
, etc.)
- Stabilize existing placeholder indexing syntax (
assert ⍤
at the beginning of a line is now interpreted as a test in some contexts- See the updated Testing Tutorial for more information
parse ⋕
now parses complex values from botharbi
anda+bi
formatsun °
orient ⤸
is now equivalent torange ⇡
length ⧻
shape △
duplicate .
- Add a feature to some
under ⍜
functions that makes them more permissive of changes in rank under ⍜
un °
bits ⋯
now preserves a minimum bit lengthunder ⍜
reverse ⇌
,transpose ⍉
, androtate ↻
are now smarter with respect to the signature ofunder ⍜
's second function- For example
⍜⇌°⊂
behaves in a more useful way
- For example
under ⍜
length ⧻
now reshapes an array to have the transformed lengthNaN
and∞
indices forpick ⊡
andselect ⊏
now get thefill ⬚
valuescan \\
now accepts functions that take more than 2 arguments- The behavior is similar to the analogous behavior for
reduce /
- The behavior is similar to the analogous behavior for
- Allow
on ⟜
to use function packs - Allow
under ⍜
of scalarkeep ▽
- Add the
graphemes
function, which splits a string into unicode grapheme clusters - Add the
&fmd
system function, which creates a directory - Very large arrays are now displayed more concisely in output
- Change and enhance the behavior of
;
and;;
- You can read about the new behavior here
- Add unicode escape sequences for entering arbitrary characters
- A double backslash followed by a unicode hex number will format to the corresponding glyph
- Add the
timezone
function, which gets the local timezone offset in hours - Scoped modules are now delimited by
┌─╴
and└─╴
- These both format from the existing
---
delimiters
- These both format from the existing
- Add a
Lorem
constant, which contains the Lorem Ipsum text - Add several color constants
- Add pride flag constants
- Add
Cats
image constant - Allow
&raw
to be inverted, acting as a getter for the raw state of the terminal - Experimentally allow
fold ∧
to work with any signature- Excess values are collected into arrays
- Add the experimental
around ’
function, which duplicates the top value on the stack to the third-to-top position - Add experimental
tuples ⧅
modifier- This unifies and extends the behavior of the
choose
andpermute
functions, which are now deprecated - This also replaces and deprecates the
triangle
modifier
- This unifies and extends the behavior of the
- Add experimental
base
function- This converts to and from base-N digits
- Add an experimental
sort ⍆
function - Add an experimental
last ⊣
function- Getting the last row of an array is very common
- Add experimental subscript modifiers
- They modify the behavior of some functions and modifiers
- You can read more about them here
- Add experimental data definitions
- These allow for structured data similar to
struct
s andenum
s in other languages - They also allow a limited form of namable function arguments
- The experimental
struct
modifier/macro has been deprecated in favor of data definitions
- These allow for structured data similar to
- Add the experimental
layout
function, which renders text into an image array astar
no longer errors if no paths are found- Remove previously deprecated function strands
- Add the
uiua find
command, which finds Uiua code that matches the given unformatted text - Add the
uiua doc
command, which shows the documentation for a function or modifier - Add checking for end-of-line signature comments
- These are documented in the Documenting Code tutorial
- Add
webp
support toimg
- Some optimizations
- Pervasive function machinery has been totally rewritten
- Observed performance improvements of up to 12x
fill ⬚
ed array creation has been totally rewritten- Observed performance improvements:
- ~1.2x in the best case
- ~5x in the average case
- ~450x in the worst case
- Observed performance improvements:
rows ≡
on ⟜
/by ⊸
random ⚂
/constant
memberof ∈
range ⇡
for scalar inputs torange ⇡
memberof ∈
rerank ☇
1
range ⇡
for rank 1 inputs torange ⇡
first ⊢
un °
sort ⍆
to just pick an element
- Pervasive function machinery has been totally rewritten
- Tweak the formatter to reduce excess vertical space
- The formatter now aligns consecutive single-line bindings
uiua repl
now has a-s/--stack
flag to disable clearing the stack after each line- Clearing the stack is now the default
- The
-c/--clear
has been removed
- After programs finish executing, the terminal raw mode will be automatically disabled if it was left on.
- Add Ranges tutorial
- Update the Inverses tutorial with information about
anti ⌝
andobverse ⌅
- Add an RSS Feed for the blog
- Update the Testing Tutorial
- In the pad, files created with
&fwa
will now persist between runs - Add the option to decouple running and formatting in the pad
- Add a dropdown to the pad to insert named functions
- Add buttons to the pad to download code and copy a markdown link
- Git import URLs in the pad can now be Ctrl+clicked to open in a new tab
- Improve the Constants page
- Rename
imen
,gifen
, andauden
toimg
,gif
, andaudio
to match the naming convention of other functions- The existing names will continue to work and will be formatted to the new names
- Fix a bug in formatting
¯0
- Fix a bug with uasm serialization of non-standard numbers
- Use custom version of
nokhwa
crate so that&camcap
can build
You can find the release announcement here.
- Breaking Change -
&runs
now returns 3 handles rather than 1- This gives more precise control over stdin, stdout, and stderr
- Breaking Change -
un °
select ⊏
is now equivalent torange ⇡
length ⧻
duplicate .
- Breaking Change -
auden
now takes a sample rate argument, andun °
auden
now returns the sample rate- This allows you to work with audio that is not at Uiua's default sample rate
- Breaking Change -
fill ⬚
no longer fills the shapes of inputs torows ≡
- It could lead to some unexpected behavior when trying to fill the shapes of outputs
- Breaking Change - disable pattern matching inverses resulting from
under ⍜
- This is basically never what you want
- Pattern matching via
un °
still works as normal
- Deprecate
member ∊
and addmemberof ∈
member ∊
almost always required flipping the argumentsmemberof ∈
is the same, but with the arguments flipped- In the future,
member ∊
will be removed, andmemberof ∈
's glyph will be changed and format to∊
- Rename media en/decoding system functions
&ime
,&gife
, and&ae
to non-system functionsimen
,gifen
, andauden
- Their implementation is not actually system-dependent
- Existing
&*e
will format to the new names - The previously deprecated
&*d
decoding functions have been removed (useun °
on the encoding function)
- Switch functions have been replaced with a
switch ⨬
modifier- This makes the language more uniform
- Code with existing switch functions in
⟨⟩
s will continue to work and will format to use⨬
and()
s
- Identifiers can now contain subscript numbers
- They format from
__
followed by some numbers - For example,
X__1
will format toX₁
- They format from
- The
utf
function has been renamed toutf₈
- Stabilize labels
- You can read about them in the new Code Tactility Tutorial
windows ◫
can now use afill ⬚
value to pad the array- This is useful for convolutions
- Add new Scoped Modules
- These allow you to create a module without creating a file
- A
Call
orNew
function inside a module can now be called via the module's name - A module name used as a macro with
!
now imports all names from the module into the macro's function's scope- This can shorten code when accessing many items from the same module
- Add the
datetime
function, which splits a time into its date and time components un °
shape △
now generates an array with the given shape and incrementing elementsun °
pick ⊡
is now equivalent torange ⇡
shape △
duplicate .
keep ▽
will now cycle counts if the counts array is shorter than the counted arraykeep ▽
now works with non-integer scalar counts to scale an arrayunder ⍜
keep ▽
now allows increasing the kept array's rankunder ⍜
now works with commonby ⊸
patternsjoin ⊂
with rank differences greater than 1 can now extend the smaller arraycouple ⊟
with different ranks can now extend the smaller arrayindexof ⊗
now works withfill ⬚
to set the default for when a value is not foundun °
join ⊂
is now easier to combine with other inversesrepeat ⍥
can now repeat a negative number of times, which will repeat the inverseun °
repeat ⍥
now requires the repetition count to be inside theun °
function- This makes the inverted signature correct
inventory ⍚
no longer doeseach ∵
-like behavior- This got in the way more than it helped
- Non-scalar
switch ⨬
andrepeat ⍥
now follow the same distribution andfix ¤
rules asrows ≡
- Add the
# Track caller!
semantic comment, which prevents stack traces from going below the function that contains it - Add the experimental
chunks ⑄
function, which splits an array into chunks of a given size - Add the experimental
choose
andpermute
functions for combinatorics solutions - Add the experimental
triangle ◹
modifier, which calls a function on shrinking suffixes of an array's rows - Add the experimental
orient
function, which arranges an array's axes in a specified order - Add the experimental
fft
function, which performs the Fast Fourier transform- The inverse FFT is also supported via
un °
- The inverse FFT is also supported via
- Add the experimental
astar
modifier, which performs the A* pathfinding algorithm - Add the experimental
but ⤙
andwith ⤚
modifiers, which are compliments toon ⟜
andby ⊸
- Add the experimental
above ◠
andbelow ◡
modifiers, which keep all arguments to a function above or below the outputs on the stack - Add the experimental
struct
macro, which generates constructor and getter functions given some names - Un-deprecate
dip ⊙
function packs - Deprecate the experimental
coordinate ⟔
function, as it is seldom needed and easy to implement with other functions- It can be mostly replaced with
⊢⊚⌕
- It can be mostly replaced with
- Deprecate experimental stack and array swizzles
- They don't fit my vision for the language
- Deprecate implicit GitHub domain in
"git: ..."
modules- GitHub should not be a default
- Adjacent
trace ⸮
s now function as a singletrace ⸮
of more values - N+1 adjacent
stack ?
s now format to Ntrace ⸮
s - Add the
&camcap
system function, which captures a frame from a camera
- A ton of bug and crash fixes
- Some optimizations
- Git modules are now cloned instead of being added as submodules
- Add the
uiua module
command to list or update cloned modules
- Add the
- Add some media constants:
Logo
- the Uiua logoLena
- a good example image for image processingMusic
- a snippet of musical audio
- LSP improvements
- Show array shapes on hover
- Code action to insert
# Experimental!
comment
- REPL improvements
- The stack is now preserved between REPL lines
- Pass the
-c
/--clear
flag to clear it automatically after each line
- Pass the
- Add some commands, which can be listed by typing
help
in the repl
- The stack is now preserved between REPL lines
- Allow Uiua-specific tokens types to be disabled in the LSP
- Add new Tacit Code Tutorial
- Add new Code Tactility Tutorial
- Fix a bug where running pad code that has end-of-line comments via ctrl+Enter would cause the cursor to move every time
- Remove the Uiuisms page
- It provided a "definitive" implementation of many algorithms where the best implementation is subjective and/or context-dependent
- It is not how I want people to approach learning Uiua
- It is not something I am interested in maintaining
- Some bug and crash fixes
You can find the release announcement here.
- Breaking Change -
un °
fix ¤
now does pattern matching - Breaking Change -
un °
on ⟜
now does pattern matching in some cases- This makes its behavior conform to the rule that a function's inverse must have the opposite signature
- Some other cases, such as
°⟜+
, now properly invert the function
- Breaking Change -
keep ▽
with a scalar counts array now copies each row that many times- This matches the behaviors of APL and BQN, and is generally more useful
- The old behavior can be achieved with
/⊂↯
- Breaking Change -
fill ⬚
values are no longer accessible through function calls - Stabilize
by ⊸
! - Stabilize
repr
- Add experimental stack swizzles, which allow for more flexible stack reordering
- Swizzles are written with a
λ
followed by a list of letters - Capital letters
fix ¤
the corresponding value - The
λ
formats from'
when it is in front of the letters
- Swizzles are written with a
- Add experimental array swizzles, which allow extracting rows from an array in a concise way
keep ▽
now works withun °
- It splits an array into counts and an adjacent deduplication
- Add the
json
function, which encodes and decodes JSON strings - Add the
xlsx
function, which encodes and decodes XLSX data bits ⋯
can now take negative numbersun °
bits ⋯
can now take non-booleans- Add
un °
duplicate .
pattern matching - Add
un °
min ↧
andun °
max ↥
pattern matching insert
can now be used withun °
to extract a map entry and pattern match itfill ⬚
edkeep ▽
's fill value may now be a listinfinity ∞
can now be passed in a list totake ↙
ordrop ↘
to take/drop every row along an axisreduce /
can now take a function with more than 2 arguments- Each additional argument increases the number of arguments passed to
reduce /
by 1 - Additional arguments are passed to the function on every iteration
- Each additional argument increases the number of arguments passed to
try ⍣
signature checking is now more permissive- Switch function signature checking is now more permissive with branches that have an
assert ⍤
that always triggers first ⊢
,first ⊢
reverse ⇌
,rise ⍏
, andfall ⍖
can now be used on scalars- Add the
&exit
system function, which exits the program with a status code - Add the experimental
&memcpy
system function, which copies the data from&ffi
pointers to an array - Add the experimental
&memfree
system function, which frees memory allocated by&ffi
functions - Add
&tlsc
and&tlsl
system functions, which allow making TLS connections &rs
will now attempt to read additional bytes to resolve a UTF-8 character&gife
and&gifs
now support binary transparency- Signatures can now be specified in stack array notation immediately after a
[
or{
- Change how long decimal numbers are formatted
- Sequences of repeated digits are now replaced with
…
- Sequences of repeated digits are now replaced with
- Add argument documentation comments
- You can read more about this in the new Documenting Code tutorial
- Add some useful shadowable constants for working with compile-time file paths
ThisFile
- The relative path of the current source fileThisFileName
- The name of the current source fileThisFileDir
- The directory of the current source fileWorkingDir
- The compile-time working directory
- Deprecate function strands
- They ended up making code less readable
- Remove previously deprecated primitives:
this ↬
recur ↫
all ⋔
cascade ⪾
bind λ
types
shapes
- Remove several backward compatible glyphs from the lexer
- This frees up some glyphs that can now be used as function names
- Lots of optimizations
- Optimize the pattern
/F⊞F
to use much less memory and be an order of magnitude faster in some cases - Optimize
group ⊕
andpartition ⊜
withlength ⧻
,first ⊢
, andfirst ⊢
reverse ⇌
- Optimize iterating modifiers with a top-level
fork ⊃
orbracket ⊓
- Optimize
≡
⋅
constant
and∵
⋅
constant
patterns- The speed improvement is on the order of 70x
- Optimize the pattern
[⍥⚂…
- Optimize
length ⧻
deduplicate ◴
- Optimize the pattern
setinv
now emits a warning if the functions do not have opposite signatures- Add the
--io
flag to theuiua fmt
command, which formats code from stdin to stdout - Lots of bug and crash fixes
- Add a Documenting Code tutorial
- Add a Files and Streams tutorial
- Add an Experimental Features page
- Rewrite the pad code to use a
<textarea>
rather than acontenteditable
<div>
- This should make it work better in more browsers, especially on mobile
- You can now ctrl+click on a glyph in the editor to open its documentation
- Fix a crash involving pervasive operations on some 0-length arrays
- Fix a bug in
repeat ⍥
withinfinity ∞
signature inference
under ⍜
of pattern matching now works correctlyunder ⍜
un °
scan \\
now works correctly- Style and advice diagnostics are no longer emitted from macros
You can find the release announcement here.
- Breaking Change - Multiline strings are now also raw strings which do not require escaping
- They are no longer format strings by default
- Raw strings can be made format strings with an extra
$
, i.e.$$ …
- Breaking Change -
try ⍣
's handler function is now passed the original arguments before the error try ⍣
now works with function packs of more than 2 functions- This tries each function in the pack in order
- Switch functions now format to use
⟨⟩
brackets- This makes them easier to identify when reading
- It also allows switch functions to be used as modifier arguments without extra nesting
- Switch functions now work with
under ⍜
- Add pattern matching with
un °
- Constant values can now be inverted to form a function which errors if the top value on the stack does not match
- Format strings can be inverted to extract substrings
- Read more in the new Pattern Matching tutorial
- Git modules are no longer experimental
- Modules are added automatically as Git submodules when imported
- See the Modules tutorial for more information
map
and related functionsinsert
,has
,get
, andremove
are no longer experimental- Add the
mask ⦷
function, which creates a mask of occurrences of one array in another- This works similarly to
find ⌕
, but is better when you need a mask or to distinguish between adjacent occurrences
- This works similarly to
- Change
sine ∿
's glyph∿
is more representative of what it does- Most circle glyphs like
○
are used for array functions or stack manipulation ○
will continue to work and will be formatted as∿
under ⍜
join ⊂
now works with arrays of the same rank as long as the row count does not changeun °
scan \\
now works withequals =
andnot equals ≠
group ⊕
can now take multidimensional index arrayspartition ⊜
can now take multidimensional marker arraysunder ⍜
select ⊏
andpick ⊡
now work with duplicate indices if the values at those indices are the samerotate ↻
now works through boxesfold ∧
now works withunder ⍜
if its function doesinventory ⍚
can now take 3 or more arraysrepeat ⍥
can now take non-scalar repetition counts- This repeats the function a different number of times for each row of the inputs
select ⊏
can now be used withun °
to separate intoclassify ⊛
anddeduplicate ◴
(changed in 0.12.0)- Characters can now be
multiply ×
d ordivide ÷
d by numbers to possibly toggle their case - Add the
csv
function, which encodes and decodes CSV data - Add the
&clget
and&clset
system functions, which allow copying and pasting text to and from the system clipboard - Add more shadowable constants
- Importing modules that use the
# Experimental!
comment now requires the# Experimental!
comment in the importing file - Doc comments may now be placed at the end of single-line functions
- Non-alphabetic identifiers can now be suffixed with
!
to make macros - Add
df
,ddf
, etc shortcuts fordip ⊙
fix ¤
- Existing macros are now called "stack macros" to distinguish them from the new "array macros"
- Stack macros are now hygienic
- Add array macros, which allow code to be generated and manipulated at compile time as strings
- These are specified with a
^
immediately following a binding's arrow - They are documented in the Macros tutorial
- These are specified with a
un °
pop ◌
can now be used to retrieve thefill ⬚
value- See more details in
fill ⬚
's documentation
- See more details in
- Add the wildcard constant
W
, which matches any number, and@\W
, which matches any character - Add the experimental
coordinate ⟔
function, which searches an array for a value and returns a multidimensional indexcoordinate ⟔
is topick ⊡
asindexof ⊗
is toselect ⊏
- Experimental function strands now use the
‿
character, which formats from__
- Add the experimental
by ⊸
modifier, which duplicates a function's last argument before calling it - Add the experimental
quote
modifier, which converts a string to code at compile time- This is useful in array macros
- Add
# No inline!
semantic comment, which prevents a function and its callers from being inlined- This enables better stack traces on errors
- Deprecate
bind
- Deprecate
deal
- It is rarely used and easy to express with other functions
- Deprecate experimental
shapes
andtypes
modifiers in favor of pattern matching - Remove
cross ⊠
for good - Remove
unpack ⊐
for good - Remove
rectify ⌅
for good - Remove
&i
for good - Make
reduce /
with a monadic function a hard error
- Code is now analyzed for purity
- All pure top-level expressions will attempt to evaluate at compile time
- All fragments of code that are pure and have a signature
|0.n
will be evaluated at compile time
- Add lots of LSP features
- Find references
- Rename is now cross-file
- On-type formatting (can be toggled in settings)
- Inlay hints (each can be toggled in settings)
- Binding function signatures
- Inline function signatures
- Values of top-level expressions
- Code actions
- Macro expansion
- Remove output comment
- Convert between strand and array syntax
- Completions
- Shadowable constants
- Module items when the module reference is partially typed
- Add the
--file <file>
option to theuiua repl
command- This runs a file before starting the REPL
- Improve the supported binding type coverage of
&ffi
- Add warnings for when a loop in an array may have a variable signature
- Various performance improvements
- Optimize and multithread
⊞(/+×)
, which is a common component of matrix multiplication
- Optimize and multithread
- Lots of bug and crash fixes
- Tutorials
- Add a Working with Strings tutorial
- Add array macros to the Macros tutorial
- Add the Pattern Matching tutorial
- Add some modifier compatibility tables to documentation
- Hide experimental glyphs in the editor by default
- They can be toggled on in the settings
- An
# Experimental!
comment can now be easily inserted via a settings button or withCtrl+E
- Add horizontal scrolling to pad output
- Pad tabs are now given titles according to their contents
- The pad now renders strings that are SVG as images
- Add a pad setting for autoplaying audio
- Fix a crash in
each ∵
of 3 or more arrays
- Fix a major bug with negative
take ↙
- Fix a bug involving patterns like
°°[…]
- Improve Rust library API for getting bindings' values
- Breaking Change -
repeat ⍥
withinfinity ∞
now does a fixed-point iteration rather than an infinite loop- You can still do an infinite loop with
do ⍢
(…)1
- You can still do an infinite loop with
- Breaking Change -
reshape ↯
with a shape with negative dimensions now reverses that axis rather than acting as a "fill" value- The "fill" behavior can still be achieved by setting an axis to
infinity ∞
- The "fill" behavior can still be achieved by setting an axis to
- Breaking Change -
&ad
and&imd
now return an encoding format as a string in addition to the media data - Overhaul the module system
- Custom modifiers are now called "macros"
- Rather than requiring signatures, placeholders are now a sort of function that operates on the macro's arguments
- This allows for more complex and flexible code-reuse
- Existing code should continue to work. Existing placeholders will be formatted into the new syntax.
- You can read more about macros in the updated Macros tutorial
- Add the
on ⟜
modifier, which captures a commonfork ⊃
pattern in a more readable way join ⊂
can now be used withunder ⍜
- This only works when the joined arrays have different ranks
join ⊂
can now be used withun °
to separate the first row of an array from the resttry ⍣
's handler's function signature is now more flexible- This makes it easier to either provide a default value, process the error itself, or do something different with the inputs
- A
fill ⬚
value set outside a looping modifier will now no longer be available inside the loop- This should make it easier to scope
fill ⬚
correctly
- This should make it easier to scope
fill ⬚
can now match the lengths of inputs torows ≡
- Add recursion via referring to a binding's name within its body
- Extend some math functions to work with characters
sign ±
gets the case of a characterabsolute value ⌵
uppercases a characternegate ¯
toggles the case of a character
range ⇡
can now be used with negative numberseta η
,pi π
,tau τ
andinfinity ∞
are now parsed as numbers rather than functions- This lets them syntactically bind with
¯
or form fraction literals
- This lets them syntactically bind with
- Add the
inventory ⍚
modifier, which iterates over the unboxed items of an array and re-boxes the results- This shortens a lot of box array code
- Change
content ◇
's glyph to reflect its relationship withinventory ⍚
. Code using⊔
will continue to work and will be formatted as◇
. content ◇
can now be used withunder ⍜
if its function does- Macros with 2 or more arguments can now use
‼
at the end of their names. Macro names with any combination of!
and‼
will be automatically parsed and formatted as‼
s followed by one!
if necessary. f
can now be used at the beginning of planet notation shorthand forfork ⊃
- Inline functions are no longer required to be in a binding or modifier
- This allows arbitrary code to be wrapped and marked with a signature
- Remove cosine and arccosine optimizations
- The inverse of the cosine idiom created a logical inconsistency
pop ◌
can now be used withunder ⍜
- This is only useful when
pop ◌
is composed with other functions
- This is only useful when
- Breaking Change - Flip the order of
send
's arguments - Add the
pool
modifier, which is identical tospawn
but spawns a thread in a thread pool &rs
can now take a count ofinfinity ∞
to read until the end of the stream- Add the
&runs
system function, which runs a command and returns an IO stream handle - Add the experimental
stringify
modifier, which turns its function into a string without calling it- This is useful in macros
- Add the experimental
signature
modifier, which returns the arguments and output of its function without calling it- This is useful in macros
- Add the experimental
&ffi
system function, which allows calling functions from shared libraries - Add experimental function strands. Putting a
_
between two functions (or a function and a constant), is equivalent to putting them in()
s- This is experimental because it remains to be seen how this may affect readability
- Add experimental labels, denoted by a
$
immediately followed by an identifier, which attach a name to an array. This has two uses:- Labels are visible in output and in
stack
diagnostics - Labels in code make it easier to understand when reading
- Labels are visible in output and in
- Add experimental
shapes
andtypes
modifiers, which validate the shape and type of an array or arrays- These both check array properties at runtime and serve as a form of documentation
&var
now throws an error if the variable is not found- Deprecate
pop ◌
formatting from;
- Deprecate
all ⋔
- It was rarely used and was hard to reason about
- Add an experimental
repr
function that produces a string representation of a value in a format that can be read by the interpreter
- Lots of bug and crash fixes
- Lots of performance improvements and optimizations
- Numbers that seem to have a floating-point epsilon rounding error will be output with the epsilon noted
- Language Server
- Add Tutorial Introduction
- Add primitives.json for use with tooling
- Tutorials are now in a
/tutorial
route instead of/docs
- Add the
content ◇
modifier, which unboxes its function's arguments before calling it - Add the
unique ◰
function, which creates a mask of the first occurrence of each unique value in an array- Change
deduplicate ◴
's glyph to reflect its relationship withunique ◰
. Code using⊖
will continue to work and will be formatted as◴
.
- Change
table ⊞
now works on rows of arrays but keeps it's optimizations for lists- You never wanted element-wise combinations of multi-dimensional arrays anyway
- Deprecate
cross ⊠
, as it is now redundant - This is technically a breaking change, but it is unlikely to break much code
fill ⬚
can now be used to specify default accumulators forreduce /
,group ⊕
, andpartition ⊜
- Breaking Change - Reducing
group ⊕
andpartition ⊜
no longer take a required accumulator - Breaking Change -
fill ⬚
can no longer be temporarily disabled. Try to scope it to the smallest function.
- Breaking Change - Reducing
- Breaking Change - Most non-pervasive monadic functions no longer implicitly unbox their argument
- This implicitness led to some unexpected behavior, particularly when getting the
length ⧻
orshape △
of a boxed array - Exceptions are
reverse ⇌
andtranspose ⍉
, which work on box elements without unboxing them
- This implicitness led to some unexpected behavior, particularly when getting the
- Unicode escape sequences that are not 2 or 4 hex digits long can now be specified with
\u{…}
- Change
pop ◌
's glyph to make it look good in planet notation. Code using;
will continue to work and will be formatted as◌
. un °
reduce /
multiply ×
now gives the prime factorization of a numberclassify ⊛
anddeduplicate ◴
now work withunder ⍜
&fras
and&frab
now work withunder ⍜
- Completely remove the deprecated
unbox ⊔
- Add experimental hashmap functions, which operate on a box array as if it is a hashmap
- Add experimental
bind
modifier, which binds local values within a function- This introduces some non-tacitness to the language
- The internal byte array type is now used in more places, which should improve performance a bit
&ime
and&imd
now support the QOI image format- Lots of bug and crash fixes
- Add a new tutorial: Thinking With Arrays
- Fix some bugs and crashes
- An entire Uiua codebase is now compiled before it is executed, rather than compiling and executing line-by-line
- Add the
memo
modifier, which memoizes a function - Add the
comptime
modifier, which runs a function at compile time &i
can now only be used as the first function in a bindingrepeat ⍥
can no longer use a negative number of repetitionsrepeat ⍥
can now be used withun °
andunder ⍜
reshape ↯
now works withunder ⍜
scan \
now works withun °
in some casessetinv
andsetund
are no longer experimental- Add output comments, which the formatter fills with values from the stack
- Make an empty comment starting with
n
additional#
s - The formatter will replace the comment with the top
n
values from the stack - Output comments in functions will show a number of values present on the stack for each time the function is called
- Make an empty comment starting with
- LSP improvements
- Add hover information on binding references
- Add signatures to binding hover information
- Add same-file binding rename support
- Add same-file goto definition support
- Add the
uiua build
command, which emits a.uasm
bytecode file uiua run
can now run a.uasm
bytecode fileuiua stand
now embeds the bytecode assembly in the executable- Multiple compiler errors can now be emitted at once
- Bug and crash fixes
- Performance improvements
- Add an Inverses tutorial
- Each tutorial challenge now contains 1 or 2 answers
- Make proxy values a little less leaky
- Make placeholders work properly with
both ∩
- Some other bug and crash fixes
fix ¤
now works with binary pervasive functions- This removes the need for some uses of
rows ≡
and should be a bit faster
- This removes the need for some uses of
fill ⬚
can now be disabled for a function by filling with an empty listparse ⋕
now has a glyph and is semi-pervasive- It was being used enough to warrant a glyph
sign ±
,floor ⌊
,ceiling ⌈
, andround ⁅
now work withunder ⍜
- Add some missing arithmetic inverses and unders involving
flip :
- Change
pack
's name tounpack ⊐
, and it no longer implicitly boxes values (only unboxes them)- Implicit boxing could lead to unexpected and inconsistent behavior
- Change
invert
's name and glyph toun °
. Code using⍘
will continue to work and will be formatted as°
.°
is a nicer glyph, andun
composes more nicely with the names of invertible functions
- Deprecate
unbox ⊔
in favor ofun °
box □
- It can still be typed the same way!
- Deprecate
reduce /
with a monadic function- This created poorly-defined stack signatures that changed depending on the length of the array being reduced
un °
with stack array and planet notations, i.e.°[⊙⊙∘]
, can be used instead, as it has a well-defined signature- For operating on just part of an array, use
under ⍜
take ↙
,drop ↘
, orselect ⊏
box □
ed arrays can once again be compared lexicographically
- Make
stack ?
anddump
output show call stack - Show type and shape information when pretty-printing empty arrays with rank 2 or greater
- Improve language server hover information
- Bug and crash fixes
- Add a token count to the editor (in settings)
- Files can now be dragged into the editor to open them with
&fras
&fld
now works on the website
- Fix
stack ?
signature
invert ⍘
andunder ⍜
now work with stack array notation.- Add the
stack ?
function, which debug-prints the entire stack dump
now works withinvert ⍘
andunder ⍜
fill ⬚
andpack ⊐
are now exclusive- Change how
regex
works to be more powerful - Add special syntax for splitting/joining lines of code
'
will split a line without changing semantics''
will combine two lines without changing semantics
- The way pervasive functions work with
box □
ed arrays is now more consistent - Remove
reach
,distribute
,tribute
,level
,combinate
, and all ocean functions for good
- Add a style diagnostic about lines that are too long
- Add some other style diagnostics
- Replace
uiua check-update
withuiua update
, which will update the interpreter by installing a new version with Cargo - Bug and crash fixes
- Multiline strings can now be toggled like comments with ctrl+4
- Fix a bug with nested custom modifiers
windows ◫
can now take negative window sizes- Add an experimental distinction for some functions/modifiers
- Experimental features are opt-in and must be enabled by putting an
# Experimental!
comment at the top of a file
- Experimental features are opt-in and must be enabled by putting an
- Add the experimental
all ⋔
modifier, which is a variadic generalization ofboth ∩
- Add the experimental
rectify ⌅
modifier, which sets a function's inverse to itself - Add the experimental
setinv
modifier, which sets the inverse of a function - Add the experimental
setunder
modifier, which sets theunder ⍜
-compatible inverse of a function - Add the experimental
this ↬
modifier, which sets a function to recur to - Add the experimental
recur ↫
modifier, which calls a function recursively - Allow custom modifiers to use switch function syntax
sign ±
now normalizes complex numbers- Change
type
mapping - Deprecate
reach ⟜
- Fix some bugs and crashes
- Improve some formatting with multiline functions and switch functions
identity ∘
no longer formats from()
- Allow
uiua <file> [args]
as a shortcut foruiua run <file> [args]
- Allow disabling autorun for pad links
- Fix some bugs and crashes
- Big Change
- Deprecate all ocean functions
- Deprecate
level ≑
andcombinate ◳
- Deprecate
tribute ≐
anddistribute ∺
fold ∧
no longer takes a rank list
- Add the
rerank ☇
function, which changes the rank of an array's rows- This fills the void left by
level ≑
andcombinate ◳
- This fills the void left by
- Add the
fix ¤
function, which adds a length 1 axis to an array rows ≡
now repeats the rows of an arrays that have exactly 1 row- This in combination with
fix ¤
fills the void left bytribute ≐
anddistribute ∺
- This in combination with
cross ⊠
can now take more than 2 arguments- Switch functions are now less strict about branch signature compatibility and can take arrays as conditions
- A single switch function can now be used as a list of functions for dyadic modifiers
- Remove
if ?
, as all its use cases are now covered by switch functions. It will continue to parse, but?ab
will be formatted as(b|a)
flip :
's glyph is now just a colon (it wasRATIO ∶
)under ⍜
now works withabsolute value ⌵
- Remove
break ⎋
for good
- Lots of bug and crash fixes
- Lots of performance improvements
- Update the Advanced Array Manipulation Tutorial to reflect the changes in this version
under ⍜
withtake ↙
anddrop ↘
is now less strict about shape/rank changesrange ⇡
called on a list of 0 or 1 values is now more consistentfill ⬚
now works withrotate ↻
to give non-wrapping behaviorfill ⬚
now works withfind ⌕
if the searched-for array is longer than the array being searchedparse
now works withinvert ⍘
andunder ⍜
- The output of
find ⌕
is now the same shape as the array being searched
- Fix a bunch of bugs
- Several performance optimizations
transpose ⍉
is now much fasterdistribute ∺
andtribute ≐
are now much faster if their function is a pervasive built-in- Some other functions are also a bit faster
- Hold shift when copying a link to copy a Markdown link
- Add embeddable editor. Replace the
pad
in pad links withembed
orembedpad
.
- Add complex numbers, which can be created with the
complex ℂ
function - Add the
do ⍢
modifier, which repeatedly calls a function as long as a condition holds - Deprecate
break ⎋
- Add multi-dimensional
where ⊚
join ⊂
to an empty list now always works regardless of rank of the other arrayeach ∵
androws ≡
now work withunder ⍜
- All ocean functions now work with
under ⍜
- Allow multiple values to be returned from
each ∵
,rows ≡
,distribute ∺
,tribute ≐
,table ⊞
, andcross ⊠
invert ⍘
atangent ∠
now produces the sine and cosine of an angle&i
now treats paths as relative to the file calling it rather than the current working directory- Rank list functions for the rank-generic modifiers can now take any number of arguments. For any number of augments greater that 0, an empty numeric list will be pushed before the function is called.
- Add fraction literals with
/
- Parsing multiple formattable functions from words is now smarter
- Remove
bind '
. It made code hard to read. It will continue to parse, but will be formatted as(…)
- Add the
uiua stand
command, which creates a standalone executable
- Add Optimizations page
- Add Images and GIFs tutorial
- Fix a bug with watch mode
- Add the
reach ⟜
modifier, which removes the second value from the stack and calls its function. - Change how short spellings of
dip ⊙
,gap ⋅
, andidentity ∘
work- Instead of allowing them to be spelled with 2 characters, they can now be spelled with 1 character as long as there are at least 2 in the sequence.
- If present,
'i'
may only come last. reach ⟜
is included.
- Add 2-letter spellings of
deep ≊
,abyss ≃
, andseabed ∸
to make them consistent withrock ⋄
.
- Fix a bunch of bugs and crashes
- The formatter now indents bindings that start with a bound function that starts with
&i
- The native interpreter no longer automatically checks for updates. You can still check manually with
uiua update?
.
- Add challenges to the end of tutorial sections
- Make the introductory examples on the main page less esoteric
- Update the Advanced Stack Manipulation Tutorial to include
reach ⟜
- The Uiua Rust crate is now fully documented and has a decent API
- Implement
under ⍜
multi-indexpick ⊡
- Implement
under ⍜
partition ⊜
- Implement
under ⍜
group ⊕
- Add
send
,recv
, andtryrecv
functions for sending values between threads - Add
&fde
and&ftr
system functions for deleting/trashing files and directories under ⍜
with system functions that return stream handles calls&cl
as an inverse- Add the
&raw
system function for setting the terminal to raw mode - Add the
&gifd
system function for decoding GIFs
- The interpreter now formats its own diagnostic messages instead of delegating to a library
- Fix a bunch of bugs and crashes
- Add
uiua repl
command - Optimize (
⊢
⍏
), (⊢
⇌
⍏
), (⊢
⍖
), and (⊢
⇌
⍖
) to be O(n) instead of O(nlogn) - Optimize (
⊢
⊚
) to not materialize the indices array
&ast
now works on the website by generating a fixed amount of audio- How long the generated audio is can be configured in the editor settings
- Error and diagnostic messages are no-longer all one color
- The pad editor now inserts a trailing newline on format
- Increase thresholds for arrays automatically becoming images or audio
- Split up system functions into more categories on the main docs page
- The bell character
@\b
now plays a sound if printed with&p
or&pf
- The GitHub Discussions are now open!
- Custom modifier placeholders (
^
) must now be immediately followed by a signature. This reduces the number of signatures that have to be declared everywhere else.
- Massive Change - Functions are no longer first-class values. This has many implications:
- Functions can no longer be put in arrays or manipulated as stack values
- Inline functions can now only appear as modifier arguments or bindings
call !
has been removed, as there is nothing on the stack to call- Modules have been reworked.
&i
now handles both loading a module from a file and importing items from that module. ---
scopes are now test scopes.~~~
scopes have been removed.- Remove
use
, as it is no longer necessary - Boxes still work as normal, but are now their own type distinct from functions
- Remove
sig
, as everything that can be on the stack now has the same signature
- Add new syntax for defining custom modifiers
- Add new syntax for calling a function from a list of functions
- Add the
pack ⊐
modifier, which calls its function and implicitly boxes/unboxes values - Add the
combinate ◳
modifier, which is a rank-generic version oftable ⊞
fold ∧
is now rank-generic and requires a rank list- Add the
tribute ≐
modifier, which is a flipped version ofdistribute ∺
- Change
level ≑
's glyph to reflect its relationship witheach ∵
,rows ≡
,distribute ∺
, andtribute ≐
. Code using⍚
will continue to work and will be formatted as≑
. - Add
rock ⋄
,surface ~
,deep ≊
,abyss ≃
, andseabed ∸
, which build rank lists to be used withlevel ≑
and the new rank-generic modifiers - Change
trace ⸮
's glyph to letsurface ~
use~
. - Change
match ≍
's glyph to avoid confusion with the new ocean functions' glyphs. Code using≅
will continue to work and will be formatted as≍
. - Stack signatures found to be incorrect at runtime produce an error
- Dyadic math operations now work with
under ⍜
even if both arguments are outsideunder ⍜
's function - Some mathematical functions that previously did not work with
invert ⍘
andunder ⍜
when accompanied byflip :
now do
- Add 3 new tutorials
- The orientation of stack values in the output can be flipped in the settings
- Add
regex
function for matching regular expressions - Add
utf
function for UTF-8 encoding and decoding - Add
&invk
system function for invoking a path to be opened with the system's default program fill ⬚
can now be used withfirst ⊢
- Most functions that expect strings as arguments will now dig arbitrarily deep into boxes
- Make
if ?
signature checking more permissive - The presence of
break ⎋
in arepeat ⍥
always requires a stack signature - The
&runi
and&runc
functions now return exit codes - Multiline string now only insert
\n
at the end of each line instead of\r\n
- Bugfixes and performance improvements
- Add a page listing common stack idioms
- Add
under ⍜
both ∩
- Remove
restack ⇵
for good - Remove
roll ↷
andunroll ↶
for good @\s
can now be used in addition to@
to get a space character
- Many performance improvements and memory usage reductions
- Many bug and crash fixes
- Add some additional style diagnostics
- Add more semantic token types to the language server
- Stop using deprecated MarkedString in the language server
- The editor's font size can now be changed
- Improve brackets/quotes behavior in the editor
- HTML is now properly escaped in the editor
- Formatting can now put the cursor to the left of the current token (toggleable in the settings)
- Major Change
distribute ∺
now takes the array being distributed as its last argument, rather than its first - Add
where ⊚
function, which returns the indices of an array that have non-zero values if ?
's branches can now have a different number of arguments (but not outputs)if ?
's condition can now be a list of conditions, and the branch will be chosen for each row in the argument(s)- The reducing versions of
group ⊕
andpartition ⊜
now take accumulators. Aggregating versions are unchanged. spawn
andwait
no longer have glyphs. Code using↰
and↲
will continue to work and will be formatted asspawn
andwait
.&n
is no longer a system function and is now callednow
under ⍜
now
can be used to time thingscall !
can now call functions that return any number of values, not just one- Add hex character escape sequences for string and character literals.
\xNN
for short ASCII codes\uNNNN
for full Unicode sequences
- The formatter now aligns consecutive end-of-line comments
NaN
s no longer propagate inminimum ⌊
andmaximum ⌈
- Fix a bug that prevented
under ⍜
multidimensionaltake ↙
anddrop ↘
from working - Fix a bug in how
fold ∧
ordered multiple accumulators - Fix a bug that allowed incorrect signatures to be declared for functions
- Fix a bunch of other bugs and crashes
- Add the Uiua386 font as an option in the editor
- Add GIF encoding with
&gife
- Rename
constant
tobox □
. - Add
unbox ⊔
, which unboxes a boxed array - Major Change: Some uses of
call !
will no longer compile without declaring a stack signature. When unboxingbox □
ed arrays, you can useunbox ⊔
instead, which has a well-defined signature. - Add
fall ⍖
function, which gives the indices of the array if it were sorted descending - Change
grade ⌂
name and glyph torise ⍏
to reflect its relationship withfall ⍖
. Code using⌂
will continue to work and will be formatted as⍏
. try ⍣
now puts arguments to its first function above the error value when calling the error handlerfold ∧
can now use multiple accumulators- Improve
dump
output formatting dump
is now a monadic modifier. Its function preprocesses each value before dumping it.- Add the
sig
function, which returns the stack signature of a value - A negative dimensions in the shape passed to
reshape ↯
can now be in any position, not just the first or last - Functions with ASCII glyphs now also format from their names
- Add a advice diagnostic about the capitalization of binding names
- Add GIF output
- Execution time limit is now 2 seconds by default but can be customized
- Fix a crash and a bug that could occur when creating nested arrays that pull in values.
This version changes a lot of glyphs. If you are coming from the previous version, most of the old glyphs will be automatically formatted to the new ones. The only change you may need to make is replacing all ^
s with |
s.
You may want to read the new version of the Advanced Stack Manipulation Tutorial to understand the reason for so many of these changes.
- Add the
bracket ⊓
modifier, which calls two functions each on different arguments - Change
fill ⬚
's glyph to reflect its relationship withbox □
. Code using⍛
with continue to work and will be formatted as⬚
. - Change
share ⇉
name and glyph tofork ⊃
. Code using⇉
will continue to work and will be formatted as⊃
. - Change
noop ·
name and glyphs toidentity ∘
to reflect its relationship withgap ⋅
anddip ⊙
. Code using·
will continue to work and will be formatted as∘
. - Change
identity ∘
's signature from|0.0
to|1.1
- Add the
gap ⋅
modifier, which discards a value then calls its function. It is mainly intended to be used withfork ⊃
. - Change
dip ⊙
's glyph to reflect its relationship withgap ⋅
andidentity ∘
. Code using→
will continue to work and will be formatted as⊙
. - Change
both ∩
's glyph to reflect its relationship withfork ⊃
. Code using∷
will continue to work and will be formatted as∩
. distribute ∺
now works with any number of arguments. Only the first argument is distributed.fill ⬚
now works withreshape ↯
reshape ↯
now allow negative numbers to denote derived dimensions- Change the modifier termination character to
|
instead of^
- Remove old versions of
fork
andtrident
- Add the
&httpsw
function for making HTTPS requests
- Add formatter configuration options. See the readme for details.
- Checking for updates is less zealous, and can be disabled with the
--no-update
flag touiua run
oruiua watch
- Running code in the Pad editor updates the URL to prevent work from accidentally being lost
- Add the
share ⊃
modifier, which unifies and deprecatesfork ⊃
andtrident ∋
bind '
no longer calls its functions immediately. This should not change any reasonable existing code.- Change how
partition ⊜
andgroup ⊕
work with dyadic functions to be consistent withreduce /
- Deprecate
restack ⇵
. It was never a good idea. - Remove the overloaded behavior of
call !
. It no longer behaves like an if-else when used with a list of functions.- You can replace all existing instances of that use case with
!⊡:
- You can replace all existing instances of that use case with
- Add the
if ?
modifier, which calls one of two functions based on a condition
both ∩
can now be used with a function that takes any number of arguments.- Various bug and crash fixes
- Tell the user when the interpreter can be updated
- Add the
dip ⊙
modifier, which temporarily pops a value - Deprecate
roll↷
andunroll↶
- Add
under ⍜
keep ▽
- Add
dump
function, which prints the entire stack
- Remove the
|1.1
signature restriction forunder ⍜
's second function - Remove the rank
∴
function - Remove the restriction that all functions in a non-scalar function array all have the compatible signatures
- Whether a binding is a constant or a function is now independent of how many values are on the stack
- Add a system for non-error diagnostics
- Add advice about redundant uses of
each ∵
- Add advice about redundant uses of
- Allow passing
--no-format
touiua watch
&sc
now returns0
if EOF is input
&sc
now works on the website by showing a prompt
- Make binding names case-sensitive
- Add
^
syntax to terminate modifier parsing. - Add
&runi
and&runc
functions for running commands - Add
&cd
function for changing the current working directory - Add shadowable constants like
e
andos
- Change
trident ∋
argument order to make it easier to reason about - Enable
fill ⬚
forkeep ▽
if the amount list is shorter than the kept array
- Add
uiua eval
command which evaluates a Uiua expression and prints the result - Watch commands no longer try to open the file being watched
- Fix a bug that made numbers that were
≤ 1e-12 ⌵
format to0
- Make a space character
@
more visible by underlining the space - Improve cursor movement when formatting in the editor
- Add this changelog
- Add
trace ~
function- Debug-prints the value on top of the stack without popping it
- Shows the line and column number too
- Add
both ∩
modifier- This can change code like
/(|2 ⊂!:!:) {"a" "bc" "def"}
- To just
/'⊂∩! {"a" "bc" "def"}
- This can change code like
- Turn the term pair syntactic construct into a modifier called
bind '
- Fix some correctness bugs related to
under ⍜
andinvert
- Fix a crash when trying to reverse an empty array
- Add a right-to-left explanation page