BQN vs Uiua #3

Sdílet
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

Komentáře • 20

  • @AzureFlash
    @AzureFlash Před 5 měsíci +18

    I love Uiua so much. Comfiness is off the charts. I can't even explain this metric, but it's astronomically high.

    • @zexovz
      @zexovz Před 5 měsíci

      truth spoken

  • @Thwy
    @Thwy Před 5 měsíci +3

    It's great to see how Uiua has evolved since the last video you made of it

  • @TankorSmash
    @TankorSmash Před 5 měsíci

    Thanks for making the video! Looking forward to more Uiua!

  • @thiccbonkus
    @thiccbonkus Před 5 měsíci +3

    "ChunkScan!" could be a band name

  • @maianho6084
    @maianho6084 Před 4 měsíci

    Hey, I like that you make another vidio abount Uiua! The Uiua programing language is update!

  • @ayoubelmhamdi7920
    @ayoubelmhamdi7920 Před 5 měsíci +3

    uiua ❤

  • @frasermorrison5178
    @frasermorrison5178 Před 5 měsíci +3

    Uiua make me go weewah

  • @elnico5623
    @elnico5623 Před 5 měsíci

    very cool

  • @argonwheatbelly637
    @argonwheatbelly637 Před 5 měsíci +1

    Which do you think is ready for commercial-level work? APL is a given, but what about BQN and Uiua? BTW, love the videos!

    • @piraloco5864
      @piraloco5864 Před 29 dny

      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

    • @everythingtube172
      @everythingtube172 Před 6 dny

      The Uiua website is written in Uiua

    • @piraloco5864
      @piraloco5864 Před 6 dny

      @@everythingtube172 pretty sure just the uiua logo is made in uiua no? i could be wrong tho

  • @kryffon
    @kryffon Před 5 měsíci +1

    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]
    ```

    • @batlin
      @batlin Před 5 měsíci +3

      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

    • @batlin
      @batlin Před 5 měsíci

      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

    • @kryffon
      @kryffon Před 5 měsíci +1

      @@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

    • @batlin
      @batlin Před 5 měsíci +1

      @@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.

  • @japedr
    @japedr Před 5 měsíci

    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 :)

  • @miezum2
    @miezum2 Před 4 měsíci

    Chat? Is this the real world?