Skip to content

Instantly share code, notes, and snippets.

View rsbowman's full-sized avatar
😎

Sean Bowman rsbowman

😎
View GitHub Profile
use "collections"
// Chandy-Misra solution to the dining philosophers problem in Pony
// R. Sean Bowman, July 2016
actor Philosopher
// our name (for printing) and a stream to log info on
let _name: String
let _out: OutStream
@rsbowman
rsbowman / .block
Last active February 22, 2016 03:07
Rearrange force directed layout disks
license: bsd-3-clause
@rsbowman
rsbowman / main.js
Last active February 10, 2016 13:14
cycle.js dynamic list of counters
import {Observable} from 'rx';
import Cycle from '@cycle/core';
import {hr, div, button, p, makeDOMDriver} from '@cycle/dom';
import isolate from '@cycle/isolate';
import combineLatestObj from 'rx-combine-latest-obj';
/* Make a list of "counters", each keeps track of its count
* and has a + and - button to modify the count. The counter_list
* component can add and remove counters dynamically.
*/
#include <iostream>
using namespace std;
template <typename T>
class Maybe {
T v;
bool _ok;
public:
Maybe(T val) : v(val), _ok(true) {}
@rsbowman
rsbowman / .vimrc
Created July 6, 2015 19:01
Vim config
set nocompatible
set encoding=utf-8
" vim-plug
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-endwise'
Plug 'tpope/vim-git'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-fugitive'
@rsbowman
rsbowman / config.py
Created July 6, 2015 18:59
QTile Config
# -*- coding: utf-8 -*-
#
import re, subprocess
from libqtile.config import Key, Click, Drag, Screen, Group, Match, Rule
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook
from libqtile.dgroups import simple_key_binder
from libqtile import hook
@rsbowman
rsbowman / envelope.cpp
Last active August 29, 2015 14:23
Simple Envelope/Letter Pattern
#include <iostream>
#include <memory>
using namespace std;
class Real;
class Integer;
class Number {
friend Real;