This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-18
Channels
- # admin-announcements (3)
- # alda (1)
- # boot (85)
- # capetown (4)
- # cider (10)
- # clara (16)
- # cljsrn (3)
- # clojars (35)
- # clojure (83)
- # clojure-austin (8)
- # clojure-brasil (4)
- # clojure-canada (16)
- # clojure-greece (2)
- # clojure-ireland (7)
- # clojure-russia (23)
- # clojure-spec (22)
- # clojure-uk (151)
- # clojurescript (97)
- # core-async (10)
- # cursive (1)
- # datascript (7)
- # datomic (21)
- # defnpodcast (13)
- # devcards (3)
- # emacs (4)
- # events (3)
- # hoplon (18)
- # juxt (4)
- # leiningen (7)
- # mount (4)
- # off-topic (2)
- # om (1)
- # onyx (30)
- # planck (6)
- # proton (81)
- # re-frame (3)
- # reagent (9)
- # rum (10)
- # spacemacs (1)
- # specter (6)
- # testing (7)
- # untangled (66)
- # vim (84)
- # yada (23)
@ajchemist: a minimal repro?
Interestingly, the JavaScript associated with that is simply some.ns.x = some.ns.x
. Hmm.
Again, https://github.com/clojure/clojurescript/wiki/Quick-Start led me to this
@ajchemist: Cool, so while (def x x)
is legit in ClojureScript, the fact that it causes an upstream failure with Closure under :advanced
is now captured here https://github.com/google/closure-compiler/issues/1899
Hi guys, https://clojure.news is out! HackerNews clone written entirely in Clojure & ClojureScript
Can I prepend the :output-to
-file with a custom js-file? I know :preamble
exists but I would like something that only prepends to the initial file.
@vikeri: what's the "initial file"?
The output js file, the one that bootstraps the application, loads cljs, goog bootstrap and ultimately my main ns.
More specifically I want to add a bootstrap script that mocks out some stuff before running tests for React Native. I can accomplish this by running nodemon
on this bootstrap file, but it would be neat to use doo
directly without nodemon
.
@akiel: You can use goog.i18n.DateTimeFormat
and a component that updates in given intervals
@martinklepsch: I use cljs-time now which also has intervals. but it was a bit of work and I have no localization
The intervals were more about triggering re-renders
ah ok, so you only want the relative time stuff not the auto-updating (I looked up timeago.js and I thought that's what you wanted 馃檪 )
Actually goog.i18n.DateTimeFormat
doesn't help but goog.date.relative
does: https://github.com/google/closure-library/blob/master/closure/goog/date/relative.js#L25
@bhauman: I'm testing Figwheel repl with Vim-fireplace. Should it support redirecting println output from browser to editor/nrepl?
I guess it should: https://github.com/bhauman/lein-figwheel/blob/9d4d11ed1ad88a5cde9c6186a01d7d08791e446e/sidecar/src/figwheel_sidecar/repl.clj#L56
@juhoteperi: if you are using the latest, then yes, but this is dependent on your apps use of println
Is 0.5.4-7 recent enough? I'm mostly concerned about Fireplace's use of cljs.repl/source
which calls println.
https://github.com/bhauman/lein-figwheel/blob/master/support/src/figwheel/client.cljs#L49
Could something in the app break the redirection?
Doesn't work either, it is only printed on the browser console
Works with boot-cljs-repl/weasel
Hmm, works from nrepl
@bhauman: Also about Fireplace, do you have opinion about providing cljs-repl-env function which could be used by Fireplace to connect to the repl? Fireplace calls piggieback/cljs-repl so current cljs-repl function doesn't work
can anyone explain how to use (i.e., require
) a node module client-side in clojurescript?
[my guess is that cljs.nodejs won't exist client side and thus nodejs/require won't either]
@juhoteperi: everything you need should be in the figwheel-sidecar.repl
ns, if you need a refactoring, or if you want to make a fn available in the repl-api ns I'll take a PR
@bhauman: Impl. here: https://github.com/bhauman/lein-figwheel/compare/master...Deraen:repl-env
With some refactoring there wouldn't be need for this much duplication
Yeah I'm not sure if -repl-options work exactly the same as providing options to piggieback/cljs-repl
@johanatan: you're guess is right. You'll need to include the code in some way, built for the browser
@johanatan: normally I compile it with webpack as a UMD module and add it in the :foreign-libs
compiler option
@anmonteiro: can you point me to an example on Github?
@johanatan: here鈥檚 a Google Groups thread with more information: https://groups.google.com/forum/#!topic/clojurescript/mqQNcT4lHss
@bhauman: PR opened, I'll continue debugging the print redirection problem
@anmonteiro: so I used the re-frame template and it has a lot of stuff setup. I have no idea if it is using CLJSJS React or not (or if that is an important part of that setup).
@johanatan: I鈥檓 not sure what you鈥檙e asking now
is it important that CLJSJS React (rather than some other mechanism of obtaining React) be used?
[the thread you linked to seems to highlight CLJSJS React as crucial to that setup working]
[and if it is important, perhaps I do have CLJSJS React and don't know it (as re-frame/reagent are doing magic beyond what is in project.clj)]
@johanatan: not magic, but Reagent probably pulls React as a transitive dependency
@johanatan: You can check lein deps :tree
to check what deps Reagent brings
re: thread, I don鈥檛 remember the specifics, all I know is it helped me set up a while ago
@anmonteiro: did you integrate the invocation of webpack from the lein build? or do it as a separate build step coordinated by a GNU makefile or similar ?
@johanatan: in the project I used it in, I did it only once and committed the generated module
so, looks like this is way overkill for my current purposes anyway as there is CLJSJS module for the component I want to use: https://clojars.org/cljsjs/fixed-data-table
Hi, there is a problem with the quick start. The browser repl doesn't work with file urls, so just opening the index.html in the browser won't work, you have to serve the files for it to work, and the tutorial doesn't say so.
Here's a related issue https://github.com/cemerick/austin/issues/47
i鈥檓 having some trouble making a cljs version of this : http://bl.ocks.org/rkirsling/5001347#index.html
my problem is mainly with the function tick(), it has an updated reference to path which is changed every now and then in restart()
but when i鈥檓 using om, i can鈥檛 think of a way to make an equivalent tick() where i only initialize force once
i have to include this: (.on force-layout "tick" (on-tick app)) inside om/IDidUpdate, which makes me feel that i鈥檓 doing something wrong
wondering how to add a JSDoc annotation to a protocol function?
should I add it in the implementation or when defining the protocol?