> So I presume that pcalls is leaving some future-detritus that requires
> 60 seconds to timeout. What should I be doing to clean up after
> pcalls?
(shutdown-agents)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Group
Thanks for the feedback Daniel, I've incorporated your ideas and re-
uploaded. I'm not sure where you're seeing mutable data structures.
Anyhow, I now only call eval once each time scorer is called, which is
massively faster.
This has allowed for additional testing points, and now I get a
perfec
At svn 1365 I think (not terribly current while slime sorts itself
out).
If I feed the following script to clojure-main:
(defn trivial-task [] nil)
(pcalls trivial-task trivial-task)
It takes a full minute and change to execute:
$ time java -server -cp ../clojure/clojure.jar clojure.main
pc
On May 26, 2009, at 11:33 PM, tsuraan wrote:
Is there an example of using :rename in a :use in the ns macro? I'm
trying to get it to work, but the best I can come up with is:
(ns namespace
(:use other-namespace :rename { :existing :newname }))
Here's the correct syntax:
(ns namespace
(
Is there an example of using :rename in a :use in the ns macro? I'm
trying to get it to work, but the best I can come up with is:
(ns namespace
(:use other-namespace :rename { :existing :newname }))
and when compiling, I get "ClassCastException: java.lang.Boolean
cannot be cast to clojure.lan
Hi Konrad,
I think I understand your point now. You would like the indexing to
match the implicit dimension order of the nested structure.
I was also concerned about storage order because I wanted to at some
point integrate this datastructure with colt or parallel colt and the
incanter library.
On May 26, 2009, at 2:59 PM, kyle smith wrote:
>
> I have written code that will randomly guess the mathematical form of
> a list of xy ordered pairs. My code and a sample run are in guess-
> check.clj in the files section. The final sum of squares is
> fantastic! This code is just for fun, b
This release has the minor changes listed below.
Clojure Plugin for Netbeans
* Using Clojure 1.0.0
* Removed com.infolace.format dependency
Enclojure Library
* org.enclojure.common.jar dependency removed from org.enclojure.repl
The plugin can be downloaded here:
http://code.google.com/p/enclo
I have written code that will randomly guess the mathematical form of
a list of xy ordered pairs. My code and a sample run are in guess-
check.clj in the files section. The final sum of squares is
fantastic! This code is just for fun, but I would appreciate some
feedback.
--~--~-~--~---
Hi Frantisek!
On May 25, 2009, at 7:11 AM, Frantisek Sodomka wrote:
(def a)
(deftest test-binding
(are (= _1 _2)
(binding [a 4] a) 4 ; regression in Clojure SVN r1370
))
I see those tests going in over time... Thanks so much for making them!
The checkin notes for this change ment
Hi,
Am 26.05.2009 um 20:47 schrieb kyle smith:
Ahh, of course. I've actually learned that trick before. Thanks.
There is also the mega-hacky quasiquote macro:
(defn- self-eval?
[thing]
(or (keyword? thing)
(number? thing)
(instance? Character thing)
(string? thing)
Ahh, of course. I've actually learned that trick before. Thanks.
--~--~-~--~~~---~--~~
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
To unsubscribe from this
I would lead the desired term with ~'
For example:
`(+ 1 2)
=> (clojure.core/+ 1 2)
`(~'+ 1 2)
=> (+ 1 2)
This is very useful when defining a function in a macro
On May 26, 2:30 pm, kyle smith wrote:
> user> (def nums '(1 2 3))
> #'user/nums
> user> (def funs '((+ (1 2 3)) (- (1 2 3
> #'
Hi Kyle,
This will work:
`((~'+ ~nums) (~'- ~nums))
Hope this helps
-Patrick
--~--~-~--~~~---~--~~
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
To unsubscr
user> (def nums '(1 2 3))
#'user/nums
user> (def funs '((+ (1 2 3)) (- (1 2 3
#'user/funs
user> funs
((+ (1 2 3)) (- (1 2 3)))
user> (def funs `((+ ~nums) (- ~nums)))
#'user/funs
user> funs
((clojure.core/+ (1 2 3)) (clojure.core/- (1 2 3)))
I would expect these two approaches to be the same,
Hi,
Am 26.05.2009 um 14:15 schrieb Rich Hickey:
Yes - keep your functions out of your data. If you are used to
engine.getMove(position) it becomes:
(get-move engine position)
If you want polymorphism you can make get-move a multimethod. If the
'engine' concept is only about code (e.g. has no
On May 26, 2009, at 14:59, aperotte wrote:
> Numpy does things a bit differently, I think in a large part because
> their format is row major. Based on my understanding of the two
> formats, in the multidimensional generalization of row and column
> major the left most and the right most indices
Oops, thanks
On May 26, 9:45 am, Laurent PETIT wrote:
> Please refer to Chouser's answer for your main point,
>
> Regards,
>
> --
> laurent
>
> 2009/5/26 Sean Devlin :
>
>
>
> > Okay, excellent counterexample for some. I understand that behavior
> > now.
>
> > I guess I should focus on my main
Please refer to Chouser's answer for your main point,
Regards,
--
laurent
2009/5/26 Sean Devlin :
>
> Okay, excellent counterexample for some. I understand that behavior
> now.
>
> I guess I should focus on my main point, changing/aliasing the name to
> some? to be consistent with every?
>
>
Okay, excellent counterexample for some. I understand that behavior
now.
I guess I should focus on my main point, changing/aliasing the name to
some? to be consistent with every?
On May 26, 9:34 am, Laurent PETIT wrote:
> Hi,
>
> (comp first filter) and some are not equivalent.
>
> Consider th
On Tue, May 26, 2009 at 9:11 AM, Sean Devlin wrote:
>
> To add to my own post:
>
> There is also a discrepancy in what is returned from the two
>
> (some identity [1 2 3]) -> 1
> (every? identity [1 2 3]) -> true
The naming difference matches the behavior difference. The ? in 'every?'
suggests
Hi,
(comp first filter) and some are not equivalent.
Consider this less simple case:
user=> (defn negate-or-nil [x] (when (even? x) (- x)))
#'user/negate-or-nil
user=> (first (filter negate-or-nil [1 2 3]))
2
user=> (some negate-or-nil [1 2 3])
-2
user=>
some returns the result of the predicat
To add to my own post:
There is also a discrepancy in what is returned from the two
(some identity [1 2 3]) -> 1
(every? identity [1 2 3]) -> true
I would expect the following to occur
(some identity [1 2 3]) -> true
Granted, it's all the same to an if statement. However, current
behavior of
I just noticed a quirk in the core API. The some and every? functions
have different naming conventions. Is there a reason for this? If
not I think renaming/creating an alias some? would be very helpful.
--~--~-~--~~~---~--~~
You received this message because you
Konrad,
I did some thinking about this and I think what's there is actually
what I intended for it to be. I did expect for (nth data 1) and (nth
m 1) to return similar structures and that was part of the reasoning.
Numpy does things a bit differently, I think in a large part because
their forma
On May 25, 9:17 pm, Andrew Wagner wrote:
> I'm trying to wrap my head around how to architect this project. I've got
> some functional programming experience (with Haskell), but am pretty new to
> Lisps, and feel a bit lost without the type system.
>
> So. The project is a chess AI. Now the nic
I really like the above class solution (but maybe its my OO
background! ;).
Howerver, I thought gen-class wasn't doing anything when not AOT-ing.
In other words, unless you are doing AOT compilation, gen-class
shoudn't be used. Did I miss something?
Thanks,
Max
On May 26, 1:23 am, Daniel Lyo
On May 25, 10:01 pm, Mark Volkmann wrote:
> I understand that at least some of the functions in the
> clojure.parallel namespace depend on addtional JAR files related to
> JSR-166. I found the
> sitehttp://gee.cs.oswego.edu/dl/concurrency-interest/which has links to
> JAR files for that. When
Ah, sorry, I'm using swank-clojure. It was also broken, but now it's
working again with the latest clojure svn. I didn't realise there was
an alternative!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" gr
On 20 Mai, 14:25, Shawn Hoover wrote:
> I can't help with COM, but this patch might help slime automatically connect
> to the REPL on Windows
> XP:http://bitbucket.org/shoover/clojure-box-swank-clojuremq/src/tip/hack...
Hi Shawn,
thanks for this patch, now starting swank-clojure on windows w
I remember Rich pointing the files section of the clojure google group
where he had uploaded a working version of JSR-166.
2009/5/26 Mark Volkmann :
>
> I understand that at least some of the functions in the
> clojure.parallel namespace depend on addtional JAR files related to
> JSR-166. I found
31 matches
Mail list logo