This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-28
Channels
- # admin-announcements (59)
- # aws (27)
- # beginners (42)
- # boot (22)
- # cider (5)
- # clojure (97)
- # clojure-australia (3)
- # clojure-italy (2)
- # clojure-japan (9)
- # clojure-russia (81)
- # clojure-sg (2)
- # clojurescript (86)
- # clojutre (1)
- # cloxp (2)
- # cursive (60)
- # datomic (24)
- # docs (1)
- # editors (1)
- # emacs (17)
- # hoplon (57)
- # instaparse (1)
- # jobs (11)
- # ldnclj (19)
- # re-frame (1)
- # reagent (3)
- # spacemacs (7)
- # testing (8)
- # yada (127)
this might be a dumb question, but I can’t even offhand find the docstring for goog-define
I was running off of @martinklepsch’s blog post
@tel I should add a link to the source to the blogpost probably
but I am having an issue with goog.History:
(goog.History. )
ExceptionInfo #<TypeError: goog.History is not a constructor>
@gerrit: did you follow https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL ?
@akiel: actually no.
I just uncommented the :nrepl-port
in the project.clj
and then added dev
to the src-paths. then I start the cljs repl using this:
(ns user
(:require [figwheel-sidecar.repl-api :as rapi]))
(defn cljs-repl []
(rapi/cljs-repl))
I’m running figwheel with a ring handler, is this using jetty?
@gerrit: this is how I used goog.History: https://github.com/darwin/faceboard/blob/master/frontend/src/faceboard/router.cljs#L14
@darwin: thanks, for some reason it stopped complaining about that typeerror after a couple of restarts ?!??!!
This is exciting (note the last commit): https://github.com/ohpauleez/cljs-terra
@akiel: try this one: https://github.com/gerrit-hntschl/ccpeople2/blob/master/app/project.clj
yes lein figwheel
worked for me in the past already - but I like to execute code from within the editor in the repl which does not work with lein figwheel
Hi all, can someone spot what’s wrong with this conditional statement I’m trying to use?
(ns foo.schemas.core
(:require [schema.core :as s]
#?(:clj [clojure.tools.logging :as log])))
Seems to work fine on the Clojure side, but with ClojureScript 1.7.107 I keep getting compile errors about being unable to find clojure.tools.logging(I’m trying to not include it in ClojureScript)
Aha, think I figured it out… The error was actually coming up from a Clojure compilation of this file within my CLJS project, because I had it under :source-paths
…and I don’t have that dependency in the cljs project. Thanks and sorry for the noise!
does anyone know if there is a something i need to do to get CLJS to output code that can run without a DOM? in my case, i want to write a web worker. my attempts are failing because there are references to window
in my CLJS output.
@sekao: people wrote web workers successfully with CLJS before, maybe you are including some DOM-related library to your web-worker project?
I've made more progress on my L-System code and now have what I believe should support every variation of L-Systems you could want - deterministic, stochastic, context-sensitive, parametric, combinations of all of the above. https://github.com/decomplect/ion/blob/master/src/ion/ergo/l_system.cljc
I'm not 100% sure about the API and code, so if anyone wants to check it out and provide feedback/suggestions that would be great.
For example, is there a more idiomatic way of handling the need to look at the previous and next values in a collection when processing that collection? I just did a (map vector (range) coll)
over the collection and then in the handler I did (replacement v (get coll (dec n)) (get coll (inc n)))
@sekao: you can maybe get some inspiration from my project here: https://github.com/darwin/plastic/blob/master/cljs/project.clj#L95, I had to employ quite some hacks to get it working (re-frame, depends on reagent, which in turn includes react.inc.js), but it could be much simpler in your case, if you don’t have such deps and don’t need to depend on :closure-defines feature
here are the hacks on web worker side: https://github.com/darwin/plastic/blob/master/lib/worker.js
@darwin the only library i’m using is schema. however i am using cljs.js/eval
in my worker. i assume that doesn’t need the DOM.
@sekao: are you compiling as :nodejs target, right? you should dig into the output and find out what is responsible for those window references
maybe it is possible to compile with default web target as well, I’m not sure, I did :target :nodejs
@darwin the output with that has unexpected tokens. did you have to modify the JS output to get it to work in a web worker?
it even outputs #!/usr/bin/env node
at the top, is that even valid for a web worker script?
@cfleming: not sure what’s going on but the latest release is unusable for me, doing anything at the REPL locks up IntelliJ completely
@darwin i may have miscommunicated, but i’m trying to run CLJS in a web worker inside a browser, not on nodejs, so i don’t think the :nodejs target will work for me
@sekao: there’s an old ClojureScript library related to web worker, it might give you some hints: https://github.com/MarcoPolo/servant
@dnolen: That’s weird, does going back to 0.1.59 fix it? No-one else has reported anything.
@jeluard i tried that library but so far i’ve been using the web workers api directly so far since it’s so simple. i think my issue is about the CLJS compiler itself though.
@dnolen: Oh, the one right now. That’s very strange, there are only minor fixes in there. I’ll check ASAP. Doing anything in a CLJ clojure.main REPL, right?
@cfleming: not sure about doing any thing, just the project I was in which is not shareable. In the middle of work so didn’t investigate more.
@dnolen: Not sure, I’ll see if I can see anything obvious. If I can’t reproduce I’ll get a thread dump from you when you have some time.
Anyone seen No implementation of method: :-compile of protocol: #'cljs.closure/Compilable found for class: nil
in clojurescript 107?
@dnolen: Ok I think I know what the problem is. I changed one of the regexes for stacktrace matching and I think the new one is prone to exponential backtracking. That matching happens on the EDT and would lock the IDE.
@dnolen: There’s a test build here: http://colinfleming.net/regexp/cursive-14.1-0.1.61.zip with that change backed out. A couple of other people have had the problem and will hopefully try to reproduce, but if you get time to try it that would be excellent.
@dnolen: Ok, never mind - another user has confirmed that the test build fixes the issue. I’ll do a release now.