Live data from Hacker News

Uiua: A minimal stack-based, array-based language

uiua.org

101–107 of 107 posts

Re: Uiua: A minimal stack-based, array-based language

#101

Earlier quoted context omitted.

Hot take: people who don't touch type.

Oh, you can touch type emoji and symbols today. There are all sorts of interesting Input Method Editors (IMEs) for them. Since Windows 10 there's one by default in Windows if you type Win+. or Win+; (whichever you prefer). You can type and it will filter the emoji by name. It's not quite as nice for mathematical symbol entry, but it does include them (on the tab labeled with an Omega) and is still better than many ot…

I meant "brevity at all costs" languages like J and Uiua strike me as the kind of contraptions that people who can't type fast would come up with. I speak from experience. I had a coworker who would write absolutely cryptic code and one day we were working together and I noticed he was typing painfully slow, and then it all clicked.

I'm well aware it's possible to type eg Chinese rapidly, and I use the Windows emoji entry keyboard quite often.

Re: Uiua: A minimal stack-based, array-based language

#102

Earlier quoted context omitted.

Oh, you can touch type emoji and symbols today. There are all sorts of interesting Input Method Editors (IMEs) for them. Since Windows 10 there's one by default in Windows if you type Win+. or Win+; (whichever you prefer). You can type and it will filter the emoji by name. It's not quite as nice for mathematical symbol entry, but it does include them (on the tab labeled with an Omega) and is still better than many ot…

I meant "brevity at all costs" languages like J and Uiua strike me as the kind of contraptions that people who can't type fast would come up with. I speak from experience. I had a coworker who would write absolutely cryptic code and one day we were working together and I noticed he was typing painfully slow, and then it all clicked. I'm well aware it's possible to type eg Chinese rapidly, and I use the Windows emoji…

I see these languages as resembling classic mathematical notation as much or more than I see them as "lazy typist" languages. To be fair, some of classic mathematics notation was designed to be easy to write on blackboards, but that's still very different from being easy to type.

Re: Uiua: A minimal stack-based, array-based language

#103

This is actually pretty neat. But I'm having a hard time understanding how to ergonomically write with glyphs. What's the intended workflow. Remembering a bunch of shortcuts to get ⌕ instead of just typing `find` seems harder to read and write. Edit: I think I understand from the language tour. You're supposed to write the ascii names like `find` then running the program converts built-ins to glyphs.

Why not just use a compiler then? Is a glyph, in the way it is used here, the same as a bytecode?

Re: Uiua: A minimal stack-based, array-based language

#105
post #24

Beautiful. I'm a bit surprised by [1 2 ; .] 3 Producing [1 2 3] Instead of 3 [1 2]

Every function has to pop all its inputs from and push its output to the stack. the duplicate (or .) function pops one input and pushes it twice.

That is a little surprising, but making stack operations special in that they don't need to pop their arguments might be a worse option.

Re: Uiua: A minimal stack-based, array-based language

#106

Earlier quoted context omitted.

That's some dedication! You can indeed get the maximum item in an array with `/↥`. Here is my fizzbuzz solution: ( https://uiua.org/pad?src=fizzbuzz%20%E2%86%90%20%28%0A%20%20... )

Neat solution! Yes, I'm aware of `/↥`, but it finds maximum within a single array of values of the same shape. But what if I have two values of the same shape? E.g. `↥[][1]` throws an error. So I have to either `fill` them to the same shape or use `grade`.

The fact that you embed the entire program in the URL is a hilarious demonstration of its brevity

Re: Uiua: A minimal stack-based, array-based language

#107

This does look quite nice. I always felt that the operator precedence / association rules in other stack languages were by far the most difficult thing to get used to, not the nonstandard symbols. This appears more inviting in that regard. I do have to question the choice of right-to-left (array language) evaluation order. I've personally always preferred left-to-right (stack language) evaluation. I feel like right-t…

> I feel like right-to-left requires you to think to the end of a line before you start typing anything at all

Maybe this will make people tend to shorter lines, counterbalancing the natural tendency towards incomprehensibility of array and stack languages

Post reply on HN