This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # ai (1)
- # beginners (239)
- # bitcoin (1)
- # boot (4)
- # cider (5)
- # clara (3)
- # cljs-dev (16)
- # cljsjs (5)
- # cljsrn (1)
- # clojure (152)
- # clojure-android (3)
- # clojure-dev (3)
- # clojure-greece (4)
- # clojure-italy (5)
- # clojure-spec (14)
- # clojure-uk (24)
- # clojurescript (81)
- # data-science (1)
- # datomic (47)
- # devcards (34)
- # docs (3)
- # emacs (6)
- # ethereum (1)
- # events (9)
- # flambo (5)
- # fulcro (11)
- # graphql (1)
- # immutant (3)
- # lein-figwheel (2)
- # leiningen (2)
- # luminus (6)
- # lumo (90)
- # off-topic (25)
- # proton (2)
- # re-frame (44)
- # reagent (5)
- # ring (7)
- # ring-swagger (11)
- # shadow-cljs (11)
- # spacemacs (6)
- # vim (13)
- # yada (25)
(try (.scrollTo js/window 0 0) (catch :default _ nil)))
@anmonteiro Why the
Any plan for Java 9? I got an related issue https://github.com/thheller/shadow-cljs/issues/98#issuecomment-332436290
Is it a possible
(defn resolve [x] (let [p (string/split (str x) #"\.|\/") resolver (fn  (loop [[s & ss] p r js/global] (if s (recur ss (js/goog.object.get r s)) r)))] (when (resolver) (new cljs.core.Var resolver x nil))))
resolvefunction to commit to clojurescript? (sure, taking care about
js/window/`js/root` and maybe better naming and others signatures) Due the late binding on js, maybe will make sense remove the
when, allowing create
Varto a "undefined" variable...
cljs.core/resolve already exists
any ideas why when i run my tests using karma everything builds but before running the actual tests, it just returns to a prompt?
running the tests directly via karma works just fine, it's when i run via lein that it stops
Hmm looks like React 16.0.0 productions builds defines
Nb into the global namespace causing issues if you load React after your CLJS app... Adding these to the externs fixes it. Ugly.
Or using output-wrapper, @rauh ?
No just using the UMD builds form
@thheller The one from the announcement/CDN ( https://facebook.github.io/react/blog/2017/09/26/react-v16.0.html#installation ) : https://unpkg.com/[email protected]/umd/react.production.min.js
The 16.xx beta builds didn't have that issue. Should I open a React issue for this? Probably going to bite a few people
https://unpkg.com/[email protected]/umd/react.development.js this has a proper UMD wrapper, no idea why the production version doesn’t include it
I’m getting a complaint from chrome that your cert is invalid.
Odd, I’m using chrome as well without issue? The cert is from http://letsencrypt.org. Which chrome version are you on?
Looking for a few testers that currently have to jump through hoops to make JS dependencies work.
What's the best way to customize the
cljs.user ns when working with Figwheel? I.e. I want the
dev:cljs.user=> prompt preloaded with functions, aliased namespaces etc.
When I add a file called
cljs/user.cljs on the classpath, it doesn't get loaded automatically (lein-figwheel "0.5.13"). I can require it in my
core.cljs, but then it also ends up in production builds.
hey, can someone tell me why it's
(require '[blah.blah]) in the REPL? What does
'[xxx] mean? I know sequences literals have to be declared with quotes, but what does quoting a vector mean
@zakpatterson quoting the vector also quotes the symbols inside the vector - you could e.g. write
(require ['clojure.string :refer ['join]]) at the expense of more quotes
Ah, that makes sense. so wait, now sequences don't make sense anymore, as
(def x 2) '(x 3) produces
(x 3) rather than
i can get back to google too, that point about quoted vectors wasn't apparent to me
with a list, quote is special - it does two things: it quotes each of the members of the list and it prevents the evaluation of the list (i.e. it evaluates to itself rather than causing a function call)
if you only want to prevent evaluation without quoting the members, you can use
(list x 2); if you want to quote members without preventing evaluation (which is silly mostly), you can do
Vectors are different because they never get interpreted as a function call - but you may still want to quote contents.
Almost everything in Clojure evaluates to itself - the exception are symbols (which evaluation to what they refer to) and lists (which evaluate as function calls)
Am I missing anything?
that's super helpful, i was mixing my understanding of
'(x 2) with backtick syntax, like
and the backtick operation seems to retain the notion of which namespace the variable existed in, rather than treating it as a raw symbol
yeah forget about backticks - that's advanced level macro business, not be touched in your 1st year in clojure
yeah i'm surprised I got this far without figuring the quoting thing out, i was about to write a macro
@nwjsmith yeah although arguably that's "itself" as if you print it you get the same string back
@pesterhazy With the source paths compiler option in your build config (e.g. project.clj) to include the dev directory it works for me e.g.
:source-paths ["src/cljs" "src/cljc" "dev"]
@vinai do you
require the ns anywhere explicitly?
or do you do that from emacs?
it's user, not cljs.user?
@pesterhazy It's cljs,user. The repl.options was for the clojure repl.
@lilactown If you want to use
core.async with Lumo, you could consider Andare, which is a port of
core.async that is compatible with self-hosted ClojureScript. https://github.com/mfikes/andare
If you want to use "leiningen packages" with Lumo, you really just need to put dependency JARs on Lumo's classpath, using Lumo's
-c option or
I’m testing our clojurescript app on the newest clojurescript (1.9.908) + clojure 1.9.0-beta1. I get this error in the console: “Uncaught SyntaxError: Invalid or unexpected token”
@mfikes thanks. I ended up just running with figwheel-node, I think the CLI app I'm writing is complicated enough to warrant it
@borkdude I think it is this one https://dev.clojure.org/jira/browse/CLJS-2352
With the newest ClojureScript from master I get a warning in transit-cljs about
uri? being redefined. I’ll file an issue at the transit-cljs repo.
Is there a good example/tutorial/book chapter of a ClojureScript on node app out there?
just realeased version 0.3.0 of postagga, the easy natural language parser - now with more flexible parsing rule 🙂 https://github.com/fekr/postagga
I'm writing a node app in CLJS - what's the ceremony around accessing a part of the Node.js standard library e.g.
@lilactown if you’re on CLJS 1.9.908:
(ns my-ns.core (:require fs))
then use functions as:
shouldn’t be hard (untested):
(let [c (chan)] (fs/readFile "foo.txt" #(put! c %)) c)