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
3-D
4-H
a cappella
a gogo
a la carte
a la king
a la mode
a posteriori
a priori
a tempo
@davepagurek
davepagurek / abstraction-proposal.md
Last active Apr 18, 2018
Calder abstraction proposal
View abstraction-proposal.md

Calder geometry abstraction proposal: tangible models

Overview

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.

Armatures

Building armatures

@davepagurek
davepagurek / proposal.md
Last active Apr 15, 2018
Calder dsl proposal
View proposal.md

Calder Pipeline DSL Proposal

Background

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: https://github.com/regl-project/regl/blob/gh-pages/API.md#commands

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
<html>
<head>
</head>
<body>
<canvas id="glCanvas" width="640" height="480"></canvas>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gl-matrix/2.4.0/gl-matrix-min.js"></script>
<script type="text/javascript" src="script.js"></script>
</body>
</html>
@davepagurek
davepagurek / setup.sh
Last active Oct 10, 2017
Add arrow keys to db2. Run `db2c`
View setup.sh
#!/usr/bin/env bash
# install rlwrap
cd ~
git clone https://github.com/hanslub42/rlwrap.git
cd rlwrap
autoreconf --install
./configure --prefix=$HOME
make
make install
View install_db2_wrapper.sh
#!/usr/bin/env bash
# echo rlwrap
cd ~
git clone https://github.com/hanslub42/rlwrap.git
cd rlwrap
autoreconf --install
./configure --prefix=$HOME
make
make install
View TestModule.pm
use v6;
unit module TestModule;
constant $nouns = "{$?FILE.IO.dirname}/conv.data.noun".IO.lines.Set;
@davepagurek
davepagurek / openletter.md
Last active Oct 2, 2017
An open letter to CS247.
View openletter.md

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
davepagurek / .gitignore
Created Apr 7, 2016
Xcode .gitignore sample
View .gitignore
.DS_Store
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
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.