hi all
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 @p-himik
I'm trying to call a macro I wrote and sporadically get an error like this:
null
StackOverflowError:
clojure.lang.KeywordLookupSite$1.get (KeywordLookupSite.java:45)
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.
StackOverflowError:
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.
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.
Here's the full stack trace: https://gist.github.com/eerohele/3bd89bc9dfaf2d53e4c9cced3c5be7a1 @thheller this time shadow-cljs is the topmost entry, but I have no idea whether that really means anything.
I don't know. https://github.com/thheller/shadow-cljs/issues/804
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.
@alexander.vanelsas How do you load the zip from your browser? Ajax call?
> 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?
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.
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?
@mikethompson I might be 2 days ~ 2 weeks away from a first release of Girouette, currently working on a CSS classes extraction tool.
However, you can already use Girouette as it is on the master branch. The only issue is that the CSS extraction is not final.
And there's also lambdaisland's approach called ornament
:
https://github.com/lambdaisland/webstuff/blob/main/src/lambdaisland/ornament.cljc
Just for completeness, here's another CSS lib from the (g)olden days: https://github.com/cdaddr/gaka (this one also happens to work with babashka)
If you don't need JVM support, there are these wrappers of emotion and styled-components: https://github.com/dvingo/cljs-emotion https://github.com/dvingo/cljs-styled-components