BQN vs Uiua #3
Vložit
- čas přidán 27. 06. 2024
- A video comparing the BQN and Uiua programming languages on the implementation of a simple algorithm called ChunkScan.
Livestream Exploration (Timestamped): • Coding (and Playing) S...
Previous CZcams Video (BQN vs C++): • BQN vs C++
BQN: mlochbaum.github.io/BQN/
Uiua: www.uiua.org/
Chapters:
0:00 Intro
1:26 BQN Solution (Recap)
2:37 Uiua Solution
5:11 Outro
Follow me on Github: github.com/codereport
Follow me on Twitter: / code_report
Follow me on LinkedIn: / codereport - Věda a technologie
I love Uiua so much. Comfiness is off the charts. I can't even explain this metric, but it's astronomically high.
truth spoken
It's great to see how Uiua has evolved since the last video you made of it
Thanks for making the video! Looking forward to more Uiua!
"ChunkScan!" could be a band name
Hey, I like that you make another vidio abount Uiua! The Uiua programing language is update!
uiua ❤
Uiua make me go weewah
very cool
Which do you think is ready for commercial-level work? APL is a given, but what about BQN and Uiua? BTW, love the videos!
This also kinda annoyed me, i love array languages but most of them just seem like interactive demos and not really something for the real world. i am developing a new language tho, hope that goes well
The Uiua website is written in Uiua
@@everythingtube172 pretty sure just the uiua logo is made in uiua no? i could be wrong tho
How would i do something like this rust code in languages like APL, UIUA, etc??
```rust
let a = [1, 2, 3, 4, 5, 6];
let b: Vec = a.iter().enumerate()
.scan(0, |state, (i, &x)| {
*state = x + (*state) * ((i % 3 != 0) as i32);
Some(*state)
})
.collect(); // output: [1, 3, 6, 4, 9, 15]
```
I'm not sure exactly what you're looking for, since that's just ChunkScan again. But here's a reasonably direct translation of your code into K (an ASCII-based descendant of APL, like J but mostly used in financial systems):
{y+x*0
Despite not knowing BQN, I was able pretty much literally translate the K version. I think it helps that both languages do a left-to-right scan whereas APL seems to be right-to-left. Note that both versions have the 𝕩 term twice, so there's probably a way to factor it out.
{𝕩+𝕨×0
@@batlin You are right. This is ChunkScan again. In the video, reshape/deshape is used which. I was thinking if it is possible to do it without reshaping in just one pass.(i am not a regular APL,etc user 😢but i really do enjoy these videos 🙂 , so maybe my way of thinking is still very imperative, but i have watched enough to slowly be able to understand the joy of it)
In order to use any input array x in this ChunkScan, i think we can do is take its length, create a range 0..len(x), then zip it to get index for each element
@@kryffon yeah that sounds right. Same here, just starting to figure out the basics of the "APL way", so these videos are great for that. APL Quest is good as well, but I find these cross-language comparisons super helpful.
3:34 well I guess there's also the fact that the reshape symbol looks like a quarter rest (silenced "note") and is also similar to an upside down rho which is APLs reshape, but maybe my ideas are too far-fetched :)
Chat? Is this the real world?