This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-02
Channels
- # admin-announcements (11)
- # beginners (183)
- # boot (139)
- # cider (37)
- # clojure (134)
- # clojure-germany (23)
- # clojure-italy (28)
- # clojure-japan (24)
- # clojure-russia (12)
- # clojurebridge (17)
- # clojurescript (222)
- # code-reviews (6)
- # core-async (9)
- # core-matrix (4)
- # datomic (13)
- # editors (2)
- # euroclojure (13)
- # ldnclj (69)
- # off-topic (32)
- # om (3)
- # onyx (24)
- # reagent (10)
- # yada (31)
Hi. Is there any way to set up multi-module project in lein where module dependencies are not via repository? I tried lein-modules and lein-sub But for clean project is I go to submodule and do lein test for example lein tries to fetch module dep from repo. I want something like gradle where it figures out that required module is just folder away and builds it on the fly.
Is it correct in implying that they are a little like a curried or partial'ed function you can compose with the (>>) operator in F#?
no, they are not currying or partial application, they are reducing function composition
i bet alexmiller has had a lot of practice explaining transducers
Is there a way to use autoprefixer with leiningen?
@robert-stuttaford: he’s even written it in a book (Clojure Applied) 😉
I was looking through it the other day but I couldn't find out how much of it is already written
Quite a bit, @iae - I’d say it’s worth getting now
"This book aimed at for people inexperienced with Clojure..." "Oh man, this book was too introductory for me, what gives."
So, since we're on the topic on books... Mastering Clojure Macros looked fun, but I'm not sure if it's equal to an in-depth review of C++ Template Metaprogramming
A fun, incredibly deep and complex topic that is more or less not that useful in most applications
iae: re Clojure Applied, it covers 1.7 topics
like transducers in particular
@alexmiller: is that the only Clojure book that covers 1.7 stuff?
well all other Clojure books came out before 1.7, so advantage us :)
the coverage is integrated into the sequential processing chapter primarily. reader conditionals aren't covered.
the goal of the book is explicitly not to "cover Clojure" but to cover the meat of how to use Clojure to build real stuff, assuming some prior knowledge (like reading any intro book)
so many topics, esp those covered elsewhere in the pragmatic books (macros, web dev) are not covered
Excuse my ignorance, but do you mean that you don't teach macros or that you don't show off how to make pragmatic or real stuff with macros?
Applied Clojure helped me understand Components. I could not for the life of me figure out how to use it just by reading the Readme.
Huh, everyone that talks or asks about lisp gets them thrown in their face as a cornerstone or fundamental to the nature and productivity of lisps
Forgive my ignorance, but isn't that what the book would like to do, though? Show how to use advanced or useful clojure features to build real stuff?
macros are not covered at all
you can write real stuff without macros
there are undoubtedly many topics that could be included but aren't
gotta leave room for the 2nd ed :)
we're finalizing content next week so at this point the TOC is locked
based on the current production schedule, the final printed book should be available in early Sept (e-book probably late Aug)
I am very excited to read it.
@iae: We have 25K lines of production Clojure and only 9 small macros.
(that total includes whitespace, comments, etc)
Clojure source 129 files 25139 total loc, 1854 fns, 670 of which are private, 309 vars, 9 macros, 29 atoms
We also have a lot of tests (well, some people think it’s a lot for Clojure, some don’t):
Clojure tests 60 files 7495 total loc Clojure WebDriver tests 43 files 2040 total loc
attempting to import this into a lein figwheel clojurescript project: https://github.com/clojure/data.json
clojure.data.json uses Java interop
You got it. Only pure algorithms can work across clj and cljs, or could. Reader conditionals may pave the way for more cross-platform libs.
Is there any commonly-known way to tell, basically, if a lib I want to use is javascript-interop?
That's what I'd do, though I do only tiny bits of cljs so my ignorance is vast
Either, I think
So, I'm pretty unhappy with my IDE, Cursive with IntelliJ. It's till too rough around the edges. I gave LightTable a whirl but it has ceased active development and I don't want to have to switch again in a few months. I haven't given emacs a try yet because the package manager errors out on me under windows; is that still the de-facto standard for lisp/clojure development?
Emacs is probably still the most popular editor used for Clojure development — but it does have a steep learning curve.
I would recommend using one of the curated Emacs setups as the best way to go.
My whole team uses Emacs Live. Git clone the Emacs Live repo and replace your .emacs.d
folder with that repo. Provides pretty much everything you’d ever need, out of the box, and is maintained and curated well.
Emacs Live side-steps the package manager completely, by the way.
I use it on both Mac and Windows.
I meant more that you probably won’t need to install any packages, if you use Emacs Live (which has its own "pack" system, making it easy to drop in new stuff and load it without messing up the core Emacs Live install stuff).
At work some of us use Zenburn as a pack (instead of the default color theme pack), and I packaged up ponylang-mode as a live pack to experiment with.
What if one wanted to use emacs live with spacemacs? Both seem to say use this ~/.emacs.d directory?
(and how do I easily switch back to my existing ~/.emacs.d? that I been using for years?)
I used emacs live for a while and decided it was too complicated. It tried to do too much.
but have to learn completely different keystrokes for everything, and different mindset, more like VIM.
But I do like fireplace plugin in vim, so i haven't made my mind yet.. cider vs fireplace..
maybe by telling emacs specifically where the ~ directory each time from the Windows shortcut?
maybe, not sure, my emacs knowledge is limited, what i would do is just make a copy of emacs.d or whatever is that dir called
So I'm a little overwehelmed right now; it comes with tons of packs and no explanation of how to use them. I suppose I either know them already or have to go into every package to figure out the essentials such as "eval this snippet" or "send to REPL" and "open lein project"
@iae yeah i noticed that too when i tried spacemacs for a minute, a lot of non default config
someday when i'm ready to dive into emacs properly i will probably aim to build up a spacemacs/prelude type thing from scratch
Don’t worry about learning it all at once. Just use helm a lot to see the keyboard commands.
What I do is keep tabs open with command lists. For example: https://github.com/syl20bnr/spacemacs/tree/master/contrib/!lang/clojure#key-bindings
so im using the
cljs-ajax
lib with clojurescript, and running (type)
on the following request: (GET "")
my js console outputs that the type of the above is "
goog.net.XhrIo(opt_xmlHttpFactory)
"that basically means that I am outputting the type of the request object, right, not the type of the response?
(def app-state
(GET ""
{:handler (fn [response] (.log js.console (type response)))}))
what i hate about emacs is all those 3 key strokes combos i have to do, in vim i usually did just 2
heheh , true Never thought of it this way lool, I thought they meant space as outer space..
@samueldev: I’m used to using Liberator so I get back maps.
instead i get this huge response object which is a vector containing a shit ton of bloat info that i dont need
@samueldev: How do you write that sweet, sweet logo? cljs
Alright, my bedtime has arrived. Thanks for the help everyone! I'll keep hacking on emacs for the next few days to get a feel for it, but the whirldwind tour was great, a real demonstration of the variety and power
(defonce app-state
(GET ""
{:handler (fn [response]
; (js* "debugger;")
response)
:response-format :json
:keywords? true}))
(defn project-view [project owner]
(reify
om/IRender
(render [this]
(dom/li nil (str (:name project) ", ")
(dom/a #js {:href (:github-url project)} (:github-url project))))))
(defn projects-view [data owner]
(reify
om/IRender
(render [this]
(dom/div nil
(dom/h2 nil "Project list")
(apply dom/ul nil
(om/build-all project-view data))))))
(om/root projects-view app-state {:target (. js/document (getElementById "app"))})