Looks like that was a success. Thanks for the help!
On Fri, Oct 25, 2013 at 11:26 AM, Mark Tomko wrote:
> Thanks Sean. I'll give it a try!
>
>
>
>
> On Fri, Oct 25, 2013 at 11:21 AM, Sean Corfield wrote:
>
>> Second bug in your code: (delete-scores-for-column
Thanks Sean. I'll give it a try!
On Fri, Oct 25, 2013 at 11:21 AM, Sean Corfield wrote:
> Second bug in your code: (delete-scores-for-column db cid)
>
> Should be: (delete-scores-for-column t cid)
>
> Sorry I didn't see that (additional) bug first time around when I
> suggested removing :trans
Even so, what do you do when you're using someone else's code as a library?
On Mon, May 13, 2013 at 10:42 AM, Meikel Brandmeyer (kotarak)
wrote:
> Hi,
>
> Am Montag, 13. Mai 2013 16:16:36 UTC+2 schrieb Mark:
>>
>> That's a fair point, but do you always know that what you've gotten back
>> is a s
I definitely agree that nomenclature is often one of the hardest things to
handle well. I'm actually a professional software engineer in real life,
but I don't get to use Clojure at work. I suppose the names I suggested
were uninspired partially because I only get a few minutes at a time to
work on
I agree with you in principle, but I suspect that the answer is
deliberately delegated to Java's definition of letter or number.
Mark
On Mar 2, 3:17 am, Michael Wood wrote:
> On 2 March 2010 00:24, Joost wrote:
>
> > On 1 mrt, 23:02, Michael Wood wrote:
> >> I don't know if the following's "al
I'd suggest allocating more heap than the default JVM settings, or
running the JVM in server mode. I'm not sure what Haskell's
underlying implementation is, but I'd assume that it can grow its heap
(somewhat) arbitrarily, which the JVM cannot, beyond a fixed bound.
On Feb 23, 12:51 am, "Edward Z.
I'd suggest checking your JVM memory settings. The Haskell
implementation may allow the heap to grow arbitrarily, but the default
JVM heap size is very limited, which may result in poor memory
performance.
On Feb 23, 12:51 am, "Edward Z. Yang" wrote:
> I'd first like to state that I went into th
Oh, man. I just moved from Seattle to Boston in December, and I miss
Zoka's coffee. Have fun, everyone!Maybe we can get some of the
Boston-area Clojure folks to meet up sometime.
On Feb 11, 7:30 pm, Phil Hagelberg wrote:
> On Fri, Feb 5, 2010 at 12:50 PM, Phil Hagelberg wrote:
> > Wow, I c
y into conflict with other imports!). In Clojure,
however, it appears that any class that I want to reference needs to
be fully qualified or explicitly imported into my own namespace.
On Dec 28, 11:09 pm, David Brown wrote:
> On Mon, Dec 28, 2009 at 02:50:59PM -0800, Mark Tomko wrote:
> >
tion: No such namespace: NestedStatics$LevelOne
$LevelTwo (analysis.clj:5)
On Dec 28, 5:48 pm, Mark Tomko wrote:
> This appears to work:
>
> user=> (str org.tomko.konkordans.NestedStatics$LevelOne)
> "class org.tomko.konkordans.NestedStatics$LevelOne"
>
> Is this depend
n wrote:
> On Mon, Dec 28, 2009 at 02:32:48PM -0800, Mark Tomko wrote:
> >user=> (str.org.tomko.konkordans.NestedStatics/LevelOne)
>
> Does
>
> str.org.tomko.konkordans.NestedStatics$LevelOne/ONE
>
> Work?
>
> You can always look in the class output directory tha
Is there a way to reference nested static members of Java classes
using Clojure? I tried a few things and couldn't get it to work. To
simplify the question a bit, I wrote the following Java class:
package org.tomko.konkordans;
public class NestedStatics {
public static String FOO = "foo";
I wrote this implementation of a heap (or priority queue) in pure
Clojure:
http://pastebin.com/m2ab1ad5a
It's probably not of any quality sufficient to be make it to the
contrib package, but it seems to work. Any thoughts on how it might
be improved?
Thanks,
Mark
--
You received this message
ure itself. Python does this and I've always liked it.
>
> Tom
>
> On Dec 9, 5:43 am, Mark Tomko wrote:
>
>
>
> > I second this - since many of the IDE plugins bundle the clojure-1.0
> > jar, new users trying out Clojure (and IDEs) can't use all the
>
I second this - since many of the IDE plugins bundle the clojure-1.0
jar, new users trying out Clojure (and IDEs) can't use all the
features listed in the docs, and it's hard to tell which is which.
Maybe we could at least add a 'added in version' to the new method
metadata?
On Dec 9, 4:48 am, Jar
A priority queue implemented over a heap would be more efficient than
a sorted set, in general. With a heap, you have constant time access
to the smallest (WLOG) element in the heap at all times. Removing it
costs a fixed O(lg n). A sorted set (especially one that's being
modified) isn't necessa
ant... and
> efficient.
>
> hth
>
> Christophe
>
>
>
>
>
> On Fri, Nov 13, 2009 at 7:07 AM, Mark Tomko wrote:
> > Let's try this again:
>
> > (defn swap [coll i j]
> > (if (= i j) coll
> > (let [li (min i j) ui (max i j)]
> &
re-li
(list (nth coll ui))
post-li-pre-ui
(list (nth coll li))
(rest post-li-post-ui)))
The code is actually even more complicated. I'm sure with a little
more time I could clean it up.
On Nov 12, 9:59 pm, Mark Tomko wrote:
> Oh, I po
Oh, I posted too soon. My implementation has a bug.
On Nov 12, 9:56 pm, Mark Tomko wrote:
> I came up with a way to do it, but I'm sure there's a simpler way.
> Here's what I have:
>
> (defn swap [coll i j]
> (let [li (min i j) ui (max i j)]
> (let [[
I came up with a way to do it, but I'm sure there's a simpler way.
Here's what I have:
(defn swap [coll i j]
(let [li (min i j) ui (max i j)]
(let [[pre-li post-li] (split-at li coll)]
(let [[post-li-pre-ui post-li-post-ui] (split-at (- ui 1) (rest
post-li))]
(concat
p
(count (matching-elements
coll1 coll2)))
This was partially for my own debugging purposes, so I could see what
things were being counted.
On Oct 14, 12:23 am, John Harrop wrote:
> On Wed, Oct 14, 2009 at 2:06 AM, Mark Tomko wrote:
>
> > This is basically a problem of parallel iterati
This is basically a problem of parallel iteration. I've devised 2
solutions, one is recursive (alas, not tail-recursive) and the other
appears to be a more idiomatic Clojure solution. Can someone suggest
a more efficient or cleaner solution?
Here's the "literal" solution:
(defn matching-elemen
Of course. I'm not sure what I was thinking. Thank you.
On Oct 9, 7:47 pm, Shawn Hoover wrote:
> On Fri, Oct 9, 2009 at 10:37 PM, Mark Tomko wrote:
> > ; a returns a new similarity function that applies the provided
> > transform function
> > ; before compa
Okay, I'm flummoxed. Given the following definition:
(defn make-n-gram-fn [n]
(fn [coll] (map vec (partition n 1 coll
I can do this:
(def bi-gram (make-n-gram-fn 2))
(bi-gram "abc")
([\a \b] [\b \c])
But, if I add the following:
; counts the number of indexes in a pair of collections
Can you give some more context?
On Oct 8, 6:38 am, kunjaan wrote:
> java.lang.ClassFormatError: Unknown constant tag 52 in class file
> queries__init (Trial.clj:0)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clo
This is pretty much what I'd had in mind. I don't see how the text of
the Exception is set by the macro, but it'd be really spectacular if
the message were more clear. Is that message coming from the defvar
form?
On Oct 6, 6:14 pm, "Stephen C. Gilardi" wrote:
> On Oct 2, 2009, at 10:29 AM, Mar
To be explicit, the doall needs to be before the call to recur (that
is, it affects the map). Is that right?
On Oct 5, 1:31 am, Meikel Brandmeyer wrote:
> Hi,
>
> On Oct 5, 9:50 am, Volkan YAZICI wrote:
>
> > > (defn leak []
> > > (loop [v [0 0]]
> > > (recur (map + v [1 1]
>
> > >
That's what I meant when I mentioned the 'binding' form above. The
reason that's okay (to me) is that it explicitly calls out that
bindings may be about to change.
On Oct 2, 11:47 am, John Newman wrote:
> Also, I'm not sure if your understanding of "binding" is correct.
>
> because within any l
When I write code in Java, I declare everything final that's possible
to be declared final, and I deliberately look for solutions that avoid
reassignment to variables, so all my variables are final).
I'm new to Clojure, so I might be wrong, but it seems that within a
function, mutable bindings mu
29 matches
Mail list logo