This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-16
Channels
- # aleph (1)
- # architecture (5)
- # beginners (43)
- # boot (23)
- # cider (5)
- # cljs-dev (143)
- # clojure (42)
- # clojure-austin (4)
- # clojure-dusseldorf (14)
- # clojure-italy (15)
- # clojure-norway (1)
- # clojure-russia (10)
- # clojure-spec (41)
- # clojure-uk (70)
- # clojurescript (262)
- # cursive (3)
- # data-science (18)
- # datomic (66)
- # figwheel (1)
- # fulcro (39)
- # hoplon (21)
- # jobs-rus (1)
- # juxt (4)
- # lein-figwheel (2)
- # leiningen (4)
- # lumo (26)
- # off-topic (4)
- # om (6)
- # onyx (19)
- # parinfer (50)
- # pedestal (9)
- # portkey (10)
- # re-frame (41)
- # schema (5)
- # spacemacs (2)
- # yada (35)
morning
mornin'
morning
morning @actionshrimp !
it goes by baby steps into all the macro features. If you like a gentle introduction, that's it.
I'm still looking for a regular practical usage of macros in a codebase, I haven't really found it. Does "Mastering Clojure Macros" go into any of that at all?
there are a few examples toward the end of the book, on how to implement pattern matching or walking code via macros
@dominicm I’ve recently had to do something similar to https://github.com/clojure/tools.logging/blob/master/src/main/clojure/clojure/tools/logging.clj#L69 to get the namespace of where a “utility” function was called in.
I use a cheeky macro to grab the lexical scope for debugging sometimes, when the things I want to inspect are too big for printing and I want to explore them at the repl
(defmacro capture-env
"Interns the lexical scope into user/sym"
[sym]
`(intern (symbol "user") (symbol ~sym) ~(into {} (for [[k# v#] &env] [(keyword k#) k#]))))
@danieleneal https://github.com/gfredericks/debug-repl a favourite tool of mine for exploring at the repl.
https://github.com/georgejahad/debug-repl also the original, which isn't nrepl integrated.
that looks awesome
I've missed debugger;
from js land
I've got into the cider debugger a bit more recently. Although does it only work if you kick off execution from the REPL? I've tried instrumenting a function then making e.g. a request from a browser rather than the REPL and it doesnt seem to kick in that way
^same
and that's usually when I need it most 🙃
hahaha we've all been there
any problem in web apps can be fixed by adding another middleware
weird, seems overly specific to http too. which makes me think it might require something
does anyone have a good experience creating excel files (ideally .xlsx) from clojure ? i seem to recall some #clojure-uk conversation about it a while back
mm my colleagues been using docjure
I think elise_huard was asking
docjure uses apache poi underneath
afternoon @danieleneal
afternoon @actionshrimp !
hows coding
not too bad
although I cant work out why my lens isnt dissocing
and it gives a very cryptic error message
what does it say
we can trade cryptic error messages
lens.cljc?rel=1502887456005:28 Uncaught TypeError: Cannot read property 'call' of null
at traversy$lens$update (lens.cljc?rel=1502887456005:28)
at lens.cljc?rel=1502887456005:99
at core.cljs:5002
at Function.cljs.core.update_in.cljs$core$IFn$_invoke$arity$3 (core.cljs:5002)
at cljs$core$update_in (core.cljs:4993)
at lens.cljc?rel=1502887456044:21
at traversy$lens$update (lens.cljc?rel=1502887456005:28)
at lens.cljc?rel=1502887456005:99
at traversy$lens$fapply (lens.cljc?rel=1502887456005:35)
at traversy$lens$update (lens.cljc?rel=1502887456005:28)
always a pleasure
here's mine
both null pointers :facepunch:
haha, go team
is it a custom lens
fortunately not, I think I'm just being silly
don't be discouraged. Are you sure you're calling the update
that you think you are? Perhaps you're using clojure.core/update
in place of tl/update
or something
@mccraigmccraig my question was more about parsing excel files, not creating them - though would be interested to know if that works!
@mccraigmccraig we use the apache poi (so just Java) to create excel files without too much trouble.
not even any jar-hell from poi @thomas ?
not that I am aware of @mccraigmccraig
cool, i'll give that a blast then. thanks y'all