Skip to content

Instantly share code, notes, and snippets.

View meshula's full-sized avatar
💭
Exploring liminal spaces

Nick Porcino meshula

💭
Exploring liminal spaces
View GitHub Profile
@meshula
meshula / usd-tbb-boost.md
Last active October 14, 2021 12:18
usd-tbb-boost.md

boost removal is an ongoing, low noise effort.

At this point, if you build without python, you can build the usd libraries treating boost as header only, without actually building boost. one or two of the command line tools use boost for command line options.

Porting those to (my suggestion) CLI11 would remove the last non-python boost dependency.

to be redundant and clear: you can manually cherrypick the boost headers

class Marker {
}
class Element {
var layers = [CGImage?]() // this will become an ImageIndex that refers to a jpg, tile, etc
var markers = [Int]()
var start_frame = Int(0)
var end_frame_ex = Int(0)
var in_frame = Int(0)
@meshula
meshula / zig-pypi.py
Created July 13, 2021 17:25
publish zig to pypi
# This is not original code, it's from https://github.com/ziglang/zig-pypi
# this copy's purpose is to add comments in order to understand how it works
import os
import hashlib
import urllib.request
from email.message import EmailMessage
from wheel.wheelfile import WheelFile, get_zipinfo_datetime
from zipfile import ZipInfo, ZIP_DEFLATED
import libarchive # from libarchive-c
@meshula
meshula / rusty-cli.md
Last active May 11, 2023 13:31
Rust rewrites of command line tools
@meshula
meshula / usd-adoption.md
Created May 19, 2021 22:18
notes on usd adoption
  • on Windows, pip largely works for PySide2, but PySide2 is poorly supported and mostly broken under conda. Mixing and matching pip and conda is a bad practice.
  • in a non-studio environment, Qt is problematic outside of the GPL3 environment.
  • usdview is great, but if Python, or Qt, or PySide2 provide challenges, the onboarding process to USD involves a large effort
  • no low-dependency usdview is available
  • boost is a barrier to adoption due to well documented versioning issues (e.g., it is in vfxplatform as a configuration difficulty) and an onboarding-unfriendly build system
  • tbb is a barrier outside of the DCC environment, as it is Yet Another threading system that may be at odds with either a developer's own tasking system, or a system native one such as Apple's Grand Central Dispatch. It is very easy to induces oversubscription problems with TBB in practice.
  • lack of standard cookbooks. there are multiple community efforts, but no acknowledged best practice sources
  • Python is highly adopted in Fil
@meshula
meshula / dinput8_joystick.cpp
Created May 16, 2021 19:28 — forked from t-mat/dinput8_joystick.cpp
DirectInput Joystick class
#include <windows.h>
#include <stdio.h>
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#pragma comment(lib, "dinput8.lib")
#pragma comment(lib, "dxguid.lib")
class DiJoyStick {
public:
@meshula
meshula / character_anim.md
Created May 11, 2021 21:54
Character animation notes

Character Animation

#include <iostream>
#include <assert.h>
#include <vector>
template<class T>
struct Func{};
// std::func replacement without dynamic memory allocation (captures are limited to 48 bytes)
// this could be extended to support captures >48 bytes... of course, with a bit more of logic
// and some state.
@meshula
meshula / clean_git_repository.bash
Created January 15, 2021 22:54 — forked from ymollard/clean_git_repository.bash
Clean a git repository by deleting history and data of old deleted files
#!/bin/bash
# This script, executed at the root of a git repository, deletes traces of every old file in this repository, index + blob on all branches
# It can take 10-30 minutes to run and will print regular warning stating than some references are unchanged
# time ./clear_git_repositor.bash >cleaning.log
# We need several passes to clean files renamed multiple times (git log --find-renames prevents its deletion for each renaming)
# MAXIMUM_PASSES should be more than the maximum number of renamings/movings for any file, if not then we might keep some traces of former files
MAXIMUM_PASSES=10 # Maximum number of passes