This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.
- Haskell is a functional programming language.
-- Echo server program | |
module Main where | |
import Control.Monad (unless,when) | |
import Network.Socket hiding (recv) | |
import qualified Data.ByteString as S | |
import Data.Word(Word8) | |
import Control.Concurrent(threadDelay) | |
import Data.List | |
import Numeric |
; A REPL-based, annotated Seesaw tutorial | |
; Please visit https://github.com/daveray/seesaw for more info | |
; | |
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers | |
; Seesaw's basic features and philosophy, but only scratches the surface | |
; of what's available. It only assumes knowledge of Clojure. No Swing or | |
; Java experience is needed. | |
; | |
; This material was first presented in a talk at @CraftsmanGuild in | |
; Ann Arbor, MI. |
(def urls (array "http://a.tile.openstreetmap.org/${z}/${x}/${y}.png" | |
"http://b.tile.openstreetmap.org/${z}/${x}/${y}.png" | |
"http://c.tile.openstreetmap.org/${z}/${x}/${y}.png")) | |
(def OSM (js/OpenLayers.Layer.XYZ. "OSM (with buffer)" urls (extend-object! (js-obj) {"transitionEffect" "resize" | |
"buffer" 2 | |
"wrapDateLine" true | |
"sphericalMercator" true}))) | |
(def plot (js/OpenLayers.Map. (extend-object! (js-obj) {"div" "plot" |
This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.
import Control.Monad.Reader | |
hello :: Reader String String | |
hello = do | |
name <- ask | |
return ("hello, " ++ name ++ "!") | |
bye :: Reader String String | |
bye = do | |
name <- ask |
(ns cljs-minimal.core | |
(:require [cljs.core.async :as async :refer [put! <! >! <!! >!! chan]]) | |
(:require-macros [cljs.core.async.macros :as m :refer [go]])) | |
(defn get-position [] | |
(let [out (chan) | |
geo (.-geolocation js/navigator)] | |
(.getCurrentPosition geo (fn [pos] (put! out pos))) | |
out)) |
module ReaderMonad where | |
import Control.Monad.Reader | |
stuff :: Reader Int String | |
stuff = do | |
s <- ask | |
return (show s ++ " green bottles") | |
main :: IO () |
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
module Transformers where | |
import Control.Applicative | |
import Control.Monad | |
import qualified Data.Char as Char |
#!/bin/bash | |
wget -r -nc -p --html-extension -k -D google.com -np https://landing.google.com/sre/book/ |