Fork me on GitHub
#clojurescript
<
2015-12-24
>
mheld01:12:22

yeah, I ended up going with reagent!

mheld01:12:27

even though om is more popular

richiardiandrea01:12:27

I am very happy to announce Replumb 0.1.4. Adds dir, apropos, find-doc together with around 300 assertions against ClojureScript core. We found a bug, which is good, as one of the objectives of this library was also to help in that, I will report it soon on JIRA, but first things first: https://github.com/ScalaConsultants/replumb/releases/tag/0.1.4

isaac04:12:55

cljs how to redefine function for debug some third lib. clojure can use alter-var-root

underplank08:12:02

Hi all. Im running into a wierd problem when trying to decode JSON. In a figwheel repl I can do

(JSON/parse json-string)
but when I try to compile and run in a browser I get
No such namespace: JSON, could not locate JSON.cljs

borkdude08:12:31

@underplank: try (.parse js/JSON "123")

underplank08:12:02

ahh… turns out its a compiler warning rather than an error. Can you do

js/JSON/parse

sander09:12:11

@underplank if you prefer that order, use js/JSON.parse

underplank09:12:10

@sander: ahh thanks. worked it out, thanks @borkdude as well!

mfikes15:12:58

Wut. @dnolen now has a 2-peat for #1 HN. Maybe he can achieve a 3-peat. simple_smile

fappy19:12:21

Hi everyone! Noob question: if I'm using Stuart Sierra's component lib and I want to change the def'd var #'system to refer to something else, how can I do it in ClojureScript? ... in Clojure we'd use alter-var-root ... but ClojureScript thinks alter-var-root is an undeclared var...

fappy20:12:00

maybe set!

rhansen20:12:27

set! works

fappy21:12:42

Oh no! clojure.namespace.tools.repl currently only supports Clojure / JVM. oops.

mfikes21:12:55

If you happen to get an Apple TV this holiday season, ClojureScript / Ambly support is available for tinkering: https://github.com/omcljs/ambly/wiki/tvOS-Support

Tim21:12:58

(def my-canvas (.getElementById js/document "canvas"))

(def ct (.getContext my-canvas "2d"))

(defn fill-rect [ct]
  ;(.fillStyle ct "Red")
  (.fillRect ct (30 30 50 60)))

Tim21:12:17

I’m trying to get this code to work …. but I get Uncaught TypeError: 30.call is not a function

sander21:12:53

@tmtwd: (30 30 50 60) is interpreted as a function call

Tim21:12:04

I figured it out simple_smile

Tim21:12:14

it was simpler than I thought it would be

ssutch22:12:50

has anyone tried combining om next and velocity js?

blissdev23:12:14

ssutch: I know there had been some work on om.previous, but not sure about next