Skip to content

Instantly share code, notes, and snippets.

View hansihe's full-sized avatar

Hans Elias J. hansihe

View GitHub Profile

Regulator Testbench

Mix.install([
  {:regulator, "~> 0.6.0"},
  {:kino, "~> 0.14.2"},
  {:kino_vega_lite, "~> 0.1.9"},
  {:vega_lite, "~> 0.1.11"}
])
defmodule OpentelemetrySpandexDatadogExporter do
@behaviour :otel_exporter
require Record
@deps_dir "#{__DIR__}/../../../deps"
Record.defrecord(
:span,
Record.extract(:span, from: "#{@deps_dir}/opentelemetry/include/otel_span.hrl")
)
@hansihe
hansihe / ssa_compile.diff
Created February 9, 2021 11:24
SSA Compile
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index b8921573d4..f2efe725a0 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -29,7 +29,7 @@
-export([env_compiler_options/0]).
%% Erlc interface.
--export([compile/3,compile_asm/3,compile_core/3,compile_abstr/3]).
+-export([compile/3,compile_asm/3,compile_core/3,compile_abstr/3,compile_ssaetf/3]).

Keybase proof

I hereby claim:

  • I am hansihe on github.
  • I am hansihe (https://keybase.io/hansihe) on keybase.
  • I have a public key ASBfXtO4vEM1zEt4gwHp7XeCUuN31ZJVfVrqDptfpo9pVAo

To claim this, I am signing this object:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFUpX5sQLQRS6zvj/Wjcrc50g3ej+JruBPkW8iWW88ll6KFl3QQB9jjDj8f7dOykn4Cld3gHRQfGde2Wz1MLfTzifKfV2wXjKB6iE9MD9zIemR6Y8xI4MKan3zHYqpPHpmhheqWt1PE7TG3FAMUfU46r7LXQtld19O8bH7WBGt7L7BLqdNf8lLwUeo8Ah0D66AGjQWJs5T6K92xbqiQ9eG6r/NLtCmLnnzHcGRb11zdrZUdZDKBhvyiivmNYRRZ7mSXj9h0jkHsoLd8Gj/d4yh0pWHjs7clC1m2iVkpAqAb+TKMpwyomdAJi4AhGJsMBK/WLpnBrkUI07nX49trhpZ hansihe@hansihe-XPS-13-9343
module 'test' ['add'/2,
'add_two'/3,
'module_info'/0,
'module_info'/1,
'return_closure'/1]
attributes [%% Line 1
'file' =
%% Line 1
[{[116|[101|[115|[116|[46|[101|[114|[108]]]]]]]],1}]]
'add'/2 =
read_tag_val() {
tag = read_u8();
tag_type = tag & 0b00000111;
tag_expanded = tag & 0b00001000;
tag_adv_expanded = tag & 0b00010000;
if tag_expanded == 0 {
val = tag >> 4;
@hansihe
hansihe / test.c
Last active December 29, 2020 12:48
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <pthread.h>
#include <signal.h>
#include <stdint.h>
#include <time.h>
#include "queue.h"
#include "erl_nif.h"
// NOTE: Although this uses javascript syntax highlighting, it is not javascript.
// start: Vec3
// direction: Vec3
function traverse(start, direction) {
// TODO: Make sure direction is not 0, this will result in infinite loop!
// Floor the position to get current voxel.
var pos = floor(start);
@hansihe
hansihe / OpenSimplex Normalize.ipynb
Last active January 27, 2016 07:36
Normalizing OpenSimplex probability distribution.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.