from a conversation with Daniel after https://sflean.group/ 
 
 pytorch -> triton -> tritonIR -> ptx -> sass
 
 or eager-mode: pytorch -> prebuilt cuda kernels 
 
 
 jax -> jaxpr -> xla -> llvm ir -> ptx -> sass
 
 can’t have if statements in jax - branches are ?collapsed? at
compiletime 
 there is a keyword in jax that gets around this 
 it…

 First-in-human quantum entanglement imaging 
 
 PET scan observing entanglement on a 68Ga - observed annihilation
photons 
 
 
 EML: All elementary functions from a single binary operator 
 
 eml(x, y) = e^x - ln(y) 
 gives you all the cos, sin, tan 
 cute. practical? who knows! 
 i sketched a bit what making circuits with this would look like.…
Pulled from a model and not double-checked. “Proof system” used broadly: formal logic, mechanized theorem proving, and cryptographic proofs of knowledge. 
 
 ~500bce panini, ashtadhyayi (formal generative grammar of sanskrit) 
 ~350bce aristotle, syllogistic logic + organon 
 ~300bce euclid’s elements (axiomatic geometry) 
 ~250bce archimedes, method of…
I ported
 Flypitch 
from Lean 3 to Lean 4 over the course of approximately a week, mostly
unattended Claude. 
 The proof of the independence of the continuum hypothesis is a Gödel +
Cohen result that deals with the cardinality of the naturals vs. the reals. 
 That is to say, it states that ZFC (from set theory)
cannot prove or disprove the existence of a…

 Repo: ~/learning/gpucc (local) 
 Hardware: AMD EPYC (SEV-SNP), Intel Xeon (TDX), NVIDIA H100/A100 
 
 What is Confidential Computing? 
 
 Running workloads in hardware-enforced trusted execution environments (TEEs) 
 The host/hypervisor cannot read or tamper with guest memory 
 Attestation: cryptographic proof that the workload is running in a genuine TEE with…
The login flows generally seem poorly-written, and we have now increased
the complexity of login flows. Are they worth it? 
 Benefits: 
 
 They ?require? secure elements. Websites can now know that a subsequent
