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/values (so

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

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

2015-11-25 Thread Dave Kincaid
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 I can tell there is

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

2015-11-25 Thread Dave Kincaid
> 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 Kincaid wrote: >

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

Re: Creating multi-module projects with dependencies between modules

2014-03-17 Thread Dave Kincaid
what you tried that didn't work, I can try to get you going. Jim On Mon, Mar 17, 2014 at 10:55 PM, Dave Kincaid kincai...@gmail.comjavascript: wrote: 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

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 function.

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

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,

Re: Help deciphering ArityException message

2013-06-29 Thread Dave Kincaid
...) form help? ~BG On Sun, Jun 30, 2013 at 5:39 AM, Dave Kincaid kincai...@gmail.comjavascript: wrote: 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

Re: UnreadableForm exception trying to read an EDN file

2013-06-29 Thread Dave Kincaid
, 2013 8: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, Dave Kincaid kincai

Re: Help deciphering ArityException message

2013-06-29 Thread Dave Kincaid
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 kincai...@gmail.comjavascript: wrote: Here is the whole thing: (defn reformat-headers

Re: UnreadableForm exception trying to read an EDN file

2013-06-29 Thread Dave Kincaid
. [messages dest] (binding [*print-dup* true] (pprint (for [[metadata ^bytes payload] messages] {:header metadata :payload (String. payload)}) dest))) ~BG On Sun, Jun 30, 2013 at 7:05 AM, Dave Kincaid kincai...@gmail.comjavascript: wrote: Thanks! If that works

Re: UnreadableForm exception trying to read an EDN file

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

Re: UnreadableForm exception trying to read an EDN file

2013-06-29 Thread Dave Kincaid
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 kincai...@gmail.comjavascript: 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
://clojuredocs.org/clojure_core/clojure.core/print-method ~BG On Sun, Jun 30, 2013 at 7:18 AM, Dave Kincaid kincai...@gmail.comjavascript: wrote: Hmm. No, it doesn't. This is what I get with pprint by itself: :headers {pluginKey #ByteArrayLongString PLUGIN2} with your version I get

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 detection.

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.clinit(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 that someone

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
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. Glen On Tuesday, 14 May 2013 13:19:15 UTC+1, Dave Kincaid wrote: This thread seems to have gotten way off track and I think that Stuart

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 kincai...@gmail.com javascript:: As long as we remember that not everyone is using Leiningen

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

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

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

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

Re: Refactoring tools

2013-03-20 Thread Dave Kincaid
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 refactoring tools around for working with Clojure projects in Emacs

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

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:

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

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:

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

Re: Clojure lazy-seq over Java iterative code

2012-09-14 Thread Dave Kincaid
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 kincai...@gmail.comjavascript: wrote: 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

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

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 PM, Dave Kincaid kincai

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

Re: Classpath problem compiling or executing in emacs

2012-06-17 Thread Dave Kincaid
, Sean Corfield wrote: What's in your project.clj file? On Sat, Jun 16, 2012 at 1:19 PM, Dave Kincaid kincaid.d...@gmail.com wrote: 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

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]

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 kincaid.d...@gmail.com wrote: Sure can. Here is the project.clj: (defproject swank-test 0.1

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

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

2012-06-15 Thread Dave Kincaid
*other* than clojure because it's such a beautiful and effective experience. -- *From: * Dave Kincaid kincaid.d...@gmail.com *Sender: * clojure@googlegroups.com *Date: *Fri, 15 Jun 2012 14:47:10 -0700 (PDT) *To: *clojure@googlegroups.com *ReplyTo: * clojure

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

2012-06-15 Thread Dave Kincaid
with you project.clj. Nothing to do wrong there. Can you show the project.clj and the directory structure of a non-working project? -- Sent from my mobile Am 16.06.2012 01:07 schrieb Dave Kincaid kincaid.d...@gmail.com: I'm with you, Peter. The problem is I can't get lein swank and slime

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

2012-06-15 Thread Dave Kincaid
, Dave Kincaid kincaid.d...@gmail.com wrote: Sure can. Here is the project.clj: (defproject swank-test 0.1 :source-path src/main/clj :test-path test/clj :java-source-path src/main/java :javac-options {:debug true :fork true} :resources-path src/main/resources