bqn-libs
ngn-k-tutorial
Our great sponsors
bqn-libs | ngn-k-tutorial | |
---|---|---|
1 | 11 | |
45 | 192 | |
- | - | |
6.9 | 8.4 | |
3 months ago | 28 days ago | |
C | ||
BSD Zero Clause License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
bqn-libs
-
Ngn/k (free K implementation)
Languages with multidimensional arrays (APL, BQN, J, but not K) have trouble with dicts because an index into an array is a list of numbers, and an index into a dict is an arbitrary value. Many primitives, and especially selection, are designed around lists of numbers and don't transfer to dicts. In K, where the index into a list is one number, there's still a requirement that the keys in a dict all have the same level of nesting, but this isn't bad in practice. BQN will eventually have hashmaps implemented as in a more mainstream/conventional way, as objects. There's a model at https://github.com/mlochbaum/bqn-libs/blob/master/hashmap.bq... .
I don't think studying the compiler is a very good way to learn BQN, but I would like to write up parts of it (limited by time and motivation of course). I did some chat sessions on this sort of compilation during early development; see the links at the bottom of https://mlochbaum.github.io/BQN/implementation/ .
ngn-k-tutorial
-
Thinking in an Array Language
Complain about the language or documentation, but array language communities are absolutely friendly to outsiders! This tutorial lists some active forums, give them a try:
https://github.com/razetime/ngn-k-tutorial/tree/main?tab=rea...
Also, have to shout out the APL Orchard, where Adám will give any visitor a personal tutorial: https://chat.stackexchange.com/rooms/52405/the-apl-orchard
-
APL: An Array Oriented Programming Language (2018)
To add to the list, this one is pretty good;
https://github.com/razetime/ngn-k-tutorial
-
rando Q vs J thoughts | Locklin on science
If you like APL, then you probably want to try K, which is an ASCII-only array language with a focus on guided minimalism. For an open source K you can try ngn/k, which has a tutorial.
- Thinking in an array language
-
Ngn/k (free K implementation)
Razetime's matmul refactoring is brilliant: https://github.com/razetime/ngn-k-tutorial/blob/main/c-think...
Finally, some nice examples of k's concision:
qs:{$[2>#?x;x;,/qs'x@&'~\:x<*1?x]} / Quicksort
- An ngn/k Tutorial
What are some alternatives?
Kbd - Alternative unified APL keyboard layouts (AltGr, Backtick, Compositions)
b-decoded - arthur whitney's b interpreter translated into a more traditional flavor of C