On Sep 12, 2011, at 11:28 PM, Ken Wesson wrote:
> But if, as you say, take, drop, etc. work for larger n, it should be
> easy to make nth work with larger n and non-random-access seqs, just
> by changing the non-random-access case to (first (drop n the-seq)).
I'd be rather surprised if nth sudden
Hi,
Check out Stevedore: https://github.com/pallet/stevedore
Example:
http://hugoduncan.org/post/2010/shell_scripting_in_clojure_with_pallet.xhtml
User group: http://groups.google.com/group/pallet-clj
Thanks,
Ambrose
On Tue, Sep 13, 2011 at 1:09 PM, Denis Labaye wrote:
> Hi,
>
> I have to wri
Eclipse with CounterClockwise is ok (relatively speaking). With it one
can do the usual:
- breakpoints (no conditional)
- stepping in/out
- examine variables from different call frames
But thats pretty much what it can do now. Neither Changing variable's
value nor expression evaluation works,
Hi,
I have to write a bunch of Bash scripts, and not a lot of time :)
The final script would perform a full install, provisionning, sanity
checks, ... in one command.
I wonder if I could generate them using Clojure.
Of course the output script(s) won't have the Clojure runtime.
Any advices / th
On Mon, Sep 12, 2011 at 11:55 AM, Stuart Halloway
wrote:
> I'm guessing there are similar bugs in drop, take, and so forth with
> large n and large (or infinite) seqs. They should all be fixed.
>
> The other fns are ok, thanks to their separate heritage. drop, take, et al
> are sequence functions,
I'm low on time but I will throw a few rocks in the pool here.
Composition of futures / asynchronous tasks leads you towards dataflow
concurrency (a trend in the making). People are dipping their toes in
this all over right now but it needs further pushing. imho this is
going to be big in 3-5 yea
In general, if it's not specified in the doc string, then it's not a
promise. That said, the implementation of `sort` in Clojure on the JVM uses
java.util.Arrays#sort, which is specified to be stable.
I would generally expect a language built-in `sort` routine to be stable, so
take that for wha
> Since the new, separated contrib libraries are supposed to be
> compatible with Clojure 1.2, you could perhaps also start migrating
> one lib at a time at your leisure. This might even enable you to
> contribute to a migration document.
>
Yes, this is what I am hoping people will do. Move to
Hey everyone,
I've just pushed out a shiny new Overtone release to Clojars. Although it's
only been a little over a month since the last release, there's been quite a
lot of work committed that it definitely warranted a new number and a little
release party! So update your music project depende
hi Laurent,
Sorry for going silent for several days the usual excuse, work
deadline, families etc
Anyway, really appreciate ur jumping in and try to give me a hand.
I finally found out why:
1.) I have to indicate in Eclipse that the user library, that pointed
to the jar downloaded from
Just some more, maybe even simpler examples:
Clojure 1.3.0-master-SNAPSHOT
user=> (defn foo>>bar [] "")
user=> (foo>>bar "a")
ArityException Wrong number of args (1) passed to: user$foo-GT
clojure.lang.AFn.throwArity (AFn.java:439)
user=> (defn foo++bar [a] "")
user=> (foo++bar)
ArityException
> I think it's probably too early to speculate, but does the clojure/
> core team have any thoughts on how Google Dash might affect
> ClojureScript? Given that ClojureScript currently compiles to Closure
> Javascript, can we then compile that into Dash for performance
> enhancements?
I think the
I think it's probably too early to speculate, but does the clojure/
core team have any thoughts on how Google Dash might affect
ClojureScript? Given that ClojureScript currently compiles to Closure
Javascript, can we then compile that into Dash for performance
enhancements?
http://css.dzone.com/ne
Hi,
On Monday, September 12, 2011 8:07:22 PM UTC+2, Chouser wrote:
>
>
> https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/AFn.java#L436
>
looks like a subtle bug, doesn't it? The compiler translates '-' to '_'
(Compiler.java:2619) and '>' to '_GT_' (Compiler.java:2623). Toge
On Mon, Sep 12, 2011 at 11:39 AM, Sean Corfield wrote:
> On Mon, Sep 12, 2011 at 8:16 AM, Stefan Kamphausen
> wrote:
>> Maybe the example becomes clearer with a little less foo and a little more
>> bar and baz:
>>
>> shell> lein repl
>> REPL started; server listening on localhost port 64913
>> us
> I'm guessing there are similar bugs in drop, take, and so forth with
> large n and large (or infinite) seqs. They should all be fixed.
The other fns are ok, thanks to their separate heritage. drop, take, et al are
sequence functions, and proceed iteratively.
nth is of a different lineage. It w
On Mon, Sep 12, 2011 at 8:16 AM, Stefan Kamphausen
wrote:
> Maybe the example becomes clearer with a little less foo and a little more
> bar and baz:
>
> shell> lein repl
> REPL started; server listening on localhost port 64913
> user=> (defn foo [arg] "foo")
> #'user/foo
> user=> (defn bar->baz [
Maybe the example becomes clearer with a little less foo and a little more
bar and baz:
shell> lein repl
REPL started; server listening on localhost port 64913
user=> (defn foo [arg] "foo")
#'user/foo
user=> (defn bar->baz [a b] "bar->baz")
#'user/bar->baz
user=> (foo (bar->baz "a"))
java.lang.Il
On 12 September 2011 15:49, Christina Conway wrote:
> user=> (defn foo [a] "")
> #'user/foo
> user=> (defn foo->foo2 [a b] "")
> #'user/foo->foo2
> user=> (foo (foo->foo2 "a"))
> java.lang.IllegalArgumentException: Wrong number of args (1) passed to:
> user$foo (NO_SOURCE_FILE:0)
>
> This example
Hi
On 12 September 2011 11:43, Jan Rychter wrote:
> On Sep 10, 9:31 pm, Sean Corfield wrote:
>> On Sat, Sep 10, 2011 at 9:46 AM, Jan Rychter wrote:
>> > If you use Clojure to build an application that you subsequently
>> > launch and maintain, it is pretty much a given that you use contrib.
>>
> In my opinion It would be wiser to target OpenCL first. So this effort
> will not depend on particular hardware vendor.
Sadly, I've found yet another limitation of OpenCL over the weekend.
Apparently OpenCL doesn't support GPU function pointers. Without
function pointers, and with OpenCL only su
On Fri, Sep 9, 2011 at 1:43 AM, Timothy Baldridge wrote:
> I've been kicking around an idea for some time, of starting a
> Clojure->CUDA compiler. I would like to start a discussion about this
> to figure out what some possible solutions are. First of all let me
> start a simple fact list:
>
> CUD
user=> (defn foo [a] "")
#'user/foo
user=> (defn foo->foo2 [a b] "")
#'user/foo->foo2
user=> (foo (foo->foo2 "a"))
java.lang.IllegalArgumentException: Wrong number of args (1) passed to:
user$foo (NO_SOURCE_FILE:0)
This example illustrates the problem. The exception indicates that the foo
function
On Fri, Sep 9, 2011 at 4:47 AM, Christina Conway
wrote:
> A function name contains the characters ->
> e.g. foo->fn
> The function causes an exception.
> However the exception is not reported on the function but on another
> function called before it.
> java.lang.IllegalArgumentException: Wro
+1
On Sep 11, 4:04 pm, David Nolen wrote:
> As an avid Emacs user - don't bother. If you just want a no hassle
> environment that supports Clojure development use Clooj. Steps -
>
> 1) Download
> 2) Double-click
>
> https://github.com/arthuredelstein/clooj
>
> David
>
>
>
> On Sat, Sep 10, 2011 a
On Mon, Sep 12, 2011 at 12:54 AM, Alan Malloy wrote:
> Integer overflow.
>
> user> (mod 9876543210 (bigint (Math/pow 2 32)))
> 1286608618
Oops.
But nth can probably be fixed while keeping good performance:
(defn- small-drop [s n]
(loop [n (int n) s (seq s)]
(if (zero? n) s (recur (dec n)
Thanks for the suggestion BG.
I tried using clj-stacktrace but the function name is still not displayed
correctly in the trace.
Regards,
cc
On 11 September 2011 13:53, Baishampayan Ghose wrote:
> > The foo->fn function is compiled to a .class file as:
> > foo__GT_fn.class
> > The foo>fn functio
On Sep 10, 9:31 pm, Sean Corfield wrote:
> On Sat, Sep 10, 2011 at 9:46 AM, Jan Rychter wrote:
> > If you use Clojure to build an application that you subsequently
> > launch and maintain, it is pretty much a given that you use contrib.
> > Lots of it, in fact.
>
> I think that depends on when yo
Hello,
I made a small macro, if anyone is interested.
https://gist.github.com/1209498
It wraps one or more forms and if an exception is thrown,
prints the form that caused it, and throws the exception itself.
Examples:
user=> (trace-forms 3)
3
user=> (trace-forms (+ 6 (/ 9 0)))
java.lang.Arith
Incidentally, I was just working on such a thing.
I'll send it in a new thread.
Jonathan
On Sun, Sep 11, 2011 at 7:03 PM, Michael Jaaka wrote:
> Couldn't match expected type `(t, t1)'
> against inferred type `(t2, t3, t4)'
> In the expression: (8, 11, 5)
> In the expression: [(1, 2), (8, 11, 5)
Chouser writes:
> I haven't tried all the above, but I had a couple thoughts that might help:
>
> First, inside #=(), arguments aren't evaluated. They act as if quoted:
>
> #=(+ 1 (+ 2 4))
> ; ClassCastException clojure.lang.PersistentList cannot be cast to
> java.lang.Number clojure.lan
Hi!
>> Hm, but even without the reader #=(..) syntax, there's some strangeness:
>>
>> --8<---cut here---start->8---
>> user> (. java.util.Date newInstance)
>> ; Evaluation aborted.
>> java.lang.NoSuchFieldException: newInstance
>> [Thrown class java.lang.Runtim
32 matches
Mail list logo