This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: bsd-3-clause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
template <typename T> | |
class Maybe { | |
T v; | |
bool _ok; | |
public: | |
Maybe(T val) : v(val), _ok(true) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <memory> | |
using namespace std; | |
class Real; | |
class Integer; | |
class Number { | |
friend Real; |