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
// 1. demonstrate writing OpenEXR using Hio, then reading the file back in.
// 2. read a two channel exr file using Hio, then creata HioTexture with it
do {
float* data4 = (float*) malloc(w*h*4);
float* amplify = data4;
for (int i = 0; i < h; ++i) {
for (int j = 0; j < w; ++j) {
if (i&1) {
@meshula
meshula / notestaking.md
Created January 12, 2024 17:46
note taking

I've tried various things through the years. Starting with paper notebooks, until the early 2000s. I still flip through them from time to time to refresh my memory.

From then until about 2012, I used Twitter and a blog. http://nickporcino.com/meshula-net-archive/archive.html Forgive the terrible early web-look. From the cloud on the side, you can see that I tagged posts, and this tagging system served me very well. Of all the things I have tried, this archive is the most useful. I wish I still use it, but the scaffolding I wrote for it is very old, and I don't have time to upgrade it.

Until a couple of years ago, I used gists as a notebook. eg.

developing a new version of Landru scripting system: https://gist.github.com/meshula/48a62b20b3db57fdd7e70b78567fa316

exploring static initialization in USD:

@meshula
meshula / nasaprompt.txt
Created October 26, 2023 18:34
nasaprompt.txt
source https://twitter.com/thatroblennon/status/1717312851281654173
NASA open-sourced a monster of a megaprompt.
I deconstructed it to see what I could learn.
7 lessons from a genius-level AI prompt:
The prompt (which I give in full at the bottom of this post) is designed to guide a user through the biomimicry design process.
#usda 1.0
(
defaultPrim = "World"
metersPerUnit = 0.01
upAxis = "Y"
)
def Xform "World"
{
def Scope "Looks"
#define LABTEXT_ODR
#include "include/LabText/LabText.h"
#include <stdio.h>
#include <map>
using std::map;
#include <string>
using std::string;
@meshula
meshula / prompts.txt
Created April 6, 2023 06:17
prompts.txt
Pixar's Universal Scene Description Logo, except the Logo is floating in space, like a planet, and has little USD logos whizzing around it as if they are 1950's satellites from an old Disney Man In Space film. centered subject filling half the frame, (high detailed skin:1.2), 35mm,, soft focus, soft lighting, high quality, film grain, kodachrome, chromatic aberration, slight radial distortion, NASA film footage, television scanlines, lomography, clouds that look like amoebas
Steps: 21, Sampler: Euler a, CFG scale: 6.5, Seed: 2189048835, Size: 512x512, Model hash: 6ce0161689, Model: v1-5-pruned-emaonly
Time taken: 2.55sTorch active/reserved: 2616/3160 MiB, Sys VRAM: 4431/32511 MiB (13.63%)
@meshula
meshula / usd-static-thoughts.md
Last active June 11, 2023 16:58
usd static linking thoughts

ARCH_CONSTRUCTOR is used by pxr/base/arch/initConfig.cpp:ARCH_CONSTRUCTOR(Arch_InitConfig, 2, void) pxr/base/tf/initConfig.cpp:ARCH_CONSTRUCTOR(Tf_InitConfig, 2, void) pxr/base/tf/initConfig.cpp:ARCH_CONSTRUCTOR(Tf_InitConfigPost, 202, void) pxr/base/plug/initConfig.cpp:ARCH_CONSTRUCTOR(Plug_InitConfig, 2, void) pxr/base/vt/value.cpp:ARCH_CONSTRUCTOR(Vt_CastRegistryInit, 255)

and by the macros TF_REGISTRY_DEFINE TF_REGISTRY_DEFINE_WITH_TYPE

@meshula
meshula / balloons.md
Created March 21, 2023 20:46
balloons.md

Hark! To shoot down a balloon without inquiry, Is a careless deed, unwise and lacking prudence. Ere the shaft be loosed, one must seek to know, Whose airy vessel 'tis that floats aloft. For in this age of great strife and conflict, The skies above are fraught with hidden foes. So let no man act with haste or rashness, Lest he draw down upon himself a dire retribution. Let wisdom guide our deeds and steer our course, And let our arrows fly with aim true and sure,

@meshula
meshula / test-nanoexrinfo.lua
Created March 15, 2023 02:06
test-nanoexrinfo.lua
local ThreadPool = {}
ThreadPool.__index = ThreadPool
function ThreadPool.new(num_workers)
local self = setmetatable({}, ThreadPool)
self.num_workers = num_workers
self.workers = {}
self.tasks = {}
self.running = true
@meshula
meshula / test-nanoexrinfo.zig
Created March 15, 2023 02:04
test-nanoexroinfo.zig
const std = @import("std");
const Queue = std.mpmc.MPMCQueue;
const sync = std.sync;
const Allocator = std.heap.ArenaAllocator;
const io = std.io;
const os = std.os;
const MAX_TASKS = 100;
pub fn ThreadPool(allocator: *Allocator, num_threads: usize) anyerror!void {