Fork me on GitHub
#clojurescript
<
2017-06-17
>
urbank00:06:17

Hm, seems I didn't have figwheel true set on the build. Strange, pretty sure it worked on my other computer

zane21:06:19

Any idea why cljs.spec.test.alpha/check would return a 0-element vector?

zane21:06:40

I figured it would default to a positive :num-tests.

misha22:06:48

how can I preserve fractions in clojurescript? figwheel complains with "Could not Compile" as soon as I put fraction into component:

[:div {} 1/2]

noisesmith22:06:22

do Ratios even exist in cljs?

noisesmith22:06:20

I think the clojurescript compiler just outputs doubles when it reads a ratio

noisesmith22:06:47

hmm - I'm testing this with self-hosting cljs on node though- I wonder what cljs.jar does

misha22:06:35

(print 1/2) fails compilation too (via figwheel)

noisesmith22:06:41

+$ cat src/repro/repro.cljs 
(ns repro.repro)

(println 1/2)
+$ rlwrap java -jar cljs.jar 
Clojure 1.8.0
+user=> (require 'cljs.build.api)
nil
+user=> (cljs.build.api/build "src" {:output-to "out/main.js"})
ExceptionInfo failed compiling constant: 1/2; class clojure.lang.Ratio is not a valid ClojureScript constant.  clojure.core/ex-info (core.clj:4617)
+user=> 

misha22:06:51

I'd really love to get fractions from ui into datomic via datascript w/o making special pipeline around just those few attributes

cryan22:06:11

is there a way to query a reagent component's local state from the repl?

misha22:06:25

cryan: try asking in #reagent

mfikes22:06:19

Right—the reader used for self-hosted reads fractions as doubles, but for JVM-based the ratios can't be processed