Scalaの記事です。Haskellはあまり書けません。
Iterateeの複雑さから開放されたいのでPipe系ライブラリ使いましょうという記事です。
Iterateeとの比較や簡単な使い方についてつらつらと書いていきます。
#define _XOPEN_SOURCE 700 | |
#include <signal.h> | |
#include <unistd.h> | |
int main() | |
{ | |
sigset_t set; | |
int status; | |
if (getpid() != 1) return 1; |
/* | |
* I add this to html files generated with pandoc. | |
*/ | |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |
!SLIDE
;; let's create a simple protocol that just returns a number | |
user> (defprotocol NumberP (number [_])) | |
NumberP | |
;; now we'll create an implementation that always returns '1' | |
user> (deftype One [] NumberP (number [_] 1)) | |
user.One | |
;; unsurprisingly, this type only has a single static value, which wraps the '1' | |
> (-> One .getDeclaredFields seq) |
In this article, we we will look at the first three Futamura projections. | |
> module Futamura where | |
Suppose we have a program datatype, which takes input to output. This could be | |
any kind of executable program:§ | |
> data Program i o = Program i o | |
It is accompanied by an `exec` function which executes the program, and given an |
This list now exists over at http://juliepagano.com/blog/2013/11/02/101-off-limits/ and will be updated there.
I keep saying that impromptu, unwanted feminism 101 discussions are exhausting and not a good use of my resources. Then people ask what I mean by 101, so I'm starting to make a list. This list will change over time - I recommend checking back.
I highly recommend checking this list before engaging with me about feminism if you're new to it. It'll save both of us a lot of time and frustration.
Nope. This argument is bad and the science does not support it. Unfortunately, every time you say this out loud, you are contributing to cultural problems that do decrease the number of women in tech.
You're free to view the older revisions of this gist, but much of this content has been rewritten and will appear on the [Basho blog] (http://basho.com/blog) in the very near future.
Update: First part of the series is now at http://basho.com/understanding-riaks-configurable-behaviors-part-1/
Original: "Callbacks are imperative, promises are functional: Node's biggest missed opportunity" by James Coglan
Translated by Yuta Okamoto (@okapies)
package mergeconflict.collection.concurrent; | |
import java.util.concurrent.Semaphore; | |
import java.util.concurrent.atomic.AtomicReference; | |
import mergeconflict.collection.immutable.Queue; | |
public class BlockingQueue<E> { | |
private final Semaphore s = new Semaphore(0); | |
private final AtomicReference<Queue<E>> q = new AtomicReference<Queue<E>>(Queue.<E> empty()); |