- @fergbyrne
- HTM = Hierarchical Temporal Memory
- Slides
- big data is like teenage sex
- noone knows how to do it
- everyone thinks everyone else is doing it
| public class Main { | |
| public static final Object LOCK = new Object(); | |
| public static void main(String[] args) throws InterruptedException { | |
| new Thread(new A()).start(); | |
| new Thread(new B()).start(); | |
| } | |
| } |
| (ns shades.lenses) | |
| ; We only need three fns that know the structure of a lens. | |
| (defn lens [focus fmap] {:focus focus :fmap fmap}) | |
| (defn view [x {:keys [focus]}] (focus x)) | |
| (defn update [x {:keys [fmap]} f] (fmap f x)) | |
| ; The identity lens. | |
| (defn fapply [f x] (f x)) | |
| (def id (lens identity fapply)) |
| module Main | |
| import Effect.State | |
| data BTree a = Leaf | |
| | Node (BTree a) a (BTree a) | |
| instance Show a => Show (BTree a) where | |
| show Leaf = "[]" | |
| show (Node l x r) = "[" ++ show l ++ " " |
| : fib ( a b -- x y ) [ + ] keep swap ; | |
| ! My goal was to implement this with produce. | |
| 1 1 | |
| [ dup 4000000 < ] [ fib dup ] produce | |
| 2nip ! Remove the workspace | |
| dup length 1 - swap remove-nth ! Remove the extra value | |
| [ dup odd? [ drop 0 ] when ] | |
| map-sum |
| USING: kernel math math.functions sequences ; | |
| IN: euler1 | |
| : euler1 ( x -- y ) | |
| iota [ dup [ 3 divisor? ] [ 5 divisor? ] bi or [ drop 0 ] unless ] map-sum ; |
| (ns schema->gen | |
| "Functions for generating test data from schemas." | |
| (:require [four.stateful :as four] | |
| [re-rand :refer [re-rand]] | |
| [schema.core :as sch] | |
| [simple-check.generators :as gen])) | |
| (defn ^:private re-randify-regex | |
| "schema requires ^$ while re-rand forbids them" | |
| [re] |
| (ns DarrenN.stateless.buffer) | |
| ;; create-buffer returns a vector scoped to size. When new items are added | |
| ;; they are passed to functions in add-listeners. If the vector is at its | |
| ;; size limit then items are shifted off the front of the vector and | |
| ;; passed to the functions in destroy-listeners | |
| ;; Callbacks for adding/removing item from vector | |
| (def destroy-listeners [(fn [i] (print (str i " removed")))]) | |
| (def add-listeners [(fn [i] (print (str i " added")))]) |