I hereby claim:
- I am roehst on github.
- I am roehst (https://keybase.io/roehst) on keybase.
- I have a public key ASDz5GKEsxxSYl2CEs5RxOZCyHI5CSeBPmLsRe19yKCFcgo
To claim this, I am signing this object:
| defmodule Parbool do | |
| require Process | |
| def or_(task1, task2) do | |
| parent = self | |
| pid1 = spawn(fn -> send parent, task1.() end) | |
| pid2 = spawn(fn -> send parent, task2.() end) | |
| receive do | |
| false -> | |
| receive do | |
| result2 -> |
| import Data.List (find, isPrefixOf) | |
| data Syllab = Syllab { findStr :: String, replaceStr :: String } | |
| deriving Show | |
| appliesTo string syllab = isPrefixOf (findStr syllab) string | |
| vocabulary = [Syllab "cho" "tio", | |
| Syllab "nho" "neo", | |
| Syllab "rr" "r", |
| #!/usr/bin/bash | |
| INSTALLER_VERSION=2.0 | |
| CNCHI_VERSION=0.6.11 | |
| TEXTDOMAIN=cli_installer | |
| # we rely on some output which is parsed in english! | |
| #unset LANG | |
| source /etc/antergos/functions | |
| ANSWER="/tmp/.setup" |
| timestamp=$(date +%y%m%d) | |
| folder="~/.today" | |
| eval folder=$folder | |
| mkdir $folder -p | |
| file="~/.today/$timestamp.txt" | |
| eval file=$file | |
| touch $file |
| module Main where | |
| fizzBuzz :: Int -> IO () | |
| fizzBuzz n | n `mod` 5 == 0 && n `mod` 3 == 0 = putStrLn "Fizz Buzz" | |
| | n `mod` 5 == 0 = putStrLn "Buzz" | |
| | n `mod` 3 == 0 = putStrLn "Buzz" | |
| | otherwise = return () | |
| runManyActions [] = return [] | |
| runManyActions (x:xs) = do |
| defmodule HelloWeb do | |
| def controller do | |
| quote do | |
| use Phoenix.Controller, namespace: HelloWeb | |
| import Plug.Conn | |
| import HelloWeb.Router.Helpers | |
| import HelloWeb.Gettext | |
| end | |
| end |
| use Phoenix.Controller, namespace: HelloWeb | |
| import Plug.Conn | |
| import HelloWeb.Router.Helpers | |
| import HelloWeb.Gettext |
| defmodule Expr do | |
| @moduledoc """ | |
| A simple expression parser & evaluator. | |
| To use it, call run/1: | |
| iex> Expr.run "1*2*3*4*5+1000" | |
| 1120 | |
| It also supports let bindings: |
| defmodule Parser do | |
| def parse(source) do | |
| source |> Code.string_to_quoted!() | |
| end | |
| def parse_to_expr(source) do | |
| source |> parse |> to_expr | |
| end | |
| def to_expr({:+, _, [a, b]}) do |
I hereby claim:
To claim this, I am signing this object: