This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.
- Haskell is a functional programming language.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
ocamlbuild \ | |
-pkg containers \ | |
-pkg lwt \ | |
-pkg yojson \ | |
-pkg conduit.lwt-unix \ | |
-pkg nocrypto \ | |
-pkg nocrypto.unix \ | |
-pkg websocket.lwt \ | |
-cflags "-w A-4-40-41-42-44" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from concurrent.futures import as_completed, ThreadPoolExecutor | |
from urllib.request import urlopen | |
import re | |
import sys | |
DEFAULT_REGEX = r'<input type="text" id="nacional" value="([^"]+)"/>' | |
CURRENCY = { | |
'dolar': 'http://dolarhoje.com/', | |
'euro': 'http://eurohoje.com/', |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _GNU_SOURCE 1 | |
#include <sched.h> // sched_setaffinity | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <limits.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <pthread.h> | |
#include <assert.h> | |
#include <sys/time.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Shapes | |
( Point, Shape, area, nudge, baseCircle, baseRect ) where | |
-- 値コンストラクタが1つしかない場合、データ型と値コンストラクタは同じ名前にする(慣例) | |
data Point = Point Float Float deriving (Show) | |
data Shape = Circle Point Float | Rectangle Point Point deriving (Show) | |
area :: Shape -> Float | |
area (Circle _ r) = pi * r ^ 2 | |
area (Rectangle (Point x1 y1) (Point x2 y2)) = (abs $ x2 - x1) * (abs $ y2 - y1) |
Edward Snowden answered questions after a showing of CITIZENFOUR at the IETF93 meeting; this is a transcript of the video recording.
For more information, see the Internet Society article.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################## | |
# Install system packages # | |
############################################################################## | |
xcode-select --install | |
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / | |
# install homebrew |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder