Activity, over time
Daily observations from the public event archive.
Attention
Daily stars & forks
Star accumulation
Cumulative stars
Pull requests
Daily opens & merges
Conversations
Daily issues & comments
Community
Daily accounts & reviews
Releases
Daily releases
Trending history
Daily top 10 · last 90 days · UTC
Mentions
Stars
Forks
Contributors
Latest stargazers
The last 10 distinct accounts we observed this year.
Most active participants
PR, issue, comment & review events in the past year.
Packages
Scan pending.
Live mentions badge
Show how many posts mention your project in the last 30 days.
Live mentions · last 30 days
Mentions
Stuck understanding macros vs functions Yes, it's another one of these. I feel like that scene in Seinfeld when Kramer is able to see hidden image in an abstract painting but Mr. Pitt cannot, to his increasing frustration. Case in point, I'm looking for a clear and simple explanation for this and came across this post >My favorite example for this is the lame idiom you see in Java code: if (log.isDebugEnabled()) { log.debug("expensive" + debug + message); } >This is "better" than just log.debug(...) because with the latter, your expensive log message argument needs to be evaluated even if debug is disabled. However, in a language w/ macros, you just say: (debug (str "expensive" debug message)) >and these considerations are already taken care of for you: github.com/clojure/tools.logging/blob/master/src/… then someone goes >Edit: Ohhh! I see! The message isn't evaluated until after! Got it. >I don't understand why this is special? >Why can't you rewrite log.debug to include the check? func debug(m string) { if log.isDebugEnabled() { log.debug(m); } } >What makes macros special in this case? and I'm over here stuck like "what? where? where???" I'm not getting the epiphany and it doesn't help that they linked to clojure and I can't read clojure. So, can we stick with this example? But can someone really ELI5 for me please? --- Let's say we have pseudocode file isDebugEnabled = True; def doSomeStuff(): ... if (isDebugEnabled) { debug("expensive" + debug + message); } ... Then yes, every time we run doSomeStuff() we will check if debug is enabled. I'm with you there, because 1. We enter the function. 2. Encounter the if statement. 3. Check if isDebugEnabled is true or false at the time. 4. proceed accordingly. Now can I please get a by-the-numbers of how macros make this more efficient? Thanks.