This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include "DynArray.h" | |
typedef enum { | |
TOKEN_IDENTIFIER, // abc0123 | |
TOKEN_NUMBER, // 1738 | |
TOKEN_STRING, // "Blah" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The Computer Language Benchmarks Game | |
// https://salsa.debian.org/benchmarksgame-team/benchmarksgame/ | |
// | |
// Contributed by Mark C. Lewis. | |
// Modified slightly by Chad Whipkey. | |
// Converted from Java to C++ and added SSE support by Branimir Maksimovic. | |
// Converted from C++ to C by Alexey Medvedchikov. | |
// Modified by Jeremy Zerfas. | |
// Modified by Yasser Arguelles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <stdio.h> | |
#include <assert.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#define NULL_REG SIZE_MAX | |
typedef size_t Reg; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <stdio.h> | |
#include <assert.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
typedef float Vec3 __attribute__((ext_vector_type(3))); | |
#define MAX_KD_NODES 1024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdint.h> | |
enum { | |
FS_MAGIC_NUMBER = 0x666f6f64, | |
FS_LATEST_VERSION = 1, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#define STRINGIZE(arg) STRINGIZE1(arg) | |
#define STRINGIZE1(arg) STRINGIZE2(arg) | |
#define STRINGIZE2(arg) #arg | |
#define CONCATENATE(arg1, arg2) CONCATENATE1(arg1, arg2) | |
#define CONCATENATE1(arg1, arg2) CONCATENATE2(arg1, arg2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct ParticleSet { | |
size_t count; | |
// note that each of these arrays have to be aligned to the vector | |
// width we'll be working with, since it always updates in multiples | |
// of the vector width. | |
float* x; | |
float* y; | |
float* z; | |
float* vx; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <x86intrin.h> | |
typedef struct TriangleX4 { | |
__m128 ax, ay, az; | |
__m128 bx, by, bz; | |
__m128 cx, cy, cz; | |
} TriangleX4; | |
typedef struct TriangleNormalX4 { | |
__m128 nx, ny, nz; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Everything is not a damn file: | |
I'm splitting up the idea of files to be "nicer" files are storage concepts, a USB device is a device, and stdout is a stream | |
GPUs as first class devices: | |
OS functionality for executing code on them, memory mapping, and overall GPU use on the userland without a graphics API or a mess | |
Sandboxing the file system: | |
Each file gets a mini filesystem and that's all they get access to by default, it makes install and uninstall nicer, gives apps a clear place to put their data into, and improves security | |
Unified UI renderer: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defcolor_back = 0xFF041818; | |
defcolor_margin = 0xFF323232; | |
defcolor_margin_hover = 0xFF333333; | |
defcolor_margin_active = 0xFF404040; | |
defcolor_list_item = {defcolor_margin, defcolor_back}; | |
defcolor_list_item_hover = {defcolor_margin_hover, defcolor_margin}; | |
defcolor_list_item_active = {defcolor_margin_active, defcolor_margin_active}; | |
defcolor_cursor = {0xFF90EE90, 0xFF90EE90}; | |
defcolor_at_cursor = defcolor_back; |
OlderNewer