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 no-instrument.core | |
(:require[om.core :as om :include-macros true] | |
[om.dom :as dom :include-macros true])) | |
(enable-console-print!) | |
;; Instrumentation | |
;; =============== | |
(defn paint-component |
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 ^:figwheel-always local-state.core | |
(:require-macros [cljs.core.async.macros :refer [go]]) | |
(:require [om.core :as om :include-macros true] | |
[om.dom :as dom :include-macros true] | |
[cljs.core.async :refer [put! chan <!]])) | |
(enable-console-print!) | |
(defonce app-state (atom {})) |
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 react-components.core | |
(:require [reagent.core :as reagent :refer [atom]])) | |
(enable-console-print!) | |
(defonce app-state | |
(atom {:text "Hello world!" | |
:plain {:comment "and I can take props from the atom"}})) | |
(defn comment-box [] |
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 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]])) |
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
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 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 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 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 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 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) |
OlderNewer