Skip to content

Instantly share code, notes, and snippets.

JFrame took 0.009548935s
Config took 0.046662874s
Sonic Palette took 0.255192107s
Knuckles Palette took 0.003669708s
Tails Palette took 0.003472774s
Shadow Palette took 0.004536207s
Rouge Palette took 0.006939667s
Amy Palette took 0.003259934s
E102 Palette took 0.004125171s
Cream Palette took 0.004338449s
32, 56, 124, 32, 107, 32, 58, 58, 32, 88, 32, 45, 62, 32, 89, 10, 32, 57, 124, 32, 107, 32, 120, 32, 61, 32, 89, 123, 120, 125, 46, 10, 32, 32, 124, 32, 126, 126, 126, 126, 126, 126, 126, 126, 94, 10, 49, 48, 124, 32, 10, 69, 114, 114, 111, 114, 58, 32, 84, 114, 121, 105, 110, 103, 32, 116, 111, 32, 115, 116, 111, 114, 101, 32, 97, 114, 103, 117, 109, 101, 110, 116, 32, 112, 111, 105, 110, 116, 101, 114, 32, 105, 110, 116, 111, 32, 97, 32, 108, 111, 99, 97, 108, 32, 115, 116, 114, 117, 99, 116
@phase
phase / ast&ir
Last active December 9, 2017 08:10
recursive expressions
AstModule(name=parser_test, functionDeclarations=[
AstFunctionDeclaration(name=i, argumentTypes=[Int32], returnType=AstStruct{Y}, permissions=[])], functionDefinitions=[
AstFunctionDefinition(name=i, arguments=[a], statements=[
VariableAssignmentStatement(name=x, expression=
AllocateStructExpression(struct=X, expressions=
[IdentifierExpression(name=a)])),
VariableAssignmentStatement(name=__return_expression, expression=
AllocateStructExpression(struct=Y, expressions=[
IdentifierExpression(name=x)])),
ReturnStatement(expression=
IrFunction(name=h, returnType=Int, argumentCount=1, registerTypes=[Int, X, Int], instructions=[
HeapAllocateInstruction(type=X),
StoreInstruction(register=1),
FieldSetInstruction(structRegisterIndex=1, fieldIndex=0, valueRegisterIndex=0),
FieldGetInstruction(registerIndex=1, fieldIndex=0),
StoreInstruction(register=2),
ReturnInstruction(registerIndex=2)])], structs=[X])
IrFunction(name=h, returnType=Int, argumentCount=1, registerTypes=[Int, X, Int], instructions=[
StackAllocateInstruction(type=X),
#include<stdlib.h>
struct Box {
int x;
};
int f(struct Box* box) {
return box->x;
}
FunctionCallInstruction(functionName=internal_add_i32, registerIndexes=[0, 1]),
StoreInstruction(regIndex=2),
FunctionCallInstruction(functionName=internal_add_i32, registerIndexes=[0, 2]),
FunctionCallInstruction(functionName=internal_add_i32, registerIndexes=[3, 2]),
StoreInstruction(regIndex=3),
ReturnInstruction(registerIndex=3)
StoreInstruction(regIndex=3),
StoreInstruction(regIndex=3),
FunctionCallInstruction(functionName=internal_add_i32, registerIndexes=[0, 1]),
45 00 00 10 04 00 F0 FF
46 00 00 10 0A 00 F0 FF 00 00 00 01 00 00 F0 00 00 00 F0 FF 00 00 10 00 D0 00 11 00 00 00 10 01
6E 02 00 28 01 00 F0 FF
40 00 00 10 08 00 00 11 6E 02 00 28 01 00 F0 FF
41 00 00 10 02 00 F0 FF 40 01 20 00 00 00 21 00 00 00 22 00 24 00 23 00 D0 00 24 00 04 00 27 00 01 00 25 00 02 00 26 00
42 00 00 10 04 00 F0 FF
43 00 00 10 06 00 F0 FF 00 00 24 00
44 00 00 10 00 00 20 01 08 00 F0 FF
45 00 00 10 0A 00 F0 FF 00 00 00 01 00 00 F0 00 00 00 F0 FF 00 00 10 00 D0 00 11 00 00 00 10 01
@phase
phase / interface.ll
Last active November 27, 2017 10:13
; ModuleID = 'interface.ll'
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%class.Concrete = type <{ %class.Interface, i32, [4 x i8] }>
%class.Interface = type { i32 (...)** }
$_ZN8ConcreteC2Ev = comdat any
$_ZN8ConcreteD2Ev = comdat any
package main
func f(x, y int) int {
z := x + y;
return z;
}
func main() {
/* go */ f(7, 11);
}
@phase
phase / compressed.html
Last active October 27, 2017 03:58
Compressed: 9,302 bytes, Uncompressed: 18,830 bytes
<!DOCTYPE html> <html> <head> <title>Ore - A Minecraft Package Repository</title> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet"> <link rel="icon" href="https://www.spongepowered.org/favicon.ico"> <link rel="stylesheet" type="text/css" href="/assets/highlight/styles/default.css"/> <link rel="stylesheet" type="text/css" href="/assets/bootstrap/css/bootstrap.min.css"/> <link rel="stylesheet" type="text/css" href="/assets/stylesheets/main.css"/> <link rel="manifest" href="/assets/manifest/manifest.json"> <meta name="theme-color" content="#333"> <script type="text/javascript" src="/assets/lib/jquery/jquery.min.js"></script> </head> <body> <nav id="topbar" class="navbar-main navbar-inverse"> <div class="container"> <div id="sp-logo-container"> <a class="logo" href="/"> <img src="https://www.spongepowered.org/assets/img/icons/spo