Re: Code layout

2013-12-11 Thread Cedric Greevey
On Wed, Dec 11, 2013 at 2:00 AM, Mark Engelberg mark.engelb...@gmail.comwrote: Put as much as is legible on one line. If you need to break lines, break after the function name, not after the first parameter, in order to minimize rightward drift. I've always preferred (map foo coll1

Re: Big Excel (xlsx) file parsing (docjure, incanter...)

2013-12-11 Thread Ragnar Dahlén
Have you tried increasing the heap size of your JVM using the -Xmx and -Xms options? We're loading some spreadsheets that are 80M in size and have to run with a ~1.5G heap to handle this... On Saturday, 7 September 2013 02:22:27 UTC+1, Stanislav Sobolev wrote: Hello guys. I have excel file

Re: type hinting overloaded methods

2013-12-11 Thread Mikera
You can't really avoid the instance checks: the underlying mechanic is that the JVM needs to figure out somehow at runtime which overloaded method version to call, since all it knows at compile time is that it has an arbitrary Object. instance? is the simplest way to do this. There are some

Re: type hinting overloaded methods

2013-12-11 Thread Philipp Meier
Hi, Am Mittwoch, 11. Dezember 2013 14:27:01 UTC+1 schrieb Mikera: You can't really avoid the instance checks: the underlying mechanic is that the JVM needs to figure out somehow at runtime which overloaded method version to call, since all it knows at compile time is that it has an

Re: type hinting overloaded methods

2013-12-11 Thread Mikera
On Wednesday, 11 December 2013 13:37:24 UTC, Philipp Meier wrote: Hi, Am Mittwoch, 11. Dezember 2013 14:27:01 UTC+1 schrieb Mikera: You can't really avoid the instance checks: the underlying mechanic is that the JVM needs to figure out somehow at runtime which overloaded method version

Re: type hinting overloaded methods

2013-12-11 Thread Phillip Lord
Mikera mike.r.anderson...@gmail.com writes: On Wednesday, 11 December 2013 13:37:24 UTC, Philipp Meier wrote: Implementing a clojure protocol will give you fast dispatch on the first argument's type. Very true... it's a tradeoff: - protocols allow open extension (which doesn't appear to

Re: Clojure can't import some Java classes

2013-12-11 Thread Robin Heggelund Hansen
Is this something that is fixable? -- -- 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 new members are moderated - please be patient with your first post. To

Re: type hinting overloaded methods

2013-12-11 Thread Mikera
On Wednesday, 11 December 2013 14:50:36 UTC, Phillip Lord wrote: Mikera mike.r.an...@gmail.com javascript: writes: On Wednesday, 11 December 2013 13:37:24 UTC, Philipp Meier wrote: Implementing a clojure protocol will give you fast dispatch on the first argument's type. Very

Re: 'neostore' does not contain a store version, please ensure that the original database was shut down in a clean state.

2013-12-11 Thread Wes Freeman
The alternatives to BatchInserter are to just use the normal Java API and batch things up into large transactions--~10k things at a time is probably a good first try. You'll probably get 1/4 to 1/2 of the speed of the batch inserter, but it won't crash unrecoverably, as the journal file will be

type-hinting functions with variable (but known) return types

2013-12-11 Thread Phillip Lord
Sorry, full of questions about type hinting at the moment. I've found myself writing a lot of expressions like this: ^[Lorg.semanticweb.owlapi.model.OWLClassExpression; (into-array OWLClassExpression [(ensure-class o name) (ensure-class o disjoint)])

Re: type hinting overloaded methods

2013-12-11 Thread Phillip Lord
Mikera mike.r.anderson...@gmail.com writes: On Wednesday, 11 December 2013 14:50:36 UTC, Phillip Lord wrote: Macros that generate type hints can get pretty ugly. Yes, I notice that! I ran into the same problem with vectorz-clj The following pattern ended up working for me: the trick to to

Re: 'neostore' does not contain a store version, please ensure that the original database was shut down in a clean state.

2013-12-11 Thread Joseph Guhlin
I just want to fully agree with Wes, don't run this from eclipse. I get best performance from Neo4j batch inserter by compiling it and then running it from the jar, as opposed to lein run. Definitely check your heap to the JVM and to the batchinserter initialization, as they are separate and

Re: T-shirts?

2013-12-11 Thread Aaron Brooks
Out of curiosity, who is behind ClojureAppreciationhttp://www.zazzle.com/gifts?ch=clojureappreciation? (i.e Who gets the ~21% markup?) If this is Rich and/or Tom, I'm more than glad to pay $37 for a t-shirt. If it's a for-profit entity (such as Cognitect), I think the price is a bit extravagant

[ANN] introduction to opencv development with clojure

2013-12-11 Thread Mimmo Cosenza
Hi all, I'm happy to announce that a first tutorial on introducing OpenCV development with clojure has been just merged in the official 2.4 documentation branch https://github.com/Itseez/opencv/blob/2.4/doc/tutorials/introduction/clojure_dev_intro/clojure_dev_intro.rst It's only the a very

Re: type-hinting functions with variable (but known) return types

2013-12-11 Thread Cedric Greevey
The only thing I can think of off the top of my head is to write a hinted-array macro that turns (hinted-array Class expr) into ^Class (into-array Class expr). Emitting type hints or other form metadata in macros is do-able, but sometimes a bit tricky. Something like this might work (untested):

Re: implementing arithmetic operators without using [+ - * / even? odd? inc dec]

2013-12-11 Thread u1204
Implement the nand function, simulate registers using nand, and you can do anything since nand is universal. Or, if you really want to get primitive write a turing tape processor. Pain all the way down :-) Tim Daly -- -- You received this message because you are subscribed to the Google Groups

Re: [Job spam] Write Clojure in your pajamas, for decent money in a pleasant company, remote pairing all the time

2013-12-11 Thread Alexey Verkhovsky
A couple of updates on things that were discussed earlier. 1. Thanks to this thread we are now talking to quite a few awesome people from North America. So, not everyone able and willing to write Clojure on the day job has this wish fulfilled, after all :) 2. We are not doing H1Bs/relocations

Re: [ANN] introduction to opencv development with clojure

2013-12-11 Thread Colin Fleming
Congratulations Mimmo, that's great news. I'd like to play with OpenCV at some point, I'll definitely use this if/when I do. And yes, I totally agree - Seesaw is the gold standard with lib wrapping IMO, it's a fantastic piece of work. Cheers, Colin On 12 December 2013 08:00, Mimmo Cosenza

Should I be using deftype, gen-class or defrecord instead of this hack?

2013-12-11 Thread Tim
As an experiment, I've written a DSL that generates database queries using *effectively* only the data. The query logic is derived from the data assemblance and choice of data structures (or types). I am at the stage where I have all the logic working, and I am now moving into perf testing and

Re: loop/recur with multiple branches

2013-12-11 Thread Vincent Chen
On Tue, Dec 10, 2013 at 11:46 PM, Cedric Greevey cgree...@gmail.com wrote: On Tue, Dec 10, 2013 at 6:29 PM, Vincent Chen noodle...@gmail.com wrote: Try this (not tested, might be missing parens and whatnot): (defn slice [x s n] (loop [[h tail] x, s s, n n, acc []] (cond (zero?

[ANN] A post on CLJS DOM manipulation libraries

2013-12-11 Thread Dave Della Costa
Hi folks, Albeit a little later than I'd hoped, I've written a post giving a high-level overview of the DOM manipulation/Event handling libraries available in ClojureScript at the present time: http://davedellacosta.com/cljs-dom-survey It's aimed at beginners in ClojureScript, for the most