View chambered.js
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
;(function(){ | |
"undefined" !== typeof Math.imul && (Math.imul.c ? Math.imul.c(4294967295, 5) : Math.imul.call(null, 4294967295, 5)); | |
var e = function() { | |
function a(a) { | |
return a * b.b(); | |
} | |
function c() { | |
return Math.random.b ? Math.random.b() : Math.random.call(null); | |
} | |
var b = null, b = function(b) { |
View users_master_view_controller.clj
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 classroom-checkout.users-master-view-controller | |
(:require [fikesfarm.ios.interop :refer [TableViewDataSource TableViewDelegate FetchedResultsControllerDelegate fetched-results-change-type' table-view-row-animations]] | |
[classroom-checkout.user-detail-view-controller :refer [user]] | |
[classroom-checkout.database :refer [database-manager create-user!]]) | |
(:require-macros [fikesfarm.ios.util :refer [reify]])) | |
(def view-controller (atom nil)) | |
(def table-view (atom nil)) | |
(def edit-bar-button-item (atom nil)) | |
(def add-bar-button-item (atom nil)) |
View BooksViewControllerObjC
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
#import "FCCBooksMasterViewController.h" | |
#import "FCJTableView.h" | |
#import "FCJBarButtonItem.h" | |
@implementation FCCBooksMasterViewController | |
- (void)handleViewDidLoad { | |
[[self getFunction:@"view-did-load!"] | |
callWithArguments:@[self, |
View BooksMasterViewControllerCljs
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 classroom-checkout.books-master-view-controller | |
(:require [fikesfarm.ios.interop :refer [TableViewDataSource TableViewDelegate FetchedResultsControllerDelegate | |
fetched-results-change-type' table-view-row-animations | |
user-interface-idiom-ipad? table-view-cell-editing-styles]] | |
[classroom-checkout.book-detail-view-controller] | |
[classroom-checkout.database :refer [database-manager create-book! delete-book!]] | |
[classroom-checkout.utils :refer [full-title]]) | |
(:require-macros [fikesfarm.ios.util :refer [reify export-view-did-load]])) | |
(def view-controller (atom nil)) |
View delete_recursively.clj
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
(defn delete-recursively [fname] | |
(letfn [(func [f] | |
(when (.isDirectory f) | |
(doseq [f2 (.listFiles f)] | |
(func f2))) | |
(clojure.java.io/delete-file f))] | |
(func (clojure.java.io/file fname)))) | |
(defn delete-recursively' [fname] | |
(let [func (fn func [f] |
View recursive_let_fn.clj
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
(defmacro memoize-rec [form] | |
(let [[fn* fname params & body] form | |
params-with-fname (vec (cons fname params))] | |
`(let [f# (memoize (fn ~params-with-fname | |
(let [~fname (partial ~fname ~fname)] ~@body)))] | |
(partial f# f#)))) | |
(let [fib (fn fib [n] | |
(if (< n 2) | |
n |
View gist:ab60ff79b8a88de1e9b7
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
I when running (deftest test-misc...) in embedded JavaScriptCore instance | |
in iOS simulator, JavaScriptCore crashes with the trace below. I'm working | |
to isolate this to file a report with Apple and to better understand what | |
generated JavaScript may be causing it (perhaps we can work around). | |
(lldb) bt | |
* thread #1: tid = 0x3f7e, 0x0111e583 JavaScriptCore`WTFCrash + 67, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xbbadbeef) | |
frame #0: 0x0111e583 JavaScriptCore`WTFCrash + 67 | |
frame #1: 0x011395a9 JavaScriptCore`WTF::fastMalloc(unsigned long) + 1929 | |
frame #2: 0x00c9cb56 JavaScriptCore`WTF::Vector<JSC::UnlinkedInstruction, 0ul, WTF::UnsafeVectorOverflow>::expandCapacity(unsigned long) + 86 |
View test2.clj
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 classroom-checkout.test2 | |
(:refer-clojure :exclude [iter]) | |
(:require [cljs.test :refer-macros [deftest testing is]] | |
[clojure.string :as s] | |
[clojure.set :as set])) | |
;; this fails in v8 - why? | |
;; (assert (= "symbol\"'string" (pr-str (str 'symbol \" \' "string")))) | |
(deftest test-misc |
View both.clj
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
(defrecord WebsocketEnv [] | |
cljs.repl/IJavaScriptEnv | |
(-setup [this _] (websocket-setup-env this)) | |
(-evaluate [_ _ _ js] (websocket-eval js)) | |
(-load [this ns url] (load-javascript this ns url)) | |
(-tear-down [_] (websocket-tear-down-env))) | |
(if false | |
(reify cljs.repl/IJavaScriptEnv |
View jsc.clj
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
(defn jsc-eval | |
"Evaluate a JavaScript string in the JSC REPL process." | |
[repl-env js] | |
(let [in @(:in repl-env) | |
out @(:out repl-env)] | |
(write out js) | |
(let [result "success" #_(read-response in)] | |
{:status :success | |
:value (:value 1)}))) |
OlderNewer