request is coming from the same private key in a secure element (we have
a cryptographic ?root of trust? / ?chain of attribution? that connects a
given request…

 Reflect on 5-7 different possible sources of the problem, distill those down to 1-2 most likely sources, and then add logs to validate your assumptions before we move onto implementing the actual code fix 
 source 
 
 
 
 Title: Senior Engineer Task Execution Rule 
 Applies to: All Tasks 
 Rule:
You are a senior engineer with deep experience building…
Pulled from a model and not double-checked: 
 
 100,000-50,000bce spoken language 
 ~10000bce agriculture, animal domestication 
 ~65000bce la pasiega cave paintings 
 ~3500bce bronze 
 ~3300bce early swords 
 ~3200bce written language 
 ~3000bce wheel 
 ~1500bce iron 
 ~1500bce hinduism 
 ~1300bce judaism 
 ~600bce buddhism / confucianism / daoism…
Rationalism has certainly been present in my high school and college
friend groups: initially with HPMOR and then later with LessWrong posts in
the DMs. When my roommates suggested we go to the conference, I was
enthusiastic for a shared group activity. 
 “Being” very intellectual - in the head - is perhaps not a recipe for
centeredness and embodiment, which seem…

 https://gallium.inria.fr/blog/intel-skylake-bug/ 
 
 Skylake series of Intel processors had a hardware bug when using
certain registers in tight loops, with hyperthreading enabled. 
 Manifested as crashes in OCaml programs. 
 
 

I got curious how Stable Diffusion works. 
 Diffusion models, in short: 
 
 PNG -> Some “latest space” 
 Compressed with a “variational encoder / decoder” 
 Add noise according to a gaussian 
 Pass (prompt,noise,latent_img, timestep) into a U-Net 
 U-Net predicts noise that was added at that timestep 
 A scheduler/sampler (e.g. DDPM, Euler)…
Curious, once again, what voice to use where. 
 Wanting to know precisely the correct time, socially, for a drink,
and precisely what the adverse health effects are. 
 Thanksgiving in Chicago November. Gym with Jose. 
 CCC at end of 2023. 
 SF for two weeks in January. 
 Colorado at the end of February, for Eric’s birthday. 
 
 Working in novel fields means…

 Bitcoin
 
 The First One 
 Proof of Work 
 Has a scripting language called Script 
 Lightning 
 
 
 Ethereum
 
 Proof of Stake 
 EVM opcodes see my notes 
 zksync 
 Optimism 
 
 
 Monero
 
 Privacy-preserving. High volume. 
 Had some traceability issues early on
( paper )
 
 i.e., you could defeat the…

 threshold secret sharing:
 
 you have multiple shards of a secret 
 given enough of them, you can reconstruct the whole secret 
 sample implementation: github/hashicorp/vault/shamir.go 
 
 
 multisig:
 
 you need multiple transactions from valid parties to execute
something 
 sample implementation: solidity-by-example/multisig 
…

 Arkworks has pretty unergonomic API but is the most used.
 
 Example code to prove a merkle tree inclusion 
 
 
 Bellman looks a little nicer but a little less production-ready.
 
 exposes a bunch of low-level primitives (you have to implement a bit! and xor!) for example 
 very mathy blog posts e.g.…
In January 2022, I moved to Berlin and led a team of 5 to build: 
 
	 A VR puzzle competition connected to a real-life fishtank via
	submersible webcam video stream designed to teach binary reverse engineering
		 
			 
				 
			 
			 
			 	 
				…
i’m excited about it! 
 https://staging.bsky.social/profile/klatz.co 
 why? 
 it solves a lot of twitter and mastodon’s problems. the devs are cool
people. i’ve used twitter ~every day for eight years, and have many times
not written useful code for myself because i knew it risked getting killed
by twitter. 
 what’s cool about it? 
 domain…
From contributing to Stepmania: 
 git pull --rebase upstream main
git push origin main
 # delete local branch
git branch -d foo/bar
# delete remote branch
git push origin --delete foo/bar
 # updating personal fork
git pull --rebase upstream main # pull most recent changes from project.
 # --rebase avoids merge commit.
 # only drop in case of merge…
… is hard, because it’s parenting. 
 And with parenting, you have to clean up after your kids, even when they
make large messes, and you’re tired, and you’re at your wit’s end. 
 The impulse to protect can be dangerous when misdirected. Or even wielded
by adversaries. 
 Think misapplications – those prepared to protect everything are bound…
(target audience: students) 
 Depends on context, but roughly sortable into 3 categories: 
 
 Independent (you, by yourself) 
 Industry (you, with a company) 
 Academic (you, with a professor) 
 
 These different sectors have different incentives. It is worth considering
whether these incentives align with your goals. Once affiliated with an
institution, it…

 For UIUCTF 2021 , I led a small group of colleagues to design and
deploy a CTF challenge wherein competitors had to fool an image classifier
based on resnet18 . 
 The challenge asks you to upload an image to the “pwny bouncer”, who will
then classify “pwny” or “not a pwny” using a naive classifier model, and a
robust classifier model.…
# tl;dr it lets you make a clean disposable python environment 
 
 # while in a project directory 
 python3 -m venv env
 
 ls ./env/bin
 # Activate.ps1 activate activate.csh activate.fish easy_install easy_install-3.8 pip pip3 pip3.8 pygmentize python python3 
 
 source ./env/bin/activate
 
 # now we can install packages in this folder 
 
 which…
(continuing the theme of “me writing posts for friends I’m teaching to
code”) 
 
 How to ask technical questions artfully: https://www.google.com/search?q=how+to+ask+technical+questions 
 
 Get faster, better, more accurate responses 
 People like you for asking questions interestingly and respectfully 
 Feel the fear, and do it anyway 
 
…
Audience: friends I’m teaching to code. 
 Warning, these are likely to change as WSL and discord.py do. 
 If you get stuck anywhere or want to know more, DM me! 
 Goal 
 A Discord bot on your local computer that runs when your computer is on. 
 Prerequisites 
 
 Know how to read 
 
 You will learn 
 
 How to read long instructions, ignoring…
A friend recently developed tendonitis from typing/piano/Overwatch 12-14 hrs/day and I sent them my list of resources, collected over many years of me worrying about long-term effects of computer usage. Here they are. 
 
 “ Voice Driven Development ” - Talk by Emily Shea on fighting RSI using Talon, an OSS software project 
 g Heavy Industries : Stenography keyboards made…
Files 
 This challenge had 0 solves, probably because it was for a smaller CTF and had a difficult logical jump. I got about halfway through this challenge before getting stuck. I ended up
asking the organizers for the intended solve after the competition ended,
at which point I quickly solved it. 
 We’re given a WASM binary and a webserver asking for a username…
this post was started 6 February, finished 9 July, and is backdated 
 Been a while since the last post! I’ve been busy I guess. Haven’t had too
much of an itch to blog until I got to Seattle and had a little
downtime caffeine at 10pm by accident. Writing late at night remains one of my favorite hobbies. 
 I still really like the idea of blogging and hosting your own…
I spent a disproportionately large amount of time solving the first portion
of this binary, because I was having fun learning things via it. I
did not solve anything past the first function, but hoo boy, there’s a great
pleasure in diving really deeply into a small problem and learning a lot. 
 We are given a pwn binary that asks for a magic value and runs through…
Ian Klatzco 
 tl;dr: How to make a successful security club 
 
 Create an easy-to-access chatroom (Discord) 
 Set up a CTF framework like CTFd 
 Make extremely easy challenges 
 Make slides, hand them out at the beginning 
 Present on them for 15m, walk around and help people solve for 45m 
 
 Abstract 
 Building good teams (either in the “elite”…
gdb-peda$ help catch
Set catchpoints to catch events.

List of catch subcommands:

catch assert -- Catch failed Ada assertions
catch catch -- Catch an exception
catch exception -- Catch Ada exceptions
catch exec -- Catch calls to exec
catch fork -- Catch calls to fork
catch handlers -- Catch Ada exceptions
catch load -- Catch loads of shared…

 Installed a bunch of dependencies from
 https://github.com/stepmania/stepmania/wiki/Compiling-StepMania .
 
 Dl’d directx 
 had 2015 redistrib on system 
 installed windows 10 sdk 
 installed latest nsis (release 15 dec 2018) 
 
 
 installed visual studio community 
 git clone git@github.com:stepmania/stepmania.git 
 cd stepmania && git…
Manners of getting input. From memory, maybe more later. 
 x86, 32 & 64b. 
 read from stdin to a buffer : Will read any character (incl. nulls). 
 fgets : reads up to n-1. terminates on nulls. adds a newline. 
 scanf : varargs. takes a format string specifier, eg scanf("%9s", mem_loc); . 
 getc in a while() loop : probably my least favorite. 
 mmap() 
 port mapped io :…
audience: sigpwny members after the meeting where we ran it. very tutorial-y 
 would probably be very useful for students trying to do CS461/ECE422’s printf activity, though that’s 32-bit 
 sigpwny meets 7pm thursday eceb 3013; we can’t help you with your security MPs but we’ll teach you the skills necessary to do them 
 This is very long and favors going…
A few PEDA commands are undocumented (on the first page of the GitHub repo,
there’s more useful help in help ). Here are my notes. 
 There are a bunch of useful aliases at the bottom of the file . 
 stack n 
 Prints n words off the stack. 
 context 
 Type context to re-print what usually prints at a breakpoint (registers, code, stack). 
 Built-in exploit code…
Warning: very stream-of-thought-y. 
 
 It’s PIE, and ASLR is already off on my machine which makes restarting in GDB easier. 
 Set a breakpoint on main , and the strncmp in main that looks useful. 
 main checks to make sure the input string is 37 bytes. 
 r <<< $(python -c 'print 'a'*37')
 x64 calling convention is rdi, rsi, rdx, rcx, r8, r9, and then they start going…
According to the ABI, the first 6 integer or pointer arguments to a
function are passed in registers. The first is placed in rdi, the second in
rsi, the third in rdx, and then rcx, r8 and r9. Only the 7th argument and
onwards are passed on the stack.
 via
I needed this a few times during ECE411 — Computer Organization and Design at
UIUC. 
 Opcodes are stored in the lowest 6 bits of the instructions (for 32 bit mode at least)

LUI 0110111
AUIPC 0010111
JAL 1101111
JALR 1100111
BEQ 1100011
BNE 1100011
BLT 1100011
BGE 1100011
BLTU 1100011
BGEU 1100011
LB 0000011
LH 0000011
LW…
I wanted to learn how to write a CPU emulator, because it seemed like fun!
I ended up writing a disassembler too. GitHub . 
 I came across this “ literate program ” on how to write one in C++. I wanted to
do it in Python, because it seemed like it would be more educational if I needed
to transform the presented C++ into Python, and I was in the mood to learn…
I’m digging around into how pwntools is packaged. It looks really nicely organized and commented. 
 Get the path of a python modules 
 import pwn
 print(pwn . __file__)
 The pwn module is just a top-level with nice naming — pwnlib actually contains all the functionality. 
 dynelf.py is really interesting — it lets you resolve any symbol in a binary given a function…
I have this conversation with a lot of friends so I figured I’d collect my
favorite resources somewhere so that I can just pass around a list. This is
targeted at people who did not/do not intend to do a CS major in undergrad,
and who are interested in learning more as a hobby or to get a job. 
 
 The hardest problem in computer science is learning how to enjoy it.