Congratulations Mr. Hoekstra on your recent engagement! All the best from a fellow Canadian! P.S. As a life-long Hamiltonian, I still haven't forgotten the dig (however true it may be) you made at my home town on ADSP! 😠
@opposite3423 ай бұрын
I can't really wrap my head well with n-trains stuffs, so Uiua being a stack language really aids readability for me (also makes me prefer it the most).
@TankorSmash3 ай бұрын
Yeah I'm the same way with trains, it's really hard for me to parse. Uiua I'm struggling with refactoring any small file due to how it stops you from 'compiling' when types don't line up. You can't see what the output would be, so you just have to pop and duplicate stuff until it compiles. Uiua is great but that flow is killing it for me otherwise.
@THB1923 ай бұрын
Trains confused me in J but they make a lot more sense in BQN because they didn't screw up the combinators so the rules were actually very consistent. Whereas in J the entire meaning of the train changes depending on if it has an even or odd number of functions in it and you end up having to cap the end of trains a lot more as a consequence.
@matwadoesgames3 ай бұрын
As a beginner to intermediate "classic" language programmer, its astonishing how you all talk abt your combinators and n trains like it were simple stuff? How do i learn this?
@elnico56239 күн бұрын
I've been using uiua for about a year now and bqn for little over half that, and trains are still kinda mystifying to parse but genuinely not hard of a concept at all
@lokedhs3 ай бұрын
A small note: Kap does support structural under for monadic take. However, it uses the up arrow for this (since the language itself started with the APL2 syntax and not Dyalog). That said, it still wouldn't work since monadic take returns the first element and not the first row. That's the reason you need to use the dyadic version with the left argument being a 1
@CrazyMan42DABOMB3 ай бұрын
happy to see more Kap on the channel!! what a cool language
@CrazyMan42DABOMB3 ай бұрын
also, I would totally love to see some problems that showcase Kap's laziness semantics a little bit more
@jacoblockwood40343 ай бұрын
The second Uiua solution can be one character shorter by writing +⇌°⊟ (add reverse uncouple) instead of /+⍜⊢⇌ (reduce add under first reverse). I do like the under way but I think uncouple is a bit more idiomatic for this case with an array of two rows.
3 ай бұрын
I guess the nicest thing would be if there were min and max functions to get the min and max value respectively and create some kind of recursively defined function that always pops these two elements until the array is empty and at the same time construct a list of averages.
@misterpopo37363 ай бұрын
Love how KZbin reccomends the same videos to me. I was confused for a sec edit: Kap has traditional if/else statements? I stll miss these
@lokedhs3 ай бұрын
Yes, it does. They have the same syntax as C or Java. The justification for this syntax is explained in more detail in the otger video. It's also worth highlighting that if is an expression and not a statement, so it returns a value that can be used in an expression (this is similar to Kotlin)
@LukasSmith8273 ай бұрын
🧢
@zcubesdemoes21912 ай бұрын
a=[7, 8, 3, 4, 15, 13, 4, 1]; MIN((a⋰).nth(1..(a#/2),1,true).$$(AVG)) // result 5.5 // z^3 code. // a⋰ - a ascending // a# - length of array // .nth(nth, count, bothsides). here nth is from 1 to (a#/2) // count is 1, for each n // bothsides - extracts elements from both sides of the array, here min and max of the sorted array // .$$ applies AVG function to each row, and each row here contains min and max for the nth extract // if count is provided as an array for more interesting computation // .$$ can be given a array of functions such as AVG, SUM, and more.