ngn-k-tutorial
An ngn/k tutorial.
How to use this tutorial
This tutorial assumes you have some beginner programming knowledge, and a basic understanding of what arrays are.
The progression will start from explaining basic primitives, and move on to bigger concepts. The final few chapters will implement full programs in K, step by step.
Each part of this tutorial will have Vocabulary
and Exercise
(pending) sections at the end. I suggest getting familiar with the vocabulary and doing the exercises in each part before moving on the next lesson.
Progress:
Currently, the main introduction to ngn/k is complete. More practical chapters will be added.
Verb coverage: complete
- [x] identity - [x] right - [x] plus - [x] flip - [x] product - [x] first - [x] minus - [x] subtract - [x] divide - [x] square root - [x] first - [x] multiply - [x] range, odometer - [x] keys - [x] create dict - [x] mod - [x] where - [x] min - [x] reverse - [x] max - [x] grade up - [x] lesser - [x] grade down - [x] greater - [x] group - [x] identity matrix - [x] equal - [x] not - [x] match - [x] enlist - [x] concat - [x] null? - [x] except - [x] fill - [x] length - [x] reshape - [x] floor - [x] lowercase - [x] drop - [x] delete - [x] cut - [x] string - [x] pad - [x] cast - [x] distinct - [x] random float - [x] find - [x] random - [x] at - [x] type - [x] dot - [x] eval - [x] values - [x] ifAdverb coverage:
- [x] each - [x] binary search - [x] over - [x] fixedpoint - [x] for - [x] while - [x] join - [x] base encode - [x] scan - [x] scan-fixedpoint - [x] scan-for - [x] scan-while - [x] split - [x] base decode - [x] each prior - [x] windows - [x] each right - [x] each leftCredits
- ngn many tidbits and useful knowledge on the workings of ngn/k
- @chrispsn, @Traws, @ColTim for ideas on the Prelude chapter, and primitive implementations
- @HoosierEE for help with proofreading and many useful edits
- @DiscoDoug for a lot of help with writing the sudoku chapter