Application is something that throws off beginners, cause functions are all nouns. `{2+x}*a` is noun verb noun so K applies verb to both nouns. If the k parser sees noun noun , like {2+x}(*a) then it will apply the first noun to the second. Happy to know that you've been enjoying K, hope I helped clarify things. I will add this to the tutorial sometime soon (and maybe add the finishing touches)
Oh awesome, thanks, that makes a lot of sense! One last question: are primitives not considered nouns (at least in this case)? Like *|1 2 3 does what you expect, and doesn't get parsed like |[*;1 2 3]
@@yernab primitives are always verbs (not nouns) until you put them in parens. `*|1 2 3` does what you expect, and (*)|1 2 3 does |[*;1 2 3]. By putting a verb in parens you are basically converting it to a K train, and hence it becomes a noun.
Really nice. I did a bit of playing with APL this week. I'd love to see a video on what you think of the different array language options out there, if you have the interest. I'm not sure which I should focus on.
Recommend just picking one and trying it! Lots of skills carry over and there’s a lot of primitive overlap between them. Dyalog APL and BQN have great documentation (Uiua’s is pretty good too).
You shouldn’t need to transpose the enlist of x at 20:40 to join with y. In recent builds you can join a list of characters in addition to a list of strings. Also enlist each might be a more straightforward way to do what you’ve done here.
I think I might actually give this one a shot. As far as code golf languages go, not using Unicode garbage puts this language toward the top of my list. Including a REPL that I can use locally is also a nice touch. The implementation in C should make it easier to understand so I could add a save feature for the REPL, even if I do have to use `gcc -E`. I do wonder if he wrote this entire project this way by hand or if he used a minifier.
Application is something that throws off beginners, cause functions are all nouns.
`{2+x}*a` is noun verb noun so K applies verb to both nouns.
If the k parser sees noun noun , like {2+x}(*a) then it will apply the first noun to the second.
Happy to know that you've been enjoying K, hope I helped clarify things. I will add this to the tutorial sometime soon (and maybe add the finishing touches)
Oh awesome, thanks, that makes a lot of sense! One last question: are primitives not considered nouns (at least in this case)? Like *|1 2 3 does what you expect, and doesn't get parsed like |[*;1 2 3]
@@yernab primitives are always verbs (not nouns) until you put them in parens.
`*|1 2 3` does what you expect, and (*)|1 2 3 does |[*;1 2 3].
By putting a verb in parens you are basically converting it to a K train, and hence it becomes a noun.
Really nice. I did a bit of playing with APL this week. I'd love to see a video on what you think of the different array language options out there, if you have the interest. I'm not sure which I should focus on.
Recommend just picking one and trying it! Lots of skills carry over and there’s a lot of primitive overlap between them. Dyalog APL and BQN have great documentation (Uiua’s is pretty good too).
You shouldn’t need to transpose the enlist of x at 20:40 to join with y. In recent builds you can join a list of characters in addition to a list of strings. Also enlist each might be a more straightforward way to do what you’ve done here.
Thanks, that's helpful! I think I also figured out @ (apply) isn't necessary for indexing, so that saves a few more chars.
Very nice video!
it can runs on my Termux * - *
🤯
I think I might actually give this one a shot. As far as code golf languages go, not using Unicode garbage puts this language toward the top of my list. Including a REPL that I can use locally is also a nice touch. The implementation in C should make it easier to understand so I could add a save feature for the REPL, even if I do have to use `gcc -E`. I do wonder if he wrote this entire project this way by hand or if he used a minifier.