Skip to content

Instantly share code, notes, and snippets.

View Orbots's full-sized avatar

Michael Alexander Ewert Orbots

View GitHub Profile
@Orbots
Orbots / ga3.h
Last active May 30, 2024 23:38
Geometric Algebra with signature (3,0,0)
// Example:
// ga_versor q = normalize(add(1.0, (ga_bivector){ .e12 = 1.0 }));
// see tests at end of file for more
#pragma once
#include <stdarg.h>
#include <complex.h>
#include <math.h>
@Orbots
Orbots / TypedPools.jl
Last active December 19, 2018 00:27
Typed memory pool for julia.
module TypedPools
export
Handle,
TypedPool,
StructPool,
MutableStructPool,
alloc!,
alloc_args!,
alloc_inplace!,
@Orbots
Orbots / Graph Laplacian on Constraints.ipynb
Created June 30, 2017 23:38
Graph Laplacian on Constraints.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Orbots
Orbots / .vimrc
Created October 7, 2015 19:31
.vimrc
execute pathogen#infect()
set ignorecase
set smartcase
set hlsearch
set wildmenu
set showcmd
set nocompatible
syntax on
filetype plugin indent on
set shiftwidth=2
@Orbots
Orbots / evaluator.cljs
Last active December 25, 2015 00:29
bare-bones metacircular evaluator in clojurescript
;; Develop your clojurescript program here
(ns metacirc.evaluator (:require [cljs.reader :as reader]))
;; TODO:
;; globals: "let", "do"
;; javascript interop
;; var args or at least get more than 4 for list
;; {} [] #{} '()
@Orbots
Orbots / entity.cljs
Created October 8, 2013 17:23
component entity system in clojurescript
;; TODO: deletion. warning when adding group to existing name. is this implemenation of groups a good thing?
(ns forces.framework.component
)
(def !nextEntityGUID (atom 1))
(def !names (atom {}))
(def !nameReverseLookup (atom {})) ;; name to guid map
@Orbots
Orbots / component.cljs
Last active June 13, 2017 08:26
component entity system in clojurescript
;; component access, query and data
(ns forces.framework.component
)
;; support stuff
(defn dissoc-in
"Dissociates an entry from a nested associative structure returning a new
nested structure. keys is a sequence of keys. Any empty maps that result
will not be present in the new structure."
[m [k & ks :as keys]]