Releases: uiua-lang/uiua
Releases Β· uiua-lang/uiua
0.9.2
0.9.2 - 2024-02-25
Interpreter
- Fix a bug involving patterns like
°°[β¦]
0.9.0
0.9.0 - 2024-02-25
Language
- 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 refering 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
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
Website
- Add Tutorial Introduction
- Add primitives.json for use with tooling
- Tutorials are now in a
/tutorial
route instead of/docs
0.8.0
0.8.0 - 2024-01-31
Language
- Add the
content β
modifier, which unboxes its function's arguments before calling it- Deprecate
unpack β
in favor ofcontent β
- The behavior of
content β
is less implicit and is not prone to some of the potential unexpected behavior ofunpack β
- Deprecate
- 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 implicitely unbox their argument
- This impliciteness 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 impliciteness led to some unexpected behavior, particularly when getting the
- Unicode escape sequences that are not 2 or 4 bytes 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
Interpreter
- 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
Website
- Add a new tutorial: Thinking With Arrays
0.7.1
0.7.0
0.7.0 - 2023-12-15
Language
- 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
Interpreter
- 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
Website
- Add an Inverses tutorial
- Each tutorial challenge now contains 1 or 2 answers
0.6.1
0.6.0
0.6.0 - 2023-12-06
Language
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
Interpreter
- 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
Website
0.5.1
0.5.0
0.5.0 - 2023-12-2
Language
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
Interpreter
- 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
Website
- Multiline strings can now be toggled like comments with ctrl+4