Skip to content

Instantly share code, notes, and snippets.

@sogaiu
Last active November 13, 2025 13:46
Show Gist options
  • Select an option

  • Save sogaiu/067d7cfe47182033b759047e15cef406 to your computer and use it in GitHub Desktop.

Select an option

Save sogaiu/067d7cfe47182033b759047e15cef406 to your computer and use it in GitHub Desktop.
janet hidden feature?

observe:

  (file/write out
              "#include <janet.h>\n"
              "static const unsigned char bytes[] = {"
              (string/join (interpose ", " chunks))
              "};\n\n"
              "const unsigned char *" name "_embed = bytes;\n"
              "size_t " name "_embed_size = sizeof(bytes);\n")

and yet:

$ jdoc file/write

    cfunction
    src/core/io.c on line 251, column 1

    (file/write f bytes)

    Writes to a file. 'bytes' must be string, buffer, or symbol. 
    Returns the file.

references:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment