2011/1/25 Meikel Brandmeyer m...@kotka.de:
Hi,
On 25 Jan., 01:57, Laurent PETIT laurent.pe...@gmail.com wrote:
(try (. ~(bindings 0) close) (catch Throwable _))
New code should use (.close foo) instead of (. foo close), IIRC.
Sure, but it's an enhancement over existing code, so I've
2011/1/25 Shantanu Kumar kumar.shant...@gmail.com:
The changed code should catch 'Exception', not 'Throwable' because the
latter is a common ancestor of both 'Exception' and 'Error'. An
'Error' must not be swallowed at any point in the system, unless you
are writing an app server or a JVM
On Jan 25, 2:30 pm, Laurent PETIT laurent.pe...@gmail.com wrote:
2011/1/25 Shantanu Kumar kumar.shant...@gmail.com:
The changed code should catch 'Exception', not 'Throwable' because the
latter is a common ancestor of both 'Exception' and 'Error'. An
'Error' must not be swallowed at any
On 25 Jan 2011 06:04, Shantanu Kumar kumar.shant...@gmail.com wrote:
The changed code should catch 'Exception', not 'Throwable' because the
latter is a common ancestor of both 'Exception' and 'Error'. An
'Error' must not be swallowed at any point in the system, unless you
are writing an app
On Jan 25, 4:22 pm, David Powell djpow...@djpowell.net wrote:
On 25 Jan 2011 06:04, Shantanu Kumar kumar.shant...@gmail.com wrote:
The changed code should catch 'Exception', not 'Throwable' because the
latter is a common ancestor of both 'Exception' and 'Error'. An
'Error' must not be
Hello,
Seems like this might be a good time to say thanks to Laurent for all
the work he's done on CCW. FWIW, I've been using it for a while, and
never had any issues installing it (at least not from a clean
Eclipse), nor any of the other described issues.
So thanks Laurent, and keep up the
Mark, John, Gaz:
Your responses are all suggestive but I don't know where to go from here
so I am going to make one more cry for help -- and to this group rather
than the leiningen-specific one suggested by Mark because my basic
problem is really how-to-get-clojure/emacs-running-under-MacOsX.
On Tue, Jan 25, 2011 at 1:04 PM, Shantanu Kumar kumar.shant...@gmail.comwrote:
I can't see the value in catching Throwable and then re-throwing it;
idiomatically Throwable is rarely caught. Looking at code example, the
following two snippets below are just the same:
(try
(.close resource)
I wiped my macports a while back, reinstalled everything I needed and
stopped having problems like this.
On Mon, Jan 24, 2011 at 9:38 PM, Mark Rathwell mark.rathw...@gmail.comwrote:
Seems pretty clear that your macports version of curl is the problem, it's
up to you what you want to do about
Quick question...I am trying to populate a record with values provided
in a list. I'm definitely doing it the wrong way...but maybe there's
no good way to do it.
Here's what I do (clojure 1.2.0 by the way):
(defrecord Foo [x y z])
(Foo. 1 2 3)
#:user.Foo{:x 1, :y 2, :z 3}
but then:
(apply
On Tue, Jan 25, 2011 at 1:03 AM, Shantanu Kumar
kumar.shant...@gmail.com wrote:
The changed code should catch 'Exception', not 'Throwable' because the
latter is a common ancestor of both 'Exception' and 'Error'. An
'Error' must not be swallowed at any point in the system, unless you
are
thanks!!!
On Jan 25, 8:55 am, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
constructors (like methods) are not first class. You have to wrap it
in a factory function.
(defn make-foo
[a b c d]
(Foo. a b c d))
(apply make-foo [1 2 3 4])
Sincerely
Meikel
--
You received this message
Hi,
Disclaimer: I have no clue, what I'm talking about. Just making up
contrived examples, which probably never happen in reality.
On 25 Jan., 15:13, Ken Wesson kwess...@gmail.com wrote:
Remember, we're no longer using a finally clause, so for the .close
to be exception-safe *everything* must
I have run across something else I don't understand about pmap. Why does the
following:
(pmap (fn [_] (clojure.java.shell/sh sleep 10)) (range 32))
result in all 32 sleep processes being run at once? I thought pmap used n+2
threads, where n is the number of processors/cores available (I have
On Tue, Jan 25, 2011 at 9:45 AM, Michael Gardner gardne...@gmail.com wrote:
I have run across something else I don't understand about pmap. Why does the
following:
(pmap (fn [_] (clojure.java.shell/sh sleep 10)) (range 32))
result in all 32 sleep processes being run at once? I thought pmap
On Jan 25, 2011, at 9:06 AM, Ken Wesson wrote:
sh is asynchronous. It calls Runtime/exec, which launches the sleep as
a separate process and immediately returns a Process object (which
your pmap should be returning a seq of). It may produce n+2 Process
objects at a time but it produces them
On Tue, Jan 25, 2011 at 10:21 AM, Michael Gardner gardne...@gmail.com wrote:
On Jan 25, 2011, at 9:06 AM, Ken Wesson wrote:
sh is asynchronous. It calls Runtime/exec, which launches the sleep as
a separate process and immediately returns a Process object (which
your pmap should be returning a
On Jan 25, 2011, at 9:33 AM, Ken Wesson wrote:
Well, that's weird, because the documentation *I* read says it
composits the arguments together into a command line and hands off to
Runtime/exec. And the documentation of *that* says it returns a
Process object and the process it launches runs
On Jan 25, 7:32 pm, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
Disclaimer: I have no clue, what I'm talking about. Just making up
contrived examples, which probably never happen in reality.
On 25 Jan., 15:13, Ken Wesson kwess...@gmail.com wrote:
Remember, we're no longer using a finally
Ok, I think I've got it - so basically all private variants should go
in contrib now and moving defn- now would break a lot of people's code
just for a little more coherency.
But in this case, I'd like def- to be included in clojure.contrib.def.
I dislike defvar as it's just name and docstring
In my original message describing pmap's behavior, there was a little
gotcha near the end:
Note: Sometimes working at odds with pmap's Don't work too far
ahead approach is if the input sequence to pmap is chunked. When a
chunk is reached, all elements in that chunk have threads start in
On Jan 25, 2011, at 12:13 PM, Andy Fingerhut wrote:
In my original message describing pmap's behavior, there was a little
gotcha near the end:
Note: Sometimes working at odds with pmap's Don't work too far ahead
approach is if the input sequence to pmap is chunked. When a chunk is
Midje is a testing framework that provides a migration path from clojure.test
to a more flexible, readable, abstract, and gracious style of testing. I've
bumped it to version 1. That means I feel safe offering it to you for
production use.
Here's a video showing how to migrate from
Hi!
It is nice to announce that Sisyphus - the google's mapreduce
implemented in Clojure - has been released.
Here are the sources: https://github.com/njoanna/Sisyphus
Some comments are still in polish but they will be gradually replaced
with english version.
Right now there are 5 tasks
You guys are great! As my dad used to say when he had been greatly
helped: Each of you is a scholar and a gentleman.
I admire your expertise. You each had knowledgeable and quite helpful
suggestions. I ended up using Alex's ideas for getting the Leiningen
installation process to avoid
Hi Olek,
Could you explain how this differs from Hadoop in concept and in
execution? Thanks.
On Tue, Jan 25, 2011 at 2:26 PM, Olek aleksander.nas...@gmail.com wrote:
Hi!
It is nice to announce that Sisyphus - the google's mapreduce
implemented in Clojure - has been released.
Here are the
Edmund Jackson has put up a blog post that describes how integrate
LinkedBlockingQueue's with Conduit. It's a pretty good example of what
you can do with Conduit without too much trouble.
Jim
http://boss-level.com/?p=89
--
You received this message because you are subscribed to the Google
Hello.
If def- remains for historical reason, def- may be marked as
duplicated and will be moved, for example, in 1.4, 2.0 or so?
Thank you.
--
Name: OGINO Masanori (荻野 雅紀)
E-mail: masanori.og...@gmail.com
--
You received this message because you are subscribed to the Google
Groups Clojure
28 matches
Mail list logo