Thinking in K: A Practical Guide to Array Language Programming with ngn/k
By
tosh
Slow-proofed and worth the wait. Worth its weight in flour.
Summary
A tutorial chapter from the ngn-k-tutorial on GitHub that introduces the concept of "thinking in an array language" using K. It covers practical REPL-based programming workflows, the use of ngn/k with rlfe for history navigation, testing functions interactively before moving to production code, and leveraging ngn/k's prettyprinting feature which always returns valid K data for precomputation to optimize programs.
Key quotes
· 3 pulledMost K programming happens through the REPL, because it is very useful to iterate upon previous code.
Functions are tested in the REPL, and then moved to actual code.
ngn/k's prettyprinting always returns valid k data, and you can precompute some things beforehand to speed up your program.
You might also wanna read
Efficient Array Programming: Collection of Documents and Writings on Array-Oriented Languages
This GitHub repository contains a comprehensive collection of documents and writings focused on efficient programming techniques in array-or
Building a Minimal RAG System from Scratch: PDF to Highlighted Answers in ~100 Lines of Python
A hands-on tutorial that builds the smallest functional RAG (Retrieval-Augmented Generation) system from scratch using about 100 lines of Py
Steve Jobs: Learning to program computers teaches you how to think
This article features a quote from Steve Jobs about the importance of learning computer programming, where he argues that coding teaches peo
tiny-vllm: An Open-Source C++ and CUDA LLM Inference Engine with Educational Course
This article presents tiny-vllm, an open-source project that provides both a full C++ and CUDA implementation of a high-performance LLM infe
Binary Search in Python: Iterative Implementation Using a While Loop
This article explains the Binary Search algorithm in Python, covering its iterative implementation using a while loop. It highlights that bi
How AI coding assistants are helping introverted junior developers bridge the experience gap
The article explores how AI coding assistants like GitHub Copilot and IBM's Bob are reshaping the experience of junior developers. It argues
thenewstack.io·2d ago