Re: clojure diffs

2013-06-07 Thread Dennis Haupt
intellij can do exactly what you want 2013/6/7 Moocar anthony.mar...@gmail.com Hi all, Diffs for clojure code (and lisps in general) can be hard to read. Every time we wrap a form, any lines below are indented. The resulting diff just shows that you've deleted lines and added lines, even

Re: Core Logic Reference Documentation

2013-06-07 Thread xavriley
I made a fork of clojuredocs for the Overtone project (which is here - http://overtone-docs.herokuapp.com/). I'm happy to try something similar for core.logic if it would be useful. First on my list is getting Clojure 1.4 and 1.5 onto clojuredocs though... If you want to try it yourself, repos

Re: Clojure for Map Reduce (on hadoop 0.22)

2013-06-07 Thread Ramesh
Thanks a lot, Alex. It works for me too. Thanks, ramesh On Mon, Jun 3, 2013 at 4:26 PM, ronen nark...@gmail.com wrote: Iv used Alex version and works great (on that note thank you Alex for keeping it going) Ronen On Wednesday, May 29, 2013 11:45:13 AM UTC+3, Alex Ott wrote: Hi

Re: Why the CLR languages fail?

2013-06-07 Thread Paul Dorman
Hi all, I'm super tired, so apologies if this has already been covered, but I think portability is the main issue. Java is very portable, whereas the CLR is focused on a single platform. Also, most of the innovations in the Clojure space have been built on top of the JVM. Until Clojure reaches

documentation and metadata on var

2013-06-07 Thread Phillip Lord
I have developed a library which places Java objects into clojure vars. This is all working nicely, but I would like to documentation look up to work as normal. I *could* add documentation using the normal metadata facilities, but this is not ideal because the Java object itself contains

Re: Core Logic Reference Documentation

2013-06-07 Thread xavriley
I went ahead and made a start here: http://corelogicdocs.herokuapp.com/ It will probably have a few bugs but it's a start at least. Google Groups seems to be deleting my posts so I'm hoping this gets through. Thanks, On Wednesday, May 29, 2013 6:08:06 PM UTC+1, Benjamin Peter wrote: Hello,

Re: Why the CLR languages fail?

2013-06-07 Thread Mike Chaliy
Visual Studio and all around it is almost the only point why people use CLR. If language does not have VS integration (or integration is basic) there is no point to restrict yourself to CLR and this makes people to go with JVM versions of language as this give more wider options for

Vector is only half associative?

2013-06-07 Thread Robert Ewald
Hello everyone, I found that a vector being associative really enlightening and useful. But merge-with and other functions don't work, even though I think it is not unreasonable to expect that. That is because (seq [1 2 3 4]) is the seq of Long while (seq {0 1, 1 2, 2 3, 3 4}) is a seq of

Re: Core Logic Reference Documentation

2013-06-07 Thread xavriley
In a fit of altruism, I decided to go ahead and do it myself. http://corelogicdocs.herokuapp.com/ This is the result of an hour's work and some find-and-replace so I fully expect it to be broken in all kinds of ways, but it's a start :) On Wednesday, May 29, 2013 6:08:06 PM UTC+1, Benjamin

[job opening] DRW (http://drw.com) is looking for a Sr. Software Engineer - Clojure/JRuby

2013-06-07 Thread Jay Fields
DRW (http://drw.com) is looking for a Sr. Software Engineer - Clojure/JRuby more info: http://drw.submit4jobs.com/index.cfm?fuseaction=83084.viewjobdetailCID=83084JID=149069 My experience working for DRW: http://blog.jayfields.com/2013/04/year-five.html Drop me a line if you want more info.

Re: [job opening] DRW (http://drw.com) is looking for a Sr. Software Engineer - Clojure/JRuby

2013-06-07 Thread Alex Baranosky
Hi Jay, I'm interested in DRW, but am pretty sure the offices are in New York / Chicago right? I'm not sure I could convince my significant other to move away from the Bay Area. I've been working with Runa for a year, have a lot of experience with testing and JVM languages. Github:

Re: clojure diffs

2013-06-07 Thread Alex Baranosky
Thanks for remembering gui-diff Denis :) I actually left it out of my post, having forgotten about it, even though I use it multiple times a day, and couldn't get by without it in my workflow anymore. Best, Alex On Fri, Jun 7, 2013 at 12:47 AM, Dennis Haupt d.haup...@gmail.com wrote: intellij

Re: clojurescript 0.0-1820 release is percolating

2013-06-07 Thread David Nolen
Fixes: - * variadic aset * CLJS-513: fix out bound behavior for vectors * CLJS-515: emit positional factories for deftype * IReduce for primitive arrays and lists Changes: - * CLJS-499: ObjMap deprecated in favor of PersistentArrayMap Enhancements: - * Added

Re: optional first map argument

2013-06-07 Thread Alice
I've modified clojure.core/destructure to support this new binding syntax. https://gist.github.com/doffltmiw/5730721 Here are some tests: (let2 [[(a map?) b] [{:p 1} 2]] [a b]) ;= [{:p1 1} 2] (let2 [[(a map?) b] [2]] [a b]) ;= [nil 2] (let2 [[(a map? {:p default}) b] [2]] [a b]) ;= [{:p

idiot question about macros

2013-06-07 Thread larry google groups
I am very stupid and I am having trouble figuring out how to read this: (defmacro match-func [ body] `(fn [~'x] (match [~'x] ~@body))) ((match-func [q :guard even?] (+ 1 q) [z] (* 7 z)) 33) ;; 231 What? Why 231? The article is here: http://java.dzone.com/articles/my-first-clojure-macro I

How to cleanly interface with a Java lib that requires mutability?

2013-06-07 Thread Denis Labaye
Hi, I'm writting Clojure code that is used by a Java framework (Fitnesse's slim for those who knows). To workflow is like this: Instanciation of a new Java objectf = new Foo()Initialization with settersf.setBar(ze bar)And then call some methodsf.baz() My solution is something like: (ns Foo

Re: How to cleanly interface with a Java lib that requires mutability?

2013-06-07 Thread Gary Trakhman
sounds fun, have you seen this yet? http://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/ On Fri, Jun 7, 2013 at 3:21 PM, Denis Labaye denis.lab...@gmail.com wrote: Hi, I'm writting Clojure code that is used by a Java framework (Fitnesse's slim for

Re: idiot question about macros

2013-06-07 Thread David Pollak
On Fri, Jun 7, 2013 at 11:14 AM, Ben Wolfson wolf...@gmail.com wrote: On Fri, Jun 7, 2013 at 11:09 AM, larry google groups lawrencecloj...@gmail.com wrote: I am very stupid and I am having trouble figuring out how to read this: (defmacro match-func [ body] `(fn [~'x] (match [~'x]

Re: clojure diffs

2013-06-07 Thread Denis Labaye
On Fri, Jun 7, 2013 at 5:13 PM, Alex Baranosky alexander.barano...@gmail.com wrote: Thanks for remembering gui-diff Denis :) You never officially announced it (didn't see anyway). So here it is :-) My most valuable Clojure dev tool (along with clojure.tools/trace. And wait ... Incanter also,

Re: How to cleanly interface with a Java lib that requires mutability?

2013-06-07 Thread Denis Labaye
On Fri, Jun 7, 2013 at 9:28 PM, Gary Trakhman gary.trakh...@gmail.comwrote: sounds fun, have you seen this yet? http://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/ wicked cool thx I'll do this then : (deftype Foo [^{:volatile-mutable true} x]

Re: Best IDE

2013-06-07 Thread Terje Norderhaug
On Thu, Jun 6, 2013 at 6:02 PM, Lee Spector lspec...@hampshire.edu wrote: 8) If you want to become a rock star eternal golden coder's hero then develop an Emacs-like Clojure coding environment for which the features ARE discoverable and for which the learning curve is gentle. This sort of

Re: idiot question about macros

2013-06-07 Thread Ben Wolfson
On Fri, Jun 7, 2013 at 12:30 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Jun 7, 2013 at 11:14 AM, Ben Wolfson wolf...@gmail.com wrote: The macro (which IMO is terrible and shouldn't be emulated) Why do you think the macro is terrible? It's unnecessarily unhygienic:

Re: Why the CLR languages fail?

2013-06-07 Thread James Ashley
On Friday, June 7, 2013 6:45:43 AM UTC-5, Mike Chaliy wrote: Visual Studio and all around it is almost the only point why people use CLR. If language does not have VS integration (or integration is basic) there is no point to restrict yourself to CLR and this makes people to go with JVM

Re: Why the CLR languages fail?

2013-06-07 Thread Raoul Duke
Be that as it may: if you work in a MS-centric company, shifting to JVM clojure is iffy at best. OTOH, convincing people who've never used anything except C# that there are alternatives worth considering is quite an uphill battle. At least one friend over the years has gotten fed up at my

Re: Best IDE

2013-06-07 Thread futile
Before, I used vim for several years. But when I learned Clojure I switched to emacs, and it's really not hard or awkward like I was afraid of. Honestly now I like it much better than vim. And I've found paredit and nrepl.el to be extremely handy, even used together. On Tuesday, January 17,

Re: NullPointerException when creating protocol in macro

2013-06-07 Thread Vincent
Thanks everyone for your answers. I must say I'm quite mystified as to why Stuart's version works. I ended up defining a function that has the same signature as the protocol, and whose first argument wraps a function that contains the appropriate code. Vincent On Wednesday, 5 June 2013

using partial with -

2013-06-07 Thread Matt Smith
Newbie question here. This code: (println (flatten(map first '([1 2] [3 4] [5] (def mapfirst (partial map first)) (println (- '([1 2] [3 4] [5]) mapfirst flatten )) (println (- '([1 2] [3 4] [5]) (partial map first) flatten )) prints out: (1 3 5)

Re: using partial with -

2013-06-07 Thread Jonathan Fischer Friberg
On Fri, Jun 7, 2013 at 11:13 PM, Matt Smith matt.smith...@gmail.com wrote: (- '([1 2] [3 4] [5]) (partial map first) flatten ) Because this becomes (flatten (partial '([1 2] [3 4] [5]) map first)) I think I understand how you thought; (partial map first) becomes a function,

Re: using partial with -

2013-06-07 Thread Neale Swinnerton
On Fri, Jun 7, 2013 at 10:13 PM, Matt Smith matt.smith...@gmail.com wrote: (println (- '([1 2] [3 4] [5]) (partial map first) flatten )) when expanded becomes this: (println (flatten (partial '([1 2] [3 4] [5]) map first))) It looks like what you really want is to

Re: using partial with -

2013-06-07 Thread Matt Smith
Got it. Thanks! On Friday, June 7, 2013 3:29:55 PM UTC-6, Jonathan Fischer Friberg wrote: On Fri, Jun 7, 2013 at 11:13 PM, Matt Smith matt.s...@gmail.comjavascript: wrote: (- '([1 2] [3 4] [5]) (partial map first) flatten ) Because this becomes (flatten (partial '([1

[ANN] 'primitive-math', a library for predictable arithmetic operations

2013-06-07 Thread Zach Tellman
What (+ x y) compiles down is highly dependent on the surrounding context, including but not limited to the local type-hints and the value of *unchecked-math*. Actually verifying that it's calling the primitive, unboxed, easily inlined clojure.lang.Numbers.add(long, long) requires either a

Re: using partial with -

2013-06-07 Thread Алексей Александров
Because (partial map first) return function = (- [[1 2] [3 4] [5]] (partial map first)) #core$partial$fn__3796 clojure.core$partial$fn__3796@1cd14f7 you should call function to get result = (- [[1 2] [3 4] [5]] ((partial map first)) flatten) (1 3 5) 2013/6/8 Matt Smith matt.smith...@gmail.com

Re: Best IDE

2013-06-07 Thread Denis Labaye
*Learning Emacs is more important than learning Clojure.* -- A Clojure fanboy and former Vim user On Fri, Jun 7, 2013 at 10:46 PM, futile sbdegu...@gmail.com wrote: Before, I used vim for several years. But when I learned Clojure I switched to emacs, and it's really not hard or awkward

Re: [ANN] 'primitive-math', a library for predictable arithmetic operations

2013-06-07 Thread Ambrose Bonnaire-Sergeant
FWIW a third option to determine the exact method called is jvm.tools.analyzer: clojure.tools.analyzer= (clojure.pprint/pprint (ast (+ 1 2))) {:op :static-method, :env {:source NO_SOURCE_FILE, :column 29, :line 1, :locals {}, :ns {:name clojure.tools.analyzer}}, :class

Re: Best IDE

2013-06-07 Thread Lee Spector
On Jun 7, 2013, at 4:36 PM, Terje Norderhaug wrote: MCLIDE is alive and well. Although the most recent public build was released last summer, there are open source on github for those that want to participate in the development: https://github.com/TerjeNorderhaug/mclide Thanks Terje

Re: feeding leiningen a local JAR file

2013-06-07 Thread David Williams
Try here http://nakkaya.com/2010/03/16/adding-custom-libraries-into-local-leiningen-repository/ On Wednesday, November 21, 2012 3:47:40 AM UTC-8, Dick Davies wrote: I've got a couple of projects that need a newer version of a JAR than is available in Maven. Is there any support/syntax

with-open and for

2013-06-07 Thread Steven D. Arnold
Hi, I am trying to write a function to extract words from a file that are four characters or more, and nine characters or less. Many words could appear on a single line, so the implementation needs to combine the words from all the lines. I wrote a function to do this, but I am getting an

Re: with-open and for

2013-06-07 Thread Lars Nilsson
On Sat, Jun 8, 2013 at 12:53 AM, Steven D. Arnold thoth.amon.i...@gmail.com wrote: (defn filter-file [] (with-open [rdr (reader /Users/thoth/wordlist.txt)] (flatten (for [line (line-seq rdr)] (filter (and #(= (count %) 9) #(= (count %) 4))