This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-17
Channels
- # admin-announcements (22)
- # beginners (15)
- # boot (38)
- # cider (16)
- # clojure (68)
- # clojure-android (1)
- # clojure-berlin (27)
- # clojure-japan (7)
- # clojure-nl (7)
- # clojure-poland (2)
- # clojure-russia (164)
- # clojure-uk (2)
- # clojurescript (321)
- # datomic (42)
- # editors (45)
- # events (4)
- # indycljs (2)
- # jobs (7)
- # ldnclj (7)
- # liberator (4)
- # off-topic (29)
- # om (5)
- # onyx (8)
- # re-frame (6)
- # reagent (44)
- # slack-help (9)
@yedi If you want presentations https://www.youtube.com/user/ClojureTV usually has some good stuff. They just put up EuroClojure 2015 and Clojure/West videos were put up 2 months ago.
@logaan - I find emacs prelude very sane
So, in Clojure I cannot call a function unless it was defined above in the file?
yep. You can can (define my-fn-that-is-declared-below) (defn other-fn (my-fn-that-is-declared-below))
Ah - I mean (declare) not (define): http://clojuredocs.org/clojure.core/declare
@pupeno: it makes writing the compiler easier (you only need a single pass)
@pupeno: From what I've seen declare
is only used when absolutely necessary, which is rare.
And I think I ran into a situation where it didn't work in something like partial
because what partial
got called with was nil
. So declare
only saves you when the function is going to be called after it gets fleshed out.
@meow: I think that might be the use of def
rather than partial
@meow: Yeah, that’s gonna take the “value” of foo - which is an unbound fn
consider
(def x nil)
(def f (partial x))
(def x 10)
It was easy enough to work around. Just thought I'd point it out. Helped me understand that anything declared is basically nil
until finally defined.
@andrewmcveigh: yep, that's the mental model I have now.
I've recently been writing a lot more tests, and have been tweaking a little macro I wrote to help - thought I'd release it
@malcolmsparks: Nice - thanks.
Ctrl-x 8 RET 😉
I have a form which is taking far too long that I need to debug. I want that form and every form it calls to be printed out with timing - is there such a beast?
clojure.tools.trace almost does it, could you fork it and add timings?
@malcolmsparks: thanks - I will take a look
(makes me miss AOP :-))
@jstaffans: yes, it's a smiley. Definitely a library to use on a Friday afternoon
@colin.yates: Would https://github.com/hugoduncan/criterium do what you want?
1. C-8 x RET SUPERSET OF 2. Use 😆 instead 3. Copy and paste it from somewhere else (like you just did)
oh gosh, slack turned my :>
into a smiley
sorry, yes, you're right, thanks
1. C-x 8 RET SUPERSET OF
(i'm busy spinning plates this afternoon)
@lvh and hopefully some folks will have also learned how to generate xxxxxxxx
@lvh I like it! send me a PR!
@malcolmsparks: Where does C-x 8
come from?
@stuartsierra: Emacs (on my system anyway)
for inserting unicode
Oh, I see, it's C-x 8 RET
@stuartsierra: yes sorry, it's friday, lots of typos this afternoon
Cool, thanks for introducing me to that @malcolmsparks
malcolmsparks: I didn't realize this until I just tried it, but helm automatically gave me a usable search box -- I can never remember which order the words GREEK
CAPITAL
LETTER
DELTA
go in
I think you can mostly copy and paste unicode chars from the web, years ago when I had a Mac with UK layout, I used to keep a files of #'s which I could copy from for writing bash scripts...
@lvh - yeah, I didn't realise that until I'd moved off the Mac
@stuartsierra: you're welcome
@lvh: arch linux on a T420 thinkpad (x2)
not a superfast environment but I'm used to it - will be hard to move off
@malcolmsparks: iota looks very promising - found a small bug
@malcolmsparks: ah arch, brings back warm feelings - pacman FTW
@malcolmsparks: wouldn't it be better to use re-find instead of re-matches for :# ? Most of the times I wan't to test for parts of an error message. I don't like to surround all patterns with .*
@colin.yates: you could try something like robert-hooke or dire to add pre and post hooks, and add crude timings or use something more rigorous like criterium
thanks @zerokarmaleft - I had looked at robert-hooke before it doesn’t quite fit this use-case as I want to decorate the form and any form that is called. Analogous to AOP ‘around’ advice.
This is a bummer: https://twitter.com/aphyr/status/621807910817890304