Fork me on GitHub
#clojurescript
<
2015-11-20
>
hans05:11:00

my problem above (ANALYSIS ERROR) was caused by :global-vars {*print-length* 50}, which is a general cause of grief anyway. I've replaced it by a proper :repl-options clause, now things work fine.

mrg12:11:34

Does anyone know of a minimal leiningen template for cljs library development?

mrg12:11:04

The closest thing I could find was mies and that one kind of does its own thing

bhauman15:11:02

@mrg the figwheel template is pretty good lein new figwheel libname

Lambda/Sierra15:11:11

What's the current entry-point to self-hosted ClojureScript? I.e., what do I need to set up to get eval in ClojureScript?

mrg16:11:20

Thanks @bhauman, i'l look into it

richiardiandrea16:11:06

@stuartsierra look at my replumb for having something easy or cljs.js namespace in ClojureScript for the innards

dnolen16:11:45

@stuartsierra: it depends on how much stuff you want to do. If you just need eval cljs.js should suffice

dnolen16:11:01

if you need to be able to load code things get more complicated but still cljs.js has hooks for that

dnolen16:11:32

@stuartsierra: a good place to start are few self host tests we have in the repo

Lambda/Sierra16:11:10

Thanks @dnolen & @richiardiandrea. I want to play around with editing & reloading CLJS code in a browser, like jsfiddle.

Lambda/Sierra16:11:31

http://cljsfiddle.net/ is not responding at the moment.

bhauman16:11:38

Currently fixing up the figwheel nREPL docs. Things have all come together and seem to be working now. Just in time for the switch to Socket REPL.

mfikes16:11:15

@stuartsierra: http://clojurescript.net hosts Joel Martin's self-hosted REPL (based on cljs.js)

julia17:11:31

has anybody played around with reagent/om?

chris17:11:31

Lots of people. There is an #om and #reagent channel.

darwin17:11:31

@julia: I did with both, but maybe better to ask in channels like #C06DT2YSY or #C0620C0C8

julia17:11:54

thanks chris & darwin!

lvh20:11:08

Huh. Could someone provide some insight into using set!/..? I’m trying to do the CLJS equivalent of element.style.display = “none”’;: (set! (.. element -style -display) "none”)

lvh20:11:33

Huh. Previously I got a compilation error, now it works. Weird.

jaen20:11:11

I'm no expert but that looks legit to me.

dnolen20:11:04

We should all be contributing to this

dnolen20:11:46

I’ve relied on Clojars for many, many years now myself and throwing a few bucks a month their way isn’t asking much

dnolen20:11:29

if Clojars goes away

dnolen20:11:51

none of these talks, tutorials, quick starts, libraries or anything mean very much

bhauman21:11:39

New figwheel nREPL documentation. If you are using figwheel and nREPL, please give this a read/try/edit.

bhauman21:11:12

@dnolen: yeah toby works on this a lot and answers support email all the time

stewsquared21:11:13

So, the scala.js community is working on a new website that's meant to be accessible to javascript developers. It will be officially announced Monday: http://ochrons.github.io/sjs2/ The clojurescript ecosystem is much more mature, but as @nullptr noted in his talk, TTFX (time to first xml) is 1. Is there already a discussion around introducing cljs to non-clojurians? I'd like to get caught up.

bhauman21:11:11

@stewsquared: just want to point out that @shaunlebron and @chrisoakman have done a bunch of work in this area

jaen21:11:31

Time to first XML? The only time I've ever seen XML in Clojure is when I had to deal with Java logging, but that's not something that would happen if you do only Clojurescript.

stewsquared21:11:59

@jaen: Derek was refering to the fact the the first google result for "clojurescript" includes maven build info. More generally he was making a point the cljs docs target clojurescript users.

jaen21:11:10

Okay, I guess that's a fair point, XML is probably a big turn-off for many people, even more so than all those silly parentheses and Clojurescript target audience is certainly more the usual Java -> Clojure dev than something else. That said I only ever used Java when university forced me to (and only after I had to re-take the course for third time to not get expelled) and I didn't really feel quite enough evil Java vibes from it (that is Clojure(script)) to scare me off.

arohner21:11:55

using lein-doo / karma, is there a way to find out which browser is running tests, without doing standard sniffing?

arohner21:11:11

I’d like for karma / doo to just tell me, ‘you’re currently testing in chrome’ or whatever

richiardiandrea22:11:13

removing the last line keeps the prompt to cljs.user

bhauman22:11:41

cool thanks!!

richiardiandrea22:11:43

I mean removing (run-at-time "1 sec" nil #'cider-repl-set-ns (cider-current-ns))

richiardiandrea22:11:51

the rest is super smooth 😄

richiardiandrea22:11:03

the new doc is better 😉

bhauman22:11:05

Thanks for looking at it

bhauman22:11:17

I'm going to go over it again tomorrow

richiardiandrea22:11:23

by the way before I did not have any sidecar in the dev deps and it was working fine, now I am trying to remove it and see what happens

richiardiandrea22:11:11

@bhauman: yes I confirm that here this works:

{:dev {:dependencies [[com.cemerick/piggieback "0.2.1"]
                                  [org.clojure/tools.nrepl "0.2.11"]]
                   :plugins [[lein-doo "0.1.6-SNAPSHOT"]
                             [lein-figwheel "0.5.0-1" :exclusions [cider/cider-nrepl]]]
                   :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
                   :figwheel {:nrepl-port 5088
                              :css-dirs ["resources/public/styles/css/"]
                              ;; Load CIDER, refactor-nrepl and piggieback middleware
                              :nrepl-middleware ["cider.nrepl/cider-middleware"
                                                 "refactor-nrepl.middleware/wrap-refactor"
                                                 "cemerick.piggieback/wrap-cljs-repl"]}}

puppybits22:11:58

hey has anyone used core.async + atoms in IE11? It seems IE11 has a scoping issue where it doesn’t have access to the atom when I call reset inside the go block.

;; this fails only in IE11
(go
  (let [status (<! (bank-create-link chan))]
    (reset! cached-accounts status)))

;; this works in all browsers
(let [really-ie?-really?-wtf #(reset! cached-accounts %)]
    (go
         (let [status (<! (bank-create-link chan))]
            (really-ie?-really?-wtf status))))

dnolen22:11:45

@puppybits: hrm seems strange, I would file an issue - not sure who will have time to get to it - so a patch is even better

dnolen22:11:54

I suspect we could alter the codegen to account for it

dnolen22:11:59

either in core.async or ClojureScript

bherrmann23:11:50

6:19:51 PM IllegalAccessError: com/intellij/execution/impl/MyDiffContainer

bherrmann23:11:17

When I try an execute a leiningen debug configuation

bherrmann23:11:54

ooh.. meant to use the cusive chat window.