- 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
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 |
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 |
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 |
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)) |
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 |
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; |
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 | |
if [[ $# -lt 2 ]]; then | |
echo "Usage: $0 <depfile> <command...>" >&2 | |
exit 1 | |
fi | |
# The .d file we're going to write. | |
DEPSFILE=$1 | |
shift |
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 Andy Chu | |
class switch(object): | |
"""A ContextManager that translates to a C switch statement.""" | |
def __init__(self, value): | |
# type: (int) -> None | |
self.value = value | |
def __enter__(self): | |
# type: () -> switch |
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
#!/usr/bin/env python3 | |
# Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) | |
import shlex | |
import subprocess | |
import sys | |
import textwrap | |
def with_pty(command): |