Re: Duplicate key exception reading map that was written to a file

2015-11-25 Thread Dave Kincaid
I'm using the excellent abracad library :refer'd as avro. On Wednesday, November 25, 2015 at 10:40:53 PM UTC-6, Dave Kincaid wrote: > > The question marks are actual question marks. I'm not sure how to find the > "duplicate" keys in the map in memory. As far as

Re: Duplicate key exception reading map that was written to a file

2015-11-25 Thread Dave Kincaid
question > marks a particular character? > > If you can find the similar strings in memory, before they are written, > call: > (map int the-string) > To see the actual unicode characters for the question marks. > > On Wednesday, November 25, 2015 at 11:07:34 PM UTC-5, Dave Kin

Re: Duplicate key exception reading map that was written to a file

2015-11-25 Thread Dave Kincaid
The number of keys in the map is 8,054,160. On Wednesday, November 25, 2015 at 10:04:11 PM UTC-6, Dave Kincaid wrote: > > I have something very strange going on when I try to write a map out to a > file and read it back in. It's a perfectly fine hash-map with ? > key/value

Duplicate key exception reading map that was written to a file

2015-11-25 Thread Dave Kincaid
I have something very strange going on when I try to write a map out to a file and read it back in. It's a perfectly fine hash-map with ? key/values (so it's pretty big). When I write the map out to a file using (spit "/tmp/mednotes6153968756847768349/repl-write.edn" (pr-str phrases)) and t

Re: Creating multi-module projects with dependencies between modules

2014-03-17 Thread Dave Kincaid
gt; Hi Dave, > > Inter-module deps should be supported by lein-modules. I have plenty of > them in the immutant source tree. The test-resources dir in the > lein-modules source has some examples of parent/child/sibling deps, but > they're pretty contrived. If you can descr

Creating multi-module projects with dependencies between modules

