I hereby claim:
- I am devth on github.
- I am devth (https://keybase.io/devth) on keybase.
- I have a public key whose fingerprint is 2E06 04DD 164E F921 8B97 EF06 EE84 56ED C976 4E34
To claim this, I am signing this object:
sealed trait NestedProjection | |
case class Field(name: String) extends NestedProjection | |
case class NestedField(field: Field, child: NestedProjection) extends NestedProjection |
I hereby claim:
To claim this, I am signing this object:
(def ^{:dynamic true} foo "ok") | |
(binding [foo "y u no"] | |
(def aa (go (Thread/sleep 10000) foo))) | |
(<!! aa) ;=> y u no |
# remap prefix to Control + a | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
set-window-option -g mode-mouse on | |
# force a reload of the config file | |
unbind r | |
bind r source-file ~/.tmux.conf |
import scala.concurrent._ | |
import scala.concurrent.duration._ | |
import ExecutionContext.Implicits.global | |
val load = (x: Int) => future { Thread.sleep(200); x } | |
val f = Future.traverse(1 to 100)(load) | |
Await.result(f, Duration.Inf) | |
// scala.collection.immutable.IndexedSeq[Int] = Vector(1, 2, 3, 4, 5, 6, 7, 8, | |
// 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, | |
// 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, |
function insertEvery(str, xChars, strToInsert) { | |
var newStr = "", times = Math.ceil(str.length / xChars); | |
for (var i = 0; i < times; i++) { | |
newStr += str.substr(i * xChars, xChars) + strToInsert; | |
} | |
return newStr; | |
} |
you are not allowed to use cursors outside of the render phase
followed by
Outside of the render phase you are only allowed to do two kinds of operations on cursors
https://github.com/swannodette/om/wiki/Basic-Tutorial#wiki-debugging-om-components
;;; Pallet project configuration file | |
(require '[pallet.crate.java :as java] | |
'[pallet.crate.runit :as runit] | |
'[pallet.crate.lein :as lein] | |
'[pallet.crate.app-deploy :as app-deploy] | |
'pallet.compute) | |
(defplan setup-machine [] | |
(package-manager :update) | |
(packages :apt ["git"])) |
(defn stacksize [] (try (throw (Exception. "")) (catch Exception e (count (.getStackTrace e))))) | |
(defn prss [] (print (stacksize) " ")) | |
; stack size doesn't increase with proper loop/recur | |
(loop [x 0] (prss) (when (> 10 x) (recur (inc x)))) | |
; 24 24 24 24 24 24 24 24 24 24 24 nil | |
; stack size increases with recursion | |
(defn rec [x continuation] | |
(prss) |