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
fn foo<T: Sized>() { | |
const foo: usize = mem::size_of::<T>() * 4; | |
} | |
fn bar<T: Sized>() { | |
let foo: usize = mem::size_of::<T>() * 4; | |
} |
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
/* center radius (pixels) */ | |
#define C_RADIUS 128 | |
/* center line thickness (pixels) */ | |
#define C_LINE 1 | |
/* outline color */ | |
#define OUTLINE vec4(0.30, 0.30, 0.30, 1) | |
/* number of bars (use even values for best results) */ | |
#define NBARS 140 |
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
/* GIST NOTE: this is part of a much larger collection of lua utilities for AwesomeWM | |
and has some (very tiny) lua code that wraps these C functions and places them into | |
a table. */ | |
/* License: GPLv3 | |
Copyright 2018 Levi Webb */ | |
/* MINIMAL TCP SOCKET SUPPORT */ | |
typedef struct tsoc_con { |
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
<Jarcode> mazeto: I'm referring to the kind of computation that occurrs in most simulation games as not parrellelizable | |
* pilne has quit (Quit: Quitting!) | |
<Jarcode> mazeto: for example, collision detection gets gnarly with multiple threads and you end up having to aggressively group bodies together that might collide with each other and then perform the actual computations in the same thread | |
<Jarcode> mazeto: and then the same with the other groups | |
* rmbeer has quit (Remote host closed the connection) | |
* Aruseus has quit (Quit: Leaving) | |
* Aruseus ([email protected]) has joined | |
<Jarcode> mazeto: but then if there's something difficult to predict (ie. very high velocity object that could travel across the entire game world), suddenly you're finding yourself yielding other threads and creating a massive mess | |
* rmbeer (~rmbeer@unaffiliated/rmbeer) has joined | |
<beaky> just use a neural network to implement the simulation stuff |
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
/* setup screen framebuffer object and its texture */ | |
struct gl_sfbo { | |
GLuint fbo, tex, shader; | |
bool valid; | |
const char* name; | |
struct gl_bind* binds; | |
size_t binds_sz; | |
}; |
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
#define E 2.7182818284590452353 | |
void transform_smooth(struct gl_data* d, void** udaa, void* data) { | |
struct gl_sampler_data* s = (struct gl_sampler_data*) data; | |
float* b = s->buf; | |
size_t sz = s->sz; | |
for (int t = 0; t < sz; ++t) { | |
float | |
db = log(t), /* buffer index on log10 scale (db) */ |
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
struct Slot<T> { | |
state: AtomicUsize, /* request state, written by the tracker */ | |
occupied: AtomicBool, /* written by the owner */ | |
data: T /* valid only if occupied.load(...) == true */ | |
} |
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
From 7b92f57a4eec5fe2d01ee620f1213c238d128b86 Mon Sep 17 00:00:00 2001 | |
From: BuildTools <[email protected]> | |
Date: Fri, 30 Dec 2016 11:43:57 -0800 | |
Subject: [PATCH] Update dns.c and usage | |
--- | |
src/belle_sip_resolver.c | 2 +- | |
src/dns.c | 690 ++++++++++++++++++++--------------------------- | |
src/dns.h | 37 +-- | |
3 files changed, 296 insertions(+), 433 deletions(-) |
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
;; Jarcode's configuration for the best editor (emacs). | |
;; I now use EXWM, so emacs is my window manager. | |
;; Enter the debugger if emacs quits a frame without handling the quit signal | |
;; EXWM is somewhat unstable, so I'm using this feature to report issues when I | |
;; need to force emacs out of an operation | |
(setq debug-on-quit t) | |
;; The toolbar and menu bar is for casuals | |
(tool-bar-mode -1) |
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
;; Jarcode's configuration for the best editor (emacs). | |
;; The toolbar and menu bar is for casuals | |
(tool-bar-mode -1) | |
(menu-bar-mode -1) | |
;; Scrollbar is just distracting, line numbers are used to know where in the file I am | |
(scroll-bar-mode -1) | |
;; Font, enable anti-aliasing and FULL HINTING in GTK to get desired look |