(setq org-confirm-babel-evaluate nil)
(setq org-babel-sh-command "ssh default ")
;; customize the following variables:
;;(setq org-babel-load-languages
;;<<< '((emacs-lisp . t) (python . t) (clojure . t) (sh . t ) (perl . t)))
This file contains 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
(ns my-transducers.core | |
(:require [clojure.core.async :as async])) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Understanding Transducers | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; | |
;; This is the source code for the blog post Understanding Transducers, found | |
;; here: http://elbenshira.com/blog/understanding-transducers | |
;; |
This file contains 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
Show hidden characters
// installed Clojure packages: | |
// | |
// * BracketHighlighter | |
// * lispindent | |
// * SublimeREPL | |
// * sublime-paredit | |
{ | |
"word_separators": "/\\()\"',;!@$%^&|+=[]{}`~?", | |
"paredit_enabled": true, |
This file contains 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
;; Run using a local build of ClojureScript master, e.g.: | |
;; clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.155"}}}' -i build.clj | |
(require '[cljs.build.api :as b]) | |
(b/watch "src" | |
{:output-dir "out" | |
:output-to "out/main.js" | |
:optimizations :none | |
:verbose true |
This file contains 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
// JVM sizing options | |
-server -Xms40g -Xmx40g -XX:MaxDirectMemorySize=4096m -XX:PermSize=256m -XX:MaxPermSize=256m | |
// Young generation options | |
-XX:NewSize=6g -XX:MaxNewSize=6g -XX:+UseParNewGC -XX:MaxTenuringThreshold=2 -XX:SurvivorRatio=8 -XX:+UnlockDiagnosticVMOptions -XX:ParGCCardsPerStrideChunk=32768 | |
// Old generation options | |
-XX:+UseConcMarkSweepGC -XX:CMSParallelRemarkEnabled -XX:+ParallelRefProcEnabled -XX:+CMSClassUnloadingEnabled -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseCMSInitiatingOccupancyOnly | |
// Other options | |
-XX:+AlwaysPreTouch -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -XX:-OmitStackTraceInFastThrow |
This file contains 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
(ns xn.test | |
(:require-macros [cljs.core.async.macros :refer [go alts!]] | |
(:require [xn.core :as xn] | |
[xn.util :as u] | |
[cljs.core.async :refer [<! take!]] | |
[xn.xhr :refer [request-body request-records chain-req]])) | |
(def sample-app | |
(reify | |
xn/Application |
This file contains 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
(ns n01se.externs-for-cljs | |
(:require [clojure.java.io :as io] | |
[cljs.compiler :as comp] | |
[cljs.analyzer :as ana])) | |
(defn read-file [file] | |
(let [eof (Object.)] | |
(with-open [stream (clojure.lang.LineNumberingPushbackReader. (io/reader file))] | |
(vec (take-while #(not= % eof) | |
(repeatedly #(read stream false eof))))))) |
This file contains 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
(require '[schema.core :as s]) | |
(require '[schema.coerce :as coerce]) | |
(require '[schema.utils :as utils]) | |
(defn filter-schema-keys | |
[m schema-keys extra-keys-walker] | |
(reduce-kv (fn [m k v] | |
(if (or (contains? schema-keys k) | |
(and extra-keys-walker | |
(not (utils/error? (extra-keys-walker k))))) |
This file contains 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
;### Tested with clojure "1.6.0" and core.async "0.1.346.0-17112a-alpha" ### | |
(use 'clojure.core.async) | |
;### Lib functions ### | |
(defn take-until | |
"Creates a channel that replicates values from the in channel until the | |
control channel either emits a value or closes." | |
[control in] | |
(let [out (chan)] |
This file contains 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
#lang typed/racket | |
;;; Typed Racket version of Martin Grabmü̈ller's "Algorithm W Step by Step" | |
;;; http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.65.7733 | |
;;; This is my first use of Typed Racket. I am looking to change this from | |
;;; following Haskell idiom to following Racket idiom. | |
;; An expression is a variable, a literal, an application, |