Fork me on GitHub

Ok here is the another issue, I'm trying to use [quiescent "0.3.1"] and it needs sablono.core? Here is the output: "No such namespace: sablono.core, could not locate sablono/core.cljs, sablono/core.cljc, or Closure namespace "sablono.core""


@br11k: interesting - this makes it look like they don't use sablono - but maybe they misspecified their deps?


@br11k this also indicates that quiescent doesn't use sablono

[email protected]: ~/quiescent$ lein deps :tree
Possibly confusing dependencies found:
[jonase/eastwood "0.2.1"] -> [org.clojure/clojure "1.6.0"]
[lein-cljfmt "0.5.3"] -> [cljfmt "0.5.3"] -> [rewrite-cljs "0.4.1"] -> [org.clojure/clojurescript "1.7.228" :exclusions [org.apache.ant/ant]] -> [org.clojure/clojure "1.7.0"]
[lein-cljfmt "0.5.3"] -> [cljfmt "0.5.3"] -> [rewrite-cljs "0.4.1"] -> [org.clojure/clojure "1.7.0"]
[lein-cljfmt "0.5.3"] -> [cljfmt "0.5.3"] -> [org.clojure/clojure "1.7.0"]

Consider using these exclusions:
[lein-cljfmt "0.5.3" :exclusions [org.clojure/clojure]]
[lein-cljfmt "0.5.3" :exclusions [org.clojure/clojure]]
[lein-cljfmt "0.5.3" :exclusions [org.clojure/clojure]]

Retrieving cljsjs/react-with-addons/15.1.0-0/react-with-addons-15.1.0-0.pom from clojars
Retrieving cljsjs/react-dom/15.1.0-0/react-dom-15.1.0-0.pom from clojars
Retrieving org/clojure/tools.reader/1.0.0-alpha1/tools.reader-1.0.0-alpha1.jar from central
Retrieving cljsjs/react-dom/15.1.0-0/react-dom-15.1.0-0.jar from clojars
Retrieving cljsjs/react-with-addons/15.1.0-0/react-with-addons-15.1.0-0.jar from clojars
 [alembic "0.2.0"]
   [lein-as-resource "2.1.3"]
   [org.flatland/classlojure "0.7.0"]
   [org.tcrawley/dynapath "0.2.3"]
 [cljsjs/react-dom "15.1.0-0" :exclusions [[cljsjs/react]]]
 [cljsjs/react-with-addons "15.1.0-0"]
 [clojure-complete "0.2.4" :exclusions [[org.clojure/clojure]]]
 [criterium "0.4.2"]
 [org.clojure/clojure "1.8.0"]
 [org.clojure/clojurescript "1.7.228"]
   [ "v20151216"]
   [org.clojure/data.json "0.2.6"]
   [org.clojure/google-closure-library "0.0-20151016-61277aea"]
     [org.clojure/google-closure-library-third-party "0.0-20151016-61277aea"]
   [org.clojure/tools.reader "1.0.0-alpha1"]
   [org.mozilla/rhino "1.7R5"]
 [org.clojure/tools.nrepl "0.2.12" :exclusions [[org.clojure/clojure]]]
 [org.clojure/tools.trace "0.7.6"]
[email protected]: ~/quiescent$ grep -r sablono .


err - hard to see from that, but grep for sablono returned no results


@noisesmith Oh, I see, actually sablono.core used in the core.cljs.


ahh, so you need to manually add sablano to your project deps I guess?


Yep that's what I've discovered


Trying to use outdated guides is so painful haha 😄


Probably there is something like that but I never found it


doesn't the official clojurescript quickstart or figwheel quickstart have this stuff?


I don't know. I've just googled this stuff. Saw "reload-less workflow" mentioned and assumed this article is the only way to get things right.


google is bad at keeping up with clojure


the official docs are usually better than what google hands you in my experience


@noisesmith Is there a way I could see packages available for :dependencies?


as in, browse the packages you could try?

noisesmith00:11:15 shows packages and who uses them


though its UI is weird


there is also lein search


[email protected]: ~$ lein help search
Search remote maven repositories for matching jars.

The first run will download a set of indices, which will take a very long time.

The query is evaluated as a lucene search. You can search for simple string
matches or do more advanced queries such as this:

  $ lein search clojure
  $ lein search description:crawl
  $ lein search group:clojurewerkz
  $ lein search "id:clojure version:1.6"
  $ lein search "Riak client"

Also accepts a second parameter for fetching successive pages.

Arguments: ([query] [query page])


Keeps telling me "No such namespace: quiescent, could not locate quiescent.cljs, quiescent.cljc, or Closure namespace "quiescent"". Tried: 1. [quiescent "0.3.2"] 2. [quiescent/quiescent "0.3.2"] 3. [levand/quiescent "0.3.2"] How namespaces work?


those are not namespace names, those are dependencies


a dependency can provide namespaces and packages


require is used to get namespaces provided by a dependency


import is used to get classes from packages in a dependency


