nah its pretty straightforward w/ higher order fns. one of many possible solutions: {(1○⍺)>2○⍵} {(⍹ ⍵)/⍨⍵ ⍶ ⍹ ⍵} {⍵*2} {⍵/⍨2|⍵}⍳50 1 9 49 225 361 441 625 1089 1521 1681 2025 2209
rewritten apl version w/ lambdas and commute (vs assignment & parens): {⍵/⍨⍵<50}{2*⍨⍵/⍨1=2|⍵}⍳10 1 9 25 49 About as short as I can make it, and while its longer than the pandas solution, the primitives are significantly…
it indeed becomes much easier to understand after ~ a year. this thread included some discussion about making APL-family languages easier to read for novices: https://news.ycombinator.com/item?id=20728715 I'm of the…
its a golfed example to show that its possible to use APL as a cli tool. I would not put any code into production that looks like this. Generally it would go into a library. APL has an initially steep learning curve,…
I admit, GNU APL gets sluggish when dealing with values with more than ~100k elements. For most ad-hoc work it is satisfactory and can let you sketch out ideas before attempting to push the performance characteristics.
dyalog has a few more operators. for example @ & ⍠. It lets you use statement separators in lambdas. In gnu apl you can simulate that with '⊣'. It allows multiline lambdas. Dyalog uses ⍺⍺ & ⍵⍵ for operators vs ⍶ & ⍹.…
I tend to agree with your broader points. In my personal life I often reach for APL to do ad-hoc data analysis. It has grown on me in the last year and has fundamentally changed how I perceive and write code. However, I…
gnu apl is an often overlooked but extremely solid APL implementation that plays nice w/ unix. slightly verbose example but heres gnu apl as a pipe-like interface. Often this would be abstracted to a library that gets…
nah its pretty straightforward w/ higher order fns. one of many possible solutions: {(1○⍺)>2○⍵} {(⍹ ⍵)/⍨⍵ ⍶ ⍹ ⍵} {⍵*2} {⍵/⍨2|⍵}⍳50 1 9 49 225 361 441 625 1089 1521 1681 2025 2209
rewritten apl version w/ lambdas and commute (vs assignment & parens): {⍵/⍨⍵<50}{2*⍨⍵/⍨1=2|⍵}⍳10 1 9 25 49 About as short as I can make it, and while its longer than the pandas solution, the primitives are significantly…
it indeed becomes much easier to understand after ~ a year. this thread included some discussion about making APL-family languages easier to read for novices: https://news.ycombinator.com/item?id=20728715 I'm of the…
its a golfed example to show that its possible to use APL as a cli tool. I would not put any code into production that looks like this. Generally it would go into a library. APL has an initially steep learning curve,…
I admit, GNU APL gets sluggish when dealing with values with more than ~100k elements. For most ad-hoc work it is satisfactory and can let you sketch out ideas before attempting to push the performance characteristics.
dyalog has a few more operators. for example @ & ⍠. It lets you use statement separators in lambdas. In gnu apl you can simulate that with '⊣'. It allows multiline lambdas. Dyalog uses ⍺⍺ & ⍵⍵ for operators vs ⍶ & ⍹.…
I tend to agree with your broader points. In my personal life I often reach for APL to do ad-hoc data analysis. It has grown on me in the last year and has fundamentally changed how I perceive and write code. However, I…
gnu apl is an often overlooked but extremely solid APL implementation that plays nice w/ unix. slightly verbose example but heres gnu apl as a pipe-like interface. Often this would be abstracted to a library that gets…