2014-03-17 Thread Dave Kincaid
I'm trying to create a project with multiple modules where there are some dependencies between modules. So far I've tried out lein-sub and lein-modules but neither one seems to handle inter-module dependencies (either that or I just can't figure out how to do it). What are people using for proj

Re: what does "defserverfn" mean?

2013-10-10 Thread Dave Kincaid
Indeed. You will find the defserverfn macro definition in backtype.storm.daemon.common.clj. - Dave On Thursday, October 10, 2013 2:27:38 AM UTC-5, Chris Ford wrote: > > Hi, > > Clojure allows the creation of macros, which means that developers can > define new things that look like the keywords

Re: Help deciphering ArityException message

2013-06-30 Thread Dave Kincaid
Thanks, Stefan. That sounds like good advice. Dave On Sunday, June 30, 2013 5:09:23 AM UTC-5, Stefan Kamphausen wrote: > > Just a little hint which may help you in the future. > > First, note the trailing $fn in reformat-headers$fn which tells you, that > your problem is with an anonymous functi

Re: UnreadableForm exception trying to read an EDN file

2013-06-29 Thread Dave Kincaid
s` - > http://clojuredocs.org/clojure_core/clojure.core/print-method ~BG > > On Sun, Jun 30, 2013 at 7:18 AM, Dave Kincaid > > > wrote: > > Hmm. No, it doesn't. This is what I get with pprint by itself: > > > > :headers {"pluginKey

Re: UnreadableForm exception trying to read an EDN file

2013-06-29 Thread Dave Kincaid
tension is not working though... ~BG > > On Sun, Jun 30, 2013 at 7:18 AM, Dave Kincaid > > > wrote: > > Hmm. No, it doesn't. This is what I get with pprint by itself: > > > > :headers {"pluginKey" #} > > > > with your v

Re: UnreadableForm exception trying to read an EDN file

2013-06-29 Thread Dave Kincaid
payan Ghose wrote: > > This form, by the way is readable. Not sure why the print-dup > extension is not working though... ~BG > > On Sun, Jun 30, 2013 at 7:18 AM, Dave Kincaid > > > wrote: > > Hmm. No, it doesn't. This is what I get with pprint b

Re: UnreadableForm exception trying to read an EDN file

2013-06-29 Thread Dave Kincaid
t-messages > "Write out the messages in the given seq." > [messages dest] > (binding [*print-dup* true] > (pprint > (for [[metadata ^bytes payload] messages] >{:header metadata :payload (String. payload)}) > dest))) > > ~

Re: Help deciphering ArityException message

2013-06-29 Thread Dave Kincaid
note the destructuring. > > The problem is, the lambda inside the map is expecting two args but is > getting one arg (which is a two element sequence) instead. > > Hope that helps. > > ~BG > > > > On Sun, Jun 30, 2013 at 6:49 AM, Dave Kincaid > >

Re: UnreadableForm exception trying to read an EDN file

2013-06-29 Thread Dave Kincaid
:14:49 PM UTC-5, Baishampayan Ghose wrote: > > Adding a method to the `print-dup` multimethod that dispatches on > ByteArrayLongString should help. See here for an example - > http://clojuredocs.org/clojure_core/clojure.core/print-dup ~BG > > On Sun, Jun 30, 2013 at 5:47 AM, Dav

Re: Help deciphering ArityException message

2013-06-29 Thread Dave Kincaid
ause problems. Does using the (fn ...) form help? ~BG > > On Sun, Jun 30, 2013 at 5:39 AM, Dave Kincaid > > > wrote: > > Could someone help me decipher the ArityException I'm getting. It's not > > making sense to me. First here is the exception: > >

UnreadableForm exception trying to read an EDN file

2013-06-29 Thread Dave Kincaid
I'm using pprint to write out a map to a file then trying to read it back in using clojure.edn/read (I also get the same error using read). Here is the output (it's a map that was created by the Langohr rabbitmq library): {:header {:timestamp #inst "2058-04-07T17:56:17.000-00:00", :delivery

Help deciphering ArityException message

2013-06-29 Thread Dave Kincaid
Could someone help me decipher the ArityException I'm getting. It's not making sense to me. First here is the exception: ArityException Wrong number of args (1) passed to: lastN$reformat-headers$fn clojure.lang.AFn.throwArity (AFn.java:437) and here is the function reformat-headers: (defn ref

Re: [ANN] lein-pedantic is now deprecated

2013-05-29 Thread Dave Kincaid
I am definitely interested in that. I've been using lein-pedantic all the time. It's helped immensely. On Wednesday, May 29, 2013 8:25:22 PM UTC-5, Nelson Morris wrote: > > Good news everybody! As of leiningen 2.2.0 using `lein deps :tree` will > perform version checks and version range detectio

Re: Strange exception intializing clojure.core using Spring-Hadoop

2013-05-17 Thread Dave Kincaid
at clojure.lang.AFn.invoke(AFn.java:39) at clojure.lang.Var.invoke(Var.java:415) at clojure.lang.RT.doInit(RT.java:460) at clojure.lang.RT.(RT.java:329) does that give anyone an idea? On Thursday, May 16, 2013 7:53:27 PM UTC-5, Dave Kincaid wrote: > > I'm posting this here in hopes th

Strange exception intializing clojure.core using Spring-Hadoop

2013-05-16 Thread Dave Kincaid
I'm posting this here in hopes that someone might be able to steer us in the right direction. We have a Cascalog process that we're using Spring-Hadoop & Spring-Batch to send to a remote Hadoop cluster. It seems as though Spring-Hadoop is doing something funky with the classpath/classloader and

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Dave Kincaid
it would work). But I still wasn't able to get Midje working due some assumptions about Leiningen. On Wednesday, May 15, 2013 8:13:19 AM UTC-5, Laurent PETIT wrote: > > 2013/5/15 Dave Kincaid >: > > As long as we remember that not everyone is using Leiningen and/or > Mave

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Dave Kincaid
existing > library, than spend 20 minutes creating my own duplicate of that work. > > I hope this doesn't come over as too accusatory, if the cost of > dependencies truly is higher than the cost of duplicating work/code then > perhaps we need to try and make the former easier. &g

Re: Utility libraries and dependency hygiene

2013-05-14 Thread Dave Kincaid
This thread seems to have gotten way off track and I think that Stuart made a very important point in the original post that's getting lost. It would help all of us out if library authors stopped making their libraries dependent on 10+ other libraries. This issue does have the potential to real

Re: Utility libraries and dependency hygiene

2013-05-12 Thread Dave Kincaid
Thanks for this, Stuart. I hope it's not too late. As one who has spent the last couple weeks spinning up a new project that uses its own local Ivy repository I've been feeling this pain first hand. The number of dependencies I have had to add just for a few Clojure libraries has been quite pai

Quick question on protocols

2013-05-09 Thread Dave Kincaid
I've not worked with protocols much, but saw a good fit recently. However, I'm a little bit unsure about this situation. I have some Thrift objects that I'd like to be able to easily unpack into maps, so I created a protocol (defprotocol Unpackable (unpack [x])) Thrift has two main data types

Re: Refactoring tools

2013-03-20 Thread Dave Kincaid
recently, but I used to use > https://github.com/joodie/clojure-refactoring. > > -- > '(Devin Walters) > Sent from my Motorola RAZR V3 (Matte Black) > > On Wednesday, March 20, 2013 at 8:05 PM, Dave Kincaid wrote: > > I'm wondering if there are any refact

Refactoring tools

2013-03-20 Thread Dave Kincaid
I'm wondering if there are any refactoring tools around for working with Clojure projects in Emacs. There seems to be all kinds of other tools except for refactoring. I'm really looking for simple things like ways to easily rename variables, functions, namespaces, etc. That seems to be the most

Re: What's the point of -> ?

2013-03-12 Thread Dave Kincaid
Before long Clojure will have as much ugly, arcane syntax as Scala. (I say that mostly tongue in cheek, btw). For me, a lot of the attractiveness of Lisp languages is the minimal syntax that they have. I'm not a fan of adding more to Clojure than is already there. I'm just one voice and a very

Re: What's the point of -> ?

2013-03-11 Thread Dave Kincaid
I'm with you. I don't like it personally. Every time I come across it reading code I have to stop and think about what exactly it does. On Monday, March 11, 2013 10:00:13 AM UTC-5, edw...@kenworthy.info wrote: > > But to understand the first you have to expand it into the second- which > means u

Re: Clojure 1.5 print-table, org-mode babel, and org-mode HTML gen

2013-03-05 Thread Dave Kincaid
Comments in your .emacs file? That's blasphemy! On Tuesday, March 5, 2013 6:37:29 AM UTC-6, greg r wrote: > > I think I was wrong about the extra elisp code required for nrepl to > evaluate babel Clojure code blocks. This was from last year: > > > https://groups.google.com/forum/?fromgroups=#!se

Re: Interop question concerning optional args

2012-12-10 Thread Dave Kincaid
I just came across this same problem while trying to use Java 7's java.nio.file.Files.createTempDirectory() (http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createTempDirectory(java.lang.String, java.nio.file.attribute.FileAttribute...)) Clojure won't let me just do (java.nio

How to represent trees for use with zippers

2012-10-15 Thread Dave Kincaid
I stumbled across the clojure.zip library today which looks extremely useful for working with trees. The only problem is I can't figure out how to represent a tree as a vector so that the zipper will have the correct structure. For example say I want to work with this tree:

Re: Clojure lazy-seq over Java iterative code

2012-09-14 Thread Dave Kincaid
Still puzzling over that one. On Friday, September 14, 2012 11:48:23 AM UTC-5, Sean Corfield wrote: > > On Fri, Sep 14, 2012 at 8:37 AM, Dave Kincaid > > > wrote: > > I also posted this to StackOverflow, so sorry if you saw it there too. > If > > you w

Clojure lazy-seq over Java iterative code

2012-09-14 Thread Dave Kincaid
I also posted this to StackOverflow, so sorry if you saw it there too. If you want some rep points over there you can answer there too ( http://stackoverflow.com/questions/12427518/clojure-lazy-seq-over-java-iterative-code ). I'm trying to use create a Clojure seq from some iterative Java libra

Re: Handling setting different "profiles" between different environments

2012-08-14 Thread Dave Kincaid
Thanks, Sean. I really like that approach. I wasn't even aware of the delay macro. Very cool. So much awesome stuff in Clojure I feel like I'll never learn it all. On Tuesday, August 14, 2012 8:33:49 PM UTC-5, Sean Corfield wrote: > > On Tue, Aug 14, 2012 at 5:49

Handling setting different "profiles" between different environments

2012-08-14 Thread Dave Kincaid
Being new to functional programming and Lisp in particular there is something that's been bugging me for a while. How do people handle having different configurations during development for development, testing and production? For example, things like data sources, server names, etc are often d

Re: meta-questions - [clojure] in front of Subject line

2012-06-18 Thread Dave Kincaid
Seems like a great enhancement that Google could make. Give each subscriber this as an option. Then each of us can choose whether to add this or not to messages we see. Personally, I only read these groups on the web and seeing [clojure] in the subject of every message would be really annoying.

Re: Classpath problem compiling or executing in emacs

2012-06-17 Thread Dave Kincaid
7 PM UTC-5, Sean Corfield wrote: > > What's in your project.clj file? > > On Sat, Jun 16, 2012 at 1:19 PM, Dave Kincaid > wrote: > > I'm still having a hard time understanding how namespaces work > apparently. I > > have a project that has two Clojure s

Re: Classpath set by lein swank or clojure-jack-in

2012-06-16 Thread Dave Kincaid
Thank you, Carlo! That was it! I'm using Leingingen 2. It's working great now. Dave On Saturday, June 16, 2012 8:34:08 PM UTC-5, Carlo wrote: > > On Sat, Jun 16, 2012 at 10:10 AM, Dave Kincaid > wrote: > > Sure can. Here is the project.clj: > >

Classpath problem compiling or executing in emacs

2012-06-16 Thread Dave Kincaid
I'm still having a hard time understanding how namespaces work apparently. I have a project that has two Clojure source files called core.clj and generator.clj. Both files are in the same directory, src/main/clj. In core.clj I have this: (ns core (:use [cascalog.playground] [generato

Re: Classpath set by lein swank or clojure-jack-in

2012-06-15 Thread Dave Kincaid
sspath set by lein swank or clojure-jack-in > > Have you tried visiting the project.clj file in Emacs and then doing > M-x clojure-jack-in ? That should start lein swank in the project > directory and pull in all the dependencies as expected. > > (you should start lein swank i

Re: Classpath set by lein swank or clojure-jack-in

2012-06-15 Thread Dave Kincaid
ong? On Friday, June 15, 2012 6:26:02 PM UTC-5, Moritz Ulrich wrote: > > That's strange. You usually just run lein swank in the folder with you > project.clj. Nothing to do wrong there. > > Can you show the project.clj and the directory structure of a non-working > projec

Re: Classpath set by lein swank or clojure-jack-in

2012-06-15 Thread Dave Kincaid
saved in the > file. > > I don't want to write anything *other* than clojure because it's such a > beautiful and effective experience. > -- > *From: * Dave Kincaid > *Sender: * clojure@googlegroups.com > *Date: *Fri, 15 Jun 201

Classpath set by lein swank or clojure-jack-in

2012-06-15 Thread Dave Kincaid
One of the things that really been holding me back from moving ahead with Clojure is the difficulty I have running code that I'm writing using a repl. I generally use Emacs to code Clojure and I really don't understand how the classpath gets set when I use either "lein swank + slime-connect" or