This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-25
Channels
- # bangalore-clj (1)
- # beginners (13)
- # boot (163)
- # cljsrn (23)
- # clojure (70)
- # clojure-czech (1)
- # clojure-russia (6)
- # clojure-spec (8)
- # clojurescript (47)
- # cloverage (16)
- # cursive (2)
- # editors (1)
- # garden (2)
- # lein-figwheel (1)
- # om (30)
- # om-next (2)
- # perun (2)
- # planck (23)
- # rdf (4)
- # reagent (1)
- # specter (2)
- # untangled (8)
- # vim (7)
whats a good way to check if something is a core async chan
if I want to use clojure spec for example to make sure one of my args is a chan
im using this as my pred
(defn chan? [c]
(= cljs.core.async.impl.channels/ManyToManyChannel
(type c)))
@hlolli the problem is, this is library code. So I'd like to do it programmatically. If it were clojure, I could just require
two different namespaces depending on cljs.core/*target*
, but cljs does not have a require
.
am I dreaming or was there a recent change where refer-macros was no longer required?
I think you can use :refer
for macros when you know that macro file was already analysed. For example this works when consuming libs via their cljs namespace which is linked to corresponding clj macro file inside. E.g. in lib.cljs you have (:require-macros [my.lib])
which points to lib.clj
@adamkowalski #(implements? cljs.core.async.impl.protocols/Channel %)
@adamkowalski for the type you use instance? but protocol is better
using lein figwheel, I've created dev/user.cljs and add 'dev' to source path, doesn't seem to be getting picked up, i.e. any vars declared undeclared in figwheel repl, google keeps bouncing me to user.clj articles
^ ignore.. clean-builds.. working
actually clean-builds got me compiler errors in user.cljs which when fixed, reload no errors, but still not seeing any vars..
@jrheard assuming you are using a unix terminal you will have to create a custom report function that uses ansi escape codes
As I understand it, the attr map on a Clojure function will be evaluated, but the attr map on a ClojureScript function is always quoted. So, given (defn foo {:bar (+ 1 1)} [] nil)
, (:bar (meta #'foo))
is 2
in Clojure and (+ 1 1)
in ClojureScript. Is that correct?
Is there a way to give a ClojureScript var metadata which depends on the metadata of another var (without writing a custom macro to replace defn
)?
what's the best IDE/editor for people on my team that are new to clojurescript? I have them on Intellij right now, is light table a viable option?
cool, so far it's been working out decently, they struggle with parens still though
i think parinfer is probably ideal for them if it worked all the time, I filed a bug report already with the project but it hasn't been addressed in 3 months
I always struggled w/ clojure due to editors (I never learned vim / emacs — just used stuff like textmate / sublime / etc) but cursive has gotten me over the hump to feeling productive — only complaint is all the inellij baggage and some mac platform key shortcuts don’t work out of the box
While on the topic of editors, are there any driving reasons behind using cursive over light table? Or is it simply preference?
I use Emacs, but what I really don't like in LT is its poor autocomplete and refactoring support
yes, autocomplete is good: https://github.com/clojure-emacs/cider
Thanks for the link! I'm looking for ways to improve the user experience with light table so any other feedback is helpful!
I use paredit in cursive … I haven’t tried the other modes … basically I hit alt-up
and alt-down
and tab
a lot 😜
I imagine my use is suboptimal — but I’ve never been really big into tooling / editors — like I don’t customize stuff. cursive is the first time I’ve felt comfortable writing clojure (even if I’m bad at it)
@sbauer
> I'm looking for ways to improve the user experience with light table so any other feedback is helpful!
Paredit mode isn't strict enough. Or maybe I just didn't setup it right 🙂
For example, I can put my cursor |
between (
and reagent/cursor
:
(|reagent/cursor app-state [:account])
And hit backspace
key. Result will be:
|reagent/cursor app-state [:account])
In Emacs Paredit mode I cannot do that. It protects me from having unbalanced opening and closing parenthesis/brackets/braces.Has anybody mucked around with hooking up https://github.com/google/closure-compiler-js to the cljs compiler? I’m guessing this is pretty non-trivial and would require an overhaul of, e.g. https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/closure.clj among other namespaces? But might be a game changer to be able to have, e.g. bootstrapped cljs emit optimized code?