diff --git a/Cargo.lock b/Cargo.lock index ff0b5265e..2cc2306ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4077,7 +4077,7 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uiua" -version = "0.13.0-rc.6" +version = "0.13.0" dependencies = [ "arboard", "bitflags 2.5.0", diff --git a/Cargo.toml b/Cargo.toml index c5fc22b5b..2b3c8b5ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ name = "uiua" readme = "readme.md" repository = "https://github.com/uiua-lang/uiua" rust-version = "1.78" -version = "0.13.0-rc.6" +version = "0.13.0" [dependencies] # Core dependencies diff --git a/changelog.md b/changelog.md index b7e9a6e97..4d903642d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,9 +1,10 @@ # Uiua Changelog Uiua is not yet stable. + -## 0.13.0 - 2024-10-?? -This version is not yet released. If you are reading this on the website, then these changes are live here. +## 0.13.0 - 2024-10-21 +You can find the release announcement [here](https://uiua.org/blog/uiua-0.13.0). ### Language - **Breaking Change** - [`minimum ↧`](https://uiua.org/docs/minimum) and [`maximum ↥`](https://uiua.org/docs/maximum) now compare boxes lexicographically - This makes them consistent with comparison functions like [`less than <`](https://uiua.org/docs/less%20than) @@ -23,11 +24,13 @@ This version is not yet released. If you are reading this on the website, then t - Stabilize [`orient ⤸`](https://uiua.org/docs/orient) - Change its glyph to something with broader font support - `⮌` will continue to work and will be formatted as `⤸` -- Stabilize [`below ◡`](https://uiua.org/docs/below) - Add [`anti ⌝`](https://uiua.org/docs/anti) modifier, which simplifies choosing certain inverses + - Add related new [`anti ⌝`](https://uiua.org/docs/anti) inverses for [`drop ↘`](https://uiua.org/docs/drop), [`select ⊏`](https://uiua.org/docs/select), and [`pick ⊡`](https://uiua.org/docs/pick) (though many more already existed) - Add [`obverse ⌅`](https://uiua.org/docs/obverse) modifier, which unifies the specification of inverses - This unifies, replaces, and extends [`setinv`](https://uiua.org/docs/setinv) and [`setund`](https://uiua.org/docs/setund) - Deprecate [`setinv`](https://uiua.org/docs/setinv) and [`setund`](https://uiua.org/docs/setund) +- [`un °`](https://uiua.org/docs/un) [`by ⊸`](https://uiua.org/docs/by) can now be used to access the "undo" part of a function's [`under ⍜`](https://uiua.org/docs/under) functionality +- Stabilize [`below ◡`](https://uiua.org/docs/below) - Rename `⤙ but` and `⤚ with` to [`with ⤙`](https://uiua.org/docs/with) and [`off ⤚`](https://uiua.org/docs/off) - [`with ⤙`](https://uiua.org/docs/with) has been stabilized - "Stack macros" are now called "index macros" @@ -35,15 +38,13 @@ This version is not yet released. If you are reading this on the website, then t - Deprecate existing stack-based macro placeholders (`^!`, `^.`, etc.) - [`assert ⍤`](https://uiua.org/docs/assert) at the beginning of a line is now interpreted as a test in some contexts - See the updated [Testing Tutorial](https://uiua.org/tutorial/testing) for more information -- [`fold ∧`](https://uiua.org/docs/fold) now works with any signature - - Excess values are collected into arrays - [`parse ⋕`](https://uiua.org/docs/parse) now parses complex values from both `arbi`and `a+bi` formats - [`un °`](https://uiua.org/docs/un)[`parse ⋕`](https://uiua.org/docs/parse)'s return value uses the `arbi` format - [`un °`](https://uiua.org/docs/un) [`orient ⤸`](https://uiua.org/docs/orient) is now equivalent to [`range ⇡`](https://uiua.org/docs/range) [`length ⧻`](https://uiua.org/docs/length) [`shape △`](https://uiua.org/docs/shape) [`duplicate .`](https://uiua.org/docs/duplicate) - This is analogous to the behavior of [`un °`](https://uiua.org/docs/un) [`select ⊏`](https://uiua.org/docs/select) - Add a feature to some [`under ⍜`](https://uiua.org/docs/under) functions that makes them more permissive of changes in rank - Applies to [`select ⊏`](https://uiua.org/docs/select), [`keep ▽`](https://uiua.org/docs/keep), [`first ⊢`](https://uiua.org/docs/first), [`first ⊢`](https://uiua.org/docs/first)[`reverse ⇌`](https://uiua.org/docs/reverse) - - If the value that is "put back" can have its rank changes + - The value that is "put back" can have its rank changed - Lower rank arrays get repeated to match the original shape - Higher rank arrays extend the length of the array - [`under ⍜`](https://uiua.org/docs/under) [`un °`](https://uiua.org/docs/un) [`bits ⋯`](https://uiua.org/docs/bits) now preserves a minimum bit length @@ -55,8 +56,6 @@ This version is not yet released. If you are reading this on the website, then t - The behavior is similar to the analogous behavior for [`reduce /`](https://uiua.org/docs/reduce) - Allow [`on ⟜`](https://uiua.org/docs/on) to use function packs - Allow [`under ⍜`](https://uiua.org/docs/under) of scalar [`keep ▽`](https://uiua.org/docs/keep) -- Add [`un °`](https://uiua.org/docs/un) [`on ⟜`](https://uiua.org/docs/on) [`drop ↘`](https://uiua.org/docs/drop), which pads an array -- Add [`un °`](https://uiua.org/docs/un) [`on ⟜`](https://uiua.org/docs/on) [`select ⊏`](https://uiua.org/docs/select) and [`un °`](https://uiua.org/docs/un) [`on ⟜`](https://uiua.org/docs/on) [`pick ⊡`](https://uiua.org/docs/pick) - Add the [`graphemes`](https://uiua.org/docs/graphemes) function, which splits a string into unicode grapheme clusters - Add the [`&fmd`](https://uiua.org/docs/&fmd) system function, which creates a directory - Very large arrays are now displayed more concisely in output @@ -73,6 +72,8 @@ This version is not yet released. If you are reading this on the website, then t - Add `Cats` image constant - Allow [`&raw`](https://uiua.org/docs/&raw) to be inverted, acting as a getter for the raw state of the terminal - [`under ⍜`](https://uiua.org/docs/under)[`&raw`](https://uiua.org/docs/&raw) sets raw mode, and then returns it to the previous state +- Experimentally allow [`fold ∧`](https://uiua.org/docs/fold) to work with any signature + - Excess values are collected into arrays - Add the experimental [`around ’`](https://uiua.org/docs/around) function, which duplicates the top value on the stack to the third-to-top position - Add experimental [`tuples ⧅`](https://uiua.org/docs/tuples) modifier - This unifies and extends the behavior of the `choose` and `permute` functions, which are now deprecated @@ -92,7 +93,7 @@ This version is not yet released. If you are reading this on the website, then t - They also allow a limited form of namable function arguments - The experimental [`struct`](https://uiua.org/docs/struct) modifier/macro has been deprecated in favor of data definitions - Add the experimental [`layout`](https://uiua.org/docs/layout) function, which renders text into an image array -- [`astar`](https://uiua.org/docs/astar) no longer errors in no paths are found +- [`astar`](https://uiua.org/docs/astar) no longer errors if no paths are found - Remove previously deprecated function strands ### Interpreter - Add the `uiua find` command, which finds Uiua code that matches the given unformatted text diff --git a/site/blog/list.txt b/site/blog/list.txt index e1eb1ba6d..d8c6c09fe 100644 --- a/site/blog/list.txt +++ b/site/blog/list.txt @@ -1,3 +1,4 @@ +uiua-0.13.0(666c3590-e42d-4e75-a7bf-1552a098ccd2): 2024-10-21 - Announcing Uiua 0.13.0 uiua-0.12.0(95d63645-10e4-4312-bbe3-f0a6254c0144): 2024-08-16 - Announcing Uiua 0.12.0 uiua-0.11.0(32cba0cb-2378-4cf9-894c-ea65e2a3ffda): 2024-06-02 - Announcing Uiua 0.11.0 uiua-0.10.0(6841da9d-9b35-4992-92b3-0c6820606733): 2024-04-04 - Announcing Uiua 0.10.0 diff --git a/site/blog/uiua-0.12.0-text.md b/site/blog/uiua-0.12.0-text.md index 14d478c11..b761a12d3 100644 --- a/site/blog/uiua-0.12.0-text.md +++ b/site/blog/uiua-0.12.0-text.md @@ -57,15 +57,15 @@ Foo!(G F ×A) [1 2 3] ## [`switch ⨬`]() -Dedicated switch function syntax has been replaced with the [`switch ⨬`]() modifier. +Dedicated switch function syntax has been replaced with the [`switch ⨬`](https://uiua.org/docs/switch) modifier. -In addition, it has been expanded to do an implicit [`rows ≡`](). +In addition, it has been expanded to do an implicit [`rows ≡`](https://uiua.org/docs/rows). ```uiua ⨬(∘|+1|×2) [0 1 2] 5 ``` -Existing `⟨⟩`s will continue to parse and will format to [`switch ⨬`]() with a function pack. +Existing `⟨⟩`s will continue to parse and will format to [`switch ⨬`](https://uiua.org/docs/switch) with a function pack. ## Subscript digits in identifiers @@ -84,13 +84,13 @@ Sha₂₅₆ ← "todo" # Formats to this Several primitive functions have new functionality -[`un °`]() [`shape △`]() now generates a [`range ⇡`]() array with the given shape. +[`un °`](https://uiua.org/docs/un) [`shape △`](https://uiua.org/docs/shape) now generates a [`range ⇡`](https://uiua.org/docs/range) array with the given shape. ```uiua °△ 2_3_4 ``` -[`couple ⊟`]() and [`join ⊂`]() are now more permissive of arguments with different ranks. The array with a smaller rank will be repeated. +[`couple ⊟`](https://uiua.org/docs/couple) and [`join ⊂`](https://uiua.org/docs/join) are now more permissive of arguments with different ranks. The array with a smaller rank will be repeated. ```uiua ⊟ 1_2_3 4 @@ -99,30 +99,30 @@ Several primitive functions have new functionality ⊂ [1_2_3 4_5_6] 7 ``` -[`keep ▽`]() will now cycle the counts array. +[`keep ▽`](https://uiua.org/docs/keep) will now cycle the counts array. ```uiua ▽ 0_1_2 [1 2 3 4 5 6] ``` -[`keep ▽`]() also now allows a scalar non-integer to scale an array. This is useful for image and audio arrays. +[`keep ▽`](https://uiua.org/docs/keep) also now allows a scalar non-integer to scale an array. This is useful for image and audio arrays. ```uiua ▽ 0.5 [1 2 3 4 5 6] ▽ 1.5 [1 2 3 4 5 6] ``` -## [`memberof ∈`]() +## [`memberof ∈`](https://uiua.org/docs/memberof) [`member ∊`]() is now deprecated. It was almost always used along with [`flip :`](). -It has been replaced with [`memberof ∈`](), which has the exact same functionality, except its arguments are flipped. +It has been replaced with [`memberof ∈`](https://uiua.org/docs/memberof), which has the exact same functionality, except its arguments are flipped. ```uiua F ← ∈"abc" F "beefcake" ``` -This makes it work nicely with [`by ⊸`]()! +This makes it work nicely with [`by ⊸`](https://uiua.org/docs/by)! ```uiua ⊜□¬⊸∈ " ," "To be, or not" @@ -138,9 +138,9 @@ You can view to full list of experimental features [here](https://uiua.org/docs/ ### More Stack Modifiers -The [`but ⤙`]() and [`with ⤚`]() modifiers are complements to [`on ⟜`]() and [`by ⊸`](). +The [`with ⤙`](https://uiua.org/docs/with) and [`off ⤚`](https://uiua.org/docs/off) modifiers are complements to [`on ⟜`](https://uiua.org/docs/on) and [`by ⊸`](https://uiua.org/docs/by). -[`but ⤙`]() keeps its function's *last* argument on *top* of the stack while [`with ⤚`]() keeps its function's *first* argument *below* the outputs on the stack. +[`with ⤙`](https://uiua.org/docs/with) keeps its function's *last* argument on *top* of the stack while [`off ⤚`](https://uiua.org/docs/off) keeps its function's *first* argument *below* the outputs on the stack. ```uiua # Experimental! @@ -148,7 +148,7 @@ The [`but ⤙`]() and [`with ⤚`]() modifiers are complements to [`on ⟜`]() a [⤚+ 2 5] ``` -The [`above ◠`]() and [`below ◡`]() modifiers keep *all* of a function's arguments above or below the outputs on the stack. +The [`above ◠`](https://uiua.org/docs/above) and [`below ◡`](https://uiua.org/docs/below) modifiers keep *all* of a function's arguments above or below the outputs on the stack. ```uiua # Experimental! @@ -156,17 +156,17 @@ The [`above ◠`]() and [`below ◡`]() modifiers keep *all* of a function's arg [◡(++) 1 2 3] ``` -[`chunks ⑄`]() is similar to [`windows ◫`]() except the parts of the array do not overlap. +`chunks ⑄` is similar to [`windows ◫`](https://uiua.org/docs/windows) except the parts of the array do not overlap. -```uiua +```old-uiua # Experimental! ⑄ 2_3 °△ 4_9 ≡≡□ ``` -[`orient ⤸`]() transposes an array's axes by moving the axes at the given indices to the front of the [`shape △`](). +[`orient ⤸`](https://uiua.org/docs/orient) transposes an array's axes by moving the axes at the given indices to the front of the [`shape △`](https://uiua.org/docs/shape). -This simplifies complex shape transformations that would otherwise be done with several [`transpose ⍉`]()s and [`rows ≡`]()s. +This simplifies complex shape transformations that would otherwise be done with several [`transpose ⍉`](https://uiua.org/docs/transpose)s and [`rows ≡`](https://uiua.org/docs/rows)s. ```uiua # Experimental! @@ -192,7 +192,8 @@ A few built-in image and audio constants have been added. These are useful for t ```uiua Logo -Lena ▽⟜≡▽ 0.5 # Scales the image down +Lena +▽⟜≡▽ 0.5 Music ``` diff --git a/site/blog/uiua-0.13.0-text.md b/site/blog/uiua-0.13.0-text.md index 534a26754..73eec4241 100644 --- a/site/blog/uiua-0.13.0-text.md +++ b/site/blog/uiua-0.13.0-text.md @@ -1,12 +1,12 @@ # Announcing Uiua 0.13.0 -2024-10-?? +2024-10-21 --- Uiua 0.13.0 is now available! -You can find the full changelog [here](https://uiua.org/docs/changelog#0.13.0---2024-10-??). +You can find the full changelog [here](https://uiua.org/docs/changelog#0.13.0---2024-10-21). Uiua is a general purpose, stack-based, array-oriented programming language with a focus on tacit code. @@ -36,6 +36,20 @@ It allows you set multiple kinds of inverses at once. The [Inverses Tutorial](https://uiua.org/tutorial/inverses) has been updated to include [`anti ⌝`](https://uiua.org/docs/anti) and [`obverse ⌅`](https://uiua.org/docs/obverse). +[`un °`](https://uiua.org/docs/un) [`by ⊸`](https://uiua.org/docs/by) can now be used to access the "undo" part of a function's [`under ⍜`](https://uiua.org/docs/under) functionality. + +This allows for "setter"-type behavior. For example, you can set the [`first ⊢`](https://uiua.org/docs/first) row of an array: + +```uiua +°⊸⊢ 5 [1 2 3 4] +``` + +Or set the magnitude of a complex number: + +```uiua +°⊸⌵ 10 . ℂ3 4 +``` + ## New Stack Manipulation Modifiers The [`with ⤙`](https://uiua.org/docs/with) and [`below ◡`](https://uiua.org/docs/below) modifiers have been stabilized. @@ -63,7 +77,7 @@ The [`with ⤙`](https://uiua.org/docs/with) and [`below ◡`](https://uiua.org/ ```uiua °△3_3_2 -{⊙∘} ⤸1 . +{⊙∘} ⤙⤸1 ``` [`anti ⌝`](https://uiua.org/docs/anti)[`orient ⤸`](https://uiua.org/docs/orient) allows you to combine axes, which is equivalent to taking the diagonal along those axes. @@ -101,6 +115,20 @@ Modules now use fancy delimiters. They format from the existing `---`s. Try it o --- ``` +## Line Manipulation + +The behavior of `;` and `;;` has been changed. + +The main useful change is the formatter will reverse code that is separated by `;`s, so you don't have to press `←` quite as much. + +Try it out: + +```uiua +1 2;+; *10 # Format! +``` + +You can read more about this functionality [here](https://uiua.org/tutorial/codetactility#line-manipulation). + ## New CLI Commands The native interpreter has two new commands: `uiua find` and `uiua doc`. @@ -131,6 +159,7 @@ Subscript numbers may immediately follow a glyph. These can be typed with `__` f ``` ```uiua +# Experimental! ⁅₃ π ``` @@ -182,21 +211,27 @@ Foo~Qux You can read about everything data definitions can do [here](https://uiua.org/docs/experimental#data-definitions). -# Contributors +## Contributors -No previous Uiua release has had so many direct code contributions. +No previous Uiua release has had so many direct code contributions! In particular, I'd like to thank: -- Omnikar for implementing [`un °`](https://uiua.org/docs/un)[`by ⊸`](https://uiua.org/docs/by) -- amatgil for implementing the new behavior for [`gen`](https://uiua.org/docs/gen) and the experimental [`around ’`](https://uiua.org/docs/around) function -- Marcos-cat for implementing [`fill ⬚`](https://uiua.org/docs/fill)ed [`csv`](https://uiua.org/docs/csv), [`memberof ∈`](https://uiua.org/docs/memberof)[`range ⇡`](https://uiua.org/docs/range) optimization, and a more persistent pad virtual filesystem +- [Omnikar](https://github.com/omnikar/) for implementing [`un °`](https://uiua.org/docs/un)[`by ⊸`](https://uiua.org/docs/by) +- [amatgil](https://github.com/amatgil) for implementing the new behavior for [`gen`](https://uiua.org/docs/gen) and the experimental [`around ’`](https://uiua.org/docs/around) function +- [Marcos-cat](https://github.com/Marcos-cat/) for implementing [`fill ⬚`](https://uiua.org/docs/fill)ed [`csv`](https://uiua.org/docs/csv), [`memberof ∈`](https://uiua.org/docs/memberof)[`range ⇡`](https://uiua.org/docs/range) optimization, and a more persistent pad virtual filesystem -Also, check out Omnikar's awesome [`uiua-plot`](https://github.com/omnikar/uiua-plot) library for making plots and graphs in Uiua! +Also, check out [Omnikar](https://github.com/omnikar/)'s awesome [`uiua-plot`](https://github.com/omnikar/uiua-plot) library for making plots and graphs in Uiua! -# 💟 +## 💟 Thanks as always to everyone in the Uiua community, and to Uiua's generous [GitHub Sponsors](https://github.com/sponsors/uiua-lang)! -Again, you can find the full changelog for this release [here](https://uiua.org/docs/changelog#0.12.0---2024-08-16). +Again, you can find the full changelog for this release [here](https://uiua.org/docs/changelog#0.13.0---2024-10-21). + +You can join the [Uiua Discord](https://discord.gg/3r9nrfYhCc) to chat about the language, ask questions, or get help. We also do code challenges and discuss language features! -You can join the [Uiua Discord](https://discord.gg/3r9nrfYhCc) to chat about the language, ask questions, or get help. We also do code challenges and brainstorm language features! \ No newline at end of file +## 🐈‍⬛🐈 + +```uiua +▽⟜≡▽ 0.5 Cats +``` \ No newline at end of file diff --git a/site/src/markdown.rs b/site/src/markdown.rs index ad05310ab..b3cd60fd5 100644 --- a/site/src/markdown.rs +++ b/site/src/markdown.rs @@ -98,7 +98,7 @@ fn node_view<'a>(node: &'a AstNode<'a>) -> View { NodeValue::Code(code) => { let mut inputs = Inputs::default(); let (tokens, errors, _) = uiua::lex(&code.literal, (), &mut inputs); - if errors.is_empty() { + if errors.is_empty() && code.literal != "---" { let mut frags = Vec::new(); for token in tokens { let text = token.span.as_str(&inputs, |s| s.to_string()); diff --git a/site/trunk.toml b/site/trunk.toml index c05551101..647b5e37c 100644 --- a/site/trunk.toml +++ b/site/trunk.toml @@ -4,7 +4,7 @@ no_sri = true public_url = "/" [watch] -watch = [".", "../src", "../pad/editor"] +watch = [".", "../src", "../pad/editor", "../changelog.md"] [serve] address = "0.0.0.0"