2025-12-13 11:33:00 +09:00
aoc aoc 2023-12-30 03:54:52 +02:00
dy whr 2023-04-27 05:31:51 +03:00
e rm e/100.k 2023-12-03 19:29:54 +02:00
g g/all-together-now.k 2023-08-20 18:32:22 +03:00
l #! 2023-12-08 03:42:01 +02:00
t handle enumerations of large integers 2025-12-06 09:44:53 +09:00
vim-c SN -> ZN 2023-12-16 22:31:06 +02:00
vim-k Update vim-k/syntax/k.vim 2025-07-08 08:19:04 +02:00
w fix comment 2024-10-18 13:03:46 +09:00
x A measure of agnosticism 2025-11-16 05:57:26 +01:00
.gitignore gitignore 2023-03-09 20:32:21 +02:00
.ignore 2.c 2022-10-25 23:17:58 +03:00
0.c optionally compile in current build hash 2025-05-10 16:44:37 +09:00
1.c REFB 2024-01-07 16:50:07 +02:00
2.c . 2025-12-13 11:33:00 +09:00
3.c bit reductions 2025-11-24 23:58:42 +01:00
4.c (c) 2024-01-02 19:54:02 +02:00
a.c EXC_BAD_ACCESS 2025-11-17 05:19:23 +01:00
a.h use /dev/random if present 2025-10-22 21:01:09 +09:00
b.c sure up bytecode buffer growth 2025-11-25 07:59:37 +09:00
c.c Avoid reuse with left right 2025-10-13 08:24:59 +09:00
Dockerfile smaller images 2025-08-15 14:15:58 +09:00
e.c e.c 2024-01-07 13:36:20 +02:00
f.c shortcircuit 2025-11-24 03:28:55 +01:00
g.h psh 2025-06-23 12:48:16 +09:00
g.k psh 2025-06-23 12:48:16 +09:00
h.c whr may fail 2025-12-04 20:51:01 +09:00
i.c use /dev/random if present 2025-10-22 21:01:09 +09:00
j.c typo 2025-11-17 11:29:56 +09:00
k.c register ffi functions with namespace 2025-11-16 05:57:26 +01:00
k.h ffi utilities 2025-11-16 05:57:26 +01:00
LICENSE agpl 2019-12-17 02:19:05 +02:00
lopts Add example of registering foreign functions into the REPL. Make link options easier to modify. 2022-09-12 09:11:44 +02:00
m.c cache kstring compilation 2025-08-23 11:38:06 +09:00
makefile . 2025-05-10 16:48:54 +09:00
o.c more efficent k string. tighter calibration 2025-06-18 15:51:20 +09:00
opts opts 2023-04-20 14:51:26 +03:00
p.c compute last uses on the fly 2025-08-15 09:55:15 +02:00
r.c use /dev/random if present 2025-10-22 21:01:09 +09:00
readme.txt List the Docker build as canonical 2025-02-12 09:48:08 +09:00
repl.k Add full help option 2025-11-25 07:59:37 +09:00
s.c ref chasing 2025-06-30 14:35:44 +09:00
v.c limit 2025-12-10 11:13:46 +09:00
w.c handle enumerations of large integers 2025-12-06 09:44:53 +09:00
x.c stray semi (thanks dzaima) 2025-11-23 12:01:42 +09:00
this k implementation is (lightly?) supported and is a fork of https://codeberg.org/ngn/k
for others, see https://k.miraheze.org/wiki/Running_K



ngn/k is a simple fast vector programming language
try:     https://ngn.codeberg.page/k
build:   make             # Dockerfile uses latest gcc and should be considered canonical
use:     rlfe -h ~/.k_history ./k repl.k
chat:    https://matrix.to/#/#ngnk:matrix.org
license: GNU AGPLv3 (v3 only) - https://codeberg.org/ngn/k/raw/branch/master/LICENSE

community:
  learn:
    book     (work in progress)        https://xpqz.github.io/kbook/
    tutorial (work in progress)        https://github.com/gitonthescene/ngnk-libs/tree/master/tutorial
    tutorial                           https://github.com/razetime/ngn-k-tutorial
    embedding example                  https://codeberg.org/suhr/kes
    searchable database of snippets    https://github.com/secwang/ngnkcart
  edit:
    vim mode (in this repo)            ./vim-k
    emacs mode                         https://github.com/gitonthescene/ngnk-mode
  fun:
    code golf                          https://code.golf/rankings/holes/all/k/bytes
    code golf                          https://codegolf.stackexchange.com/search?tab=newest&q=ngn
    aoc solutions by multiple people   https://k.miraheze.org/wiki/Advent_of_Code
    analysis of ngn/k AoC solutions    https://github.com/kidd/arraylangs-index
    dyalog competition solutions       https://github.com/xpqz/dyalogk
  interop:
    windows port                       https://github.com/traws0/ngnk-windows
    rust bindings                      https://crates.io/crates/ngnk
    continuous integration for osx     https://github.com/xpqz/ngnk_mirror
    nix package                        https://github.com/nathyong/ngnk-nix
  more:
    collection of libraries            https://github.com/gitonthescene/ngnk-libs
    unparser                           https://github.com/chrispsn/ngn-k-unparser
    codemirror lezer parser            https://github.com/SirBogman/codemirror-lang-k
    various utils                      http://arlyle.sdf.org/k/
    kpl, apl-like extensions for k     https://codeberg.org/CptJimKirk/kpl
    bindings for a regex library       https://github.com/x86y/onikuruma
    videos of solving aoc in ngn/k     https://www.twitch.tv/fcopy

source:
0.c main()                       k.h  embedding api
m.c memory manager and repl      a.h  common header
p.c parser                       g.h  header generated by g.k
b.c bytecode compiler and vm     t/   unit tests
a.c eval, apply, amend: . @      w/   web ui
h.c shape-related: x#y ,x x,y    x/   example for using libk.so
o.c order and equivalence        o/   build output
s.c to string: $x `k@x           l/   k libraries
c.c type conversions             g/   https://codegolf.stackexchange.com/
f.c find                         e/   https://projecteuler.net/
r.c random                       dy/  https://problems.tryapl.org/
1.c arithmetic monadic verbs     aoc/ https://adventofcode.com/
2.c arithmetic dyadic  verbs
3.c arithmetic       adverbs
4.c prime sieve
i.c input/output
v.c other verbs
w.c other adverbs
j.c json: `j@x `j?x
e.c error handling
k.c embedding api