HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
JohnEarnest
ok
JavaScript2015–2026
JohnEarnest / ok

ok

An open-source interpreter for the K5 programming language.

37Distinct people
89Mentions
3Explicit recommenders
653GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

An open-source interpreter for the K5 programming language.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

ngn/k is a performant FOSS implementation of k6, but it has many constraints and limitations that may make composing large programs difficult. It may be the best dialect for…

RodgerTheGreat used a recommendation phrase. 3 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 10:49:33 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year89 dated mentions

Observed mentions: 2015-02-13 14:20:08 UTC to 2026-07-29 07:59:27 UTC.

0510152015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 16 mentions; 2 submissions, 14 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 10 mentions; 1 submissions, 9 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 8 mentions; 0 submissions, 8 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 11 mentions; 3 submissions, 8 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 10 mentions; 2 submissions, 8 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 6 mentions; 3 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 4 mentions; 2 submissions, 2 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC16214
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC1019
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC808
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC606
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC1138
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC1028
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC404
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC707
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC615
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC633
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC422

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
oK oK is a toy interpreter for a dialect of the K programming language which aims to be an implementation of K5, the still-evolving bleeding edge version of the language. Expect oK to be buggy, incomplete and occasionally flat-out wrong, but slowly improving over time. Read the oK Manual for an overview of oK's operators and syntax. If you are interested in learning more about K, consider downloading the free version of kdb from Kx Systems, the fine makers of K. Alternatively, Kona is an open-source reimplementation of K3/K4. oK does not intend to be particularly fast or suitable for any practical purpose beyond learning, instead emphasizing simplicity of implementation. JavaScript was chosen as an implementation language because it is familar to many programmers and has first-class functions. Trying oK The easiest way to run oK is using the Browser-based REPL. This REPL features a few special commands which can be issued at the beginning of a line: \\ (while entering a multiline expression) cancel this expression. \e toggle the scratchpad editor pane. This editor's content is persisted via localstorage (in case your browser crashes or is closed accidentally). \r run the contents of the editor pane. Alternately, press shift+enter with the editor focused. \c clear the output log. \t time executing the remainder of the line. \f list all presently defined functions. \v list all presently defined variables. \u generates a code url from the remainder of the line, as described below. oK provides several numbered IO verbs: dyadic 0: takes a symbol or string as its left argument and writes the right argument to that destination as text. The right argument can be a symbol, a string, or a list of symbols or strings. In the browser-based REPL the symbol is ignored and output is always sent to the console. In the command-line REPL output is sent to a file as specified by the left argument, or to stdout if the left argument is empty. monadic 0: reads the content of a file or a URL. In the browser-based REPL it takes a string as its right argument and performs a synchronous HTTP request to that URL. The result will be a tuple containing the HTTP status code followed by the response, if any. You can use this in conjunction with pastebins to load code from elsewhere or access RESTful web APIs. Note that most web browsers restrict cross-site HTTP requests from javascript under the same-origin policy- you'll need a server which responds with an Access-Control-Allow-Origin header. GitHub gists will do: url: "https://gist.githubusercontent.com/anonymous/cc0ef05c00940044eb0a/raw/" "https://gist.githubusercontent.com/anonymous/cc0ef05c00940044eb0a/raw/" 0:url (200 "/ generate a times table\nt*/:t:!10\n") .*|0:url (0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0 2 4 6 8 10 12 14 16 18 0 3 6 9 12 15 18 21 24 27 0 4 8 12 16 20 24 28 32 36 0 5 10 15 20 25 30 35 40 45 0 6 12 18 24 30 36 42 48 54 0 7 14 21 28 35 42 49 56 63 0 8 16 24 32 40 48 56 64 72 0 9 18 27 36 45 54 63 72 81) In the command-line REPL 0: reads a file as text. The right argument can be a symbol or a string specifying the file path. If the path is to a directory, 0: returns its listing. If the path is empty and oK is not running interactively, 0: tries to read text from stdin until it encounters a '\n'. monadic 1: works just like monadic 0: except it expects the response to be JSON rather than arbitrary text, and it attempts to parse it into a K data structure you can then manipulate: url:"http://api.openweathermap.org/data/2.5/weather?q=London,uk" "http://api.openweathermap.org/data/2.5/weather?q=London,uk" t:1:url (200;[coord:[lon:-0.13;lat:51.51];sys:[type:1;id:5091;message:0.0224;country:"GB";sunrise:1425709902;sunset:1425750674];weather:,[id:800;main:"Clear";description:"Sky is Clear";icon:"01d"];base:"cmc stations";main:[temp:288.11;pressure:1024;humidity:44;temp_min:286.85;temp_max:289.82];wind:[speed:6.2;deg:230];clouds:[all:0];dt:1425736003;id:2643743;name:"London";cod:200]) t[1;`weather;0;`description] "Sky is Clear" monadic 5: returns a printable string representation of the right argument, as in K3. Sometimes this can be useful for debugging: 5: 1 2 3 "1 2 3" 5:"foo" "\"foo\"" 5: {x+2*y} "{[x;y]x+2*y}" If you visit the page with a ?run= URL parameter, the remainder of the URL will be URI decoded and executed. The \u command can create a link for you based on an expression. You can combine this feature with monadic 0: to run larger programs: \u 1+2 oK code url: http://johnearnest.github.io/ok/index.html?run=%201%2B2 \u .*|0:"https://gist.githubusercontent.com/anonymous/cc0ef05c00940044eb0a/raw/" oK code url: http://johnearnest.github.io/ok/index.html?run=%20.*%7C0%3A%22https%3A%2F%2Fgist.githubusercontent.com%2Fanonymous%2Fcc0ef05c00940044eb0a%2Fraw%2F%22 Command Line Mode Alternatively, you can run oK via the command line with Node.js. test.js runs a series of automated tests: je@indigo$ node test.js You can also try out oK from the included REPL. Note that at the time of writing, the release version of Node.js does not portably support blocking reads from stdin- the REPL has been tested with Node v0.11.14 on OSX. je@indigo$ node repl.js oK v0.1 +/4 5 6 15 1 2 3+2 5 length error. a:"some text" "some text" "t"=a 0 0 0 0 0 1 0 0 1 This REPL is very simplistic compared to the CLI provided in a complete K interpreter and lacks interactive debugging facilities. When you're done, type \\ or press Ctrl+D to exit. If you supply a filename as an argument to the REPL, it will instead execute that file: je@indigo$ node repl.js examples/hangman.k _____ > p _pp__ > e _pp_e > a app_e > l apple Mobile On mobile devices like cell phones, try oK Mobile! Tilting your device horizontally will provide a QWERTY touch-keyboard, and a vertical orientation will provide a calculator-like keypad which provides access to all K verbs and adverbs
Read the full README on GitHub

