Hacker Newsnew | past | comments | ask | show | jobs | submit | ljouhet's commentslogin

First line of https://t3x.org/klong/prime.html

"The braces around an expression denote a function. Because this function contains a single variable, x, it is a monadic function or a monad."

I never understood that about monads, even if it's litterally their name.


A monadic function in APL-family languages is not related to monads from category theory, which are the ones you see in Haskell, nor to Leibniz's monads.


In this context it just means "one parameter function".

It looks like every apparently free variable in a Klong brace expression is actually bound as a function parameter.

This is so in basic algebra in that we can think of, say, x^2 + y^2 as a two parameter function, even without writing out the full f(x, y) = x^2 + y^2 notation with the f(x, y) head.

A two parameter function would be called "dyadic" in the jargon which calls one argument functions "monadic".


It is a satire, right?

I don't know what to think anymore



uv is an incredible tool ; ty will be also. It's insanely fast

For now, I have some false negative warnings :

'global' variables are flagged as undefined `int:unresolved-reference: Name ... used when not defined` (yeah, it's bad, I know)

f(*args) flagged as missing arguments `lint:missing-argument: No arguments provided for required parameters ...`


don't forget ruff checker and formatter


Who defines "value-aligned, safety-conscious project"?

"Instead of our current complex non-competing structure—which made sense when it looked like there might be one dominant AGI effort but doesn’t in a world of many great AGI companies—we are moving to a normal competing structure where ..." is all it takes


Most likely the same people who define "all natural chicken" - the company that creates the term.


I actually lol-ed at that. It's like asking the inventor of a religion who goes to heaven.


Isn't it the goal of https://openworm.org/ ?


please skim the article. or paste it into an llm and ask the same question.





I love the way it's written: see this ChatGPT-like code that fits in your screen? Let's break it down!


In Python:

    Leaf = []
    Stem = lambda x: [x]
    Fork = lambda a, b: [a, b]

    is_leaf = lambda x: len(x)==0
    is_stem = lambda x: len(x)==1
    is_fork = lambda x: len(x)==2

    def apply(a, b):
        """ From https://treecalcul.us/specification/ (OCaml) """
        if is_leaf(a): return Stem(b)
        if is_stem(a): return Fork(a[0], b)
        x, y = a       # a == Fork(x, y)
        if is_leaf(x): return y
        if is_stem(x): return apply(apply(x[0], b), apply(y, b))
        u, v = x       # x == Fork(u, v)
        if is_leaf(b): return u
        if is_stem(b): return apply(v, b[0])
        s, t = b       # b == Fork(s, t)
        return apply(apply(y, s), t)

    T = {}
    T["false"] = Leaf
    T["true"]  = Stem(Leaf)
    T["not"]   = Fork (Fork (T["true"], Fork (Leaf, T["false"])), Leaf)

    def show(tree):
        name = [k for k in T if T[k]==tree][0]
        print(name or tree)

    show(apply(T["not"], T["false"])) # true
    show(apply(T["not"], T["true"]))  # false


And here it is in Racket or Scheme:

    (define (apply a b)
      (cond ((null? a) (list b))
            ((procedure? a) (cons (car a) b))
            ((null? (car a)) (cdr a))
            ((procedure? (car a)) (apply (apply (caar a) b) (apply (cdr a) b)))
            ((null? b) (caar a))
            ((procedure? b) (apply (cdar a) (car b)))
            (else (apply (apply (cdr a) (car b)) (cdr b)))))
    
    (define t-false null)
    (define t-true (list null))
    (define t-not (cons (cons (list null) (cons null null)) null))
    
    (apply t-not t-false)
    (apply t-not t-true)
Leaf is null, Stem is list and Fork is cons.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: