Skip to content

Commit

Permalink
change media encoding names and prepare 0.12.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikalii committed Aug 17, 2024
1 parent 739d8ae commit b565993
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name = "uiua"
readme = "readme.md"
repository = "https://github.com/uiua-lang/uiua"
rust-version = "1.78"
version = "0.12.2"
version = "0.12.3"

[dependencies]
# Core dependencies
Expand Down
17 changes: 11 additions & 6 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Uiua is not yet stable.
<!-- This version is not yet released. If you are reading this on the website, then these changes are live here. -->

## 0.12.3 - 2024-08-17
### Language
- Rename `imen`, `gifen`, and `auden` to [`img`](https://uiua.org/docs/img), [`gif`](https://uiua.org/docs/gif), and [`audio`](https://uiua.org/docs/audio) to match the naming convention of other functions
- The existing names will continue to work and will be formatted to the new names

## 0.12.2 - 2024-08-16
### Interpreter
- Fix a bug in formatting `¯0`
Expand All @@ -18,7 +23,7 @@ You can find the release announcement [here](https://uiua.org/blog/uiua-0.12.0).
- **Breaking Change** - [`&runs`](https://uiua.org/docs/&runs) now returns 3 handles rather than 1
- This gives more precise control over stdin, stdout, and stderr
- **Breaking Change** - [`un °`](https://uiua.org/docs/un) [`select ⊏`](https://uiua.org/docs/select) is now equivalent to [`range ⇡`](https://uiua.org/docs/range) [`length ⧻`](https://uiua.org/docs/length) [`duplicate .`](https://uiua.org/docs/duplicate)
- **Breaking Change** - [`auden`](https://uiua.org/docs/auden) now takes a sample rate argument, and [`un °`](https://uiua.org/docs/un)[`auden`](https://uiua.org/docs/auden) now returns the sample rate
- **Breaking Change** - [`auden`](https://uiua.org/docs/audio) now takes a sample rate argument, and [`un °`](https://uiua.org/docs/un)[`auden`](https://uiua.org/docs/audio) now returns the sample rate
- This allows you to work with audio that is not at Uiua's default sample rate
- **Breaking Change** - [`fill ⬚`](https://uiua.org/docs/fill) no longer fills the shapes of inputs to [`rows ≡`](https://uiua.org/docs/rows)
- It could leader to some unexpected behavior when trying to fill the shapes of outputs
Expand All @@ -29,7 +34,7 @@ You can find the release announcement [here](https://uiua.org/blog/uiua-0.12.0).
- [`member ∊`](https://uiua.org/docs/member) almost always required flipping the arguments
- [`memberof ∈`](https://uiua.org/docs/memberof) is the same, but with the arguments flipped
- In the future, [`member ∊`](https://uiua.org/docs/member) will be removed, and [`memberof ∈`](https://uiua.org/docs/memberof)'s glyph will be changed and format to ``
- Rename media en/decoding system functions `&ime`, `&gife`, and `&ae` to non-system functions [`imen`](https://uiua.org/docs/imen), [`gifen`](https://uiua.org/docs/gifen), and [`auden`](https://uiua.org/docs/auden)
- Rename media en/decoding system functions `&ime`, `&gife`, and `&ae` to non-system functions [`imen`](https://uiua.org/docs/img), [`gifen`](https://uiua.org/docs/gif), and [`auden`](https://uiua.org/docs/audio)
- Their implementation is not actually system-dependent
- Existing `&*e` will format to the new names
- The previously deprecated `&*d` decoding functions have been removed (use [`un °`](https://uiua.org/docs/un) on the encoding function)
Expand Down Expand Up @@ -173,7 +178,7 @@ You can find the release announcement [here](https://uiua.org/blog/uiua-0.11.0).
- [`&tlsc`](https://uiua.org/docs/&tlsc) replaces [`&httpsw`](https://uiua.org/docs/&httpsw), which is now deprecated
- [`&tlsl`](https://uiua.org/docs/&tlsl) is currently experimental and mostly untested
- [`&rs`](https://uiua.org/docs/&rs) will now attempt to read additional bytes to resolve a UTF-8 character
- [`&gife`](https://uiua.org/docs/gifen) and [`&gifs`](https://uiua.org/docs/&gifs) now support binary transparency
- [`&gife`](https://uiua.org/docs/gif) and [`&gifs`](https://uiua.org/docs/&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 ``
Expand Down Expand Up @@ -376,7 +381,7 @@ You can find the release announcement [here](https://uiua.org/blog/uiua-0.10.0).
- **Breaking Change** - [`reshape ↯`](https://uiua.org/docs/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 ∞`](https://uiua.org/docs/infinity)
- **Breaking Change** - [`&ad`](https://uiua.org/docs/&ad) and [`&imd`](https://uiua.org/docs/&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 °`](https://uiua.org/docs/un) with [`&ae`](https://uiua.org/docs/auden) or [`&ime`](https://uiua.org/docs/imen)
- They are also now deprecated in favor of using [`un °`](https://uiua.org/docs/un) with [`&ae`](https://uiua.org/docs/audio) or [`&ime`](https://uiua.org/docs/img)
- Overhaul the module system
- Details can be found in the updated [Modules](https://uiua.org/tutorial/modules) tutorial
- Deprecate [`&i`](https://uiua.org/docs/&i), as it is no longer necessary
Expand Down Expand Up @@ -492,7 +497,7 @@ You can find the release announcement [here](https://uiua.org/blog/uiua-0.10.0).
- 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`](https://uiua.org/docs/imen) and [`&imd`](https://uiua.org/docs/&imd) now support the QOI image format
- [`&ime`](https://uiua.org/docs/img) and [`&imd`](https://uiua.org/docs/&imd) now support the QOI image format
- Lots of bug and crash fixes
### Website
- Add a new tutorial: [Thinking With Arrays](https://uiua.org/tutorial/thinkingwitharrays)
Expand Down Expand Up @@ -834,7 +839,7 @@ You can find the release announcement [here](https://uiua.org/blog/uiua-0.10.0).

## 0.0.17 - 2023-10-07
### Language
- Add GIF encoding with [`&gife`](https://uiua.org/docs/gifen)
- Add GIF encoding with [`&gife`](https://uiua.org/docs/gif)
- Rename `constant` to [`box □`](https://uiua.org/docs/box).
- Add `unbox ⊔`, which unboxes a boxed array
- **Major Change:** Some uses of `call !` will no longer compile without declaring a stack signature. When unboxing [`box □`](https://uiua.org/docs/box)ed arrays, you can use `unbox ⊔` instead, which has a well-defined signature.
Expand Down
2 changes: 1 addition & 1 deletion examples/n-body.ua
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ Step ← (
⬚0≡(°⊚) # Plot
≡(⍜(☇2)≡(/↥/↥) ◫3_3) # Upscale

&fwa "n-body.gif" gifen 16
&fwa "n-body.gif" gif 16
&p "Wrote gif to n-body.gif"
6 changes: 3 additions & 3 deletions site/primitives.json
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
"class": "DyadicPervasive",
"description": "Take the arctangent of two numbers"
},
"auden": {
"audio": {
"args": 3,
"outputs": 1,
"class": "Encoding",
Expand Down Expand Up @@ -679,7 +679,7 @@
"class": "Map",
"description": "Get the value corresponding to a key in a map array"
},
"gifen": {
"gif": {
"args": 2,
"outputs": 1,
"class": "Encoding",
Expand Down Expand Up @@ -721,7 +721,7 @@
"class": "Planet",
"description": "Do nothing with one value"
},
"imen": {
"img": {
"args": 2,
"outputs": 1,
"class": "Encoding",
Expand Down
16 changes: 8 additions & 8 deletions src/primitive/defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2896,22 +2896,22 @@ primitive!(
/// A length 3 last axis is an RGB image.
/// A length 4 last axis is an RGB image with an alpha channel.
///
/// You can decode a byte array into an image with [un][imen].
/// You can decode a byte array into an image with [un][img].
///
/// Supported formats are `jpg`, `png`, `bmp`, `gif`, `ico`, and `qoi`.
///
/// See also: [&ims]
(2, ImageEncode, Encoding, "imen"),
(2, ImageEncode, Encoding, "img"),
/// Encode a gif into a byte array
///
/// The first argument is a framerate in seconds.
/// The second argument is the gif data and must be a rank 3 or 4 numeric array.
/// The rows of the array are the frames of the gif, and their format must conform to that of [imen].
/// The rows of the array are the frames of the gif, and their format must conform to that of [img].
///
/// You can decode a byte array into a gif with [un][gifen].
/// You can decode a byte array into a gif with [un][gif].
///
/// See also: [&gifs]
(2, GifEncode, Encoding, "gifen"),
(2, GifEncode, Encoding, "gif"),
/// Encode audio into a byte array
///
/// The first argument is the format, the second is the audio sample rate, and the third is the audio samples.
Expand All @@ -2926,16 +2926,16 @@ primitive!(
/// The samples must be between -1 and 1.
/// The sample rate is [&asr].
///
/// You can decode a byte array into audio with [un][auden].
/// You can decode a byte array into audio with [un][audio].
/// This returns the audio format as a string, the audio sample rate, and an array representing the audio samples.
///
/// Currently, only the `wav` format is supported.
///
/// This simple example will load an audio file, halve its sample rate, and re-encode it.
/// ex: ⍜(°auden &frab "test.wav")⊙⊓(⌊÷2|▽0.5)
/// ex: ⍜(°audio &frab "test.wav")⊙⊓(⌊÷2|▽0.5)
///
/// See also: [&ap]
(3, AudioEncode, Encoding, "auden"),
(3, AudioEncode, Encoding, "audio"),
);

macro_rules! impl_primitive {
Expand Down
6 changes: 3 additions & 3 deletions src/primitive/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,9 @@ impl Primitive {
"dup" => return Some(Primitive::Dup),
"utf" | "utf__8" => return Some(Primitive::Utf8),
"chunk" => return Some(Primitive::Chunks),
"&ime" => return Some(Primitive::ImageEncode),
"&gife" => return Some(Primitive::GifEncode),
"&ae" => return Some(Primitive::AudioEncode),
"&ime" | "imen" => return Some(Primitive::ImageEncode),
"&gife" | "gifen" => return Some(Primitive::GifEncode),
"&ae" | "auden" => return Some(Primitive::AudioEncode),
_ => {}
}
if let Some(prim) = Primitive::non_deprecated().find(|p| p.name() == name) {
Expand Down
8 changes: 4 additions & 4 deletions src/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,15 @@ sys_op! {
/// A length 3 last axis is an RGB image.
/// A length 4 last axis is an RGB image with an alpha channel.
///
/// See also: [imen]
/// See also: [img]
(1(0), ImShow, Media, "&ims", "image - show", Mutating),
/// Show a gif
///
/// The first argument is a framerate in seconds.
/// The second argument is the gif data and must be a rank 3 or 4 numeric array.
/// The rows of the array are the frames of the gif, and their format must conform to that of [imen].
/// The rows of the array are the frames of the gif, and their format must conform to that of [img].
///
/// See also: [gifen]
/// See also: [gif]
(2(0), GifShow, Media, "&gifs", "gif - show", Mutating),
/// Play some audio
///
Expand All @@ -392,7 +392,7 @@ sys_op! {
/// The samples must be between -1 and 1.
/// The sample rate is [&asr].
///
/// See also: [auden]
/// See also: [audio]
(1(0), AudioPlay, Media, "&ap", "audio - play", Mutating),
/// Get the sample rate of the audio output backend
///
Expand Down
2 changes: 1 addition & 1 deletion tests/under.ua
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
⍤⟜≍: {6 5} [⍜∩°□:□5 □6]
⍤⟜≍: [9 9 5] ⍜⊡(⍜∩×↥,) 2 [⍥9]3 ¯1 5
⍤⟜≍: [3 2] ⍜∩▽◌⟜: [1 0] [1 2] [3 4]
⍤⟜≍: 0 ⧻ {⍜(∩(|1 ◌ °imen &frab))∩∘ ."site/favicon.ico"}
⍤⟜≍: 0 ⧻ {⍜(∩(|1 ◌ °img &frab))∩∘ ."site/favicon.ico"}
⍤⟜≍: [.4] [⍜∩(◌setinv(⊓⌊⌈.÷2|+)): 3 5]

# On
Expand Down

0 comments on commit b565993

Please sign in to comment.