This file contains hidden or 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
#version 450 | |
layout(location = 0) in vec3 fragColor; | |
layout(location = 0) out vec4 outColor; | |
void main() { | |
outColor = vec4(fragColor, 1.0); | |
} |
This file contains hidden or 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
//+build windows | |
package bake | |
import "core:sys/windows" | |
import "core:strings" | |
import "core:slice" | |
/* | |
Starts the process. | |
Note: the first element of argv is the name of executable |
This file contains hidden or 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
import * as http from "http"; | |
type Result<T, E> = readonly [T, null] | readonly [null, E]; | |
function Ok<E, T>(value: T): readonly [T, null] { | |
return [value, null] as const; | |
} | |
function Err<E, T>(error: E): readonly [null, E] { |
This file contains hidden or 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
diff --git a/src/raylib.h b/src/raylib.h | |
index 4cd9e434..1c4c4a09 100644 | |
--- a/src/raylib.h | |
+++ b/src/raylib.h | |
@@ -1,6 +1,6 @@ | |
/********************************************************************************************** | |
* | |
-* raylib v4.5 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com) | |
+* raylib v5.0 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com) | |
* |
This file contains hidden or 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
# | |
# ~/.bashrc | |
# | |
# If not running interactively, don't do anything | |
[[ $- != *i* ]] && return | |
alias ls='ls --color=auto' | |
alias grep='grep --color=auto' |
This file contains hidden or 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
// Sometimes there is a need to make an application that behaves like a GUI app when ran via | |
// explorer, but like console application when ran from console. This file implements such | |
// an application. On start, it will try to attach to a parent console. If that failed, | |
// that means that we ran from explorer, and we may want to allocate a console for debugging | |
// purposes. If we get a console either by attaching to it or by creating it, we will redirect | |
// std handles. | |
// At program termination we need to send enter to stdin in order to let the parent console | |
// know that we're done. I'm not sure why we need to do this but if it's not done, the parent | |
// will wait indefinately for user input. |
This file contains hidden or 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
public delegate void DoWorkFunc<WorkItem>(WorkItem q); | |
public class WorkQueue<WorkItem> { | |
Thread[] workers; | |
DoWorkFunc<WorkItem> do_work_func; | |
Queue<WorkItem> work_items; | |
Semaphore n_work_items; | |
Semaphore n_free_items; |
This file contains hidden or 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
// Function that adds 64-bit floats implemented using bit magic | |
double fadd(double xf, double yf) { | |
const uint64_t exp_mask = ((UINT64_C(1)<<11)-1); | |
const int64_t exp_min = -1023; | |
const int64_t exp_max = 1022; | |
const uint64_t mant_mask = ((UINT64_C(1)<<52)-1); | |
// Extract fields from floats | |
union{uint64_t i; double f;} v; |
This file contains hidden or 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
int is_c99(void) | |
{ | |
int r=0,b=1,c=2; | |
r = b //*kek*/c | |
; | |
return r; | |
} |
This file contains hidden or 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
// 16-bit and 32-bit modrm encoder in x86. | |
// nothing fancy | |
FILE *out; | |
// The bitness of the output | |
// within operating system code can change from one | |
// instruction to another instruction. | |
int bits; |
NewerOlder