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 / README.md
Created February 27, 2020 15:48
Link and a Half Lists

Declare Link; 'single and a half'ly-linked lists

hse macros are for linking and unlininking things in a linked list. The list is basically a singly-linked list, but also references the pointer that is pointing at the current node. This simplifies insert/remove operations, because the specific list that the node is in, is not required. List heads will always be updated correctly.

A few 'tricks' are available, such as a) These are deemed dangerous; and uncomprehendable by anyone but the maintainer. use at your own time and expense required to explain WHY these work.

@d3x0r
d3x0r / ABOUT.md
Last active May 29, 2020 23:36
Object storage filesystem interface notes
@d3x0r
d3x0r / create if not exist.js
Created February 20, 2020 21:51
gets a directory, opens a file in the directory, and reads, if the file doesn't exist, the read fails, so it writes a default, and then reads again...
console.log( "Untested... shell to test" );
const orgRoot = "org.example.domain"
const serviceRoot = "data";
const dbRoot = "users";
const appIdentifier = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
@d3x0r
d3x0r / linklist.rewrite.c
Last active February 20, 2020 03:54
Rewrite with me and next instead of prev
@d3x0r
d3x0r / random.js
Last active February 19, 2020 22:49
Random Walker from Jenni
//https://w...content-available-to-author-only...n.com/C-Programming-Modern-Approach-2nd/dp/0393979504/
const size = 10;
var i,j,k,random;
var i1,j1;
var a = [];
for( var tmp = 0; tmp < size; tmp++ ) {
a.push([]);
@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 / dynamicContext.js
Last active December 3, 2019 02:06
Dynamic object context(?)
// This is a snipper to test the idea of context-sensitive commands....
//
// The command is `n` which is a short for 'go north'
// from a REPL standpoint, just taking the input 'n' and passing it to vm.runInContext() works
//
// However, that also limits to just that sandbox for commands, but I'd want at least 2...
// that is 'mine' or the current one of the object, and the other for the room that the object
// is in...
// But then I guess also extension provided by attachments (aim camera (at) target) if you're
// holding a camera...
@d3x0r
d3x0r / StupidLookupTester.js
Last active December 2, 2019 11:06
Object key lookup test
var o = {};
for( var a = 0; a < 100; a++ ) {
o['a'+a] = a;
}
var n;
var tickNow;
var tickDone;
@d3x0r
d3x0r / makeIng.js
Last active November 27, 2019 08:41
A routine to make a verb base into a present participle ... move -> moving
// This is a utility to make a pre-event dispatched before a normal event.
// on(move) ... on(moving... ) followed by on( move )
//
//
function makeIng( verb ) {
if( verb.endsWith( "y" )
||verb.endsWith( "a" )
||verb.endsWith( "o" )
@d3x0r
d3x0r / EmscriptenEnv.md
Created June 15, 2019 05:23
Emscripten default working environment

Default Environment variable

        ENV['USER'] = ENV['LOGNAME'] = 'web_user';
        ENV['PATH'] = '/';
        ENV['PWD'] = '/';
        ENV['HOME'] = '/home/web_user';
        ENV['LANG'] = 'C.UTF-8';
        ENV['_'] = Module['thisProgram'];