Ramblings about code optimization.
TODO
| // Reject modernity, return to wrinkly ass GL shit | |
| #if !defined(_WIN32) | |
| #error "Fuck you" | |
| #endif | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #define _USE_MATH_DEFINES | |
| #include <math.h> |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdbool.h> | |
| #include <string.h> | |
| #include <assert.h> | |
| #include <ctype.h> | |
| int s[1024],i=0,a,b,m[4096]; | |
| char *d[256],e; |
| #define _CRT_SECURE_NO_WARNINGS | |
| #include <stdio.h> | |
| #define SWEETIE_IMPL | |
| #include "sweetie.h" | |
| static char* read_entire_file(const char* filepath) { | |
| FILE* file = fopen(filepath, "rb"); | |
| if (file == NULL) { | |
| fprintf(stderr, "error: could not open '%s'\n", filepath); |
| #define UNICODE | |
| #include <stdio.h> | |
| #include <stddef.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <stdint.h> | |
| #define WIN32_LEAN_AND_MEAN | |
| #include <windows.h> |
| local bit = require("bit") | |
| local ffi = require("ffi") | |
| function get_file_name(file) | |
| local s = file:match("^.+/(.+)$") | |
| if s == nil then | |
| return file | |
| end | |
| return s |
Ramblings about code optimization.
TODO
| #define UNICODE | |
| #include <stdio.h> | |
| #include <stddef.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <stdint.h> | |
| #define WIN32_LEAN_AND_MEAN | |
| #include <windows.h> |
| // I'm going to hell for this one... | |
| // | |
| // https://godbolt.org/z/PjxjveaG4 | |
| #include <stdbool.h> | |
| #include <stddef.h> | |
| #ifdef __clang__ | |
| #define typeof(x) __typeof__(x) | |
| #endif |
| #define NL_STRING_MAP_IMPL | |
| #include "string_map.h" | |
| int main() { | |
| NL_StringMap table = nl_string_map_init(7); | |
| nl_string_map_insert_cstr(&table, "glRasterPos4iv", NULL); | |
| nl_string_map_insert_cstr(&table, "PackTouchHitTestingProximityEvaluation", NULL); | |
| nl_string_map_insert_cstr(&table, "GetPointerPenInfo", NULL); | |
| nl_string_map_insert_cstr(&table, "GetCIMSSM", NULL); |
| // Reject modernity, return to wrinkly ass GL shit | |
| #if !defined(_WIN32) | |
| #error "Fuck you" | |
| #endif | |
| #define WIN32_LEAN_AND_MEAN | |
| #include <windows.h> | |
| #include <GL/gl.h> | |
| #pragma comment(lib, "opengl32.lib") |