Live data from Hacker News

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

uiua.org

41–50 of 107 posts

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

#41

Oh hey, I made this. Cool to see it at the top of HN!

It looks unlike anything I've ever seen before. Are there any other languages that use glyphs so heavily? What was your inspiration? I have no idea how I would use this language, but it's put a smile on my face. Amazing work.

Hoon? https://developers.urbit.org/reference/hoon/rune

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

#42
post #41

Earlier quoted context omitted.

It looks unlike anything I've ever seen before. Are there any other languages that use glyphs so heavily? What was your inspiration? I have no idea how I would use this language, but it's put a smile on my face. Amazing work.

Hoon? https://developers.urbit.org/reference/hoon/rune

Love the `?` "wut" for conditionals :)

I shall call all instances of ternary conditionals "wut" statements now.

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

#43
post #26

Earlier quoted context omitted.

If (and I grant, this is a big if ) you are used to them, the symbolic nature of APLs allows to discuss code fragments (and even entire* algorithms) using inline elements instead of as separate interspersed blocks. The difference between scanning algol-style and apl-style code is a little like the difference between scanning history books and maths books: on one hand, one must scan the latter much more slowly (symbol…

APL people often point to the definition of "average" as evidence for its economy of expression: +/÷≢ They make the argument "the word 'average' has more symbols than its definition, so why not just use the definition inline as a tacit function?" There's some elegant beauty in this that I'm sympathetic to. However, I think it's fundamentally flawed for one big reason, which in my opinion is the core of the unreadabil…

But using +/÷≢ to mean average isn't like using AddReduceDivideTally, it's like +/÷≢. With substantial array programming experience I do read this as a single word and pronounce it "average"; why should the fact that each symbol has its own meaning prevent me from processing them as a group? It's purely a benefit in that I can (more slowly) recognize something like +/÷⊢/⍤≢ as a variant of average, in this case to average each row of an array.

My opinion on the overall question, which I've written about at [0], is that it's very widely acknowledged that both symbols and words are useful in programming. This is why languages from PHP to Coq to PL/I all have built-in symbols for arithmetic, and usually a few other things, and built-in and user-defined words. The APL family adds symbols for array operations, and often function manipulation. Perhaps not for everyone, but, well, it's kind of weird to see a proof that a language I use to understand algorithms more deeply couldn't possibly do this!

[0] https://mlochbaum.github.io/BQN/commentary/primitive.html

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

#46
Well this is neat. In an odd way it reminds me of how Assembly uses short commands, but instead of 1-4 letter cmdlets it's just symbols, but with many more arrays. It makes for a visually interesting codebase.

The thing that stands out the most to me is how the language itself functions as a work of art.

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

#47
post #6
post #4

My recent exposure to array programming languages came via a podcast called The Array Cast[1] Not affiliated, just recommending. The regular co-hosts appear to each be experienced with various array languages such as J, APL, etc. They don't get deeply technical, but it's a nice introduction, especially on explaining the appeal. A recent episode had Rob Pike (UTF-8, Go, etc.) on to talk about his array based calculato…

Can array languages be used as general purpose languages in any practical way? Or are they really only strong as calculators?

array languages are used by several companies for their work. K for example is pretty popular in fintech. Some present companies provide services for array languages as well.

https://www.dyalog.com/case-studies/index.htm https://github.com/interregna/arraylanguage-companies

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

#48

Oh hey, I made this. Cool to see it at the top of HN!

I want to suggest an alternative encoding/notation where instead of single (very nicely chosen) Unicode codepoints, the operators are single (perhaps less well-suited) printable ASCII characters. This would make the language into its own, human-authorable, bytecode!

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

#49

I'm a big fan of stack-based languages conceptually, but they always seem to fall flat when it comes to basic reading comprehension. APL has the same issue, as does J. Factor did improve on this a little bit by eschewing the symbol fetish but it was still very difficult to rapidly scan the code for functionality. I'm not convinced the approach shown here is a good pairing with the human brain.

I'm always wondering what kind of people prefer this syntax to more classical syntax

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

#50
post #20

Earlier quoted context omitted.

I wonder if someone made a language where color matters...

Not sure if a joke referencing ColorForth. If not, ColorForth.[1] 1: https://en.m.wikipedia.org/wiki/ColorForth

It was. Congrats _o/
Post reply on HN