Skip to content

Instantly share code, notes, and snippets.

@yohhoy
yohhoy / gist:191757eaa0fe8dfa39e8
Last active August 29, 2015 14:06
Dead-lock demonstration with condition_variable::notify_one()/pthread_cond_signal()
//
// Dead-lock demonstration with condition_variable::notify_one()
//
#include <utility>
#include <mutex>
#include <condition_variable>
template<typename T>
class mt_slot {
T slot_;
@pocketberserker
pocketberserker / homo.fs
Last active September 13, 2015 04:05
コンピュテーション式でてきとーに日本語を使ってみる
type ホモビルダー() =
member __.Delay(f: unit -> _) = f
member __.Run(f) = f ()
member __.Yield(()) = ""
member __.Yield(x: string) = x
[<CustomOperation("攻め")>]
member inline __.攻め(_, case) = case
[<CustomOperation("受け")>]
member inline __.受け(source: string, case) = (source, case)
[<CustomOperation("┌(┌^o^)┐")>]
@pocketberserker
pocketberserker / output.txt
Last active March 20, 2016 01:23
http://www.paraiso-lang.org/ikmsm/books/c86.html の第4章の最初のほうが元ネタ
1
2
あぁ^~
4
こころが
あぁ^~
ぴょんぴょんするんじゃ^~
8
あぁ^~
こころが
// Copyright Akira Takahashi 2014
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstddef>
namespace my_stl {
template <class Iterator>
struct iterator_traits {
static typename Iterator::reference dereference(Iterator& it)
@suchi
suchi / hanakotoba.txt
Last active September 26, 2020 02:36
uniqの花言葉は「君だけを」 〜 素敵なプログラム花言葉たち(1991/9/19)
Note 103 Junk & Test (junk.test)
[ BASENOTE with 36Res ]
Title:Test/kanbai: undel の花言葉は「もう一度やり直そう」
Bytes: 42 Date : 11:02am 9/19/91 Author:pcs29450 (kanbai-an)
undel の花言葉は「もう一度やり直そう」
@pocketberserker
pocketberserker / FreeMonad.md
Last active November 7, 2019 05:23
基礎から学ばないFree Monad

基礎から学ばないFree Monad

自己紹介

icon

  • なかやん・ゆーき / ぺんぎん / もみあげ
  • @pocketberserker / id:pocketberserker
@imjasonh
imjasonh / markdown.css
Last active January 3, 2025 20:15
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@y-taka-23
y-taka-23 / coq_uniq.v
Created September 12, 2015 06:31
An Implementation of the uniq Command Certified by Coq
Parameter A : Type.
Parameter beq_A : A -> A -> bool.
Section Uniq.
Require Import Arith List.
Hypothesis beq_A_true : forall x y : A,
beq_A x y = true -> x = y.
Hypothesis beq_A_false : forall x y : A,
@pocketberserker
pocketberserker / fpmeetup_compitation_expression.md
Created September 13, 2015 01:59
関数プログラミング交流会 - モナドとかよくわからないからコンピュテーション式でガン無視してみた

モナドとかよくわからないからコンピュテーション式でガン無視してみた

CC BY-SA 4.0

自己紹介

icon

  • なかやん・ゆーき / ぺんぎん / もみあげ
  • @pocketberserker / id:pocketberserker
@xavriley
xavriley / README.md
Created October 19, 2015 12:19
MIDI with Sonic Pi on OSX

Warning

These instructions are mainly for my own personal reference and should not be considered a supported feature of Sonic Pi. For experimentation only. Assumes OSX 10.10

  1. Setup a virtual midi channel on OSX

This is sometimes referred to as a "loopback" device and it should allow the various software applications to communicate.

  • Open /Applications/Utilities/Audio\ MIDI\ Setup.app/ and go to "Window > Show MIDI studio".