Skip to content

Instantly share code, notes, and snippets.

View d3x0r's full-sized avatar

Jim B d3x0r

  • Las Vegas
View GitHub Profile
@d3x0r
d3x0r / ABOUT.md
Created June 8, 2020 18:34
Node BackingStore Debug Crash

You can download this gist as a single repository.

build

node-gyp configure --debug
node-gyp build --debug
@d3x0r
d3x0r / Marching-tets.md
Last active January 5, 2024 08:10
Marching tetrahedrons; Marching Diamond Crystal Lattice; Marching Cubes/Sliced into 5 Tetrahedrons
@d3x0r
d3x0r / CMakeLists.txt
Created June 23, 2023 23:54
Test Mouse Cursor hiding (windows)
cmake_minimum_required(VERSION 3.1)
PROJECT( test )
add_executable( test_hide_cursor test_cursors.cc )
add_executable( test_wait_cursor test_wait.cc )
@d3x0r
d3x0r / C.dot.arrow.md
Last active April 2, 2023 03:41
A proposal for extending C to allow `.` operator to perform indirection of a pointer.

See C++ Proposal

Document number Nnnnn=yy-nnnn
Date: yyyy-mm-dd
Project WG14 - Programming Language C Working Group(?)
Reply-to d3x0r < d3ck0r at gmail >

I. Table of Contents

@d3x0r
d3x0r / script.js
Last active April 13, 2022 18:23 — forked from onosendi/script.js
function sleep() {
return new Promise((resolve) => {
setTimeout(resolve, 2000);
});
}
async function foo() {
while(1) {
const bar = // really big array
await sleep();
@d3x0r
d3x0r / README.md
Created February 12, 2022 02:12
General Project Updates

Projects

Some of my projects.

@d3x0r
d3x0r / panthers_c_preprocessor.c
Last active January 23, 2021 05:52
This is portable a C preprocessor written in low level C.
// make #if conditions spanning files a warning...
// also unbalanced #endif statements....
#ifndef __GCC__
//#include <conio.h>
#endif
#if defined( _WIN32 )
// getmodulefilename
#include <windows.h>
#include <direct.h>
#endif
@d3x0r
d3x0r / C++.dot.arrow.md
Last active August 1, 2020 20:41
A proposal for extending C++ to allow `.` operator to perform indirection of a pointer.
Document number P2142R1
Date: 2020-05-08
Audience SG17 EWG Incubator
Reply-to James (Jim) Buckeyne < d3ck0r at gmail > (AKA d3x0r https://github.com/d3x0r)

I. Table of Contents

@d3x0r
d3x0r / AAA-Matrix.md
Last active July 8, 2020 07:21
Discussion regarding matrix composition from angle-angle-angle vectors

This is an alternative method to get a basis from a quaternion (log quaternion)... or from angle/angle/angle. This is built by rotating the constant vectors (1,0,0), (0,1,0), (0,0,1) via standard quaternion rotation, and reducing common factors. The 0s and 1s collapse out a lot of the terms of apply. It ends up being less work to get the 3 vector basis than to rotate a single point; although if you USE the basis to multiply with the point; that increases the work to excess of just rotating a vector directly...

This is the base form... the steps will be broken out for phases of substitution. As implemented here https://github.com/d3x0r/STFRPhysics/blob/master/3d/src/dual-quat.js#L347

@d3x0r
d3x0r / twist.js
Last active July 1, 2020 21:19
Twist JS Function combined
// this = { x: xAngle, y:yAngle, z:zAngle, nL: |x|+|y|+|z|, nR:sqrt( xx+yy+zz ) }
// nR = normRectangular
// nL = normLinear
function twistQuaternion(theta) {
// function getBasis() { // computes xyz basis vectors (matrix)
// this is angle-angle-angle log-quaternion