Skip to content

Instantly share code, notes, and snippets.

I want to show you why the capabilities work the way they work, and not just how they work.

The following explanation is not meant to be accurate with reality, only a way to form the necessary connections and be able to understand one possible reasoning for the design.

I will try my best.

Backstory

Once upon a time, every API would define a bunch of interfaces that people would implement

@gigaherz
gigaherz / code.json
Last active July 8, 2017 15:52
A concept for a JSON-encoded Java AST
{
"PROGRAM": "Name here",
"VERSION": "1.0",
"Program": {
"TYPE": "class",
"SUPER": "Application",
"ATTRIBUTES": [ "public", "static"],
"FORMAT": 1,
"MEMBERS": {
// ==UserScript==
// @name Foldable diffs
// @namespace http://tampermonkey.net/
// @version 0.4
// @description Adds a fold button to file diffs, and folds deleted files by default
// @author gigaherz
// @match https://bitbucket.org/*
// @grant none
// ==/UserScript==
function SetupForm{
[reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null;
[reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null;
$form = New-Object System.Windows.Forms.Form;
$dgv = New-Object System.Windows.Forms.DataGridView;
$form.Text = "TCP Connection Status";
$form.Name = "form";
This document describes an hypotetical type hierarchy for a non-existing environment.
It has been inspired by the CLR, JVM, and some IRC conversations.
Type tree:
----------
Any
Void
Value
Primitive
@gigaherz
gigaherz / ALU.vhdl
Created October 14, 2013 19:28
An implementation of a simple 4-instruction CPU, in VHDL
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
use work.constants.all;
use work.ctypes.all;
entity ALU is port (
clk : in std_logic;
{"sidebarBg":"#23252c","sidebarText":"#ffffff","sidebarUnreadText":"#ffffff","sidebarTextHoverBg":"#2a2d34","sidebarTextActiveBorder":"#196caf","sidebarTextActiveColor":"#ffffff","sidebarHeaderBg":"#363a42","sidebarHeaderTextColor":"#ffffff","onlineIndicator":"#399fff","awayIndicator":"#c1b966","dndIndicator":"#e81023","mentionBj":"#0177e7","mentionColor":"#ffffff","centerChannelBg":"#2a2d34","centerChannelColor":"#dddddd","newMessageSeparator":"#cc992d","linkColor":"#0d93ff","buttonBg":"#0177e7","buttonColor":"#ffffff","errorTextColor":"#ff6461","mentionHighlightBg":"#784098","mentionHighlightLink":"#a4ffeb","codeTheme":"monokai","mentionBg":"#0177e7"}
// ==UserScript==
// @name Down with the Circles!
// @namespace https://gist.github.com/gigaherz/cee1af98c298dbeea14f12986307fdf0
// @version 0.4
// @description Changes the circleness of twitter avatars.
// @author gigaherz
// @match https://twitter.com/*
// @grant GM_addStyle
// ==/UserScript==
package gigaherz.survivalist.rack;
import com.google.common.collect.Lists;
import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.renderer.vertex.VertexFormatElement;
import javax.vecmath.Matrix4f;
import javax.vecmath.Vector4f;
import java.util.Arrays;
From 0e33e41ca6e711812d0a38fd20703bce74792545 Mon Sep 17 00:00:00 2001
From: David Quintana <gigaherz@gmail.com>
Date: Mon, 5 Aug 2019 01:40:44 +0200
Subject: [PATCH] Netty logging
---
src/fmllauncher/resources/log4j2.xml | 1 +
.../logging/ForgeNettyLogger.java | 504 ++++++++++++++++++
.../minecraftforge/userdev/LaunchTesting.java | 4 +
3 files changed, 509 insertions(+)