Skip to content

Instantly share code, notes, and snippets.

@veekaybee
veekaybee / normcore-llm.md
Last active December 20, 2025 14:14
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

vs:0:"valid_solutions.txt"
vg:0:"valid_guesses.txt"
ch:{e-^(,/(=x@>e)@'<'=y)?<>e:x=y} /check::guess->solution->list (-1 b, 0 y, 1 g)
en:{-+/`ln[d]*'d:f%+/f:#'=x} /entropy::list->number
bg:{x@*>en'x ch/:\:y} /best_guess::guesses->solutions->string
ma:{[g;s;r]s@&r~/:g ch/:s} /matches::guess->solutions->response->string list
pl0:{ /solver that always guesses valid solutions
s:"raise"

K: Default dicts?

Code examples are in ngn/k, a dialect where int null is 0N and a list find miss is 0N, not #list.


It would be nice if a grouped list gave empty int list for an outdex, and outdex of frequency gave zero. (See here for more.)

 x:="abracadabra"
@nat-418
nat-418 / why-tcl.md
Last active December 20, 2025 08:36
Why Tcl?

Why Tcl?

Introduction

I use [Tcl] as my scripting language of choice, and recently someone asked me why. This article is an attempt to answer that question.

Ousterhout's dichotomy claims that there are two general categories of programming languages:

@chrispsn
chrispsn / we-need-to-talk-about-group.md
Last active February 9, 2024 06:33
We need to talk about group.

We need to talk about group.

I'm sorry to tell you, but group is gone.

If you check out the latest k.d on shakti.com as at 28 March 2023, you'll see that 'unary' = is now 'freq' (frequency).

Group had a long life: it's been around since at least k2, or 1996.

So why did group go? And what should we use instead?

@suhr
suhr / nk.csv
Last active April 25, 2023 10:39
Syntax Name Description Example Output
+/x Sum Sum all value in x +/1 2 3 4 5 15
-':x Deltas Pairwise differences in x -':1 2 3 4 1 1 1 1
|+x Rotate matrix Rotate x counterclockwise |+3 3#!9 (2 5 8;1 4 7;0 3 6)
x@<x Sort Sort x {x@<x}@8 3 7 1 1 3 7 8
?x,y Set union Unique elements from x and y ?"abac","adob" "abcdo"
x^x^y Intersection Common elements from x and y {?x^x^y}["abac";"adob"] "aba"
x|-x Absolute value Absolute value of x {x|-x}@-1 1
*/y#x Power x in power of y (y>0) {*/y#x}[2;5] 32
y@(#y)!x+!#y Rotate left Rotate y by x elements to the left {y@(#y)!x+!#y}[3;"abcde"] "deabc"
@mlegls
mlegls / http.k
Last active January 18, 2023 19:29
/ ngn/k
\d http
s:{$[`C=@x;x;$x]} / string
qs:{"'",(s x),"'"} / quote string
cp:{$[1~#p:$x;"-",p;"--",p]} / command param
c:{" "," "/(cp'!x),'" ",'qs'.x} / cp list
q:{"?","&"/($!x),'"=",'s'.x}. / dict -> qstring
gr:{."\\curl -Gs ",qs x} / GET raw
g:{gr x,(q y)} / GET[url;qs]
@dustingetz
dustingetz / a.md
Last active October 4, 2022 15:47
HOWTO install `#uri` reader extension in Clojure/Script
@belm0
belm0 / article_sc_and_lua_2.md
Last active February 6, 2023 15:10
Structured concurrency and Lua (part 2)

Structured concurrency and Lua (part 2)

John Belmonte, 2022-Sep

In the previous installment, we introduced some basics of structured concurrency, and considered how this paradigm might fit within the Lua programming language.

An important point was encapsulation: the caller of a function shouldn't be concerned whether the implementation employs concurrency or not. We shouldn't have to give up features of the language or runtime just because our program contains concurrency.

A primary example is exception handling. In a basic Lua program without concurrency, we have the following expectations about error propagation:

Why not: from Common Lisp to Julia

This article is a response to mfiano’s From Common Lisp to Julia which might also convey some developments happening in Common Lisp. I do not intend to suggest that someone coming from a Matlab, R, or Python background should pickup Common Lisp. Julia is a reasonably good language when compared to what it intends to replace. You should pickup Common Lisp only if you are interested in programming in general, not limited to scientific computing, and envision yourself writing code for the rest of your life. It will expand your mind to what is possible, and that goes beyond the macro system. Along the same lines though, you should also pickup C, Haskell, Forth, and perhaps a few other languages that have some noteworthy things to teach, and that I too have been to lazy to learn.

/I also do not intend to offend anyone. I’m okay with criticizing Common Lisp (I myself have done it below!), but I want t