Uiua! A New Array Language!
Вставка
- Опубліковано 28 чер 2024
- Introducing Uiua! A new stack-oriented array language. This video briefly introduces the language by solving a simple PWC Problem.
Uiua: www.uiua.org/
UiuaPad (with DupZeroes): uiua.org/pad?src=DupZeroes%20...
Previous UA-cam Video: • Python vs BQN (1 Problem)
ArrayCast: www.arraycast.com/
ArrayCast Uiua Episode: www.arraycast.com/episodes/ep...
Perl Weekly Challenge 235: theweeklychallenge.org/blog/p...
Chapters:
0:00 Intro
0:40 Problem Description
1:32 Uiua Solution
3:27 Outro
Follow me on Github: github.com/codereport
Follow me on Twitter: / code_report
Follow me on LinkedIn: / codereport - Наука та технологія
"I'm an experienced dev, once you learn one language you can kinda read them all" Well now I stand corrected
What about this is difficult? It's combinatory logic with a stack
@@user-tx4wj7qk4tidk if ur joking, but most people don’t read, write, or think in computational symbolic notation.
@@user-tx4wj7qk4t Most cs curricula discrete math only covers propositional and first order (really just quantifiers, no mention of models). logics. combonatory logic is not commonly taught.
Reminds me of another language I toyed with that I thought was neat, Factor. I like the idea of programming with a stack (reminds me of the modern Magic: The Gathering spellcasting rules!) and combining stacks with array-style programming seems super interesting! Definitely going to keep an eye on this one
I've never used an array language for anything other than toy problems (depending on what you call an array language i guess, I've used languges that have built-in array syntax, like matlab for real problems) and I've never seen one used for anything other than toy problems. A video about using an array language to write a program that is useful in more than a one-off data processing situation would be awesome.
Was going to make a similar comment. I think I made one on another array-language video recently too.
I personally consider matlab, R, Julia, etc. to be array languages (fwiw Wikipedia lists them as such in its article on array programming). As a mathematical modeller, arrays (frequently multidimensional ones) are a ubiquitous part of my life, and there's a huge difference programming in a language that properly supports arrays vs one that either doesn't, or sort of grudgingly acknowledges they exist without giving you much in the way to work with them.
That said, seeing what you can do with something like the languages Connor is discussing really can give you ideas for how to approach problems in more... mundane languages!
@@spacelem but you see, R/Matlab/Julia are _readable_ languages
so they aren't what we want to see "used outside toy programs"
@@NoNameAtAll2I would love to see Iverson like languages used for huge projects too, but the biggest example I've seen is Co-dfns, which is a compiler for an APL dialect.
@@spacelemuiua is an interpreted language written in see. I'd like to see how it's performance would differ in Julia. I'd think it would still be limited to linear algebra and databases, if it has any utility.
Very cool to see it in action, read its website a couple months ago but didn't play around. Its cool to see it run
The stack is pretty satisfying. Can't wait to hear the episode.
Wawa Uiua😂 very cool language. Thanks for sharing
I had the idea to make a stack-oriented array language as well! Super cool to see it being done here as well. I find it interesting that the order of operations is right to left. My original idea came out of the fact that I thought that infix operators worked well for pen and paper but not so well for computer text input. Either way, the language looks very nice and I love how it visualizes the whole stack.
PLEASE MAKE MORE VIDEOS ABOUT THIS LANGUAGE, IT'S THE YOUNGER SIBLING OF ALL IVERSONIAN LANGUAGES
I'm definitely planning on making more : ) Definitely some BQN vs Uiua ones
Pwo I love the glyph's, super funky and fun! And I love the multimedia output! Looks like such a cool language
Cool, and nice REPL UI.
Maybe add a link to the online REPL pre-populated with your solution and input data?
Done! Thanks for the idea
It would be great to see code formatted from bottom to top instead of right to left to better visualize stackness of the language :D
how about you visualise the stack itself as horizontally?
Waiting for Uiua episode on Array Cast!
dupZeros xs = zipWith const (xs >>= \case 0 -> [0,0]; x -> [x]) xs
Not as concise and quite different algorithm, but the zipWith const trick is always a fun one. I didn’t try running it through pointfree, it felt concise enough. When’re we getting a video on Haskell’s recursion-schemes package? Very relevant to some of the stuff you were doing on the podcast a while ago.
could also do dupeZeroes = (>>= \x -> if x == 0 then [0, 0] else return x)
a monad is a monoid in the category of endofunctors
pretty good stuff
It would be cool to see Conway's Game of Life in Uiua
I think it's time re-write some nuclear plants software in Uiua
Wow, Uiua!
- Borat
Are languages that use the full ascii symbol set really necessary?
Unicode is far superior to ASCII.
It appears that you basically have Forth, but it’s been gussied up with Unicode glyphs … that you look up using ascii strings. I’m unclear on the advantages.
Do you think it is practical by any means?
Do you plan to show graphical applications with those arrays languages ?
Something simple like pong for instance
I was just chatting with Kai (the author) about how I would like to live stream porting my Scrabble game (written in Python) to BQN and Uiua to see how feasible/hard/easy it is
@@code_report That sounds cool !
If you do make a video about it someday, I hope you're going to explain step by step how it works because I've just checked the code of your game and, maybe it's because I've never played Scrabble in my life, but I find it hard to wrap my head around it. :p
@@benjamindeharo314 Yea, that's fair. I definitely will break it down step by step. The code is pretty bad as I hacked it together. Certain pieces are pretty nice but holistically it is a mess : )
I am starting to make those kinds of videos in BQN :). I have a very sloppy one online now on astroids (partly), and the next one will be on a Snake 2 clone. Disclaimer tho, I am a beginner in the language.
@@davidzwitser And you're using Raylib on top of that, my favorite library :D
I'll check you're content for sure, thanks man
Minions with a siren on their head going Uiua Uiua
is this even Turing complete?
These hieroglyph array languages look fun, elegant and intriguing. But can they be really better for larger, concrete projects in practice? Are they good for optimization? For maintainability? For avoiding bugs? For debugging?
Is anyone seriously using them for anything of the sort?
I barely know anything, but I'm asking because they could have potential. I imagine that it can be a good idea to make the program text bipartitioned into blocks that are of one kind or another, one being minimal compact hieroglyph code that just does the job, and the other being comments explaining in plain english what is being done. Kinda like a combination of the best of each extreme.
There are production companies using APL for various things especially financial applications. But it's not like it's all that common
i wonder why is the language designed to be right-to-left instead of left-to-right which is how stack language usually are
Are these Unicode characters?
Why do i need to work with zeros? Zero sum game.
wow i didn't understand this at all lol
Watch it a few times and you will.
@@TheReferrer72I still don't understand it and now I have Stockholm Syndrome as well.
Yeah. I didn’t even know that an array language was a thing 💀💀💀
This is probably the first of his videos I understand
Don't worry. You'll probably never have to.
Make it reverse polish and it might keep
Fantastic Lang! But this lang paradigm Is efficient?
2:52
WHY does it do the thing you want? What part of "keep" means "make the elements in array_1 appear array_2 times"? In all of your array language videos I understand very superficially what the steps are about half of the time, but I almost never understand why the language knows what part of the expression is a function's arguments. I think I have to do some research because although it's cool, I really don't get the appeal of using unserviceable code.
Neat. Sorry you always have to deal with so many comments that don't understand the fun 😔
It's fun like Mindfuck and Obfuscated C contests are fun.
More like reversed stack?
how did we get here
This is a joke esoteric language, right? Why on earth would you want to replace perfectly readable keywords with cryptic symbols unless the whole point is to make something incomprehensible?
Assembly code is much more readable than this, because at least assembly contains letters and numbers that works as mnemonics.
Also, these symbols are not only cryptic, which I guess you could get used to if you really want to memorise them, but they're also super tiny; I thought my 20px font size preference in my shell was rather large, but to be able to tell these tiny squiggles apart; I'd need it to be 35px or more (and then all the actual letters in names and stuff would be gigantic, so you don't really save much screen space anyway)
you can think of array languages as if actual Mathematicians made a programming language
and it's not the only one, APL exists since the 70s, there's also BQN, J, among others
epic transgender symbol located
what too much identity politics do to a mf
This world already has the language "forth" and "APL". Why do you need another esoteric language? Well, perhaps as a toy, nothing more.
write once, read never
Why the hell is it right-to-left that's so counterintuitive
That is the standard for most array languages. Avoids unnecessary plumbing.
What you're gonna love is that in the case where symbols are bound together, the precedence is left-to-right.
So it's read/parsed LTR but executed RTL
its just the right-to-left associativity of function application.
f(g(h(x))) means you do h first, g second and f last (hence right to left)
It's still backwards. What a silly thing to do with a fresh, new language.
uiua is a weird name for a language.
In what domain does this kind of language shine? This looks absolutely obtuse and terrible to me lol
I have a feeling that being useless and obtuse is the whole point.
uhh puzzle games
The K language is used a lot in industry, especially finance. Apparently it's incredibly fast (it's proprietary though, and pretty expensive from what I hear).
Bit late for April fools day, mate
Completely missing the point that programming languages are not made for computers to use, but for human beings to use.
Fun! But impractical at best, useless at worst.
The name of the language is not particularly good.
Most useless and un readable lnaguage genre doesn't exi-
Ūiūa? Ī haf’ a t’rēm d’at mī for litl cilt’ren ūil ūon t’ā lif’ in a nājun ūer d’ā ūil not p’ē c’uc’t’ p’ī d’ē kolor of’ d’er skin, p’ut p’ī d’ē kontent of’ d’er karaktur.
what language is this?
@@tempo_808 Iglij
@@tempo_808It's English. It's part of MLK's famous speech