Skip to content

Instantly share code, notes, and snippets.

View RealNeGate's full-sized avatar

Yasser Arguelles Snape RealNeGate

  • Washington, USA
View GitHub Profile
// the macros could be made to not do
// anything on codebases that wanna support both
#ifdef __CUIK_C__
#include <cuik.h>
#else
#define cuik_tag
#define cuik_tagged(val)
#define cuik_try_use(a, b) ((a) == (b))
#define cuik_tag_switch switch
trial_0_0():
L0: # r1 terminates at r647
r2 = [i64 x 1] PARAM 0
r3 = [i64 x 1] PARAM 1
r4 = [i64 x 1] 396779542
r5 = [i32 x 1] 4271987557
r6 = LOCAL 4 (4 align)
r7 = [i32 x 1] TRUNC r3
r8 = [i32 x 1] TRUNC r3
r9 = [i32 x 1] r7 | r8
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <x86intrin.h>
const char keywords[][16] = {
"alignof",
"auto",
"break",
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <x86intrin.h>
enum {
TOKEN_ACCESSOR = '.',
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <x86intrin.h>
#include <Windows.h>
enum {
TOKEN_ACCESSOR = '.',
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <x86intrin.h>
const char keywords[][16] = {
"alignof",
"auto",
"break",
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;
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:
#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;
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;