Nils' book on Klong is awesome. Very well written and could not have done this project without his very detailed and thorough documentation and C code reference implementation. Nils also helped with some clarifying details on the finer points of the language for KlongPy.
A while back I was wondering if I could have J-style notation for handling arrays on GPU. This lets me do that, and the Python/Numpy interface is a wonderful bonus. Awesome implementation! A few exploratory questions:
1. I've written a bit of J for Advent of Code/Project Euler, and I love J's tacit/point-free style. Does KlongPy have hooks and forks? What is the general difference between J and K/Klong/KlongPy?
2. Have you considered adding PyTorch as a backend, in addition to numpy/cupy? Array programming on GPU with autograd would be a magic combination.
3. Would it benefit to rewrite some of the verbs (or add new/optimized verbs) in C? I know numpy has an ok C API, and I've tried the C FFI in J with interesting results.
Again, beautiful work -- starred the repo, bookmarked, I hope to check this out sometime this summer. Thank you so much for sharing! (also thanks to Nils for your work!)
I need to read more about hooks and forks to answer that. Klong itself is relatively straightforward, however with Python integration there’s a lot that can be done.
Multiple backends would be quite interesting. There’s still some gaps in fully supporting CuPy so perhaps after getting that further along it would be interesting to expand the backends.
Related to multiple backends, I think there’s a lot to explore with JIT and other tricks to make KlongPy faster.
Generally, the bulk of my focus will be on performance going forward.
I was looking into APL and Futhark using tail2futhark a while ago, but this looks great! I'm a big fan of Nils work and I bought the Klong book last year. I usually use J or APL, but the time series data frame example with Grafana is compelling. Thanks to you and Nils for sharing such cool work!
Nils' book on Klong is awesome. Very well written and could not have done this project without his very detailed and thorough documentation and C code reference implementation. Nils also helped with some clarifying details on the finer points of the language for KlongPy.