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
| carlos@login: lein clean & lein cljsbuild auto production | |
| [1] 11434 | |
| Compiling ClojureScript. | |
| Compiling "resources/public/js/cljs/app.js" from ["src/cljs" "src/cljc" "src/frontend/src" "env/prod"]... | |
| WARNING: ->ValidationError at line 68 is being replaced at line 80 file:/home/carlos/.m2/repository/prismatic/schema/0.4.0/schema-0.4.0.jar!/schema/utils.cljs | |
| WARNING: ->NamedError at line 89 is being replaced at line 101 file:/home/carlos/.m2/repository/prismatic/schema/0.4.0/schema-0.4.0.jar!/schema/utils.cljs | |
| WARNING: update already refers to: #'clojure.core/update in namespace: plumbing.core, being replaced by: #'plumbing.core/update | |
| WARNING: update already refers to: cljs.core/update being replaced by: plumbing.core/update at line 53 file:/home/carlos/.m2/repository/prismatic/plumbing/0.4.0/plumbing-0.4.0.jar!/plumbing/core.cljs | |
| WARNING: ->ValidationError at line 68 is being replaced at line 80 resources/public/js/cljs/production/schema/utils.cljs | |
| WARNING: ->NamedError at line 89 is being replaced at line 101 |
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
| ;; Problem | |
| ;; Event Handling in UIs. We only care about some of the events fired | |
| ;; by the user or IO and it is not always possible to handle them at | |
| ;; the point where we pick them up from the DOM. | |
| ;; Thus a messaging/piping infrastructure is need to take the events | |
| ;; from the place where they are interpreted from the DOM to the place | |
| ;; that handles them. Each application rolls it's own messaging | |
| ;; infrastructure, can we do any better? |
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 import-names.core | |
| (:import (java.util Date))) | |
| (def Date "Should this compile?") | |
| (defn -main [] | |
| (println Date)) | |
| ;; Throws: |
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
| java.lang.IllegalStateException | |
| at com.google.common.base.Preconditions.checkState(Preconditions.java:158) | |
| at com.google.javascript.jscomp.CollapseProperties.rewriteAliasProps(CollapseProperties.java:266) | |
| at com.google.javascript.jscomp.CollapseProperties.inlineGlobalAliasIfPossible(CollapseProperties.java:239) | |
| at com.google.javascript.jscomp.CollapseProperties.inlineAliases(CollapseProperties.java:181) | |
| at com.google.javascript.jscomp.CollapseProperties.process(CollapseProperties.java:116) | |
| at com.google.javascript.jscomp.PhaseOptimizer$NamedPass.process(PhaseOptimizer.java:285) | |
| at com.google.javascript.jscomp.PhaseOptimizer.process(PhaseOptimizer.java:217) | |
| at com.google.javascript.jscomp.Compiler.optimize(Compiler.java:1972) | |
| at com.google.javascript.jscomp.Compiler.compileInternal(Compiler.java:765) |
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
| This Gist shows a potential bug in nashorn 1.8.0_40/1.8.0_45. It works properly in Java 9. It was logged with Review ID: JI-9020683. | |
| After compiling a reduced version of core.cljs (the ClojureScript language) and a minimal test, | |
| V8 and Spidermonkey print 1 and 10 when the compiled script runs. Nashorn prints 1 and then throws | |
| the custom exception "Error: No protocol method IDeref defined for type :[object Object]" | |
| The file compiled.js is a distilled version of the real compiled file that has the minimum code to | |
| fail. Any of the lines marked with // X solve the problem when deleted for 1.8.0_40. Deleting the | |
| commented function solves the problem both for 1.8.0_40 and 1.8.0_45. Said function is not referenced | |
| in the code at all. |
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
| var goog = goog || {}; | |
| goog.typeOf = function(value) { | |
| var s = typeof value; | |
| if (s == "object") { | |
| if (value) { | |
| if (value instanceof Array) { | |
| return "array"; | |
| } else { | |
| if (value instanceof Object) { |
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
| The minimal error (below) disappears when test-919-generic-cas is deleted. It seems to be that the Protocol clashing comes when MyCustomAtom is used, not only defined. The error also disappears if `state` inside MyCustomAtom is changed to snail. Note that Volatile in cljs.core is also defined in terms of a state attribute. | |
| Note that even though `compare-and-set!` calls `-deref` it raises no exceptions. | |
| ERROR in (test-919-generic-cas) (Error:NaN:NaN) | |
| testing CLJS-919, CAS should on custom atom types | |
| expected: (== (clojure.core/deref a0) 20) | |
| actual: | |
| #<Error: No protocol method IDeref.-deref defined for type cljs.core-test/MyCustomAtom: [object Object]> |
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 cljs.core-test | |
| (:refer-clojure :exclude [iter]) | |
| (:require [cljs.test :refer-macros [deftest testing is]])) | |
| (deftest test-atoms-and-volatile | |
| (let [v (volatile! 1)] | |
| (testing "Testing volatile" | |
| (is (volatile? v)) | |
| (is (not (volatile? (atom 1)))) | |
| (is (= 2 (vreset! v 2))) |
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
| carlos@clojurescript: ./script/test-none | |
| Analyzing file:/home/carlos/OpenSource/clojurescript/src/cljs/cljs/core.cljs | |
| Compiling test/cljs/baz.cljs | |
| WARNING: baz is a single segment namespace at line 1 test/cljs/baz.cljs | |
| Compiling test/cljs/cljs/ns_test/bar.cljs | |
| Compiling test/cljs/cljs/binding_test_other_ns.cljs | |
| Compiling test/cljs/cljs/binding_test.cljs | |
| Analyzing file:/home/carlos/OpenSource/clojurescript/src/cljs/cljs/test.cljs | |
| Analyzing file:/home/carlos/OpenSource/clojurescript/src/cljs/clojure/string.cljs | |
| Compiling test/cljs/cljs/keyword_other.cljs |
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 notes.core | |
| (:import goog.History | |
| goog.history.EventType) | |
| (:require [reagent.core :as reagent :refer [atom]] | |
| [secretary.core :as secretary] | |
| [reagent.session :as session] | |
| [reagent-forms.core :refer [bind-fields]] | |
| [ajax.core :refer [POST]] | |
| [goog.events]) | |
| (:require-macros [secretary.core :refer [defroute]])) |