Re: classpath on seesaw????

2011-11-12 Thread Dave Ray
Good Morning, The easiest way to run the Seesaw examples is as describe in the wiki (https://github.com/daveray/seesaw/wiki): * Install leiningen * Clone or download the repo from github * then... $ cd seesaw $ lein deps $ lein run -m seesaw.test.examples.kitchensink Replace kitchensink with

Re: A Taste of cKanren (via a coding challenge)

2011-11-12 Thread Jules
The time difference is largely due to using the product library function instead of for comprehensions and the fact that the cKanren version cheats by hardcoding part of the solution, and hardcoding an extra constraint alldiff(a,b,c,d). The following code takes ~12ms with PyPy on my computer: def

[ANN] Clojure Android mailing list

2011-11-12 Thread Daniel Solano Gómez
As announced yesterday at the Conj, I have created a new mailing list to help coordinate efforts revolving around Clojure Android. It's available via Google groups at http://groups.google.com/group/clojure- android. Feel free to use this group to talk about your Android projects, creation of

Can't dynamically bind non-dynamic var

2011-11-12 Thread Kevin Albrecht
I was experimenting with dynamic binding of vars with Clojure 1.3, as described on http://clojure.org/vars and got this error: user= (def x 1) user= (binding [x 2] x) IllegalStateException Can't dynamically bind non-dynamic var: clojure.core/x clojure.lang.Var.pushThreadBindings I figured out

Re: Getting index of char from end

2011-11-12 Thread Jestan Nirojan
My solution is very wrong, sorry for that. I am just wondering, cant we use memfn to make lastIndexOf as a first class function here? areduce can be used too. (defn last-indexof [cs c] (areduce cs i lst-idx -1 (if (= c (aget cs i)) i lst-idx))) (- aabbccd to-array (last-indexof \c))

Re: Can't dynamically bind non-dynamic var

2011-11-12 Thread Ben Smith-Mannschott
On Sat, Nov 12, 2011 at 18:37, Kevin Albrecht onlya...@gmail.com wrote: I was experimenting with dynamic binding of vars with Clojure 1.3, as described on  http://clojure.org/vars and got this error: user= (def x 1) user= (binding [x 2] x) IllegalStateException Can't dynamically bind

[ANN] Leiningen 1.6.2 released

2011-11-12 Thread Phil Hagelberg
I'm happy to announce the release of Leiningen 1.6.2. You should be able to do lein upgrade if you've installed manually, otherwise hopefully your package manager will pick it up soon. Highlights: * Let run task work with main functions from Java classes. * Add user-level :deploy-repositories

Re: Adding a jar to dependencies in lein

2011-11-12 Thread myriam abramson
Thanks, I didn't know about that. On Fri, Nov 11, 2011 at 4:47 PM, joegallo joega...@gmail.com wrote: Go to search.maven.org, and type in jericho-html. That'll take you to some results pages that will tell you the versions that are available, and also the correct groupId and artifactId.

Re: Rich Hickey: Simple Made Easy from Strange Loop 2011

2011-11-12 Thread Brian Marick
On Oct 21, 2011, at 4:03 PM, Rich Hickey wrote: I like nil punning, and find it to be a great source of generalization and reduction of edge cases overall, while admitting the introduction of edges in specific cases. I am with Tim in preferring CL's approach over Scheme's, and will admit

Re: Getting index of char from end

2011-11-12 Thread Ulises
Here's my take on it (all caveats apply, e.g. performance): (defn indices-of Returns the indices of the given char in the string (0 based). [c string] (map second (filter #(= c (first %)) (partition 2 (interleave string (iterate inc 0)) (indices-of \a abba) ; (0 3) and hence

What is the cost of calling require for something that already have been loaded?

2011-11-12 Thread Nicolas Buduroi
I'm using a function in Lobos to automatically load the backend code associated to a specific database and wonder if I should track what is loaded to avoid repeatedly calling `require`? This isn't an issue currently as performance isn't a problem for this library, but this might change in the

Re: Getting index of char from end

2011-11-12 Thread Tyler Perkins
Interesting. I never knew how to use areduce before. However, it always scans the entire array. If you had a very long string (or other collection), it might be better to scan backwards: user (defn last-indexof [cs c] (loop [n (dec (count cs))] (if (and (= 0 n) (not= c

Re: A Taste of cKanren (via a coding challenge)

2011-11-12 Thread David Nolen
Write a version in Python that can infer 40 from the inputs then maybe we can talk about declarative. I have no idea what you mean by cheating and even less of an idea what you mean by nice. On Saturday, November 12, 2011, Jules julesjac...@gmail.com wrote: The time difference is largely due to

Latest Bagwell paper for a new implementation of Clojure vectors ?

2011-11-12 Thread bernardH
hi, I just stumbled upon a paper on en enhanced immutable data structure [0] that could be useful for Clojure implementation. Could it enable batter parallel programming semantics as discussed by Guy Steel in this presentation [1] ? I'd have to look deeper into it, but I'd be very interested in

Downloading the documentation?

2011-11-12 Thread Kyle Cordes
Is there a readily available download of the Clojure documentation most readily viewed at clojure.org, for offline use? I've searched a bit and not found anything, though I'd not be surprised to have overlooked it. -- Kyle Cordes http://kylecordes.com -- You received this message because

Re: What is the cost of calling require for something that already have been loaded?

2011-11-12 Thread Kevin Downey
clojure tracks this info in a ref On Sat, Nov 12, 2011 at 6:47 PM, Nicolas Buduroi nbudu...@gmail.com wrote: I'm using a function in Lobos to automatically load the backend code associated to a specific database and wonder if I should track what is loaded to avoid repeatedly calling `require`?

Re: A Taste of cKanren (via a coding challenge)

2011-11-12 Thread Ambrose Bonnaire-Sergeant
Understandability is subjective. The meaning of the cKanren really jumps out at me, the python program takes a lot more for me to think through. There is nothing wrong with pruning the search space in this program. As you said, doing so reduced the Python program execution time to 2ms! Ambrose

[ANN] clj-http 0.2.4 released

2011-11-12 Thread Lee Hinman
I'm happy to announce the release of clj-http 0.2.4. You should be able to use it from Clojars with the following: [clj-http 0.2.4] Main highlights: * (with-connection-pool ...) is now supported, allowing reuse of a connection pool to greatly increase the speed of multiple requests. *

Re: A Taste of cKanren (via a coding challenge)

2011-11-12 Thread Ambrose Bonnaire-Sergeant
I'll just clarify, the matches function body jumps out at me. checko doesn't, but it's role in the problem is still clear, even if its implementation is not. I think that's still an important trait. Can checko be improved? I'm not sure. What does subchecko do, David? Ambrose On Sun, Nov 13,

Re: A Taste of cKanren (via a coding challenge)

2011-11-12 Thread David Nolen
checko and subchecko work together to determine whether an ordered set of weights can produce integers 1 to 40 in reverse. It's more verbose since we are preserving the ability to run our program backwards - which is simply a byproduct of writing a purely relational program. I'm curious if it can

Re: Downloading the documentation?

2011-11-12 Thread Matt Hoyt
Checkout the gh-pages branch from github.  The branch has all of the documentation for clojure in it.   Matt Hoyt From: Kyle Cordes k...@kylecordes.com To: clojure@googlegroups.com Sent: Saturday, November 12, 2011 8:25 PM Subject: Downloading the documentation?

Re: classpath on seesaw????

2011-11-12 Thread sixs
seesaw downloads as follows c:\seesaw\test\seesaw\test\examples\kitchensink first wseesaw is originally daveray-seesaw-1.0.7-281-g12248d4 I have tried to run lein deps and the lein run -m seesaw.test.examples.kitchensink from the first seesaw, then the nest seesaw and ffinally examples. I can't

Re: Will clojurescript get in-ns and load?

2011-11-12 Thread Dave Sann
I am going to bump this topic just once to see if there are any further opinions. I think that this would be a very useful capability. I think that in-ns and load are one solution to modularity, in particular to facilitate separating code effectively into portable chunks. My motivation is to