What Hacker News says

16 sources
If you're actually interested in diving in, here's a K5 repl you can use from your browser: http://johnearnest.github.io/ok/index.html There's a manual, and a guide to some programming techniques here: https://github.com/JohnEarnest/ok/blob/gh-pages/docs/Manual.... https://github.com/JohnEarnest/ok/blob/gh-pages/docs/Program... Examples and more discussion can be found in the same repo. This implementation is "unofficial" (reverse-engineered) and quite slow compared to the real thing, but it has a substantial portion of the functionality and is quite usable for writing meaningful programs.
In Klong – a simple array language
Depressing surprise move for those of us that were interested in this quirky tiny platform. To announce this in between versions (ie 3.3) without using official channels like Twitter, their news feed, or their KXCommunity blog, is quite baffling. If you value the way of computing that K and Q enable, some truly free alternatives include: Kona, a lively and fresh implementation of an earlier version of K (K3): https://github.com/kevinlawler/kona Kuc, a language that reads much like K, but features some interesting new ideas, such as mmap as a verb, closures (and their direct descendant objects), and an inspectable machine code-like intermediate representation of code (but sadly not data): https://github.com/zholos/kuc oK.js, the funky, bright JavaScript implementation that is quickly becoming a busy place on Github: https://github.com/John
Read the rest
Earnest/ok Sadly, the brilliant Kevin Lawler's Kerf begins to look less interesting once one considers the license. Still, its embrace of Json is something for other implementors note. https://github.com/kevinlawler/kerf That brings us to http://kparc.com. In the gloomy distance, beyond the pillowy smoke of the fires on which we burnt our printed out Q tutorials for warmth, where we still fight over tattered copies of the crippled pre-crisis K4/32b interpreter, there is an ivory tower, the inhabitants of which, it is said, look down on us mortals with benign disdain. Kparc promises us the interesting K5 and the life changing kOS. Their frustratingly secret work could be among the most important in the study of sustainable computing and different concepts of implementation. Here, at long last, Arthur will bring his significant genius to the task of the user interface, still the torpid cesspool of the developers dreary life. Tantalizing dreams of a free K seem dead now, but some remember those sultry rumors. Sadly, whether or not we'll ever get to actually use it remains an open question.
In Tell HN: Q/Kdb 32-bit no longer free for commercial use
The BrainFuck interpreter doesn't seem to work properly. For example, I tried ++++++++++[->+++++++<]. Which multiplies 10x7 and should print "F" (ascii 70). Nothing appears to print. I have a K interpreter[1] that could be adapted fairly easy to a system like this. Other good candidates include JSForth[2] and NGN APL[3]. [1] https://github.com/JohnEarnest/ok [2] http://home.diphi.com/users/jeffr/forth/jsforth.html [3] https://github.com/ngn/apl
In Show HN: A playground for in-browser interpreters
The 32 bit version of k4/q is free from Kx (the original K people) is now free from http://kx.com There's a GPL implementation of K3 called Kona at https://github.com/kevinlawler/kona ; kevin lawler also has a language called kerf (not open source) that is based on the same principles with a different syntax (JSON+SQL+more). John Earnest has a Javascript implementation of K5 called oK at https://github.com/JohnEarnest/oK Andrey Zholos has a JITing implementation of a K-like language at https://github.com/zholos/kuc
In Ask HN: APL family instead of R for data analysis?
If you like APL, you might like one of its cousins, K. I've written a (buggy, incomplete!) K interpreter I call oK which similarly runs in your browser: https://github.com/JohnEarnest/ok Here's a nice little program which calculates terms of the "look-and-say" number sequence: http://johnearnest.github.io/ok/index.html?run=%2010%7B%2C%2... And another rather infamous example program: http://johnearnest.github.io/ok/index.html?run=%20%7B(x%3B%2...
In Try APL in your browser
That's because Swift, Ceylon, Pyret, Rust, Nimrod make (relatively) small changes in syntax and semantics compared to Python, Java, C and friends - this is the Algol family of languages if you are old enough (and the "C" family if not). Can you read Prolog (assuming you're not fluent in it already)? It is a little farther along from Algol - it is generally verbose, but control flow is implicit (by failure, and negation IS failure), except where you make it explicit by saying '!' (read: "cut"), which means "never backtrack through this point". And there's no assignment, but unification plays a similar part - except it is much weirder (to the uninitiated). K is of the APL / J mold, which is much farther away from Algol and Prolog. It's mostly functional. It takes orthogonality beyond where Haskell does. Examples that might make you look aga
Read the rest
in: "flatten" (convert recursively nested list/tree to one-level list with the same order as a DFS scan) is written ",//" "decode run length decoding" is written ",/#/'" (courtesy of https://github.com/JohnEarnest/ok/blob/gh-pages/examples/run... Now, these 3-char and 5-char examples are not predefined in any way; They emerge from composing the semantics of the individual characters that make them. Let that sink. Are you aware of any other language in which a straight concatenation of 3 primitives generates a "flatten" function? 5 primitives generates a "run length decoding" function? Something about K/APL/J is distinctly different. And if you believe that it looks different becuase it's "the way it's meant to be", you're missing out on a lot.
In Show HN: Persistent Group Chat in kdb+/k/q

Showing the 15 most recent of 16 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.