On Jul 6, 7:51 am, Timothy Pratley timothyprat...@gmail.com wrote:
Very glad that test is now part of clojure core.
I've run into 2 strange behaviours when trying to write tests where
threads are involved. My case is a little complex so here is a minimal
version which shows what I mean:
On Jul 5, 10:31 pm, Mark Triggs mark.h.tri...@gmail.com wrote:
(defn bi-get-pixels
[#^BufferedImage bi]
(let [raster (.getData bi)
pixels (.getPixels raster 0 0 (.getWidth bi) (.getHeight bi)
(cast (Class/forName [I) nil))]
(vec pixels)))
This
On Jul 6, 1:26 pm, philip.hazel...@gmail.com
philip.hazel...@gmail.com wrote:
On Jul 5, 10:31 pm, Mark Triggs mark.h.tri...@gmail.com wrote:
(defn bi-get-pixels
[#^BufferedImage bi]
(let [raster (.getData bi)
pixels (.getPixels raster 0 0 (.getWidth bi) (.getHeight bi)
On Jul 6, 12:25 pm, Jarkko Oranen chous...@gmail.com wrote:
(ints nil) might also work
It does indeed. This seems to be as good a solution as could be hoped
for, thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
On Sun, Jul 5, 2009 at 3:51 PM, John Harropjharrop...@gmail.com wrote:
This is frankly quite baffling. The changes to the function are
innocent from a large-literal or pretty much any other perspective.
Both your functions load fine for me without the rest of
your code. Are there type hints
On Jul 2, 7:46 am, Takeshi Banse tak...@laafc.net wrote:
Hi all,
I Takeshi Banse live in Japan, have been teaching myself Clojure and in the
process have a patch to theswank-clojure I'd like to make.
With this patch, I can happily `M-x slime-apropos' within Emacs/SLIME.
Hope this helps.
Hey everyone,
I've noticed on several occasions there's spam in the file section
(like right now. e.g. SexyBabe.html).
What's the preferred approach to handle this:
1. Ignore it
2. Mention it on this list
3. Use a system for tagging files as spam
4. Some other idea?
Hi Rick,
I think we've both encountered the same concerns with coding style in
Clojure. I can't really say which is better - a large list of
conditions or a mutually recursive implementation. I have a feeling
that it depends on your fluency in functional languages. For me, I'm
relatively new to
Hi all,
I've been away from Clojure for a while (I was side tracked about a
month before 1.0 was released) and now that I'm back I'm completely
confused.
Clojure and Clojure-Contrib have both moved to git and are hosted on
git-hub, right? Is it then the case that the SVN repository on
Tom Emerson tremer...@gmail.com writes:
Clojure and Clojure-Contrib have both moved to git and are hosted on
git-hub, right? Is it then the case that the SVN repository on
GoogleCode is no longer being used?
That's right. Side note to folks with commit access: it would be a good
idea to
OK, as of clojure-contrib commit 0d29198..., *print-base* and *print-
radix* are fully supported for the various integer classes and ratios
in cl-format, write, and pprint.
e.g.:
(binding [*print-base* 2, *print-radix* true] (pprint (range 4)))
=
(#b0 #b1 #b10 #b11)
Please let me know if you
Thanks Paul, for the quick response.
On Mon, Jul 6, 2009 at 12:56 PM, Phil Hagelbergp...@hagelb.org wrote:
That's right. Side note to folks with commit access: it would be a good
idea to check in a note to the deprecated repositories telling people
where to go for the latest versions.
Or,
On Jul 6, 2009, at 3:13 PM, Tom Emerson wrote:
Thanks Paul, for the quick response.
On Mon, Jul 6, 2009 at 12:56 PM, Phil Hagelbergp...@hagelb.org
wrote:
That's right. Side note to folks with commit access: it would be a
good
idea to check in a note to the deprecated repositories telling
Newbie question here. Probably answered in Stu's book, but I forgot
it at home today.
is:
(for [x [1 2 3]] `(some-symbol ~x))
dangerous? I mean, assuming that some-symbol is bound and all. At
the REPL I get
((user/some-symbol 1) (user/some-symbol 2) (user/some-symbol 3))
which is what I'm
On Mon, Jul 6, 2009 at 8:53 AM, Chouser chou...@gmail.com wrote:
On Sun, Jul 5, 2009 at 3:51 PM, John Harropjharrop...@gmail.com wrote:
This is frankly quite baffling. The changes to the function are
innocent from a large-literal or pretty much any other perspective.
Both your functions
Thanks Stu, Mike, and Stephen for your responses: I appreciate the help.
@Stephen, these are all horses not worth kicking any further. Thanks
for the git links.
@Stu, I'll take that under advisement, but I'm not going to install
ruby for that one tool... yet. :)
Thanks again guys,
-tree
I think your unquote is okay. ClojureQL does something similar.
However, my gut says this should be in a doseq, not a for statement.
Could be totally wrong, tough.
My $.02
Sean
On Jul 6, 2:39 pm, Mike cki...@gmail.com wrote:
Newbie question here. Probably answered in Stu's book, but I
(defn- subexpressions-of-sum** [[n p] terms]
(let-print [sum (cons '+ (map #(factor-term % n p) terms))
prod (rest (make-product* n p))]
(cons sum
(map #(cons '* (cons sum (rest %)))
(concat prod (subexpressions-of-product prod))
I look at the above, and something
Hi,
2009/7/6 Stephen C. Gilardi squee...@mac.com:
On Jul 6, 2009, at 3:13 PM, Tom Emerson wrote:
Thanks Paul, for the quick response.
On Mon, Jul 6, 2009 at 12:56 PM, Phil Hagelbergp...@hagelb.org wrote:
That's right. Side note to folks with commit access: it would be a good
idea to
On Mon, Jul 6, 2009 at 3:47 PM, Sean Devlinfrancoisdev...@gmail.com wrote:
I think your unquote is okay. ClojureQL does something similar.
However, my gut says this should be in a doseq, not a for statement.
Could be totally wrong, tough.
I think the OP is trying to build and return a
Hi,
Am 06.07.2009 um 22:00 schrieb Chouser:
Or if you really do need a list:
(for [x [1 2 3]] (cons 'some-symbol (list x)))
o.O
*cough*(list 'some-symbol x)*cough* ;)
Sincerely
Meikel
smime.p7s
Description: S/MIME cryptographic signature
On Mon, Jul 6, 2009 at 4:18 PM, Meikel Brandmeyerm...@kotka.de wrote:
Hi,
Am 06.07.2009 um 22:00 schrieb Chouser:
Or if you really do need a list:
(for [x [1 2 3]] (cons 'some-symbol (list x)))
o.O
*cough*(list 'some-symbol x)*cough* ;)
Oh. Right. What he said.
--Chouser
Hi, I needed to call a static method on a class stored in a var
yesterday and found that it was a little bit trickier than I initially
thought. There's three way of doing it, the two first are quite
straightforward and working ;-) e.g.:
(import '(java.nio ByteBuffer FloatBuffer))
(def foo
Or if you really do need a list:
(for [x [1 2 3]] (cons 'some-symbol (list x)))
Why not
(for [x [1 2 3]] (list 'some-symbol x))
?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this
On Mon, Jul 6, 2009 at 3:58 PM, Emeka emekami...@gmail.com wrote:
(defn- subexpressions-of-sum** [[n p] terms]
(let-print [sum (cons '+ (map #(factor-term % n p) terms))
prod (rest (make-product* n p))]
(cons sum
(map #(cons '* (cons sum (rest %)))
(concat prod
Since it's not apparently a simple bug in my function above, but
something about a combination of that version of that function and
some other part of my code, I can't think of a way to track the
cause down short of the very tedious method of commenting out
functions or replacing
So a common counter to the VM startup time is so bad problem is to use
Nailgun for a long-running server process. I've gotten this working in
some respects, but I get a Unexpected chunk type 83 ('S') error quite
often when I'm trying to read from the stdin that the nailgun context
provides.
(ns
On Jul 5, 11:42 pm, Bradbev brad.beveri...@gmail.com wrote:
more to modern x86 chips. After you have the best algorithm for the
job, you very quickly find that going fast is entirely bound by memory
speed (actually latency) - cache misses are the enemy.
IME (outside JVM), this depends
I've just figured out that the macro version in the allocate example
can't be used with local variables.
(let [foo ByteBuffer]
(allocate1 foo 1024))
throws java.lang.UnsupportedOperationException: Can't eval locals
(NO_SOURCE_FILE:94)
On Jul 6, 6:59 pm, Nicolas Buduroi nbudu...@gmail.com
On Jul 6, 4:30 pm, fft1976 fft1...@gmail.com wrote:
On Jul 5, 11:42 pm, Bradbev brad.beveri...@gmail.com wrote:
more to modern x86 chips. After you have the best algorithm for the
job, you very quickly find that going fast is entirely bound by memory
speed (actually latency) - cache
Hi,
The patch below fixes the computation of swank-version, which broke when
(clojure-version) was defined to returned a string. The bug only
manifests itself if swank-clojure-compile-p is set to t.
-Sudish Joseph
From: Sudish Joseph sud...@gmail.com
Date: Mon, 1 Jun 2009 19:18:11 -0400
Hey Phil:
I think it is just an input stream encoding problem. I think if you
change this line:
(copy (- context .in) out)
to this:
(copy (- context .in InputStreamReader.) out)
it will work.
George
On Jul 6, 5:06 pm, Phil Hagelberg p...@hagelb.org wrote:
So a common counter to the
You can call the static method directly on the class name;
(java.nio.ByteBuffer/allocate 1024)
or just (ByteBuffer/allocat 1024)
if it's imported.
Rgds, Adrian.
On Tue, Jul 7, 2009 at 2:16 AM, Nicolas Buduroi nbudu...@gmail.com wrote:
I've just figured out that the macro version in the
Hi Nicolas, sorry, that last post missed the second part, I meant to add;
If you know the method you wish to call, do you not know the class and can
thus call the static method directly?
-Adrian.
On Tue, Jul 7, 2009 at 5:21 AM, Adrian Cuthbertson
adrian.cuthbert...@gmail.com wrote:
You can
I have a function that relies on a keyword being supplied. The keyword
is used to find something in a static map. I want to put in the doc-
string:
(str blah blah blah, arg1 must be one of (keys map))
Suggestions?
--~--~-~--~~~---~--~~
You received this message
I have a function that relies on a keyword being supplied. The keyword
is used to find something in a static map. I want to put in the doc-
string:
(str blah blah blah, arg1 must be one of (keys map))
Suggestions?
You'd need to generate a suitable function definition using a macro.
E.g.,
2009/7/1 ztellman ztell...@gmail.com
Most of the OpenGL code I've seen has been a fairly literal
translation of the corresponding Java, so as a way of getting my feet
wet in Clojure I've written something that tries to be a little more
idiomatic. It can be found at
37 matches
Mail list logo