Re:The APL Programming Language Source Code (2012)
by eggy on Tuesday December 20, 2022 @07:56AM
(#34065211)
Here's one paper on CNN's in APL: https://dl.acm.org/doi/10.1145/3315454.3329960
Re:The APL Programming Language Source Code (2012)
by maximus-decimus on Tuesday December 20, 2022 @12:22PM
(#34069026)
The use case is use J or K is to do advent of code or the Euler project :p
APL is a tool for thought more than a real programming language so in my opinion it's best suited to boost your puzzle solving ability.
Re:The APL Programming Language Source Code (2012)
by phantomics on Tuesday December 20, 2022 @03:35PM
(#34072133)
Image processing is a fun use case. For example, here's a bit of Common Lisp using April and the Opticl library to create a mirrored meme image:
(opticl:write-png-file
"~/out.png" (april-c "2 0∘{(x s)←⍺←2 0 ⋄ (⌽[x],[x]⊢)⌽[x]⍣s⊢⍵↓[x]⍨(1-2×s)×⌊2÷⍨x⊃⍴⍵}"
(opticl:read-png-file "~/in.png")))
The 2 0 at the start of the APL line above controls the mirroring behavior. The second number can be set to 0 or 1 to choose which side of the image to mirror, while the 2 sets the axis along which to mirror. This will be 1 or 2 for a raster image but this function can mirror any rank of array on any axis.April was used to teach image filtering in a programming class for middle-schoolers, you can see a summary in this video: https://vimeo.com/504928819
For more APL-driven graphics, April's repo includes an ncurses demo featuring a convolution kernel powered by ⌺, the stencil operator: https://github.com/phantomics/april/tree/master/demos/ncurse...
APL is a completely different paradigm.
Every now and then I get the urge to take a deep dive into APL or J but I really need a use case.
Since they are array languages they seem like they might be good for machine learning?