Fork me on GitHub

is anyone using intellij idea + cursive plugin with clojurescript? i don't seem to get the cursive benefits even though I added the project as a leiningen project


That combination is the second most popular dev setup in the Clojure community, according to the State of Clojure 2020 survey results. :) Have you followed through the Cursive documentation? If yes, then #cursive might be a better place to ask.


that's a great suggestion, thank you @U2FRKM4TW


I'm trying to call a macro I wrote and sporadically get an error like this:

        clojure.lang.KeywordLookupSite$1.get (
        cljs.analyzer/source-info (analyzer.cljc:717)
        <snip very long stack trace>
Any ideas on what might be going on? Something's causing an infinite loop somewhere, but I don't really understand what.


The error seems to be slightly different every time, too.


this seems to be related to using a different JVM implementation. I think this happens on the OpenJ9


I'm on OpenJDK 15.0.1.


But thanks for the tip, I'll try a different version.


Same thing with OpenJDK 1.8.0_272, but at least I get a bit more detail:

Encountered error when macroexpanding cljs.core/aset.
        cljs.analyzer/checked-arrays (analyzer.cljc:178)


@flowthing Hrm. If you can boil it down to a small repro that is driven by deps.edn -based configuration, maybe we can get a JIRA logged against the compiler.


All right, I can give it a shot tomorrow.


Here's the full stack trace: @U05224H0W this time shadow-cljs is the topmost entry, but I have no idea whether that really means anything.


the failures are "random" and not reproducible so I don't have a clue what is going on


Yeah, my thing is random as well.


Well, semi-random. Right now I can reproduce it every time.


no clue what you are doing. might be a macro expanding itself in an infinite loop or so


Yeah, I'll try making a repro.


Hi all. Relative newby to Clojurescript here. I'm trying to unzip a file loaded by de browser. So far I've only found JSZip, but that requires me to use js and I'm having issues getting it to work. I've managed to see what is in the zip file, but I haven't yet gotten the actual files out. To see what is in it I do this: (-> (js/JSZip.loadAsync zipfile) (.then (fn [obj] (js/console.log "object " obj) (js/console.log "files " (.-files obj)))) I can see in the console that the obj has 4 files in it. But Now I have issues getting these files out of the obj that (js.JSZip.loadAsync) creates.. According to the JZip docs I should do something like this

zip.file("image.png").async("base64").then(function (b64) {
    // ...
Has anyone tried this before, is there a code sample I could see ?


I've managed to solve the problem. The code above works for me.

Michaël Salihi17:02:53

@alexander.vanelsas How do you load the zip from your browser? Ajax call?


Hi there, In react I load the file with an :input typ=file. The file is read in with (.readAsArrayBuffer) which seems to be the input JSZip wants.


> I can see in the console that the zip file has 4 files in it. But Now I have issues getting them out of there. what do you mean by this?


Sorry, that was confusing. JSZip gives me a js obj. I can see in the console that the object has 4 files in it. In order to get them out of the object I believe I need to call the .async method that JSZip mentions in the docs. It is here where I get stuck. Not sure how to set that async call up


Here is the object and its content. I wat to get the index.html and the other image files unzipped out of the obj


We currently use Garden for CSS. We use Reagent. We're considering moving to a more dynamic/runtime library like herb, stylefy, spade or forest.  Q: Are we missing any contenders?  Q: Any opinions on the efficacy of these contenders, based on direct experience?

👀 4

No experience using cljs libraries for css, but here's a (futur) tailwind-like possible contender: I think it's pre-alpha though.

🙂 4

I’m really curious as well about this topic.


In the interests of completeness, I've now also been told about a Tailwind-ish approach:


And another related library (done in the last 5 hours ?):

🙌 6
Vincent Cantin09:02:43

@U051MTYAB I might be 2 days ~ 2 weeks away from a first release of Girouette, currently working on a CSS classes extraction tool.

Vincent Cantin10:02:13

However, you can already use Girouette as it is on the master branch. The only issue is that the CSS extraction is not final.


Just for completeness, here's another CSS lib from the (g)olden days: (this one also happens to work with babashka)

😮 4

If you don't need JVM support, there are these wrappers of emotion and styled-components:

👍 3