BOOM Analytics: Exploring Data-Centric, Declarative Programming for the Cloud
This file contains hidden or 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
Follow up to https://twitter.com/BrandonBloom/status/591772674193403905 | |
No idea if this will even work, much less perform well. This is just an idea. | |
Let's say you've got this file: | |
var color = 'red'; | |
// ... |
This file contains hidden or 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/no-check | |
;;; Types | |
(define-type Expr (U Symbol Term)) | |
(define-type Term (Pairof Symbol (Listof Expr))) | |
(define-type Strategy (-> Expr (Option Expr))) |
This file contains hidden or 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
Here is a reference to the part of the video where the slides are listed: | |
https://www.youtube.com/watch?v=SrKj4hYic5A&feature=youtu.be&t=28m | |
Here are the references: | |
SMITH - Reflection and Semantics in Lisp - 1983 | |
http://www-public.it-sudparis.eu/~gibson/Teaching/CSC7322/ReadingMaterial/Smith84.pdf | |
WAND & FRIEDMAN - The Mystery of the Tower in Lisp - 1986 | |
http://www.cs.indiana.edu/pub/techreports/TR196.pdf |
This file contains hidden or 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 hidden or 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
;; Big thanks to Christophe Grand - https://groups.google.com/d/msg/clojure/L1GiqSyQVVg/m-WJogaqU8sJ | |
(defn scaffold [iface] | |
(doseq [[iface methods] (->> iface .getMethods | |
(map #(vector (.getName (.getDeclaringClass %)) | |
(symbol (.getName %)) | |
(count (.getParameterTypes %)))) | |
(group-by first))] | |
(println (str " " iface)) | |
(doseq [[_ name argcount] methods] | |
(println |
This file contains hidden or 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
;; based on core.logic 0.8-alpha2 or core.logic master branch | |
(ns sudoku | |
(:refer-clojure :exclude [==]) | |
(:use clojure.core.logic)) | |
(defn get-square [rows x y] | |
(for [x (range x (+ x 3)) | |
y (range y (+ y 3))] | |
(get-in rows [x y]))) |