Actually Mark is right. My point is not about the Levenshtein
distance. I've even found a quite nice and concise implementation here
on the list a few weeks ago:
"generic (works for any seq) levenshtein distance"
https://groups.google.com/group/clojure/browse_frm/thread/c5da3ac1b6704eda
My point i
Perfect. Thanks for the help.
Tim
On Mar 22, 9:11 pm, Alan wrote:
> $ is a special character in replacements as well, for indicating
> capturing-subgroups.
>
> user> (require '[clojure.string :as s])
> nil
> user> (s/replace "stuff$@stuff" #"\$@" "\\$@sub")
> "stuff$@substuff"
>
> On Mar 22, 8:05
$ is a special character in replacements as well, for indicating
capturing-subgroups.
user> (require '[clojure.string :as s])
nil
user> (s/replace "stuff$@stuff" #"\$@" "\\$@sub")
"stuff$@substuff"
On Mar 22, 8:05 pm, Tim Robinson wrote:
> I'm not well versed in regex functions., so I'm probably
I'm not well versed in regex functions., so I'm probably missing
something really obvious.
=> (re-gsub #"\$@" "--" "stuff$@stuff")
"stuff--stuff"
=>(re-gsub #"\$@" "$@" "stuff$@stuff")
java.lang.IllegalArgumentException: Illegal group reference
(NO_SOURCE_FILE:0)
Anyone run into this and have a
Thanks Ken .. "into" is cool .. it does better..
Sunil.
On Tue, Mar 22, 2011 at 4:09 PM, Ken Wesson wrote:
> On Tue, Mar 22, 2011 at 5:08 AM, Shantanu Kumar
> wrote:
> > On Mar 22, 1:15 pm, Sunil S Nandihalli
> > wrote:
> >> Hello everybody,
> >> I was wondering why there is no 1 argument ver
http://www.try-clojure.org/
I hear it's not always working, but it seems to be up now.
On Mar 22, 4:55 pm, Kyle Cordes wrote:
> On Tuesday, March 22, 2011 at 7:16 AM, André Branco wrote:
>
> Hi!
>
> > A good collection of resources:
> >http://learn-clojure.com/
>
> Thanks for the mention (that's
On Tuesday, March 22, 2011 at 7:16 AM, André Branco wrote:
Hi!
> A good collection of resources:
> http://learn-clojure.com/
Thanks for the mention (that's my site). By the way, I'm on the lookout for any
other really good materials to help people get started. It's tempting to add
every resourc
Thanks, Stuart.
> With Leiningen, you can add the :jvm-opts option in project.clj,
Cool, this is what I was looking for :)
> (def signals (vec ...))
>
> says that you want the entire result, as a vector, stored as the value of
> the Var `signals`. That means your entire result data must fi
I'm wondering if it wouldn't be better to simply implement it using a
mutable 2d Java array? (the standard imperative implementation).
It wouldn't be a 'purely functional' answer, but the array wouldn't
leak out of the levenshtein-distance function.
On Mar 22, 3:09 am, Christian Schuhegger
wrot
Thanks, Ken.
> You'll need to avoid holding onto the head of your line-seq, which
> means you'll need to make multiple passes over the data, one for the
> as, one for the bs, and etc., with the output a lazy seq of lazy seqs.
Actually, it would be great to make separate, asynchronous passes for
t
Oh, and the standard JDK class java.util.zip.GZIPInputStream implements gzip
decompression.
-Stuart Sierra
clojure.com
--
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
Hi Avram,
Assuming you're using the Sun/Oracle JDK, you can increase the size of the
Java heap with the -Xmx command-line option. For example:
java -Xmx512mb -cp clojure.jar:your-source-dir clojure.main
Will run Java with a 512 MB heap. This increases the amount of memory
available to yo
On Tue, Mar 22, 2011 at 4:00 PM, Avram wrote:
> Hi,
>
> I (still) consider myself new to clojure. I am trying to read a 37Mb
> file that will grow 500k every 2 days. I don't consider this to be
> input large enough file to merit using Hadoop and I'd like to process
> it in Clojure in an efficient
On 22 March 2011 05:47, Shantanu Kumar wrote:
> On Mar 22, 3:29 am, siyu798 wrote:
>> (dirname "/a/b/c") should return "/a/b/" on both win and unix
>
> You can write such a function yourself. Irrespective of the platform,
> Java works fine with '/' as a separator in the filename.
In fact, this i
Hi,
I (still) consider myself new to clojure. I am trying to read a 37Mb
file that will grow 500k every 2 days. I don't consider this to be
input large enough file to merit using Hadoop and I'd like to process
it in Clojure in an efficient, speedy, and idiomatic way.
I simply want something akin
On Mar 22, 2011, at 12:30 PM, Mark Engelberg wrote:
> Of course, in most languages the Levenshtein distance is computed using the
> bottom-up Dynamic Programming strategy of filling in a matrix left-to-right,
> one row at a time, thus ensuring that all the entries needed to compute a
> given e
I don't believe Tim's comments are correct. Since there are three recursive
calls, I don't think there is a straightforward transformation to tail
position using an accumulator. Also, due to the interleaved nature of the
recursive calls, I would expect memoization to be essential.
So, I think th
Miki,
We do have functions to normalize and convert path and I just think the
dirname function should not do the conversion. In fact there's no benefits
to do so as /a/b/c on *nix is not equal to \a\b\c in window, same goes for
c:\a\b\c in window for c:/a/b/c in *nix. In 99.99% percent of th
A few things:
--clojure does not do automatic TCO, so you might want to look at
recur to handle your stack issue
--recur won't work unless you rewrite your function so that the
recursive call is in tail position
--you probably can do that rewrite by passing around the levenshtein
grid as an accumul
Hi!
A good collection of resources:
http://learn-clojure.com/
You may also trying solving this:
Ninety-Nine Lisp Problems
http://www.ic.unicamp.br/~meidanis/courses/mc336/2006s2/funcional/L-99_Ninety-Nine_Lisp_Problems.html
Regards,
André.
On Mar 20, 8:08 pm, Ent SaaS wrote:
> Hi,
>
> I would
On Tue, Mar 22, 2011 at 5:08 AM, Shantanu Kumar
wrote:
> On Mar 22, 1:15 pm, Sunil S Nandihalli
> wrote:
>> Hello everybody,
>> I was wondering why there is no 1 argument version of conj and disj. I
>> think that would be very convenient. Especially when used in the following
>> way
>>
>> (apply
On Mar 22, 2011, at 1:44 AM, Martin Blais wrote:
>> The operations that would be provided by a tooling library would
>> have zero impact on the nREPL protocol. There's no reason why a
>> particular client would have to either (a) use the server's
>> provided set of tooling functions or (b) use an
Thanks Shanthanu ..
Sunil.
On Tue, Mar 22, 2011 at 2:38 PM, Shantanu Kumar wrote:
>
>
> On Mar 22, 1:15 pm, Sunil S Nandihalli
> wrote:
> > Hello everybody,
> > I was wondering why there is no 1 argument version of conj and disj. I
> > think that would be very convenient. Especially when used i
On Mar 22, 1:15 pm, Sunil S Nandihalli
wrote:
> Hello everybody,
> I was wondering why there is no 1 argument version of conj and disj. I
> think that would be very convenient. Especially when used in the following
> way
>
> (apply conj some-collection collection-of-elements-to-be-conjed)
>
> C
Hello everybody,
I was wondering why there is no 1 argument version of conj and disj. I
think that would be very convenient. Especially when used in the following
way
(apply conj some-collection collection-of-elements-to-be-conjed)
Currently the above usage would fail for both conj and disj when
Hello all,
I've implemented the levenshtein measure in clojure and am quite happy
with it except that I run into stack overflows if I hand over long
strings. My current solution looks like this:
-- snip start --
(declare levenshtein-rec)
(declare change-cost)
(defn levenshtein
"Compute Levenshte
Hi,
On 22 Mrz., 06:44, Martin Blais wrote:
> > Why does a synchronuous version break less than an async one? And
> > besides: it's good enough for a lot of users, but it is not good
> > enough for me.
>
> Why does Slime with Clojure-1.3 not work right now?
I think, I understand now. I got a mis
27 matches
Mail list logo