I was able to make this go away by adding a method to Numbers.java. I
have a use case where I'm calling bit-and with two longs tens of
millions of times. Is there another way I could avoid this reflection
without this change to the Java source?
diff --git a/src/jvm/clojure/lang/Numbers.java b/s
> Can you let the fn call figure that out for you? Like so:
>
> (apply (fn ([p1 p2] (new Connection.Configuration p1 p2))
> ([p1 p2 p3] (new Connection.Configuration p1 p2 p3)))
> params)
>
> I realize that reflection is probably better in this case, but was
> wonderi
For the cases currently implemented, the perf difference is negligible. I don't
think there is anything wrong with a helper protocol, but I also don't think
the cond-based approach is a problem, unless there are real use cases for
making these open.
Pondering whether this should be a protocol w
Someone wrote an installer [1] that I've used successfully.
[1] http://github.com/paulbatum/clojure-clr/downloads
On Wed, Apr 7, 2010 at 4:37 PM, Sean Devlin wrote:
> Anyone have instructions for CLR?
>
> On Apr 7, 2:50 pm, Meikel Brandmeyer wrote:
>> Hi,
>>
>> On Wed, Apr 07, 2010 at 01:53:47P
The version of slime I am using (20100404) doesn't define any
slime-redirect-inferior-output function. Perhaps it has been renamed?
Steve
On Wed, Jun 2, 2010 at 1:06 PM, Karsten Lang wrote:
> I don't suppose
>
> (add-hook 'slime-connected-hook 'slime-redirect-inferior-output)
>
> would work?
>
Thanks Matt, that did the trick.
On Tue, May 25, 2010 at 2:16 PM, Matthias von Rohr <
matthias.vonr...@gmail.com> wrote:
> set the cursor somewhere in your (defn...) expression then press Ctrl
> + Alt + x (evaluate in REPL). After that you method call should work.
>
> Matt
>
> On May 24, 5:08 pm,
Ah, makes sense now, thank you. I know the parameter list will be one of
three possibilities, so probably makes more sense to specify the conditions
than to use reflection. I don't have a repl handy, but either of the below
should work:
;; using apply (per Konrad)
(cond
(= (count params) 2)
On Jun 1, 2010, at 22:26 , Sina K. Heshmati wrote:
> "Heinz N. Gies" said:
>
>> The DNS is fixed, try-clojure.org is now working too :)
>
> Not anymore! I was actually using it. I missed C-a C-k though.
You make me cry :P thanks for the hint this time it was my evil doing ;) fixed
now! and I p
Hi,
Sorry for posting to an old thread, but thought this might be a good
one to ask.
My question is this - isn't ClojureBox an Emacs? If yes, then why
don't we include it in the above Wiki?
Thanks,
Manoj.
On Apr 7, 3:39 pm, Avi Schwartz wrote:
> On March 30th Eric Thorsen released version 1.1
On 2 Jun 2010, at 21:10, Mike Meyer wrote:
If your class has multiple constructors with different arity, there
are ways to look up the right constructor using reflection, but I
have forgotten the details already.
Can you let the fn call figure that out for you? Like so:
(apply (fn ([p1
On Wed, 2 Jun 2010 13:33:30 +0200
Konrad Hinsen wrote:
> Constructors calls translate directly to Java constructor calls, meaning that
> the number of arguments must be known at compile time.
>
> Assuming your constructor takes a fixed number of arguments, the easiest
> solution to your proble
ka, I ran some more tests, including partition-work and your version
of fac. I also ran some code from http://shootout.alioth.debian.org in
both C and Java.
On these 10-element sequences, partition-work seems to be a few tens
of milliseconds slower than partition-all. It does look generally
useful
I don't suppose
(add-hook 'slime-connected-hook 'slime-redirect-inferior-output)
would work?
On Tue, Jun 1, 2010 at 11:00 PM, Paul Hobbs wrote:
> I have a similar issue whenever I try to print anything from slime.
> --
> Paul Hobbs
>
>
> On Mon, May 31, 2010 at 11:41 PM, Steve Molitor
> wrote:
"I have now been using Clojure as my primary programming language for
almost exactly two years. Clojure 1.2 is nearing release. The Clojure
community is larger than it ever has been, and shows no sign of
slackening its growth.
It seems like now would be a good time to take stock of where the
+1 on uppercase / lowercase
On Jun 2, 8:49 am, Tom Hickey wrote:
> Including a space is correct when changing a string "to upper
> case" (hence Java's toUpperCase), though no space would be fine there
> as well.
>
> As a verb, "uppercase" (no space) is correct. So the function should
> either mat
Including a space is correct when changing a string "to upper
case" (hence Java's toUpperCase), though no space would be fine there
as well.
As a verb, "uppercase" (no space) is correct. So the function should
either match java and be called to-upper-case or (preferably, IMO)
simply be uppercase.
Hello!
I figured it out. For the record, it was me being stupid about it. The
problem was doing a (use 'clojure.contrib.repl-utils) would barf
because 'source' is declared in both clojure.repl and
clojure.contrib.repl-utils (This has probably to do with what Sean
said - some repl functions are bei
Hello!
I figured it out. For the record, it was me being stupid about it. The
problem was doing a (use 'clojure.contrib.repl-utils) would barf
because 'source' is declared in both clojure.repl and
clojure.contrib.repl-utils (This has probably to do with what Sean
said - some repl functions are bei
In perusing the patch for ticket #359 (promoting string), I came
across the following fn:
http://gist.github.com/422392
I was wondering why there is a cond that dispatches on the instance?
predicate, instead of a helper protocol being used. Is a helper
protocol bad style? Is cond faster? Is it
No, I have yet to set up a public repo. I'll see to it that I at least
set one up for the modified clojure-master project sometime today or
tomorrow. As for a hello-world project, I'm currently running into
some issues with android's call stack limit: (use 'swank.swank) kinda
uses too much of that.
Hi,
On Jun 2, 2:51 am, Mark Rathwell wrote:
> ;; can do it with eval, but what is the correct way?
> user=> (eval `(ConnectionConfiguration. ~...@params))
> (eval `(ConnectionConfiguration. ~...@params))
> # org.jivesoftware.smack.connectionconfigurat...@a0430b6>
The best way is to use reflecti
On 02.06.2010, at 02:51, Mark Rathwell wrote:
> I apologize for my ignorance, I've been struggling with this one for a couple
> hours and can't figure it out. Why does apply not work with constructors,
> special forms, etc.? Is there some other standard way to unpack a list? My
> question is
Feka, do you select a text on page and press button in toolbar?
On Jun 1, 8:49 pm, feka wrote:
> Good idea! Thanks. (And try-clojure is good idea, too. So they also
> merit the thanks.)
>
> I can't make it grab the selection and evaluate it though. Am I
> missing something? Mac OS X 10.6.3, Chrom
I apologize for my ignorance, I've been struggling with this one for a
couple hours and can't figure it out. Why does apply not work with
constructors, special forms, etc.? Is there some other standard way to
unpack a list? My question is outlined below, I have a variable length list
of paramete
On 2 Jun 2010, at 02:38, Daniel wrote:
This touches upon another subject though: Clojure lacks a good math
library (though Liebke might kill me for that).
Incanter is great but it's not a math library in the sense of what you
propose. I'd say you have a chance to survive :-)
Has anybody th
On 1 Jun 2010, at 20:24, Travis Hoffman wrote:
I was curious what it would take to add a complex number type to
Clojure Core. If anyone else is curious, it doesn't take much:
1.) Add clojure.lang.Complex
2.) Add a Pattern and code to match, parse and create complex numbers
in LispReader (parses
26 matches
Mail list logo