Korny mentioned java.jdbc and I figured that was a good in to talk
about how we use it at World Singles. Even with the old API we used a
function in a specific namespace that returned the data source (in
fact it returned a pooled data source, using c3p0). Behind the scenes,
we actually use an atom
I'm not sure this question has been asked already, but I really want to
know the principle behind (not (empty? coll)) not being idiomatic.
I find it much more readable than (seq coll) and I don't understand why
(empty?) exists if it's not idiomatic. But my real doubt is:
What's the idiom in (seq
Sounds to me like there's enough meat in this topic for someone to consider
submitting a talk to the upcoming EuroClojure http://euroclojure.com/2013/ or
Clojure/conj http://clojure-conj.org/ on what Clojure means for DI. It's
a commonly asked question, and it could be an opportunity for The
Yes it does, thanks. It is amazing how much you can do in the typical
spring/hibernate stack with a decent IDE without engaging your brain :).
Clojure involves far less ceremony and really does expose you to the raw
elements of your problem domain and make you think.
This is of course a good
Do any of the clojure books cover this topic?
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To
Do any of the clojure books cover this topic?
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To
(seq coll) will return a true value if the collection isn't empty. It will also
return nil (false) if it is.
11.05.2013, 17:37, Nico Balestra nicobales...@gmail.com:
I'm not sure this question has been asked already, but I really want to know
the principle behind (not (empty? coll)) not being
Here's an example.
user= (if (seq []) (println 1))
nil
user= (if (seq [1]) (println 1))
1
nil
11.05.2013, 18:40, Kelker Ryan
(seq coll) will return a true value if the collection isn't empty. It will
also return nil (false) if it is.
11.05.2013, 17:37, Nico Balestra nicobales...@gmail.com:
IMHO it's a bit subjective, but empty? is defined as (not (seq coll)), so
using (not (empty? coll)) is really saying (not (not (seq coll))), which
feels a bit backwards.
Using seq also plays nicely with if-let:
(if-let [foo (seq hey)] (print foo))
(if-let [foo (seq )] (print foo))
Chris
On 11
Well, you could also watch Stuart Sierras talks on structuring functional
programs:
Clojure in the Large
http://vimeo.com/46163090
Thinking in Data Functional Design Patterns
http://www.infoq.com/author/Stuart-Sierra
On Saturday, May 11, 2013 10:48:02 AM UTC+2, Colin Yates wrote:
Yes it
There's now an example and a tutorial for using the CHP web framework.CHP - https://github.com/runexec/chpWork with HTML, CSS, _javascript_, and SQL using Clojure.
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email
Hi,
Announcing a new release of core.typed, with a bunch of improvements and
fixes.
Leiningen: [org.clojure/core.typed 0.1.14]
Highlights:
- support optional mandatory function keyword arguments
- def-alias takes a docstring, and adds appropriate :doc metadata to the
alias var.
- accumulates
Hi,
Some nice improvements here, thanks!
- Max
On Saturday, May 11, 2013 3:53:02 PM UTC+2, Ambrose Bonnaire-Sergeant wrote:
Hi,
Announcing a new release of core.typed, with a bunch of improvements and
fixes.
Leiningen: [org.clojure/core.typed 0.1.14]
Highlights:
- support optional
Thanks! I'll be open sourcing a hobby project in the next few days that
shows off these features.
Ambrose
On Sat, May 11, 2013 at 10:12 PM, Max Penet m...@qbits.cc wrote:
Hi,
Some nice improvements here, thanks!
- Max
On Saturday, May 11, 2013 3:53:02 PM UTC+2, Ambrose Bonnaire-Sergeant
I did some googling today, and didn't find much specifically for Clojure,
and most of what I did find was a bit stale.
Has anyone had any success accepting FTP uploads in Clojure on Heroku?
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post
If I cannot get New Relic to work, I'm going to stick to my development
platform for initial optimization and memory troubleshooting.
What tools do you recommend for profiling memory under Clojure? I didn't
have much luck with VisualVM, since my Mac is a bit dated at this point,
but I'd be
What's the idiom in (seq coll)?
Maybe one could say that, generally, in Clojure it's more meaningful
to work with truthy values instead of the boolean true... ?
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
Most of the code I see and write at work at Runa uses (not (empty? foo)).
I'll continue to defend the position that it is more obvious code, and
therefore better (imo :) )
Alex
On Sat, May 11, 2013 at 12:22 PM, Karsten Schmidt i...@toxi.co.uk wrote:
What's the idiom in (seq coll)?
Maybe
Not specifically, nope.
On 11 May 2013 10:37, Jimmy jimmy.co...@gmail.com wrote:
Do any of the clojure books cover this topic?
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note
On Sat, May 11, 2013 at 9:25 PM, Alex Baranosky
alexander.barano...@gmail.com wrote:
Most of the code I see and write at work at Runa uses (not (empty? foo)).
I'll continue to defend the position that it is more obvious code, and
therefore better (imo :) )
Alex
Completely agree. (seq
But then instead of
(if (not (empty? foo))
(do-something-to foo)
base-expr)
you could just write
(if (empty? foo)
base-expr
(do-something-to foo))
which maintains the idiomatic approach but is still more obvious code, yes?
Sean
On Sat, May 11, 2013 at 2:20 PM, Jonathan Fischer
I agree
On Sat, May 11, 2013 at 10:25 PM, Alex Baranosky
alexander.barano...@gmail.com wrote:
Most of the code I see and write at work at Runa uses (not (empty? foo)).
I'll continue to defend the position that it is more obvious code, and
therefore better (imo :) )
Alex
On Sat, May
Sean,
I'd tend to write things like that, yeah.
On Sat, May 11, 2013 at 2:49 PM, AtKaaZ atk...@gmail.com wrote:
I agree
On Sat, May 11, 2013 at 10:25 PM, Alex Baranosky
alexander.barano...@gmail.com wrote:
Most of the code I see and write at work at Runa uses (not (empty? foo)).
I'll
Doesn't anyone use not-empty?
http://clojuredocs.org/clojure_core/clojure.core/not-empty
On Saturday, May 11, 2013 1:36:57 AM UTC-7, Nico Balestra wrote:
I'm not sure this question has been asked already, but I really want to
know the principle behind (not (empty? coll)) not being
I'm trying to get a map out of a Goog events object (and also out of
Domina events objects). Calling js-clj on either of these, even in
the most recent version of cljs, doesn't seem to do anything; it just
returns the inscrutable #[object Object] at the REPL. (It doesn't
seem to produce maps
Hi Colin,
This is one of the reasons we created graph:
https://github.com/prismatic/plumbing
which is a general declarative mechanism for describing complex function
compositions. There's not an awesome public example yet, but we use Graph
at Prismatic to build our production services, where
Nothing major in this release other than some bugfixes and bringing the
default ClojureScript version up to date. Thanks to all contributors!
Release notes:
https://github.com/emezeske/lein-cljsbuild/blob/master/doc/RELEASE-NOTES.md
-Evan
--
--
You received this message because you are
I was wondering if there was any particular reason or difficulty that would
explain why annotations on method parameters are not yet supported.
These are quite useful in many frameworks, e.g. parameter injection,
observers, eclipse e4 event
Clojure 1.5.1.
I'm trying to reorder a map. The keys in the map are known beforehand and
their order is undefined. So, I'm taking this map and construct a new
transient map with the keys ordered as I need them:
defn reorder-map []
(let [
m {:j 10 :g 7 :b 2 :d 4 :e 5 :h 8 :i 9
What you are attempting to do is sometimes called bashing a transient in
place. See these links for some discussion and examples:
http://clojuredocs.org/clojure_core/clojure.core/assoc!
http://clojuredocs.org/clojure_core/clojure.core/dissoc!
Andy
On Sat, May 11, 2013 at 3:51 PM,
On Saturday, May 11, 2013 11:28:34 PM UTC+2, Sean Corfield wrote:
you could just write [...]
In some cases, this is even more readable:
(if-not (empty? foo)
(do-something-to foo)
base-expr)
which has the same effect, but in some cases, having (do-something-to foo)
first
may be more
Also, maps don't have an ordering, so the function is misguided by
definition. You can use a sorted-map, if having the map's keys is very
important to you, but generally it's just confusion that leads to wanting
this in the first place.
If you do decide the map must be sorted in a specific
Thanks!
On Saturday, May 11, 2013, Evan Mezeske wrote:
Nothing major in this release other than some bugfixes and bringing the
default ClojureScript version up to date. Thanks to all contributors!
Release notes:
https://github.com/emezeske/lein-cljsbuild/blob/master/doc/RELEASE-NOTES.md
33 matches
Mail list logo