Re: [OT?] Best DB/architecture for n-gram corpus?

2015-03-11 Thread Pablo Nussembaum
Have looked at http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/ that comes with Postgres 9.4 and it's really really powerful and fast. On 03/06/2015 09:25 PM, Sam Raker wrote: > I'm trying to create an n-gram[1] corpus out of song lyrics. I'm breaking > individual songs into lines, which

Re: Help with a memory leak

2014-05-23 Thread Pablo Nussembaum
/CLJ-1152 > > Andy > > > On Fri, May 23, 2014 at 8:53 AM, Pablo Nussembaum <mailto:bau...@gmail.com>> wrote: > > I have been working hard to understand the issue, and it seems to related > to the creation of lots of functions using eval. > for instance i

Re: Help with a memory leak

2014-05-23 Thread Pablo Nussembaum
I have been working hard to understand the issue, and it seems to related to the creation of lots of functions using eval. for instance if you run: (for [_ (range 1)] (eval (read-string "(fn [x] (inc x))"))) 2 or 3 time it will consume all PermGen. Is there any way to palliate this problem?

Help with a memory leak

2014-05-21 Thread Pablo Nussembaum
Hello Devs, I'm working a tool for my thesis using clojure for the first time. The tools will randomly execute methods of a java class for generating an state machine of the API. The java class is annotated with preconditions that are compiled to clojure functions. You can see and example here[1

Re: Request for help optimising a Clojure program

2013-10-23 Thread Pablo Nussembaum
What do you think of adding odd elements and substract even ones? [1 2] = 1 - 2 = -1 [2 1] = 2 - 1 = 1 On 10/23/2013 02:30 PM, Andy Fingerhut wrote: > If you can think of a different hash function for vectors that doesn't > lead to these types of collisions, I'm all ears. The issue is that > the

Re: use lein compile a Java project

2013-10-11 Thread Pablo Nussembaum
another thing that you can't do with lein and java mixed project is to define a java-tests-path. I have that problem :( The only solution is to use a dev profile to exclude test paths from production code. So I think that lein is not thought for java projects. On 10/11/2013 10:00 AM, Gaofeng Zen

Re: boolean java interopt puzzle/bug?!

2013-10-09 Thread Pablo Nussembaum
Thanks for the help and clarifications. My problem is that I'm working on a tool, as a part of my thesis, to randomly execute annotated java classes to try discover its behavior. So if a class has a (b|B)oolean field and I read its value using reflection it returns (

boolean java interopt puzzle/bug?!

2013-10-06 Thread Pablo Nussembaum
Hey Devs, I have fighting against an issue that can summarized in the following line: user=> (not (new java.lang.Boolean false)) false Is that behavior correct? Because if I run: user=> (type false) java.lang.Boolean Can someone help me to understand it? Thanks, -- Bauna -- -- You received

Re: clojure.set/union bug?

2013-07-01 Thread Pablo Nussembaum
Hi, This is pretty strange behavior to me, why is the case that keys function don't return a set like java? That could lead to a big penalty in performance if you don't realize this difference. I don't say that this is bug, although I would like to believe that a nice explanation exists ;-) Regard

Re: alternative to passing parameters to functions

2013-02-19 Thread Pablo Nussembaum
You can also check prismatic plumbing library where they a new function definition type based on maps. link: https://github.com/Prismatic/plumbing/tree/master/src/plumbing/fnk On 02/18/2013 05:33 AM, Gunnar Völkel wrote: > You can checkout clojure.options > (https://github.com/guv/clojure.options

Re: How to invoke java method obtained using clojure.reflect

2013-02-12 Thread Pablo Nussembaum
Hey, I really appreciate your help guys. This is very useful. On 02/12/2013 10:45 AM, Meikel Brandmeyer (kotarak) wrote: > You can also do away with the argument names. You just need the number of > arguments. > > (defn call-fn > [class method n-args] > (let [o(gensym) > args (rep

How to invoke java method obtained using clojure.reflect

2013-02-11 Thread Pablo Nussembaum
lojure.reflect :as r]) user=> (def method-def (filter #(= "toString" (str (:name %))) (:members (r/reflect "aClass" How do I invoke "toString" using "method-definition"? Thanks and regards, -- Pablo Nussembaum what is better to use java intero