This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-09-04
Channels
- # admin-announcements (25)
- # beginners (21)
- # boot (161)
- # cider (12)
- # clojure (92)
- # clojure-art (1)
- # clojure-germany (5)
- # clojure-nl (5)
- # clojure-russia (38)
- # clojure-sweden (1)
- # clojurescript (87)
- # clojutre (2)
- # cursive (9)
- # datascript (1)
- # datomic (22)
- # devops (1)
- # editors (33)
- # events (3)
- # hoplon (19)
- # immutant (7)
- # jobs (2)
- # ldnclj (22)
- # off-topic (41)
- # re-frame (34)
- # reagent (39)
@cfleming: https://www.reddit.com/r/Clojure/comments/3jlk1u/with_jetbrains_going_subscription_only_whats/
@emil0r: As a customer I’m not a fan of subscription based desktop software, i’d rather pay once and use that version for as long as I want and pay for updates if needed. As a developer though, I understand the need for it to run a sustainable business.
@xifi it was languishing there for a bit but it seems to be picking up steam again from the community. IMO the best environment for ClojureScript these days is Cursive. That said Figwheel makes pretty much any text editor a decent ClojureScript environment.
@xifi that plus Chrome Canary, you’ll get syntax highlighting and dependable debugging.
hello people, I just published a post where I talk a bit of things about the development of Musicoacher: http://wilkerlucio.github.io/clojure/2015/09/04/marking-of-musicoacher/
Hi, I'm looking for a good reference to read up on testing a clojurescript/om application. Any hints?
@wilkerlucio: amazing writeup
@dnolen: thank you
@wilkerlucio: my only suggestion is that I find it a bit distracting when the code isn’t formatted for the dimensions of the page, i.e. wrapping.
@wilkerlucio: just fyi, it says "marking" in your url
@dnolen: thanks for the feedback, I think you are right, it happens that I have big screen and here nothing wraps so I didn't noticed, , I'll try to improve the layout by later today
@tolbrino: ups, thanks for noticing, but since I already spread this link I'll leave it as is to don't break now
@tolbrino: Don’t know of any reading material but maybe checkout how CircleCI handles testing: https://github.com/circleci/frontend
@wilkerlucio: awesome post!! Wow. Describing devcards is at best difficult. You did a great job.
@bhauman: @wilkerlucio: agreed the benefits make a lot more sense to me now. Seems like a much better way to test UIs to be honest.
@dnolen: yeah laying out a set of components with notes for dev and QA seems much better and more realistic than selenium integration tests
@bhauman: thanks, I'm glad I can help with it somehow, from what I saw people talking on the maillist it seemed that people were not getting it, so I tried to say it in other way, hope it works
@wilkerlucio: great stuff really
Well @wilkerlucio's post is on HN on the second page of the new section I guess if folks want to vote now is a good time
@bhauman: Is there a way to have Figwheel auto-reload updated css compiled from less on the server side?
@kirked: if i understand your question correctly, as long as less it outputting css files to a dir that figwheel is watching then it should work OK
Ok, I'm making some progress in narrowing down the strange warnings:
(rum/defc test-component-1 [params]
(let [{:keys [a b]} params] ;; This line causes a 'WARNING: No such namespace: clojure.lang.PersistentHashMap, could
;; not locate clojure/lang/PersistentHashMap.cljs, clojure/lang/PersistentHashMap.cljc, or
;; Closure namespace ""' to be generated, pointing to the line above (with the defc).
[a b]))
(rum/defc test-component-2 [params]
(let [a (:a params) ;; This component does not generate any warnings.
b (:b params)]
[a b]))
It's the destructuring in the let form that causes the warning to appear. But it is somehow environment-dependent, as it only happens when using figwheel, and then only when started via a function called from the repl, not via lein figwheel
. I guess I now have to look into what sablono is doing.
i am stuck, trying to call a function multiple times on a js/object.
I use pixi.js and for the rendering, i need a stage (new js/PIXI.Container), now i want to add childs to that stage, but i am not able to do this like (map (fn [c] (.addChild stage c)) children)
@thomasdeutsch: thats a lazy call right?
@thomasdeutsch: use doseq
@nicola: but the answer to that question is in the readme and the wiki on the figwheel github site
@nicola: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL
@nicola: yeah I saw that ... and felt kinda stupid. Lots of people chew off too much at the start and I react quickly to that.
@bhauman: That is right, i should use doseq. I made the chage in my code to (doseq [c [children]] (.addChild stage c))
but sadly, that comes with some pixi errors. children is a vector containing js/objects - could this be a problem?
@thomasdeutsch: is children originally a vector? then you don't have to wrap it in another vector
no, they are js/objects that i put in a vector
@thomasdeutsch: what is the type of children? if its a vector or coll do this: (doseq [c children] (.addChild stage c))
yes, that is it! thanks. BTW. Thanks a lot for your work!
Cool. I saw that you are quite the adventurer, you took a pretty big bike trip right?
yes, that is true. 16500 km from germany to china. now i am working on a clojurescript app - i worked very hard on it for 8 months now - soon to be released (build with figwheel, rum, datascript)
that is right - need to do my own thing i guess
i will write a short blog post on my experience using figwheel and datascript - in 3 months from now.
Hey, can someone help me with a simple js interop problem? I’m trying to use the showdown Markdown parser to generate some html. It’s packaged up in cljsjs, but I can’t for the life of me figure out how to instantiate a new converter
The externs file on cljsjs is here: https://github.com/cljsjs/packages/blob/master/showdown/resources/cljsjs/showdown/common/showdown.ext.js
I’m require’ing [cljsjs.showdown]
in my ClojureScript file, but trying to access Showdown
or js/Showdown
is failing
Basically what I want to do is this, but in ClojureScript:
var converter = new showdown.Converter(),
text = '#hello, markdown!',
html = converter.makeHtml(text);
Aha! That’s it, thanks @darwin. It’s actually (js/Showdown.converter.)
since the externs has it capitalized
did a quick github googling, bhauman has another solution - this is the second thing I would try: https://github.com/bhauman/devcards/blob/master/src/devcards/util/markdown.cljs#L10-L11
I always get confused by the slash and dot rules
@timgilbert: slash always means namespace
I guess the thing that always surprises me is that I’d expect to (require '[cljsjs.showdown :as showdown])
and then (showdown/converter.)
or something
i do that all the time despite knowing that cljsjs jars don't actually contain any clojure namespaces 😕
@timgilbert: random JS libraries don’t have namespaces though
@timgilbert: IMO someone would have to make a friendly cljs wrapper from showdown for it to behave like you would expect cljs library to behave, but don’t forget that you are using raw foreign library, it does not follow cljs conventions, you have to drop into js interop, which needs a bit of understanding
Yeah, in theory I know there aren’t namespaces in js libraries, but in practice I always forget the syntax and formula to access them. It’s probably more of a problem with me than with js interop, honestly. 😐
@timgilbert: not saying it’s particularly intuitive but also we couldn’t come up with a good solution for this case.
Totally, I agree. Maybe I’ll write up a quick refresher on this stuff for the cljsjs site.