This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-04
Channels
- # admin-announcements (3)
- # alda (4)
- # beginners (30)
- # boot (116)
- # cbus (5)
- # cider (20)
- # clara (10)
- # cljs-dev (12)
- # cljsjs (41)
- # cljsrn (9)
- # clojars (6)
- # clojure (131)
- # clojure-bangladesh (5)
- # clojure-colombia (2)
- # clojure-dev (9)
- # clojure-ireland (4)
- # clojure-japan (3)
- # clojure-norway (10)
- # clojure-poland (6)
- # clojure-russia (59)
- # clojure-sg (1)
- # clojurebridge (2)
- # clojurescript (76)
- # clojurewerkz (4)
- # css (6)
- # cursive (21)
- # data-science (24)
- # datomic (27)
- # emacs (9)
- # hoplon (68)
- # jobs (2)
- # jobs-rus (1)
- # ldnclj (10)
- # lein-figwheel (9)
- # leiningen (21)
- # off-topic (5)
- # om (232)
- # onyx (63)
- # parinfer (2)
- # proton (25)
- # re-frame (12)
- # reagent (39)
- # untangled (6)
- # yada (122)
@lvh I would at least look at buffered channels, but I suspect that you need random access on the ones that are left, not just reading from the front of the queue? rrb-vector might be worth a look?
@lvh from the rrb-vector README: > The new functionality is accessible through two functions: clojure.core.rrb-vector/subvec, which provides logarithmic-time non-view slicing (in contrast to clojure.core/subvec, which is a constant-time operation producing view vectors that prevent the underlying vector from becoming eligible for garbage collection) ...
I’m working on adapting a clj library to cljs and wondering what the idiomatic equivalent would be
Every object in JavaScript is an instance of the object Object and therefore inherits all its properties and methods.
@venantius: Not entirely, but depending on what you're doing there might already be a feature which covers what you want to do. Like for example, if you need to dispatch on type when working with protocols for object
, yes you can do that. But I don't know what other things you might need. So it depends.
also look at persistentqueues, they might have the semantics you are looking for but in cljs.core
jquery in clojurescript, Im using boot builder and it seems that including jquery in a script tag wont load it. What Im trying to achieve is using om-bootstrap with toggle button, but for that I need jquery to load up.
source maps have stopped working for me & I can't see what I did to break them
this is my cljs build config https://gist.github.com/Hendekagon/40fb4b90cc066c20b58e
@octo221: you need to have :source-map "public/js/main.js.map"
instead of true
hi all. i’m a little confused about something - is it possible to use npm modules in client-side javascript, e.g. with figwheel? my point of reference here is browserify
@bostonaholic: yes but if I do that I get: AssertionError Assert failed: :source-map must be true or false when compiling with :optimizations :none but it is: "public/js/main.js.map" (util/boolean? source-map) cljs.closure/check-source-map (closure.clj:1744)
although I guess I could use :whitespace
ah, I didn't catch that
have you tried removing :source-map-path
? I've never use that
did you change something with your webserver in regards to resource paths?
yep, thanks you've got it I think - I was opening the index.html not serving it from my webserver doh!
@bostonaholic: thankyou! that was it
Hello. Have anyone had a problem of receiving JSON in ClojureScript and representing it in correct ClojureScript types automatically? For example JSON doesn't have date, uuid and keyword types, thus it can't be inferred fully automatically without some conventions. Is anybody using Schema coersions or internal JSON conventions (like specially formatted strings/objects for special types)? I just would like find a clean solution for a problem.
@nidu Transit was born exactly to solve this: https://swannodette.github.io/2014/07/26/transit--clojurescript/
if you are in control of the backend you should consider switching to it
@richiardiandrea: thanks!
Is there anyway to get a callstack when there is an error that relates to the cljs file? For example, I get an “Incorrect Arity” error - but have no idea what line of code caused this error.
@jamesmintram: What is the exact error message you are seeing? (Would like to reproduce it.)
Unit testing question: I've got a test defined with deftest
, and then I (run-tests)
in the same namespace. Running this from lein-cljsbuild
prints a report, but doesn't terminate. What do I need to do to make it suitable for use on a CI build?
@ctford I would suggest to look at lein-doo
, it makes everything easier
Thanks @richiardiandrea.
The actual answer to your question might be here at the end: https://github.com/clojure/clojurescript/wiki/Testing
@mfikes: https://gist.github.com/jamesmintram/ebe750e6b9d51063c23e — I have found the issue. It was down to an incorrectly formatted anonymous function - so I assume the compiler (in this case) will struggle to provide a line number relating to the issue.
@jamesmintram: If you can log a minimal repro, maybe we can improve the compiler for that case: https://github.com/clojure/clojurescript/wiki/Reporting-Issues
@mfikes: Yeah, I can do!
(not just checking against a specific one, but getting a list of all known ones, analogous to calling .getInterfaces
on a class in Java?)
@richiardiandrea: doo looks very nice. Trying it out now. One question - would you happen to know what it means when you get ERROR: Phantom couldn't find the script
when you e.g. lein doo phantom test
? I assume I've just set up the build wrongly.
@venantius: I'm not sure if there is an cljs.core
fn for it, but if you really want it the object contains the info under _proto_
@bensu: I get the couldn't find script message still, with or without the :optimizations
option. It might be something simple - I don't understand CLJS building very well yet.
Hmm, same error message, though I think you've fixed some things - less out\testable.js
is present and has the aggregated CLJS in it.
right, :optimizations :simple
concatenates everything to the same file and doo should definitely be able to find it
I don't have a working test build, no. The prod
build in the same project works - https://github.com/ctford/klangmeister/blob/master/project.clj#L37
if you can, add the simplest :compiler
options that don't work to that project.clj
in another branch, and post it as an issue on github with the error message
Maybe there's a way I could ask doo to be more verbose as to what command it's trying to run?
weird, everything looks good really
the other thing we don't see and which is always a source of problems (with lein in particular) is profile.clj
just putting it there 😄
agree 😉