Skip to content

Instantly share code, notes, and snippets.


Sean Jensen-Grey seanjensengrey

View GitHub Profile
View octal_x86.txt
# source:
From: (Mark Hopkins)
Newsgroups: alt.lang.asm
Subject: A Summary of the 80486 Opcodes and Instructions
(1) The 80x86 is an Octal Machine
This is a follow-up and revision of an article posted in alt.lang.asm on
7-5-92 concerning the 80x86 instruction encoding.
The only proper way to understand 80x86 coding is to realize that ALL 80x86
seanjensengrey / tiny.c
Last active May 12, 2022
Marc Feeley Tiny C compiler
View tiny.c
/* file: "tinyc.c" */
/* originally from */
/* Copyright (C) 2001 by Marc Feeley, All Rights Reserved. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
seanjensengrey /
Last active Apr 2, 2022
Calling Rust from Python/PyPy using CFFI (C Foreign Function Interface)

This is a small demo of how to create a library in Rust and call it from Python (both CPython and PyPy) using the CFFI instead of ctypes.

Based on (dead) which used ctypes

CFFI is nice because:

  • Reads C declarations (parses headers)
  • Works in both CPython and PyPy (included with PyPy)
  • Lower call overhead than ctypes

Notes on writing a Lua Bytecode VM. Lua is a compact, minimal language designed for embedding within a larger program to provide end-user customization of program behavior. This note outlines how I would breakdown implmementing the Lua Bytecode VM in Rust. The techniques are broadly applicable to any implementation language.

I would proceed by supporting a subset of Lua that uses only numbers then move on to tables with numbers. Lua 5.3 adds integers.

Form small tests cases, compile chunks of lua code and

class StackModule:
def __init__(self):
self.items = []
def __repr__(self):
return repr(self.items)
def push(self, value):
Logo Memo 1 AIM-246.pdf A Computer Laboratory For Elementary Schools
Logo Memo 2 AIM-247.pdf Teaching Children Thinking
Logo Memo 3 AIM-248.pdf Twenty Things To Do With A Computer
Logo Memo 4 AIM-249.pdf Teaching Children To Be Mathematicians vs. Teaching About Mathematics
Logo Memo 5 AIM-254.pdf NIM: A Game-Playing Program
Logo Memo 6 AIM-264.pdf Developing A Musical Ear: A Ne
seanjensengrey /
Created Sep 11, 2021
computation advances faster than heuristics


The Bitter Lesson

Rich Sutton

March 13, 2019

The biggest lesson that can be read from 70 years of AI research is that general methods that leverage computation are ultimately the most effective, and by a large margin. The ultimate reason for this is Moore's law, or rather its generalization of continued exponentially falling cost per unit of computation. Most AI research has been conducted as if the computation available to the agent were constant (in which case leveraging human knowledge would be one of the only ways to improve performance) but, over a slightly longer time than a typical research project, massively more computation inevitably becomes available. Seeking an improvement that makes a difference in the shorter term, researchers seek to leverage their human knowledge of the domain, but the only thing that matters in the long run is the leveraging of computation. These two need n

apt-get remove docker docker-engine containerd runc
apt-get install \
  apt-transport-https \
  ca-certificates \
  curl \
  gnupg \

Instance level metadata urls

Both AWS and GCP, probably Azure as well, offer the ability to query instance level metadata from within the guest (and container)

Both cloud use the same IP address ( internally to handle the request.

tl;dr, do a get request against the metadata url and look at the response headers.