Skip to content

Instantly share code, notes, and snippets.

@gakuzzzz
gakuzzzz / index.md
Last active March 20, 2024 15:48
MonadTransformer とは何か

MonadTransformer とは何か

注意書き

この記事は Monad がわかる人に向けた MonadTransformer の解説記事です。

すごいH本や FP in Scala などでモナドまではイメージが掴めたけれど、モナドトランスフォーマーが何かわからない、という層をターゲットに想定しています。

基本的に Functor, Applicative, Monad および型クラスについては把握しているものとしますので、この辺があやふやな方は別の資料などをご参照下さい。

float32
float64
int
int8
int16
int32
int64
@voluntas
voluntas / auto.rst
Last active August 29, 2023 20:34
あたりまえのことをあたりまえにやる難しさ

あたりまえのことをあたりまえにやる難しさ

日時

2017-07-04

@voluntas

バージョン

1.0.2

url

https://voluntas.github.io/

時間

30 分

@y-yu
y-yu / typeclass-in-csharp.cs
Last active April 11, 2017 10:31
Type class in C#
using System;
using System.Collections.Generic;
using System.Linq;
public interface Relation { }
public interface Relation<K, out V> : Relation
{
V Get(K key);
}
@voluntas
voluntas / naze_erlang.rst
Last active October 31, 2023 03:33
なぜ Erlang/OTP を使い続けるのか

Computation Expression Problems

1. The translation rule of do! e;

In the language specification, the translation rule of do! e; is defined as follows:

T(do! e;, V, C, q) = T(let! () = src(e) in b.Return(), V, C, q)

And the signature of Return is usually 'a -> M<'a>, so the type of do! e; results M<unit>.

@sile
sile / time-clocks.md
Last active January 18, 2024 07:50
『Time, Clocks, and the Ordering of Events in a Distributed System』の要約

Time, Clocks, and the Ordering of Events in a Distributed System

http://research.microsoft.com/en-us/um/people/lamport/pubs/time-clocks.pdf の要約。

著者はレスリー・ランポート (Leslie Lamport), 1978年。

分散アルゴリズムの書籍や論文でお馴染みの、分散システムにおけるイベント群の順序や時刻の概念を説明している論文。

! が先頭についている箇所は、要約者による(いい加減な)注釈。

@sile
sile / ppg.md
Last active October 8, 2022 12:17
Plumtree/HyParView/ppgについて

これは何?

注意

  • 内容の質はメモ書きレベル
  • ほぼ思いつきで書いているので正しさの保証も無し
    • ここで紹介したアルゴリズムに興味を持った人は、オリジナルの論文を読むことを推奨
@sile
sile / damps-06.md
Last active January 20, 2021 22:33
Distributed Algorithms for Message-Passing Systems: 第六章

第二部 分散システムでの論理時間とグローバル状態

第二部は四章からなり、以下の内容を扱っている:

  • 分散計算の、イベント/ローカル状態/グローバル状態、の概念
  • それらに関連した論理時間について
  • => __信頼可能な__分散システム上での非同期分散計算の性質を考察する上で基礎となる概念

六章:

  • プロセスのイベント群の部分順序によって、分散計算を表現する方法
package msgpack4z
import java.math.BigInteger
import scodec.Attempt
import scodec.bits.{BitVector, ByteVector}
import scodec.msgpack.codecs.MessagePackCodec
import scodec.msgpack.{MNil, MessagePack, Serialize}
object ScodecPacker {