Skip to content

Instantly share code, notes, and snippets.

View seanjensengrey's full-sized avatar

Sean Jensen-Grey seanjensengrey

View GitHub Profile

*** SHED SKIN Python-to-C++ Compiler *** Copyright 2005-2013 Mark Dufour; License GNU GPL version 3 (See LICENSE)

infer.py: perform iterative type analysis

we combine two techniques from the literature, to analyze both parametric polymorphism and data polymorphism adaptively. these techniques are agesen's cartesian product algorithm [0] and plevyak's iterative flow analysis [1] '(the data polymorphic part)'. for details about these algorithms, see ole agesen's excellent Phd thesis [2]. for details about the Shed Skin implementation, see Mark

@seanjensengrey
seanjensengrey / avro.txt
Created November 2, 2017 16:05
avro tests
{
"type" : "record",
"name" : "twitter_schema",
"namespace" : "com.miguno.avro",
"fields" : [ {
"name" : "username",
"type" : "string",
"doc" : "Name of the user account on Twitter.com"
}, {
"name" : "tweet",
@seanjensengrey
seanjensengrey / buzz.rs
Last active July 28, 2017 08:12
rust fizz buzz
use std::collections::HashMap;
type BuzzFn<'a> = Box<(Fn(i32) -> String) + 'a>;
fn mbfn<'a, F>(f: F) -> BuzzFn<'a>
where F: Fn(i32) -> String + 'a {
Box::new(f) as BuzzFn
}
fn do_buzz() {
/** Apache Licensed **/
function t2() {
aref = document.getElementsByTagName("a");
var result = [];
for(i = 0; i < aref.length; i++) {
var t = aref[i];
if (t.href.includes("forum")) {
result.push(t.href);
}
}
def do(cmd):
try:
return (True, cmd())
except Exception as e:
return (False, e)
do(lambda x: os.access(".",123123123123))
$ rebar3 eunit
===> Verifying dependencies...
===> Compiling bob
===> Getting log of git dependency failed in /Users/seanj/exercism/erlang/bob. Falling back to version 0.0.0
===> Performing EUnit tests...
======================== EUnit ========================
file "bob.app"
  application 'bob'
    module 'bob'
package main
/*
unix domain server with uid/gid checking
socat - unix-connect:/tmp/echo.sock
portions from