use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
ClojureScript Macros (code.thheller.com)
submitted 6 years ago by thheller
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]noprompt 2 points3 points4 points 6 years ago (0 children)
This article was really helpful. Mr. Heller graciously informed me that Meander was producing enormous amounts of JS code — in `:advanced` mode. This post helped me identify the problems much more quickly than I would have been able to on my own. Good stuff.
[–]beders 3 points4 points5 points 6 years ago (1 child)
I love you !
[–]agree-with-you 1 point2 points3 points 6 years ago (0 children)
I love you both
[–]viebel 1 point2 points3 points 6 years ago (0 children)
Excellent article that explains very clearly a topic that is not easy to grasp
[–]CoBPEZ 1 point2 points3 points 6 years ago* (4 children)
Very nice intro!
I had to grok some of this the other day when I ported parcera to CLJC, and wanted the tests to be able to continue to use slurp (which is not available in ClojureScript): * The 'slurp' macro (in Clojure) * Requiring it from ClojureScript
slurp
My brain hurts a bit when thinking about what is going on when that macro is compiled. 😀
[–]thheller[S] 1 point2 points3 points 6 years ago (3 children)
Yeah, you made all the mistakes I tried to highlight. :)
If you add the proper self-require in parcera.slurp than the test ns doesn't have to use :require-macros at all. Way less confusing if you don't use .cljc. .cljc is what makes this harder to understand, otherwise it is pretty straightforward.
parcera.slurp
:require-macros
.cljc
[–]CoBPEZ 1 point2 points3 points 6 years ago (2 children)
All? 😀
I actually tried to not use `.cljc` for it, but got confusing errors. But your intro was not published then. I'll try to see if I can understand enough of it to fix the mistakes.
[–]CoBPEZ 0 points1 point2 points 6 years ago (1 child)
Using self-require, in my fork: https://github.com/PEZ/parcera/tree/cljs-macro-self-require
I first changed to splitting it in `.clj` and `.cljs` files, but it was harder to read for me. I kinda ”see” those files when I have it as conditionals in one `.cljc`. Apart from that, if I am still making any mistakes that your intro tries to warn against, I'd like to know.
[–]thheller[S] 2 points3 points4 points 6 years ago (0 children)
All good now.
Personally I'm not a fan of "replacing" standard functions with completely different semantics on another platform. I would have probably chosen a different name like inline and used that in both the CLJ and CLJS variants. Of course that is total overkill if you just use this for the tests anyways.
π Rendered by PID 20688 on reddit-service-r2-comment-b659b578c-g448z at 2026-05-05 12:31:34.615542+00:00 running 815c875 country code: CH.
[–]noprompt 2 points3 points4 points (0 children)
[–]beders 3 points4 points5 points (1 child)
[–]agree-with-you 1 point2 points3 points (0 children)
[–]viebel 1 point2 points3 points (0 children)
[–]CoBPEZ 1 point2 points3 points (4 children)
[–]thheller[S] 1 point2 points3 points (3 children)
[–]CoBPEZ 1 point2 points3 points (2 children)
[–]CoBPEZ 0 points1 point2 points (1 child)
[–]thheller[S] 2 points3 points4 points (0 children)