Skip to content

Instantly share code, notes, and snippets.

View davejachimiak's full-sized avatar

Dave Jachimiak davejachimiak

View GitHub Profile
@davejachimiak
davejachimiak / Spike: Audio layering.md
Last active August 11, 2022 18:25
Research relating to: app.shortcut.com/wistia-pde/story/2262/spike-audio-layering

Spike: Audio layering

Research Objectives

Because render pipeline has support for layering audio, we need to research what it will take to support this in the UI - like adding a background track, and adjusting the volume on both the main track and background track.

Engineering Approach

  • Figure out what payload the Render Pipeline contract expects
    • Answer: RP is expecting an audioMix type, an input, multiple audio inputs -- an example of that being below.
  • Test hardcoding the input of a background track to supply RP and make sure you're getting the expected output.
// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/12/Memory.jack
/**
* Memory operations library.
*/
class Memory {
static int MEMORY, HEAP_BASE, NEXT_POINTER, SIZE, HEAP_LIMIT, OOM, freeList, i;
@davejachimiak
davejachimiak / frp.md
Created October 11, 2015 01:43
A Collection of Papers on Functional Reactive Programming
  • Functional Reactive Animation. 1997. Conal Elliott and Paul Hudak.
  • Functional Reactive Programming From First Principles. 2000. Paul Hudak and Zhanyong Wan.
  • Genuinely Functional User Interfaces. 2001. Antony Courtney and Conal Elliott.
  • Event-Driven FRP. 2002. Zhanyong Wan, Walid Taha, and Paul Hudak.
  • Functional Reactive Programming, Continued. 2002. Henrik Nilsson, Antony Courtney, and John Peterson.
  • Push-Pull Reactive Programming. 2009. Conal Elliott
  • Asynchronous Functional Reactive Programming for GUIs. 2013. Stephen Chong and Evan Czaplicki.
{
"$schema": "http://json-schema.org/schema#",
"additionalProperties": false,
"definitions": {
"pathType": {
"type": "string",
"pattern": "^(\\/?((\\.{2})|([a-z0-9][a-z0-9\\-.]*[a-z0-9]+)|([a-z0-9]*))($|\\/))+$",
"minLength": 1
}
},
@davejachimiak
davejachimiak / curryable.rb
Last active January 2, 2016 06:19
A mixin with which to extend a singleton class that curries arguments on a function defined by `#def_function`.
module Curryable
def def_function &block
@function = block
end
def call arg
unless @function
raise StandardError, 'must define a function with def_function'
end
SELECT DISTINCT main_genres.*
FROM main_genres
JOIN movie_genres ON movie_genres.genre_id = main_genres.genre_id
JOIN netflix_instant_movies ON netflix_instant_movies.id = movie_genres.netflix_instant_movie_id
JOIN rotten_tomatoes ON rotten_tomatoes.netflix_instant_movie_id = netflix_instant_movies.id
JOIN netflix_instant_movie_imports ON netflix_instant_movie_imports.netflix_instant_movie_id = netflix_instant_movies.id
JOIN netflix_instant_imports ON netflix_instant_imports.id = netflix_instant_movie_imports.netflix_instant_import_id
WHERE netflix_instant_imports.id =
(SELECT id
FROM netflix_instant_imports
@davejachimiak
davejachimiak / FromHashable.rb
Last active December 24, 2015 02:59
FromHashable
module FromHashable
def initialize hash
@hash = hash
set_ivars
set_methods
set_as_hash
end
private
module LoggingObserver
def self.included base
base.extend ClassMethods
end
module ClassMethods
def new *args
@instance = super
override_methods
@instance
@davejachimiak
davejachimiak / github_generated_merge_commit__sha_from_pull.sh
Last active December 20, 2015 14:59
Get merge commit created by Github when you open a pull request from a branch (`my_branch`)
REMOTE_SHA=`git rev-parse origin/my_branch`
PULL_NUMBER=`git ls-remote origin | grep $REMOTE_SHA | grep pull | perl -n -e '/pull\/(.*)\/head/ && print $1'`
git ls-remote origin | grep refs\/pull\/$PULL_NUMBER\/merge | awk '{ print $1 };'
old_instance_methods = Object.instance_methods
require 'minitest/spec'
$infected_assertions = Object.instance_methods - old_instance_methods
module Kernel
def expect object
Expect.new object
end