Skip to content

Instantly share code, notes, and snippets.

View zacharycarter's full-sized avatar
👋

Tail Wag Games zacharycarter

👋
View GitHub Profile
@zacharycarter
zacharycarter / wclwn.md
Last active March 12, 2024 12:45
Binding to C Libraries with Nim
Image - http://imgur.com/a/Y9sta
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~~~~~~~~~~~~~~~~~%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~~%%%%%~~%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~~~~~~~~~~~~~%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~~%%%%%~%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~~~~~~~~~~~~%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~%%%%~~~%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~~~~~~~~~%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~~~~%%~%%~%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~~~~~~%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~~~~%%~%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~%%%%%%%%%%%%%%%%%%%%%%%%%%~%%~~~~~%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~%%~%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~%~%%%%%%%%%%%%%%%%%%%%%%~~%%~~~~~%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~%%%~~~~%%%~~%%~
type
Handness = enum
hLeft,
hRight
NearFar = enum
nfDefault,
nfReverse
Vec3 = object
/* clang-format off */
/*
ijss : IncredibleJunior SparseSet
sparse set [1] for bookkeeping of dense<->sparse index mapping or
a building block for a simple LIFO index/handle allocator
[1] https://research.swtch.com/sparse
*/
@zacharycarter
zacharycarter / dungeon_keeper_crunch.txt
Created November 1, 2018 01:22
dungeon_keeper_crunch
JONTY HERE : ...I AM WRITING THIS AT 4AM ON KEEPERS LAST DAY. I LOOK AROUND
THE OFFICE AND ALL I SEE ARE THE TIRED PALE FACES OF THE KEEPER TEAM. THIS
PROJECT HAS DESTROYED THE HEALTH AND SOCIAL LIVES OF EACH MEMBER, SO I HOPE
YOU LIKE THE GAME. AMAZINGLY AFTER SIXTEEN HOURS A DAY, 7 DAYS A WEEK, FOR
NEARLY 5 MONTHS WE STILL DO. THIS GAME HAS BEEN WRITTEN WITH A PASSION I AM
PROUD TO BE PART OF....
I DO NOT JUST HOPE YOU LIKE IT, I ALSO HOPE YOU ARE AWARE OF THE HUGE AMOUNT
OF WORK WE HAVE ALL DONE. ENOUGH WAFFLE AND ON TO THE REASON FOR THIS TEXT...
import asyncdispatch
import asynctools
import docopt
import json
import nre
import os
import ospaths
import sequtils
import sha256/sha256sum
import strutils
@zacharycarter
zacharycarter / orthodoxc++.md
Created October 20, 2018 03:47 — forked from bkaradzic/orthodoxc++.md
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

{.experimental.}
type Refcounted = ref object
rc: int
value: int
type A = object
r: Refcounted
proc newA(value: int): A =
<div>
<h1>Hello, World!</h1>
<h2>It is 8:44:27 PM.</h2>
</div>
tagged_template_literal.js:908:3
<div>
<h1>Hello, World!</h1>
<h2>It is 8:44:28 PM.</h2>
</div>
tagged_template_literal.js:908:3
type
CircAlloc* [Size: static[int] , T] = tuple # Better less overhead
baseArray : array[Size,T]
index : uint16
type
Job = object of RootObj
var foo {.threadvar.}: CircAlloc[1,Job]