- Compiling compression algorithms through programs
- Compiler as
f :: (program, compression algo) -> program'
- Compiler as
- Does collapsing towers of interpreters work for programming languages with much bigger architectural differences than the ones in the paper?
- Abstract abstract interpretation
- DDCG
- Minecraft but it's all sending code to run on a shared VM
- PL where every state change is persisted in a DB
- SteamDrill (Quinn) but it's layered abstractions that you can expand (Python->C->asm) & custom events
View ssa-interp2.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stddef.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <inttypes.h> | |
#include <assert.h> | |
typedef int64_t value_t; | |
typedef uint64_t instr_t; |
View ssa-interp.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <stddef.h> | |
#define _WITH_GETLINE | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <inttypes.h> | |
#include <assert.h> |
View detect-m1-m2.makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If on an M1, M2, or other new Apple Silicon, you have to both compile and run | |
# using the "arch" tool so that both the final binary and the JIT-compiled code | |
# can run in x86_64 mode. | |
UNAME_S:=$(shell uname -s) | |
UNAME_M:=$(shell uname -m) | |
ifeq ($(UNAME_S),Darwin) | |
ifeq ($(UNAME_M),arm64) | |
COMPILEPREFIX=arch -x86_64 | |
endif | |
endif |
View elf_symbolizer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2014 The Chromium Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
# https://github.com/dart-lang/sdk/blob/5db6b482b07d0d4e67a45d95cce2f405bcf98b04/runtime/third_party/binary_size/src/elf_symbolizer.py | |
import collections | |
import datetime | |
import logging | |
import multiprocessing | |
import os |
View processify.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import traceback | |
from functools import wraps | |
from multiprocessing import Process, Queue | |
def processify(func): | |
'''Decorator to run a function as a process. | |
Be sure that every argument and the return value |
View build-opt.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PYPY=~/Downloads/pypy-c-jit-106258-39dc1c343c50-linux64 | |
PYTHONPATH="${PYPY}:${PYPY}/pypy" \ | |
"${PYPY}"/bin/pypy \ | |
"${PYPY}"/pypy/rpython \ | |
-O2 --batch targetlox.py |
View parse_bin_string.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define IS_DIG(x) (((x)|1)=='1') | |
#define SLEN(s) ((sizeof s)-1) | |
#define RIDX(s,x) ((x)<SLEN(s)?s[SLEN(s)-1-(x)]:0) | |
#define CNT(s,x,n) ((x)<n?IS_DIG(RIDX(s,(x))):0) | |
#define CNT4(s,x,n) (CNT(s,x+0,n)+CNT(s,x+1,n)+CNT(s,x+2,n)+CNT(s,x+3,n)) | |
#define CNT16(s,x,n) (CNT4(s,x+0,n)+CNT4(s,x+4,n)+CNT4(s,x+8,n)+CNT4(s,x+12,n)) | |
#define CNT64(s,x,n) (CNT16(s,x+0,n)+CNT16(s,x+16,n)+CNT16(s,x+32,n)+CNT16(s,x+48,n)) | |
#define VAL(s,x) ((RIDX(s,x)=='1')<<(CNT64(s,0,x))) | |
#define VAL4(s,x) (VAL(s,x+0)+VAL(s,x+1)+VAL(s,x+2)+VAL(s,x+3)) |
View python_make_github_issues.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
import csv | |
# Authentication for user filing issue (must have read/write access to | |
# repository to add issue to) | |
USERNAME = 'username' | |
PASSWORD = 'password' | |
# The repository to add this issue to |
View sym_test.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <cxxabi.h> | |
#include <link.h> | |
#include <string> | |
#include <vector> | |
#include <iostream> | |
using namespace std; |
View pl-things.md
NewerOlder