RE: https://mastodon.social/@zadjii/116518329631639405

One of the measurements that I've taken for my latest talk:

The *entire* API (i.e. header files) of Asio, Boost, Ceral, Eigen, Qt, Xerces, plus MS MFC, MS STL, MS Windows SDK, MS UCRT

* compiled as #include, or loaded from PCH: 2 GB

* compiled as modules (one for each library) and imported: 88 MB

as far as I can tell header files have no advantages over just putting your forward declarations at the top of your .c / .cpp files

like it’s bad enough that you have to declare everything twice, but putting your second declaration in a totally separate file that you have to remember to keep updated? that will definitely bite you in the ass

also the existence of header files requires you to use some arcane rube goldberg build system like make that’s held together with chewing gum and rubber bands, and probably isn’t even portable. when instead you could literally just include your .c / .cpp files directly and bypass that whole process

and it’s not even hard to write a .c/.cpp file that doesn’t need a headerfile:

// inside of funcs.cpp: #ifndef FUNCS_CPP #define FUNCS_CPP int someFunc(); int someFunc() { return 666; } #endif // and you just import it like this: #include "./funcs.cpp"

like why didn’t people figure this out decades ago. who even thought that headerfiles were a good idea. maybe I’m missing something but they genuinely seem to have only downsides and aren’t even the obvious way to solve this problem?

common/dist/zlib: zutil.h

kre: No #include <userland.header> in KERNEL or STANDALONE

http://cvsweb.netbsd.org/bsdweb.cgi/src/common/dist/zlib/zutil.h.diff?r1=1.9&r2=1.10

One of the major downsides of vibecoding is that once the code has been written by the AI it is deterministically right or wrong and also cannot be improved (e.g. by switching to a new frontier model) without manually prompting an AI to rewrite it.

Therefore, I have decided to address these issues by developing a new and revolutionary file system: llmfs!

Simply point it to an API, mount it somewhere, and start following "everything is a file"! Even your LLM prompts!

With this amazing new, never-before-seen technology, you can simply include prompts into your C(++) code using the well-known #include keyword:

#include <string.h> #include <stdio.h> #include <stdlib.h> #include "llm/openai/gpt-oss-20b/prompt/Write a C function called 'void replace(char* text, const char* needle, const char* replacement)' \ that replaces all occurences of needle with replacement. Only include the function and no markdown or explanation." int main() { const char* str = "Hello World!"; char* s = strdup(str); replace(s, "Hello", "Goodbye"); printf("%s\n", s); return 0; }

Will your code compile? Maybe.
Will your code work? Who knows!
Will your code have the same behavior every time you compile it? Abso-fucking-lutely not!
Will your code burn through tons and tons of tokens? Abso-fucking-lutely yes, so you can finally hit those CEO-mandated token goals.
Can you see your code? No.
Does the compiler show your code if there are warnings or errors? No, it generates an entirely new version for diagnosis!
Is this real? Yes, it exists and runs on my machine!
Does it actually work? Sometimes!


#AI #LLM #FUSE3 #cursed #I-am-so-sorry-for-creating-this #include #include #include #include #include

It's live.

https://godbolt.org/z/71f3xxcYh

#include <stdio.h>

#define bar(x) _Generic(x, \
int v: v, \
struct foo v: v.name \
)

struct foo { char* name; };

int main() {
struct foo f = { "test" };
bar(3);
bar(f) = "something";
puts(f.name); // prints "something"
}
Compiler Explorer - C (x86-64 clang (thephd.dev))

#define bar(x) _Generic(x, \ int v: v, \ struct foo v: v.name \ ) struct foo { char* name; }; int main() { struct foo f = { "test" }; bar(3); bar(f) = "something"; puts(f.name); // prints "something" }

@merri Jos tuon eteen laittaa:

const uint8_t palette[][3] = {

.. muu sisältö tähän ...

}; // loppuun

Niin tuosta tulee validi C/C++ kaksiulotteinen taulukko mitä voi käyttää suht kivuttomasti. Ehkä se on tarkoitettu osaksi jotain sorsaputkea missä joku muu osa tuottaa sit noi etu- ja takaosan?