the docs for a project should describe the namespaces available, failing that, you can browse the code in the jar (a good editor can open a jar, it's a special zip file)


But it still cannot find "quiescent" namespace


there's no such thing


look at the quiescent docs or source to find the namespaces it offers


a dependency is a package that can provide whatever namespaces or classes it likes


Woohoo finally works


@noisesmith Thank you very much for help!


I just started learning ClojureScript because I was looking for a functional front-end and after trying Elm for a bit it didn’t quite sit right with me (coming from a dynamic programming language background in ruby/js/elixir). After getting over the initial parentheses shock, I love what I’m seeing so far and in particular #re-frame 🙂


@anthonylebrun: Wecome! I hope you enjoy ClojureScript.


@shaun-mahood That looks depressingly large 😰


@br11k: Come on over to #re-frame or message me directly if you want to chat about it - I think it’s pretty straightforward to get started with and would be happy to help you unpack things with you.


@br11k: you may find interesting , it's on datascript, but has similar idea of "1 global source of truth"


@hwk @br11k: Most of the modern ClojureScript libraries and frameworks have a lot of similarity and they are all pretty awesome, there’s a ton of ideas passing back and forth between them all. For DataScript and Rum,;index=1&amp;list=PLKWlLYzr2TiwOFrH7Qe9imye2pJWKE8fo is a recent video about the same idea by the same author and there’s definitely some awesome stuff in there, he’s also got a longer workshop at if you want more info


@shaun-mahood : on your recommendation; watching this now; also, yeah, let's move to #re-frame


@shaun-mahood @hwk Thank you, I'll sure read/watch these when I get more free time. Still need to make money using PHP 😉


Is there a way to read the project.clj version from CLJS? From CLJ it would be pretty straight forward, slurp the file and read-string it. After about 30min of thinking and googling I thought it might be prudent to ask here.


@munen why don’t you read it in a macro and emit required parts in cljs?


I’m assuming you want to use something from project.clj in cljs code at runtime


@darwin That totally works. I’m still kinda new to this, so I didn’t know that this is a thing. I will have to read up a bit to actually understand what I did. Create a Macro in CLJ that I call in CLJS at runtime which then runs code it otherwise couldn’t. Pretty crazy stuff. Big thanks for the hint!


Hi. Sorry for asking about basic things, but are CLJS Atoms just pure JS variables like var x = 1; (of course they that have multiple properties such as state etc), while Clojure ones use AtomicReference etc for thread-safety?


@andrewboltachev In ClojureScript, defs are close to pure JavaScript variables, while atoms are more complicated structures that provide the needed semantics. If you are curious, here is the heart of it:


thanks, in fact, I'm programming web for quite a while, but I figured out only today (while being confused about CLJS) what does it really mean that "JS is single-threaded". TIL 😄


@andrewboltachev Right, the single-threaded aspect of JavaScript informs the way atoms are implemented in ClojureScript as compared to Clojure. For example, if you do (source swap!) at a REPL, you will see that in ClojureScript it can rely on the single-threaded nature and it is built on top of reset!.


aha, got it, thanks! In the meantime, I'm also reading famous "Java Concurrency in Practice" by Brian Goetz. In fact, I enjoy the book a lot


Does anyone know of a good library that wraps three.js or provides similar functionality? Quil does not seem as full-featured for 3D.


@shdzzl there's a THREE.js wrapper you can find here : , the project symbol is [cljsjs/three "0.0.76-0"]


@shdzzl by the way, I'm currently working on a wrapper (very WIP) for blend4web, if you're using Blender for assets


@mikebelanger Thanks, I'll take a look at your repo when I start looking at assets. I'm using cljsjs at the moment actually. I was after something that might provide abstractions more idiomatic to clojure, the way om and reagent do with react. If not, I might see what I can come up with when I get the time.


What's the correct way to call (.exit js/process 42)? ⇐ that fails under advanced compilation


@gfredericks hrm I don't think ClojureScript can be compiled for Node.js with advanced optimizations


well everything works except that call


but there are 2 solutions for that: 1. create externs for process 2. use goog.object/get: (.call (goog.object/get js/process "exit") nil 42)


@gfredericks btw 1. isn't hard at all:

var process = {
  exit: function(code){}


with cljs-oops, it should be as easy as (gcall “process.exit” 42) (a shameless plug) 🙂


Also, perhaps with the latest stuff in the compiler (last day or so), maybe it will “just work” in the future. 🙂


@shdzzl agreed, the interface to THREE is pretty minimal, and therefore not that idiomatic to clojure. I'm struggling to make the same kind of idiomatic interface to blend4web right now, and I'm open to ideas


externs seems to be a noop :/


Web APIs that require ES6 classes are starting to appear. For instance, the finalized Custom Elements v1 specification requires ES6 classes ( It appears to be possible, but very impractical, to use these APIs using polyfilled or transpiled non-ES6 code (e.g., This seems to be due to the special ability of extends and super() to subclass native-code constructors, which cannot be replicated in ES3/ES5 code. There is the Polymer shim by Justin Fagnani, but its implementation is pretty complicated (, and it must be loaded even for browsers that actually have implemented Custom Elements, such as Google Chrome and Safari Technology Preview. Does anyone around know whether there any known plans for ClojureScript someday to be able to output ES6-`class`-using code, for the sake of cleaner interoperability with these new APIs? Thanks!