This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-16
Channels
- # admin-announcements (44)
- # adventofcode (2)
- # avi (1)
- # beginners (22)
- # boot (328)
- # cider (1)
- # cljs-dev (6)
- # cljsrn (29)
- # clojure (164)
- # clojure-chicago (1)
- # clojure-dev (7)
- # clojure-nl (5)
- # clojure-russia (73)
- # clojure-seattle (1)
- # clojure-turkiye (2)
- # clojured (1)
- # clojurescript (98)
- # core-async (6)
- # cursive (26)
- # datomic (9)
- # editors (5)
- # emacs (41)
- # events (3)
- # garden (2)
- # hoplon (125)
- # ldnclj (18)
- # om (178)
- # omnext (8)
- # onyx (5)
- # parinfer (1)
- # proton (5)
- # re-frame (20)
Hello. I think I'm not getting requiring macros. I get this warning Use of undeclared Var dommy.core/selector
@virmundi: what is the problem? sel
and sel1
are macros, you need to tell ClojureScript to get them from dommy/core.clj
instead from dommy/core.cljs
you can search for a probable cause here https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure#namespaces
if you only require the macros, you might be missing the clojurescript namespace that contains dommy.core/selector
Anyone have an example of how to get the caller of a cljs fn , somewhat like in JS you can do
function Hello()
{
alert("caller is " + arguments.callee.caller.toString());
}
I just did a search for 'bureaucracy clojurescript' and could not find the framework.
Sam Roberton gave that talk.
I think it is still a work in progress
Not sure if the repo has made it into the public yet
I'm trying to use a non-minfied version of a library (`cljsjs/react-with-addons`) even when my app is compiled in advance compilation mode. Is there a way to do that?
@ashercoren: not with the default cljsjs packages I think. You can fork the packages
repo and make sure the minified build is not downloaded, then rebuild locally: boot package build-jar
@juhoteperi: I saw that link. The only way that worked for me was when I modified the src/cljs/deps.cljs
of the cljsjs package. That is the same as @martinklepsch suggested. Isn't there a way to do it while using the original package?
Very cool: @sherbondy has ClojureScript running on Apple TV, driving Ejecta UI and manipulating it via a REPL. (Cool thing for all of us is that the workflow for this target platform is the same we all know and love.): https://youtu.be/eaWy5mliO38
Well, node was out for 2 years. Phonegap is about as old as Clojurescript. It was not an unreasonable guess things will keep going that way, I suppose. Cool to see it was on mark.
@ashercoren: Looks like it's not possible to override Cljsjs deps.cljs from local deps.cljs, but overriding using compiler-options :foreign-libs should work
@juhoteperi: I tried that as well :foreign-libs [{:provides ["cljs.react"] :file "cljsjs/development/react-with-addons.inc.js"}]
. Didn't work
@ashercoren: You need to provide both file and file-min, because deps.cljs and local options are merged with merge
Hi, I'm trying to undestand why an exception is not caught (new to cljs, but I think it is what I've been searching all my life). I explained it here: http://stackoverflow.com/questions/34312417/clojurescript-reagent-handling-errors . Basically, the code is like: '(defn change-title [title] (try (swap! app-state #(-> % (assoc :text title) ((fn [state] (throw "there is an error"))) )) (catch js/Object e (swap! errors conj e))))'
@ashercoren: Tried it and can't get it working myself. But should work...
@juhoteperi: Still didn't work. It still compiles the minified version
Can @dnolen help here?
On the subject of throwing, is cljs.core/ex-info
idiomatic, or at least common, to use?
I need cljs-http.core/jsonp not to keywordize response keys (https://github.com/r0man/cljs-http/blob/master/src/cljs_http/core.cljs#L116). What would you suggest to do?
@jindrichm: if there’s not an official way to do that, file an issue
fwiw I do not bother with these kinds of libraries if it’s not buying me some shared abstraction across Clojure(Script) Google Closure is not that hard to use.
I wrote a post about @sherbondy’s Apple TV work and also submitted it to HN. “ClojureScript on Apple TV” http://blog.fikesfarm.com/posts/2015-12-16-clojurescript-on-apple-tv.html
> However, "encapsulating" the run-time state of your application inside the code that renders its views is like encapsulating your keys down the back of the couch https://github.com/samroberton/bureaucracy/blob/master/doc/Motivation.md 😄
I finally wrote a post on ClojureScript, RxJS and CLJS interop w/ vanillaJS & React. I’m not sure I’ve conflated issues but I’d love if anyone has feedback on what we’ve been doing at Capital One. http://bit.ly/whats-after-rxjs
@puppybits: thanks for writing that up!
@puppybits: small typo FPR instead of FRP in one place
@puppybits: very interesting read, thanks!
> Functions used in a transducer don’t know {their -> they’re} in a transducer. Basically I can {reusable -> reuse}
thanks. I’m not sure if it’s good or bad but it seems to work well for us. I’m sure there’s room for improvement.
I’ve been thinking a lot about Observables vs CSP lately, and this was a great perspective
The atom watchers have been great for the observables usually we have a component that has one or two atoms for caching. The JS world can pass in a callback to get notified when it changes.
Usually there’s one or 2 smart components on the page in the willMount and didUnmount call triforce.accounts(accounts => this.setState({accounts})
. If there’s accounts cached in the cljs component it triggers right away and anytime there’s a change it triggers the callback again.
cool! I hadn’t thought of atoms as an obervable-replacement before, but it makes sense
Is ClojureScript: Up and Running still the best comprehensive resource for people who want a longform hand-holding guide to getting started with the language?
@zane: ClojureScript Up and Running is a bit outdated, so I would instead have a look at modern-cljs (https://github.com/magomimmo/modern-cljs) and ClojureScript Unraveled (https://funcool.github.io/clojurescript-unraveled/)
I used Andrew Antukh’s online book: https://www.niwi.nz/cljs-workshop/ and the Joy of Clojure (super dense and covers everything).
Hey everyone. Does anybody knows where can I find good examples of om-next (docs, projects, videos)? Thanks.
Finally using ClojureScript at work :)
Anybody needed a rest mapper already?
Looking for better ways to deal with an API
@hugobessaa: you can try https://github.com/outpace/remote
Taking a look right now
@snoe: thanks 👍
I have just open-sourced Dirac give it a try: https://github.com/binaryage/dirac this is still a rough pre 0.1, but promising @jaen @bhauman @shaunlebron ^
@dnolen: thanks, got tired waiting for https://code.google.com/p/chromium/issues/detail?id=484261, decided to bend DevTools on my own
it looks awesome, thanks!
@darwin: wowowow, this is so awesome; I see it has figwheel in dependencies - how tightly coupled it is? (just wondering how hard would it be to use with The Other Build Tool)
Also, is that Cljs REPL aware of the current stack framew when debugging? Or if not - is that something that could be done?
@jaen: it does not talk to figwheel directly, it talks to cljs-devtools and cljs-devtools talks to figwheel, so that can be extended in the future to talk to some other tool, or replace cljs-devtools completely
This is current API Dirac can call (actually just eval and warm-up-repl-connection): https://github.com/binaryage/cljs-devtools/blob/master/src/devtools/api.cljs This is current code providing information to Dirac: https://github.com/binaryage/cljs-devtools/blob/master/src/devtools/dirac.cljs In the beginning I wanted Dirac to be able to connect directly to nREPL, but that seemed like a lot of work, because there is no nREPL cljs library.
> Also, is that Cljs REPL aware of the current stack framew when debugging? that is my next goal, it will be pretty easy, will just need to send compiled cljs to dirac, not eval-ing it in client javascript context
High levels of whoa; being able to eval Clojurescript in the context of currently debugged code is about the only thing lacking from seamless debugging experience.
I'll have to see if boot-cljs-repl
offers a similar API to figwheel, would be cool to be able to use that.
@jaen I’m not familiar with boot-cljs-repl, I’m still stuck with lein, because I don’t want to give up figwheel
there were only two difficult things on figwheel side: 1) how to hook into REPL loop (reading from std-in is blocking) 2) how to capture stdout and stderr exactly, so it can be presented on client-side as it appeared in the terminal (there are some weird cases where some code prints directly to out and err (imagine a macro printing warnings using println, or a code handling exceptions printing directly to err), so to be done properly it must be done on pretty low level))