this post was submitted on 24 Feb 2026
585 points (97.7% liked)

Programmer Humor

30090 readers
1860 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] arcine@jlai.lu 35 points 4 days ago (4 children)

Nix is the next step in that evolution. It's basically just JSON that can generate itself !

[–] massive_bereavement@fedia.io 43 points 4 days ago (2 children)

Sounds like Nix is a pathway to many abilities I consider to be unnatural.

[–] Bassman1805@lemmy.world 16 points 4 days ago

Yeah, it really is. A plaintext document that generates an entire OS?

[–] raman_klogius@ani.social 3 points 4 days ago

Is it possible to learn this power?

[–] KindaABigDyl@programming.dev 23 points 4 days ago* (last edited 4 days ago) (2 children)

It’s basically just JSON that can generate itself !

You have inspired me.

I will make JSON with meta-programming

I will call it DyJSON, i.e. "Dynamic JSON" but pronounced "Die, Jason!"

It is JSON with meta-programming and the ability to call C functions from libraries

Example:

# This is a line comment

# Put your function definitions up here
(concat str_a str_b: "concat" "my-lib.so") # Import a function through a C ABI
(make-person first_name last_name email -> { # Define our own generative func
    "name": (concat (concat $first_name " ") $last_name),
    "email": $email
})

# And then the JSON part which uses them
[
    (make-person "Jenny" "Craig" "jenn.craig.420@hotmail.com"),
    (make-person "Parson" "Brown" null)
]

As you can see, it is also a LISP to some degree

Is there a need for this? A purpose? No. But some things simply should exist

Thank you for helping bring this language into existence

[–] AMoistGrandpa@lemmy.ca 16 points 4 days ago

I think you've just invented Jsonnet, but with C integration.

https://jsonnet.org/

[–] KindaABigDyl@programming.dev 9 points 4 days ago* (last edited 4 days ago)

Here is the grammar:

<json> ::=              <value> | <fn-def> <json>
<value> ::=             <object> | <array> | <string> | <number> | <bool>
                        | <fn-def> | <fn-app>
                        | "null"
<object> ::=            "{" [ <member> { "," <member> } ] "}"
<member> ::=            <string> ":" <value>
<string> ::=            "\"" { <char> } "\""
<char> ::=              (ASCII other than "\"", "\\", 0-31, 127-159)
                        | (Unicode other than ASCII)
                        | ( "\\" (
                            "\"" | "\\" | "/" | "b" | "f" | "n" | "r" | "t"
                            | "u" <hex> <hex> <hex> <hex>
                        )
<hex> ::=               /A-Fa-f0-9/
<array> ::=             "[" [ <value> { "," <value> } ] "]"
<number> ::=            <integer> [ <fraction> ] [ <exponent> ]
<integer> ::=           "0" | /[1-9]+/ | "-" <integer>
<fractional> ::=        "." /[0-9]+/
<exponent> ::=          ("E" | "e") [ "-" | "+" ] /[0-9]+/
<bool> ::=              "true" | "false"
<fn-def> ::=            "(" <ident> { <ident> }
                            ("->" <value> | ":" <string> <string>) ")"
<ident> ::=             <startc> { <identc> }
<startc> ::=            /A-Za-z_/ or non-ASCII Unicode
<identc> ::=            <startc> | /[0-9-]/
<fn-app> ::=            "(" <ident> { <value> } ")"
<var> ::=               "$" <ident>
[–] protogen420@lemmy.blahaj.zone 2 points 4 days ago

good thing nixers do not know the art of lisp

[–] TheOneCurly@feddit.online 3 points 4 days ago

I had the same thought. At panel 3 it's just oh that's nix with commas.