Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uiua-0.9 #29

Merged
merged 7 commits into from
Feb 29, 2024
Merged

Uiua-0.9 #29

merged 7 commits into from
Feb 29, 2024

Conversation

shnarazk
Copy link
Owner

@shnarazk shnarazk commented Feb 29, 2024

  • &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
  • Deprecate &i, as it is no longer necessary
  • Custom modifiers are now called "macros"
  • Add the on ⟜ modifier, which captures a common fork ⊃ pattern in a more readable way(https://uiua.org/docs/un) to separate the first row of an array from the rest
  • Deprecate this ↬ and recur ↫, as they are no longer necessary-
  • eta η, pi π, tau τ and infinity ∞ are now parsed as numbers rather than functions
  • Add the inventory ⍚ modifier, which iterates over the unboxed items of an array and re-boxes the results
  • Change content ◇'s glyph to reflect its relationship with inventory ⍚. Code using will continue to work and will be formatted as .
  • 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 ⊃
  • Add the pool modifier, which is identical to spawn but spawns a thread in a thread pool
  • 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
  • Add the experimental signature modifier, which returns the arguments and output of its function without calling it
  • 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
# Experimental!
1 5 8 2
⊃(+ + -)+_(+_+)
Error: Function strands cannot contain more than two items
  at 3:9
3 | ⊃(+ + -)+_+_+
            ─────
# Experimental!
1 5 8 2
⊃(+ + -)+_(+_+)

16
14
# Experimental!
1 5 8 2
⊃(|4 + + -)+_(|3 +_+)

16
14
  • Add experimental labels, denoted by a $ immediately followed by an identifier, which attach(es) a name to an array.
# Experimental!
$aa[1 5 8 2 1 5 8 2]
$aa

aa: [1 5 8 2 1 5 8 2]
  • Add experimental shapes and types modifiers, which validate the shape and type of an array or arrays
  • Deprecate pop ◌ formatting from ;
  • Deprecate all ⋔
  • Add an experimental repr function that produces a string representation of a value in a format that can be read by the interpreter

@shnarazk shnarazk self-assigned this Feb 29, 2024
@shnarazk shnarazk added the enhancement New feature or request label Feb 29, 2024
@shnarazk shnarazk changed the title modified: flake.lock Uiua-0.9 Feb 29, 2024
@shnarazk shnarazk marked this pull request as ready for review February 29, 2024 06:17
@shnarazk shnarazk merged commit 942e836 into main Feb 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant