Re: core.logic now compatible with Clojure 1.2.X

2011-05-25 Thread Sunil S Nandihalli
thanks David. Sunil. On Wed, May 25, 2011 at 9:49 PM, David Nolen wrote: > On Wed, May 25, 2011 at 1:36 AM, Sunil Nandihalli < > sunil.nandiha...@gmail.com> wrote: > >> >> Thats really nice to hear.. but is the version on clojars compatible >> with 1.2 yet? >> Thanks >> Sunil. > > > I fixed the

Re: Efficient sparse vector representation...

2011-05-25 Thread Andreas Kostler
On that note, is there an easy way of measuring memory usage? Andreas On 26/05/2011, at 1:12 PM, Ken Wesson wrote: > On Wed, May 25, 2011 at 10:22 PM, Andreas Kostler > wrote: >> Yes and no. I need efficient two way lookup. >> >> So, I need to do something like >> For every key in {12 "a" 23 "

Re: Efficient sparse vector representation...

2011-05-25 Thread Andreas Kostler
On 26/05/2011, at 1:12 PM, Ken Wesson wrote: > On Wed, May 25, 2011 at 10:22 PM, Andreas Kostler > wrote: >> Yes and no. I need efficient two way lookup. >> >> So, I need to do something like >> For every key in {12 "a" 23 "aa" 234 ""} >> Get the token in a map that is organised like this:

Re: Efficient sparse vector representation...

2011-05-25 Thread Ken Wesson
On Wed, May 25, 2011 at 10:22 PM, Andreas Kostler wrote: > Yes and no. I need efficient two way lookup. > > So, I need to do something like > For every key in {12 "a" 23 "aa" 234 ""} > Get the token in a map that is organised like this: > {token1 id1 token2 id2 token2 id3} > > Naively, I could

Re: difference between Composite Form & Special Form

2011-05-25 Thread Ken Wesson
On Wed, May 25, 2011 at 10:58 PM, Ken Wesson wrote: > Different things happen at compile and run time in each case: > > Thing           Compile                       Run > literal         inserted into bytecode        recalled from memory > symbol          var resolved, deref compiled  var is dere

Re: difference between Composite Form & Special Form

2011-05-25 Thread Ken Wesson
On Wed, May 25, 2011 at 10:15 PM, iamcreasy wrote: > 1st question, > Is the form word is a typo here? Isn't the word will be item? If not, > is def a form? That means, this code contains 3 forms. :-s Technically, anything that can be evaluated is a form. A composite form is something like a liter

Re: Debian packages

2011-05-25 Thread Rob Lachlan
I'm curious about this as well, because of the ICFP programming contest. The contest organizers are soliciting requests for Debian packages to be installed on the contest environment. I don't suppose that this is the reason that you're asking? On May 24, 9:41 pm, Phil Hagelberg wrote: > It looks

Re: core.logic now compatible with Clojure 1.2.X

2011-05-25 Thread ck
Thank you, thank you, thank you for making this happen (and your Vimeo talks)! -ck On May 25, 12:19 pm, David Nolen wrote: > On Wed, May 25, 2011 at 1:36 AM, Sunil Nandihalli < > > sunil.nandiha...@gmail.com> wrote: > > > Thats really nice to hear.. but is the version on clojars compatible > >

Re: Efficient sparse vector representation...

2011-05-25 Thread Andreas Kostler
Yes and no. I need efficient two way lookup. So, I need to do something like For every key in {12 "a" 23 "aa" 234 ""} Get the token in a map that is organised like this: {token1 id1 token2 id2 token2 id3} Naively, I could have two maps with the reverse lookups. l1 = {token1 id1 token2 id2 to

difference between Composite Form & Special Form

2011-05-25 Thread iamcreasy
In page 19 of Pratical Clojure by Luke VanderHart & Stuart Sierra, Chapter 2, there is a paragraph, Special forms definition : Special forms are a particular type of composite form. For most purposes, they are used very similarly to a function call. The difference is that the first form of a speci

Re: Efficient sparse vector representation...

2011-05-25 Thread Alan Malloy
I think you've reinvented hashmaps: {12 "a" 23 "aa" 25 "aaa" 234 ""} On May 25, 6:51 pm, Andreas Kostler wrote: > Hi all, > has anyone spent some thought on how to efficiently represent sparse vectors > in Clojure? > A naive scheme I came up with is using a vector of [idx val] pairs, e.g.:

Efficient sparse vector representation...

2011-05-25 Thread Andreas Kostler
Hi all, has anyone spent some thought on how to efficiently represent sparse vectors in Clojure? A naive scheme I came up with is using a vector of [idx val] pairs, e.g.: (def sparse-vec [[12 "a"][23 "aa"][25 "aaa"][234 ""]]) Accessing a value at an idx can be done so: (get-nth sparse-vec 25)

Re: How to convert a string to a data structure

2011-05-25 Thread Luc Prefontaine
Use: (read-string (read-string "[{:a \"blah\" :b 23} {:d 34 :c \"hello\"}]") I believe your expression is wrong, (:d should be {:d. Luc P. On Wed, 25 May 2011 18:04:11 -0700 (PDT) ron peterson wrote: > Hi, > > If I have a following string for example: > > [{:a "blah" :b 23}(:d 34 :c "hello"

Re: How to convert a string to a data structure

2011-05-25 Thread Miki
read-string -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send em

Re: How to convert a string to a data structure

2011-05-25 Thread Ken Wesson
On Wed, May 25, 2011 at 9:04 PM, ron peterson wrote: > Hi, > > If I have a following string for example: > > [{:a "blah" :b 23}(:d 34 :c "hello"}] > > how can I convert it to a clojure data structure? => (read-string "[{:a \"blah\" :b 23}{:d 34 :c \"hello\"}]) [{:a "blah" :b 23}{:d 34 :c "hello"}

How to convert a string to a data structure

2011-05-25 Thread ron peterson
Hi, If I have a following string for example: [{:a "blah" :b 23}(:d 34 :c "hello"}] how can I convert it to a clojure data structure? Thanks, Ron. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googleg

Re: OutOfMemoryError: PermGen space on JEE

2011-05-25 Thread ataggart
This is a fairly notorious problem with app server redeployments, and is orthogonal to using clojure. On May 25, 1:43 am, Michael Jaaka wrote: > Hi! > > After few redeployments of system written in JEE I get "PermGen space" > error. > It occurs definitely after starting to use Clojure in a manner

Re: core.logic now compatible with Clojure 1.2.X

2011-05-25 Thread David Nolen
On Wed, May 25, 2011 at 1:36 AM, Sunil Nandihalli < sunil.nandiha...@gmail.com> wrote: > > Thats really nice to hear.. but is the version on clojars compatible > with 1.2 yet? > Thanks > Sunil. I fixed the 1.2 vs 1.3 numerics issue with the help of the Clojure/core team. The version on Github as

Re: Run Clojure tests

2011-05-25 Thread Ambrose Bonnaire-Sergeant
On Wed, May 25, 2011 at 7:27 PM, Zlatko Josic wrote: > Very good nose :) That was the problem. It works fine now. > > Thank you > > Great, my pleasure. Ambrose -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clo

Re: Run Clojure tests

2011-05-25 Thread Zlatko Josic
Very good nose :) That was the problem. It works fine now. Thank you Zlaja On Wed, May 25, 2011 at 1:17 PM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > Hi Zlaja, > > I'm no maven expert but I'll try and point you in the right direction. > > See the clojure-maven-plugin do

Re: Run Clojure tests

2011-05-25 Thread Ambrose Bonnaire-Sergeant
Hi Zlaja, I'm no maven expert but I'll try and point you in the right direction. See the clojure-maven-plugin docs here: https://github.com/talios/clojure-maven-plugin You should be able to add source folders to the classpath by using the element inside the plugin declaration: com.theoryinp

Run Clojure tests

2011-05-25 Thread Zlatko Josic
Hi, I have test cases ( clojure.test) . I use Maven for runing tests. If I start it from Eclipse (clojure:test) it works fine but if I start it from console (mvn clojure:test) it complains that can not found Clojure's scripts on classpath. I've got this : Caused by: java.io.FileNotFoundException:

Re: OutOfMemoryError: PermGen space on JEE

2011-05-25 Thread Shantanu Kumar
Few options to try: 1. If you are on Windows/Linux/Solaris, try JRockit instead of the HotSpot VM. http://www.oracle.com/technetwork/middleware/jrockit/downloads/index.html 2. If you are still on HotSpot try setting the JAVA_OPTS to a combination of the following options: -Xms512m -Xmx1024m -XX

OutOfMemoryError: PermGen space on JEE

2011-05-25 Thread Michael Jaaka
Hi! After few redeployments of system written in JEE I get "PermGen space" error. It occurs definitely after starting to use Clojure in a manner: some code goes to files.clj and then it is loaded and used like: RT.load(namespace, false); var = RT.var(namespace, method.getName()); var.i