This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-13
Channels
- # admin-announcements (1)
- # beginners (10)
- # boot (15)
- # cider (9)
- # clara (195)
- # cljsrn (24)
- # clojars (20)
- # clojure (46)
- # clojure-android (1)
- # clojure-germany (15)
- # clojure-greece (16)
- # clojure-nl (1)
- # clojure-russia (13)
- # clojure-spec (28)
- # clojure-uk (44)
- # clojurescript (104)
- # clojurex (1)
- # component (7)
- # css (2)
- # cursive (27)
- # datomic (92)
- # dirac (12)
- # emacs (5)
- # lambdaisland (3)
- # lein-figwheel (36)
- # mount (87)
- # off-topic (8)
- # om (102)
- # om-next (3)
- # onyx (30)
- # pedestal (3)
- # re-frame (26)
- # reagent (20)
- # robots (4)
- # specter (18)
- # spirituality-ethics (1)
- # untangled (127)
- # yada (11)
Has anybody used datascript with re-frame. Is is possible to detect datascript events to propagate changes using the reaction / subscribe / pattern?
@rnandan273: try in #C073DKH9P or #C07V8N22C
@danielcompton: I am trying to integrate datascript with a re-frame based app, there is a library called posh, is that the only way to use?
Hello! I am using figwheel to build a cljs app. I want my client side js to be able to launch scripts and access (read/write) files on the local machine. I (think I) know I can achieve this with chord library using websockets, but I was wondering if anyone knows of perhaps a simpler way or any other alternatives. Or maybe chord is the best option? How would you do this? Thank you for time đ
@oluwaseun: if it is meant to be a desktop app, electron might save you the trouble of having an http server
@bhauman: little piece of feedback about figwheel 0.5.4
. I have a library that reads a custom CLJS compiler option, :css-output-to
. Figwheel 0.5.4 hard errors on this compiler option with the following:
The key :css-output-to is spelled wrong and is mostly likely in the wrong position.
It should be probably be spelled :output-to
this makes it impossible to use figwheel with such library@rnandan273: take a look at Posh https://github.com/mpdairy/posh
@anmonteiro: cool, noted, adding arbitrary options to cljs compiler options is going to make it hard to provide comprehensive validation for people, we need a place to put arbitrary options on a build
@anmonteiro: my guess is that you are putting this at the same path level as :source-paths?
@bhauman: nope, itâs inside :compiler
:css-output-to
is an option that my library will look for, yes
can you use https://github.com/clojure/clojurescript/wiki/Compiler-Options#closure-defines?
if we allow arbitrary keys it makes it impossible to know if someone has misspelled a key
@bhauman: I could probably use :closure-defines
from now on, yes, but what about backwards compatibility?
ÂŻ\(ă)/ÂŻ
would you consider adding a knob to turn that check off?
@dnolen: i really hear you on that and figwheel was one of the tools that caused the problem
I think that + me adding a closure-define would solve the immediate problem
@anmonteiro: I'll certainly add an exception for that
@bhauman: For reference, at worst, the compiler only ever warned about things (never balked), but what we did end up doing is drastically cutting down on the warning noise by backing out part of it. Here is the commit if it helps: https://github.com/clojure/clojurescript/commit/177b05fc5935c659e4829b7b1798e216b6797bec
@bhauman: IIRC, the Levenshtein distance had to be 3 or less to trigger a suggestion. So, in summary :css-output-to
vs. :output-to
skates by by one character diff.
I am trying to use alandipart's local storage library as a backing db in re-frame, but the reactions don't seem to get triggered. Any pointers?
Having issues using macroexpand
inside a macro used via ClojureScript
(defmacro foo [x]
(println "Before:" x)
(println "After:" (macroexpand x))
)
(defmacro bar []
`(+ 1 2))
Running (foo (bar))
at repl prints this:
cljs.user=> (foo (bar))
Before: (bar)
After: (bar)
Before: (bar)
After: (bar)
Before: (bar)
After: (bar)
nil
any ideas?
@nathanmarz: runtime macroexpand
isnât a thing
I'll see if I can work around it somehow
thanks
I'm having problems with :foreign-libs being included in the JS in the wrong order. What could cause that? What should I check for?
This is my :foreign-libs vector:
[{:file "foreign-libs/cljsjs/react-with-addons/development/react-with-addons.inc.js"
:provides ["cljsjs.react"]}
{:file "foreign-libs/cljsjs/react-dom/development/react-dom.inc.js"
:provides ["cljsjs.react.dom"]
:requires ["cljsjs.react"]}
{:file "foreign-libs/cljsjs/react-dom-server/development/react-dom-server.inc.js"
:provides ["cljsjs.react.dom.server"]
:requires ["cljsjs.react"]}]
ReactDom seems to get included first instead of React for some reason.
@henriklundahl: doesnât cljs.react.dom.server
need cljs.react.dom
No, I don't think so.
@nathanmarz: you have cljs.analyzer/macroexpand-1
@dnolen thanks, I'll look into that
@nathanmarz: you need to pass &env
as the first argument, form as the second one
@dnolen: yea it works. Will try to make a macroexpand-all based on this
@henriklundahl: are you experiencing this issue while using cljsjs/react-dom
and/or cljsjs/react-dom-server
package from clojars?
(re-find #"(?i)foobar" "baz baz Foobar") => "Foobar"
, (clojure.string/replace "baz baz Foobar" #"(?i)foobar" "match") => "baz baz Foobar"
. The case insensitive flag works for clojurescript's re-find, but not for str/replace. Is this a known bug?
so this may be a simple bug or just a platform difference we do not intend to address - that should be sorted out first which it actually is
@rohit: Yes, but I have extracted the JS from the jar files to try to get it to work that way, but unsuccessfully so far.
The root reason was that I wanted to use the React test utils.
Under simple and advanced optimizations, the minified JS is used, however, and the test utils have been excluded from there.
@henriklundahl: itâs possible you found a bug but would would want to see something minimal that doesnât require any libs
that is if thereâs an issue, it should be reproducible outside of your specific case here
Yes, I understand that. If I would want to try to debug it, where should I look?
@henriklundahl: if you are trying to use react-with-addons
package and you donât want to package it yourself, have a look at this: https://clojurians.slack.com/archives/cljsjs/p1465368980000021
what you are trying may have an issue as @dnolen suggests. so thats also worth investigating.
@henriklundahl: one thing we do is dump a Google Closure dependency graph file - out/cljs_deps.js
then you should make sure that there are no errors in any of these React JS files (by loading them independently)
Ok, will check. I believe reagent requires it, but perhaps I can do without it? I don't do JS server rendering.
@rohit: That's the way I started, but the React test utils are excluded from the minified JS and the minified file is used when using simple or advanced optimizations.
@henriklundahl: let me quickly check that. i have a working setup of react-with-addons
@dnolen: What do you think of the idea of adding a flag for whether the minified JS should be used?
@henriklundahl: in theory already possible
so if you :provides
something already provided by a deps.cljs
your thing will take precendence
@henriklundahl: thats true. React.addons.TestUtils
does get compiled away in the minified build. I guess thats by design by the react package maintainers
I tried to override deps.cljs as well, but that didn't work either.
@henriklundahl: well I know people depend on it
As long as it's just one it works fine.
I'll try to narrow it down.
Yes, I'll try.