Skip to content

Releases: uiua-lang/uiua

0.10.3

10 Apr 02:34
Compare
Choose a tag to compare

0.10.3 - 2024-04-09

Interpreter

  • Fix a crash involving pervasive operations on some 0-length arrays

0.10.2

09 Apr 01:12
Compare
Choose a tag to compare

0.10.2 - 2024-04-08

Interpreter

0.10.1

07 Apr 20:31
Compare
Choose a tag to compare

0.10.1 - 2024-04-07

Interpreter

  • under ⍜ of pattern matching now works correctly
  • under ⍜ un ° scan \\ now works correctly
  • Style and advice diagnostics are no longer emitted from macros

0.10.0

05 Apr 02:41
Compare
Choose a tag to compare

0.10.0 - 2024-04-04

You can find the release announcement here.

Language

  • 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 functions insert, has, get, and remove 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
  • 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 change
  • un ° scan \\ now works with equals = and not equals ≠
  • group ⊕ can now take multidimensional index arrays
  • partition ⊜ can now take multidimensional marker arrays
  • under ⍜ select ⊏ and pick ⊡ now work with duplicate indices if the values at those indices are the same
  • rotate ↻ now works through boxes
  • fold ∧ now works with under ⍜ if its function does
  • inventory ⍚ can now take 3 or more arrays
  • repeat ⍥ 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 with un ° to separate into classify ⊛ and deduplicate ◴
  • Characters can now be multiply ×d or divide ÷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 for dip ⊙ fix ¤
  • Existing macros are now called "stack macros" to distinguish them from the new "array macros"
  • 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
  • un ° pop ◌ can now be used to retrieve the fill ⬚ value
    • See more details in fill ⬚'s documentation
  • 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 index
  • 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
    • It undermines the priniciples of the language
    • It makes certain optimizations impossible
    • fill ⬚ and/or map can be used to achieve similar effects
  • Deprecate deal
    • It is rarely used and easy to express with other functions
  • Deprecate experimental shapes and types 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

Interpreter

  • 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 the uiua 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
  • Lots of bug and crash fixes

Website

  • Tutorials
  • 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 with Ctrl+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

0.9.5

28 Feb 23:37
Compare
Choose a tag to compare

0.9.5 - 2024-02-28

Interpreter

  • Fix a crash in each ∵ of 3 or more arrays

0.9.4

28 Feb 17:15
Compare
Choose a tag to compare

0.9.4 - 2024-02-28

Interpreter

  • Fix a bug with filled multi-dimensional take ↙
  • Fix a crash in rows ≡ of 3 or more arrays

0.9.3

27 Feb 20:40
Compare
Choose a tag to compare

0.9.3 - 2024-02-27

Interpreter

  • Fix a major bug with negative take ↙

0.9.2

26 Feb 01:33
Compare
Choose a tag to compare

0.9.2 - 2024-02-25

Interpreter

  • Fix a bug involving patterns like °°[…]

0.9.0

25 Feb 20:53
Compare
Choose a tag to compare

0.9.0 - 2024-02-25

Language

  • Breaking Change - repeat ⍥ with infinity ∞ now does a fixed-point iteration rather than an infinite loop
    • You can still do an infinite loop with do ⍢(…)1
  • 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 ∞
  • Breaking Change - &ad and &imd now return an encoding format as a string in addition to the media data
    • They are also now deprecated in favor of using un ° with &ae or &ime
  • Overhaul the module system
    • Details can be found in the updated Modules tutorial
    • Deprecate &i, as it is no longer necessary
    • Enabling experimental allows a module path of the form git: <repo url> to load a module from a git repository
  • 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 common fork ⊃ pattern in a more readable way
  • join ⊂ can now be used with under ⍜
    • This only works when the joined arrays have different ranks
  • join ⊂ can now be used with un ° to separate the first row of an array from the rest
  • try ⍣'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
  • fill ⬚ can now match the lengths of inputs to rows ≡
  • Add recursion via refering to a binding's name within its body
  • Extend some math functions to work with characters
  • range ⇡ can now be used with negative numbers
  • eta η, pi π, tau τ and infinity ∞ are now parsed as numbers rather than functions
    • This lets them syntactically bind with ¯ or form fraction literals
  • 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 with inventory ⍚. Code using will continue to work and will be formatted as .
  • content ◇ can now be used with under ⍜ 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 for fork ⊃
  • 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 with under ⍜
    • This is only useful when pop ◌ is composed with other functions
  • Breaking Change - Flip the order of send's arguments
  • Add the pool modifier, which is identical to spawn but spawns a thread in a thread pool
  • &rs can now take a count of infinity ∞ 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
    • FFI is still a work in progress, but it is currently useful for foreign functions that aren't too complex
    • Bindings for Raylib are being worked on as a proof of concept. You can find them in the rayua repository.
  • 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
  • Add experimental shapes and types 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
    • Optimize the pattern for adjacency: /F
      • It is as much as 800x faster in some cases
    • Optimize /
    • Square matrices are now transposed in-place
    • ..and more
  • Numbers that seem to have a floating-point epsilon rounding error will be output with the epsilon noted
  • Language Server
    • Add completions
    • Add diagnostics
    • Add semantic highlighting
    • Add inline function hovering
    • Show un °/under ⍜ compatibility for user-defined functions

Website

0.8.0

31 Jan 16:18
Compare
Choose a tag to compare

0.8.0 - 2024-01-31

Language

  • 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 with unique ◰. Code using will continue to work and will be formatted as .
  • 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 for reduce /, group ⊕, and partition ⊜
    • Breaking Change - Reducing group ⊕ and partition ⊜ 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 - Most non-pervasive monadic functions no longer implicitely unbox their argument
    • This impliciteness led to some unexpected behavior, particularly when getting the length ⧻ or shape △ of a boxed array
    • Exceptions are reverse ⇌ and transpose ⍉, which work on box elements without unboxing them
  • 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 number
  • classify ⊛ and deduplicate ◴ now work with under ⍜
  • &fras and &frab now work with under ⍜
  • 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