This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
@mikethompson: thanks for the link. i had seen the question but didn't see the follow up conversation. it was one of those that stuck in my head as something worth exploring
@rui.yang: Do you mean the typo on the wiki page here: https://github.com/omcljs/om/wiki/Advanced-Tutorial#the-notification-channel
@rui.yang: My impression is that David would like the community to help with wiki maintenance, so I think it's safe to simply change the wiki pages so that they are correct. Your changes can always be undone if someone doesn't like them.
If you aren't sure about a change you can always ask. The #C06DT2YSY channel on slack is probably the best place for that.
@gadfly361: this is what I use, m must have exactly those keys
(defn complies-schema? [m schema] (= (set (keys m)) (set schema)))
@ergl sweet, thanks for giving another option! For my use case, pre conditions ended up working out well, but ill try this out too.
I don't know, I just want to be able to run browser repl commands without fighting with the crappy repl I get in the terminal
@petrus: create a figwheel.clj script like https://gist.github.com/sander/d9cbd3b734d31491e040 and create a "Use clojure.main in normal JVM process" repl with Parameters: path/to/figwheel.clj
@petrus: the setup at https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL has probably been tested more but seems more complicated
@petrus: you may need to put
[figwheel-sidecar "0.3.3"] in your leiningen deps for it to work
@meow there is no js namespace really. That just gives access to the global environment.
@meow: standard library loads a few Closure namespaces, they are in fact globally accessible.
(ns cljs.core (:require [goog.string :as gstring] [goog.object :as gobject] [goog.array :as garray]) (:import [goog.string StringBuffer]))
Okay, so those goog namespaces are globally available:
cljs.user=> (goog.string/isUnicodeChar 42) false
But they aren't available as
gstring for example because the
:as option creates an alias symbol in the local namespace, which in this case is the global namespace for cljs apps, but even in this case the symbol isn't available globally, but the fully qualified libraries like
goog.object are available. (I hope I got that right.)
But the fact that these google closure modules are available in the global namespace is kind of a side effect of cljs.core needing those modules for their functionality itself. It wasn't really the intent to make them part of the global namespace, was it? I mean, apps written in cljs should :require [goog.string] explicitly rather then relying on the fact that it is already available, right?
Normally they should but there are cases where accessing a namespace you know has already been loaded is useful. This is the case for some kinds macros you might write.
Yeah, I have noticed macros that didn't explicitly require namespaces that they knew would already be loaded and I didn't know if this was considered proper or not, but I suppose it is.
Does anybody have any hints on integrating external build tools into a leiningen build process? I need to build Semantic UI and other libs, they use gulp or grunt. I need to unpack, drop in a config file, build, and then extract the artifacts, placing them in resources and packaging for external static serving. Before I try reinventing the wheel, I thought I'd ask around for hints.
@jrychter: w/ cljsbuild notify-command, you can execute a script that runs gulp: https://github.com/emezeske/lein-cljsbuild/blob/c82d199f1d7390a782404d7b97ffa067b3a2e4d8/sample.project.clj#L78
@meow: it's a pattern that exists in Clojure too. Otherwise using macros gets unnecessarily error prone.
I give up. I can't figure out how cljs gets the
js/ pseudo-namespace into its global namespace. 😞
does somebody has a good example of time dependent animations/interpolation use in reagent/om/etc? how would approach such thing? core.async loop with timeouts updating a state?