I hereby claim:
- I am magthe on github.
- I am magthe (https://keybase.io/magthe) on keybase.
- I have a public key ASCF3PyaMhJU-BVsk0bF9gjQ7DSJv5NYmbYFRvBjwJtWlgo
To claim this, I am signing this object:
# A visitor pattern implementation in Python | |
class Visitor: | |
def visit(self, obj): | |
func_name = 'visit_' + obj.__class__.__name__ | |
visit_func = getattr(self, func_name) | |
visit_func(obj) | |
def visit_Tree(self, obj): | |
pass |
class Visitor: | |
def visit(self, obj): | |
getattr(self, 'visit_' + obj.__class__.__name__)(obj) | |
def visit_Tree(self, t): | |
pass | |
def visit_Leaf(self, l): | |
pass |
#! /usr/bin/env runhaskell | |
-- {{{1 imports | |
import Control.Arrow | |
import Data.List | |
import Data.Maybe | |
import Data.Time.Format | |
import Data.Time.LocalTime | |
import System.Directory | |
import System.Environment |
Vi upptäcker bättre sätt att utveckla mjukvara genom att göra det och genom | |
att hjälpa andra att göra det. Genom detta arbete har vi lärt oss värdesätta: | |
* *Funktioner och Typer* mer än klasser | |
* *Renhet* mer än mutation | |
* *Komposition* mer än arv | |
* *Högre ordningens funktioner* mer än metodbindning | |
* *Options* mer än nulls | |
Det betyder att det finns värde i sakerna till höger (förutom null), men vi |
#! /bin/bash | |
ifile=$1; shift | |
ofile=$1; shift | |
awk '/^pkgrel/ { match( $0, /^pkgrel=([[:digit:]]+)/, Arr ); printf "pkgrel=%s\n", Arr[1]+1 } | |
! /^pkgrel/ { print } | |
' ${ifile} > ${ofile}.tmp | |
mv ${ofile}.tmp ${ofile} |
Index: broadcom-wl/src/src/wl/sys/wl_cfg80211.c | |
=================================================================== | |
--- broadcom-wl.orig/src/src/wl/sys/wl_cfg80211.c | |
+++ broadcom-wl/src/src/wl/sys/wl_cfg80211.c | |
@@ -1466,7 +1466,7 @@ wl_cfg80211_get_station(struct wiphy *wi | |
scb_val.val = 0; | |
err = wl_dev_ioctl(dev, WLC_GET_RSSI, &scb_val, sizeof(scb_val_t)); | |
if (err) { | |
- WL_ERR(("Could not get rssi (%d)\n", err)); | |
+ // WL_ERR(("Could not get rssi (%d)\n", err)); |
(ns bg.core | |
(:require [quil.core :as q :include-macros true] | |
[quil.middleware :as m] | |
[bg.image :as i])) | |
(enable-console-print!) | |
(println "bg.core loaded") | |
(defn setup [] | |
(let [img (q/load-image i/img)] |
{-# LANGUAGE DeriveFunctor#-} | |
-- Simple example of using Free with a single algebra/API. | |
module Free1 where | |
import Control.Monad.Free | |
data SimpleFileF a | |
= LoadFile FilePath (String -> a) |
I hereby claim:
To claim this, I am signing this object:
import Control.Applicative | |
import Data.Monoid | |
import Data.Vector as V | |
import Prelude as P | |
import Text.ParserCombinators.ReadP | |
spinList :: Int -> Vector Char -> Vector Char | |
spinList n xs = let (h, t) = V.splitAt (l - n) xs | |
l = V.length xs | |
in t <> h |