Skip to content

Instantly share code, notes, and snippets.

Dave Pagurek davepagurek

Block or report user

Report or block davepagurek

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View adjectives.txt
a cappella
a gogo
a la carte
a la king
a la mode
a posteriori
a priori
a tempo
davepagurek /
Last active Apr 18, 2018
Calder abstraction proposal

Calder geometry abstraction proposal: tangible models


Positions and rotations in 3D space are unintuitive for people who aren't well versed in geometry. Artists are instead more used to thinking about space tangibly. Typically, when making sculpture additively, one will start with an armature, which is a skeleton of the final creation, and then and then attach things to build up the final form. Armatures are posed by holding certain parts and moving others. Pieces are connected to joints.


Building armatures

davepagurek /
Last active Apr 15, 2018
Calder dsl proposal

Calder Pipeline DSL Proposal


After writing the shader code itself, actually providing the shaders with data and calling them is a difficult process. I call the process of taking information, transforming it, and feeding it to shaders a pipeline. The code for the shaders themselves is not addressed in this proposal.

WebGL rendering is effectively a pure function: it takes some input, and writes to the screen. Since we don't read data back from the screen, this is a unidirectional data flow. It is just a matter of defining the input required for a shader. The Regl library uses this abstraction, calling a render of a shader a command:

However, because Regl doesn't parse your shader code, it doesn't know if you filled in all the data the shader needs. The best it can do is have you specify what the shader needs when defining a command, and checking at runtime that you passed in the values you said you would.

View index.html
<canvas id="glCanvas" width="640" height="480"></canvas>
<script src=""></script>
<script type="text/javascript" src="script.js"></script>
davepagurek /
Last active Oct 10, 2017
Add arrow keys to db2. Run `db2c`
#!/usr/bin/env bash
# install rlwrap
cd ~
git clone
cd rlwrap
autoreconf --install
./configure --prefix=$HOME
make install
#!/usr/bin/env bash
# echo rlwrap
cd ~
git clone
cd rlwrap
autoreconf --install
./configure --prefix=$HOME
make install
use v6;
unit module TestModule;
constant $nouns = "{$?FILE.IO.dirname}/".IO.lines.Set;
davepagurek /
Last active Oct 2, 2017
An open letter to CS247.

Open Letter to CS247

The past two assignments in this course have had what I feel to be significant issues that impede learning. I disagree with the philosophy behind the assignments' design decisions, and I feel like my opinions need to be voiced in order to help improve the quality of the course and, by extension, our education.

Counter-productive requirements

For a course about learning good C++ design, the decision to disallow all of STL, templating, arrays, and multiple files confuses me. The first assignment requires the creation of multiple container types, many of which can have very similar implementations. We are marked on not repeating ourselves, so every student completing this assignment needs to refactor their collections into some sort of heirarchy to achieve this and avoid simply copy-and-pasting code. There are a few ways to do this without using the tools we are restricted from using, and all of them lead to poor C++ code:

  • Void pointer casting: One can make a generic container c
davepagurek / .gitignore
Created Apr 7, 2016
Xcode .gitignore sample
View .gitignore
## Build generated
## Various settings
View gist:61edf63beea1068db30b
1. initially all registers are set to 0x0 except
$1 = 3
$2 = 1
$31 = something
what registers have changed (from beginning to end)
DIV(2,1) ; sets lo,hi = (1/3),1%3 = 0,1
ADD(0,1,1) ; $0 = $1 + $1, but this doesn't do anything ($0 stays 0)
SUB(3,1,2) ; $3 = $1 - $2, so $3 = 2
You can’t perform that action at this time.