This was taken from http://rxwiki.wikidot.com/101samples, because I wanted to be able to read it more comfortable with syntax highlighting.
Here's the unedited original, translated to Github Markdown glory:
#!/usr/bin/env nix-script-haskell | |
#!haskellPackages transformer | |
{-# LANGUAGE FlexibleInstances #-} | |
import B | |
import qualified Control.Monad.Reader as Reader | |
instance Reader a |
{- | |
This is a port of https://jordanmartinez.github.io/purescript-jordans-reference-site/content/21-Hello-World/05-Application-Structure/src/02-MTL/32-The-ReaderT-Capability-Design-Pattern.html | |
There was no simple, working example of the ReaderT pattern in Haskell | |
-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
import qualified Control.Monad.IO.Class as MonadIO | |
import qualified Control.Monad.Reader as Reader | |
import Prelude |
defmodule BrainfuckTest do | |
use ExUnit.Case | |
import BF | |
@doc " | |
BF is our Brainfuck turing machine | |
Output will be a map | |
%{ | |
tape: map #our tape, in the format %{0=> 0, 1=> 0, 2=> 0 ...} | |
ptr: int, #pointer position |
This was taken from http://rxwiki.wikidot.com/101samples, because I wanted to be able to read it more comfortable with syntax highlighting.
Here's the unedited original, translated to Github Markdown glory:
I was curious about [Chris McCord's Phoenix vs Rails article][original] -- if you haven't read it, go do that now first. Go ahead, this will still be here when you get back. It won't make much sense unless you've read the original.
Like many other Elixir enthusiasts, I come from a Ruby background. That said, I found Rails to be a curious choice for comparison to Phoenix, since Rails is really a kitchen-sink framework meant to handle everything from database migrations to asset-pipeline compilation. Sinatra, on the other hand, is a more
I've taken the benchmarks from Matthew Rothenberg's phoenix-showdown, updated Phoenix to 0.13.1 and ran the tests on the most powerful machines available at Rackspace.
Framework | Throughput (req/s) | Latency (ms) | Consistency (σ ms) |
---|