top | item 42594848

(no title)

MrEldritch | 1 year ago

I primarily use it as a toy, but it's also come in genuinely handy for me as a scripting language and calculator (but a calculator that also works with strings). The terseness isn't really a code-golf thing; once you're familiar with the glyphs (which are really a fairly well-chosen set of powerful algorithmic primitives) it makes it more straightforward than any conventional language I've worked with to just Implement An Algorithm, with no boilerplate or fluff. Arrays with array broadcasting, combined with Uiua's stack combinators, are just a really flexible and general tool for expressing how data flows through a program, and the glyphs make it possible to (once you're used to them) translate those flows into code very naturally and smoothly.

It's difficult for me to express just how fun Uiua can be to use. It's rather like one of those Zachtronics games - both in that figuring out how to fit your task into the array-programming model can be a bit of a puzzle sometimes, and in that once you've done that it's an extremely quick and non-frustrating process to make it work. The pure essence of what makes programming enjoyable, for better and for worse. There's also just a lot less plumbing and documentation-reading involved; the flexibility and terseness of the glyphs means that a lot of things you might have to call out to a standard library for in other languages you can Just Write because the entire implementation could easily be of length comparable to the name. (There's also a lot less plumbing and documentation-reading involved because there's only, like, four Uiua libraries anyway. Less to plumb together. Like I said, what makes programming enjoyable, for better and for worse.)

(Why Uiua and not, like, APL? I actually find APL enormously more difficult to read, due to the syntax - APL glyphs have two context-dependent readings, depending on whether they're being used as an binary infix or a unary prefix, and figuring out how the parse tree breaks down when squinting at a sea of glyphs is painful. It's like a whole language of garden path sentences. Uiua glyphs have fixed arity and always mean exactly one thing; so there's twice as many glyphs, but parsing by sight-reading is way more straightforward.)

discuss

order

No comments yet.