This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-13
Channels
- # beginners (71)
- # boot (61)
- # clara (49)
- # cljs-dev (9)
- # cljsjs (2)
- # cljsrn (5)
- # clojure (55)
- # clojure-android (1)
- # clojure-italy (4)
- # clojure-spec (39)
- # clojure-uk (56)
- # clojurescript (69)
- # cursive (5)
- # data-science (1)
- # defnpodcast (6)
- # devcards (1)
- # duct (12)
- # figwheel (3)
- # fulcro (18)
- # leiningen (35)
- # lumo (19)
- # midje (1)
- # off-topic (22)
- # om (3)
- # onyx (23)
- # portkey (3)
- # re-frame (20)
- # reagent (23)
- # ring-swagger (6)
- # shadow-cljs (119)
- # specter (7)
- # unrepl (25)
Hey guys, 4Clojure problems updated on Clojurecademy - https://clojurecademy.com/courses/17592186045426/learn/syllabus
@jeaye The issue you reported with instrument
and :advanced
is actually instead due to :static-fns
. See https://dev.clojure.org/jira/browse/CLJS-2397 for more details.
Hi, I'm using a javascript dependency that is packaged with cljsjs. I can't find any documentation for the translation between the JS object methods and cljs. Is there a primer someone can point me to?
@ertucetin Ertuğrul hi, is your project open-source ?
not Ertugrul but I like the project
Yes it is
@sirwobin The https://clojurescript.org site doesn't yet have an official interop guide, but there is a draft one that covers this https://github.com/mobileink/clojurescript-site/blob/88805681e76a86dcab068ec8b574ed733ebd5f8c/content/reference/javascript-interop-ref.adoc#js-object-property-access A popular non-official guide is at http://www.spacjer.com/blog/2014/09/12/clojurescript-javascript-interop/
Also—in printed form—ClojureScript: Up and Running covers this. (An updated edition of that book is in the works as well.)
hello friends, I am trying to use Cursive
and Lumo
together by using Tubular
socket REPL client.
It is working but I have to type my code in a new small prompt with the “Enter string for standard input” and it’s not manageable. Someone know what’s happening ? Thanks a lot
@baptiste-from-paris Did you choose “Use clojure.main in normal JVM process”? (See the note in the Tubular README.md)
yes offcourse
I read all the README.md
Cool. Usually the little dialog pops up owing to I/O handling and using a “plain” REPL avoids that aspect. Hrm.
do you have to specify some parameters (JVM args, env...)
ok, restarded IDE and it’s working...
Let me check with the latest Cursive… perhaps something broke. You shouldn’t have to supply any extra params.
sorry for that
thanks a lot 🙂
This makes me wonder if there is now an extra step where you need to restart the entire IntelliJ IDE. Hmm.
@mfikes by the way, are you able to send a form to the REPL (in the Tubular context) ? I have the “Cannot load Clojurescript form into Clojure REPL” error
@baptiste-from-paris Yes, in Cursive, ensure that the little language pulldown in the REPL UI indicates “cljs” instead of “clj”.
Perfecto !!!
forgot this one ...
(Cursive will automatically switch language if it sees To quit, type: :cljs/quit
, but Lumo / Planck don’t print that out.)
@mfikes do you have symbol resolution in cursive for free without conf (no the repl but files) ?
@baptiste-from-paris IIRC, yes. If you have a project.clj
file set up then Cursive will index your source files.
😞 js/require
and such js fn’s are not recognized
ok ok, it’s still a great UX
Can anyone recommend a more readable alternative for string interpolation in ClojureScript that is similar to "This is a #{value}."
? I saw strint
in core.incubator
. I don’t expect to be able to use that in CLJS though — unless I’m mistaken
yes, but goog.string.format
is discouraged by Closure Library maintainers themselves - limited functionality and DCE unfriendly
Yea I read the deprecation notice. Is it common in CLJS to use macros like the strint
macro defined in core.incubator
? Seems to have a nice API
although after reading the source it seems like it’s relying on str
, which seems promising
For anyone future readers, it does work, and its syntax is fantastic: (<< "My name is: ~{name}.")
desugars into (str "My name is: " name)
@thheller it is not as readable as the alternative syntax. esp. when the string interpolation has nested quotation marks etc. I’m using string-interpolation for composing queries
languages like Ruby, Elixir, JS support both string concatenation and string interpolation for these reasons
I'm importing a react component (using :npm-deps feature) and wrapping it with the adapt-react-class adapter, this fails with Uncaught TypeError: Cannot call a class as a function
, but only when :optimizations :advanced
. I reproduced behaviour in a minimal repo:
https://github.com/fbielejec/npm-deps-demo
Just checking, but are (set! (.-y item) 10)
kind of expressions also vulnerable to DCE?
hi, ho someone know how in hiccup set text input to max 4 lines height but default to one. (the overflowing top line should just hide)
Streamy HTTP library for cljs (or js) - anyone know a good one?
Apparently this is a very rare need
@borkdude Your set!
example will compile to JavaScript that looks like item.y = 10
. In other words it is not really different than (.-y item)
by itself, which is subject to renaming under :advanced
.
Is there an obvious, likely, cause for when the ClojureScript compiler says "No such namespace x.y.z, could not locate x/y/z.cljs ..." when z.cljs is right there next to other namespaces under x.y that it is finding?
darnit, letter blindness... i should have tried copying the path from the error... two characters transposed
I am running a CLJS project and things were working well and than CLJS stopped tracking the web socket connection correctly. I am getting this error: WebSocket connection to '
The app compiles correctly. Any pointers on how to debug this issue? I have tried stopping and restarting the app. You can see the app itself here: https://github.com/tkjone/clojurescript-30/tree/master/34-calendar-fun
Its odd because that is not the connection that the socket is listening on...its like its caching an old socket address
And the answer: clear your cache