Skip to content

Instantly share code, notes, and snippets.

View samizdatco's full-sized avatar

Christian Swinehart samizdatco

View GitHub Profile
Finished dev [unoptimized + debuginfo] target(s) in 0.17s
Running `target/debug/skpn-win`
[2022-07-23T23:17:40Z INFO skulpin_renderer::instance] Finding vulkan entry point
[2022-07-23T23:17:40Z INFO skulpin_renderer::instance] Found Vulkan version: (1, 3, 216)
[2022-07-23T23:17:40Z DEBUG skulpin_renderer::instance] Available Layers: [
LayerProperties {
layer_name: "VK_LAYER_LUNARG_api_dump",
spec_version: 4206808,
implementation_version: 2,
description: "LunarG API dump layer",
@samizdatco
samizdatco / backtrace.txt
Created July 25, 2022 14:19
Crash when deallocating renderer
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10360ce0)
* frame #0: 0x00000001bb2165a0 libobjc.A.dylib`objc_msgSend + 32
frame #1: 0x0000000100999fd4 rafx-win`_$LT$$LP$$RP$$u20$as$u20$objc..message..MessageArguments$GT$::invoke::h30bf3e6d2c283a8c(imp=(libobjc.A.dylib`objc_msgSend), obj=0x000000010360d530, sel=Sel @ 0x000000016fdf7b20, (null)=<unavailable>) at mod.rs:128:17
frame #2: 0x000000010099e400 rafx-win`objc::message::platform::send_unverified::_$u7b$$u7b$closure$u7d$$u7d$::h77d0856c11fe0d0c at mod.rs:27:9
frame #3: 0x000000010099c948 rafx-win`objc_exception::try::_$u7b$$u7b$closure$u7d$$u7d$::h34866726d430948d at lib.rs:68:31
frame #4: 0x000000010099b6f8 rafx-win`objc_exception::try_no_ret::try_objc_execute_closure::h359046944fc7da9f(closure=0x000000016fdf7ce0) at lib.rs:34:9
frame #5: 0x00000001009af878 rafx-win`RustObjCExceptionTryCatch(try=(rafx-win`objc_exception::try_no_ret::try_objc_execute_closure::h359046944fc7da9f at lib.rs
@samizdatco
samizdatco / backtrace.txt
Created July 24, 2022 23:02
hello_skulpin_winit crash
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x20)
* frame #0: 0x00000001bb2164d0 libobjc.A.dylib`objc_retain + 16
frame #1: 0x00000001bb21d7fc libobjc.A.dylib`objc_retainAutoreleaseAndReturn(objc_object*) + 16
frame #2: 0x000000010096a5e4 hello_skulpin_winit`GrMtlOpsRenderPass::setupRenderPass(GrOpsRenderPass::LoadAndStoreInfo const&, GrOpsRenderPass::StencilLoadAndStoreInfo const&) + 204
frame #3: 0x000000010096a4a4 hello_skulpin_winit`GrMtlOpsRenderPass::GrMtlOpsRenderPass(GrMtlGpu*, GrRenderTarget*, sk_sp<GrMtlFramebuffer>, GrSurfaceOrigin, GrOpsRenderPass::LoadAndStoreInfo const&, GrOpsRenderPass::StencilLoadAndStoreInfo const&) + 160
frame #4: 0x000000010096aab8 hello_skulpin_winit`GrMtlOpsRenderPass::GrMtlOpsRenderPass(GrMtlGpu*, GrRenderTarget*, sk_sp<GrMtlFramebuffer>, GrSurfaceOrigin, GrOpsRenderPass::LoadAndStoreInfo const&, GrOpsRenderPass::StencilLoadAndStoreInfo const&) + 68
frame #5: 0x000000010095ff98 hello_skulpin_winit`GrMt
@samizdatco
samizdatco / inline-csv.js
Last active March 19, 2021 17:07
Rather than using the p5 preload() and loadTable() functions, you can paste your CSV data right into the js file and use the buildTable() function to convert it into a p5.Table object (see: https://p5js.org/reference/#/p5.Table). Make sure you surround your csv text in `backwards quote marks` in order to create a multi-line string.
var CSV = `Year,United States,Russia,United Kingdom,France,China,India,Pakistan,North Korea
1945,1,0,0,0,0,0,0,0
1946,2,0,0,0,0,0,0,0
1947,0,0,0,0,0,0,0,0
1948,3,0,0,0,0,0,0,0
1949,0,1,0,0,0,0,0,0
1950,0,0,0,0,0,0,0,0
1951,16,2,0,0,0,0,0,0
1952,10,0,1,0,0,0,0,0
1953,11,5,2,0,0,0,0,0
#!/usr/bin/env python
# encoding: utf-8
"""
pbj
Pretty-print whatever JSON is currently in the pasteboard and view it in your pager of choice
USAGE
pbj [-c] [-m]
var tests
var arsenal
function preload(){
tests = loadTable('data/totals.csv', 'csv', 'header')
arsenal = loadTable('data/warheads.csv', 'csv', 'header')
}
@samizdatco
samizdatco / sketch.js
Last active September 30, 2018 21:45
function setup() {
createCanvas(720, 400);
}
// define global variables to hold the current rotation of each polygon across draw() calls
var hRot = 0
var mRot = 0
var sRot = 0
function draw() {
var existingHour
function setup() {
var now = clock()
existingHour = now.hour
}
function draw() {
var now = clock()
function draw() {
// get the current time
var now = clock()
// set the width & height of the sketch
createCanvas(800, 600)
background(51);
// use the `sec`, `min`, `hours`, and `day` numbers (which are all in the range 0-59, 0-23, or 1-31) to draw
var x;
var num;
// Sets the screen to be 2080 pixels wide and 720 pixels high
function setup() {
createCanvas(2080, 720);
noStroke();
}
function draw() {