C/C++:llä voi tehdä myös näin:

const uint8_t palette[][3] = {

#include "palettesavefile.jotain"

};

I've added `#include "functional"` to FlipperTransportTypes.h a really surprising number of times for someone who doesn't know what the hell Flipper is.

No warranty implied, use at your own risk. But this short C program can check if your Linux machine is still vulnerable to Copy Fail (there's also this page with python code from our friends in Estonia https://docs.hpc.ut.ee/public/cve-2026-31431/ )

Output includes "ARE available" or "NOT available"

Again: compile and run at your own risk. Don't just trust me blindly. Read the code. #CopyFail #CVE-2026-31431
==============

#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <sys/socket.h>
#include <linux/if_alg.h>

int main(void) {
int sock;
struct sockaddr_alg sa;

// Prepare sockaddr_alg for AEAD/GCM
memset(&sa, 0, sizeof(sa));
sa.salg_family = AF_ALG;
strcpy((char *)sa.salg_type, "aead");
strcpy((char *)sa.salg_name, "gcm(aes)");

// Try to create AF_ALG socket
sock = socket(AF_ALG, SOCK_SEQPACKET, 0);
if (sock == -1) {
perror("socket(AF_ALG, aead)");
printf("algif_aead functions are NOT available (AF_ALG socket creation failed).\n");
return 1;
}

// Try to bind to AEAD/GCM
if (bind(sock, (struct sockaddr *)&sa, sizeof(sa)) == -1) {
perror("bind(AF_ALG, aead, gcm(aes))");
printf("algif_aead functions are NOT available (bind failed).\n");
close(sock);
return 1;
}

printf("algif_aead functions ARE available (AF_ALG AEAD bind succeeded).\n");
close(sock);
return 0;
}

CVE-2026-31431 Mitigation - HPC Public Documentation

#include “goblins.h”
@Adamantite アプローチ2:データ圧縮アルゴリズムを導入する(ロマン)

「いや、それでも生のURLが長いのは美しくない!」というエンジニア魂にお応えするハックです。

現在は 配列 -> JSON -> Base64 という非常に冗長(無駄が多い)な変換をしているため、文字数が膨れ上がっています。ここに、Web界隈で有名な「LZ77(LZ-String)圧縮アルゴリズム」を導入して、URLの文字列を限界までギュッと圧縮してみましょう。

index.html を少しだけ書き換えます。
1. 圧縮ライブラリを読み込む

<head> タグの中(<style> の上あたり)に、以下の1行を追加します。これで世界中から圧縮プログラムをインポートできます(C++の #include のようなものです)。
HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.5.0/lz-string.min.js"></script>

2. 生成と復元のロジックを書き換える

<script> の中にあるURLの生成(エンコード)と復元(デコード)の部分を、LZ-Stringを使ったスマートな方式に書き換えます。

▼ init() 内の復元部分を書き換え
JavaScript

// 【修正前】
// const decodedStr = decodeURIComponent(escape(atob(decodeURIComponent(dataParam))));
// ownedIds = JSON.parse(decodedStr);

// 【修正後】LZ-Stringで解凍
if (dataParam) {
try {
const decodedStr = LZString.decompressFromEncodedURIComponent(dataParam);
if (decodedStr) ownedIds = JSON.parse(decodedStr);
} catch (e) {
console.error("データの復元に失敗しました:", e);
}
}

▼ generateLink() 内の生成部分を書き換え
JavaScript

// 【修正前】
// const jsonStr = JSON.stringify(ownedIds);
// const base64Data = btoa(unescape(encodeURIComponent(jsonStr)));
// const safeData = encodeURIComponent(base64Data);

// 【修正後】LZ-Stringで限界まで圧縮
const jsonStr = JSON.stringify(ownedIds);
const safeData = LZString.compressToEncodedURIComponent(jsonStr);

これを上書き保存して、もう一度Cloudflareにデプロイしてみてください。
ブルアカのキャラIDは「10001」「10002」のように似た数字の連続なので、LZ圧縮がめちゃくちゃ綺麗に刺さり、URLの長さが元の半分〜3分の1以下に激減するはずです!

って言われてる