Experimental browser for the Atmosphere
you know what c really needs? .bind
Mar 25, 2025, 5:44 AM
{ "uri": "at://did:plc:7prhbuf5izwc7xlbitgpt3sn/app.bsky.feed.post/3ll6kw5kvnk2i", "cid": "bafyreidm4nco25z2zxshjq6tz5mafixitgdvjo4nfm5fdg6fqbx27ajgay", "value": { "text": "you know what c really needs?\n.bind", "$type": "app.bsky.feed.post", "embed": { "$type": "app.bsky.embed.images", "images": [ { "alt": "$ cat bind-example.c \n#include <stdio.h>\n#include <string.h>\nextern void *bind(void *fn, void *arg0);\nint main() {\n char *str = \"uwu\";\n int (*strlen_bound)() = bind(strlen, str);\n printf(\"length: %d\\n\", strlen_bound());\n}\n\n$ cc -c bind.c && cc bind-example.c bind.o -o bind-example && ./bind-example \nlength: 3\n", "image": { "$type": "blob", "ref": { "$link": "bafkreibdfn4oecpbpbza7b4lt6qvhvlnglkajsnhg3n4g72axmtu2lv6ka" }, "mimeType": "image/jpeg", "size": 130407 }, "aspectRatio": { "width": 1243, "height": 306 } } ] }, "langs": [ "en" ], "createdAt": "2025-03-25T05:44:52.068Z" } }