Re: Version of netbeans with extra Clojure and Polyglot Maven/Leiningen support ...

2010-04-11 Thread Antony Blakey
On 12/04/2010, at 3:42 PM, mac wrote: > Yes, this is very interesting and I would love to try it. > Since I do most of my programming on a mac, a .dmg file would work > fine for me. OK, I'll setup a download site with the .app for Mac users and the patches against release68_fixes for anyone els

Re: Version of netbeans with extra Clojure and Polyglot Maven/Leiningen support ...

2010-04-11 Thread mac
Yes, this is very interesting and I would love to try it. Since I do most of my programming on a mac, a .dmg file would work fine for me. On 9 Apr, 16:18, Antony Blakey wrote: > I have a private build of Netbeans that adds the following features to the > maven support: > > 1. In the project vie

Re: re-arranging sub-partitions

2010-04-11 Thread ataggart
Or a more generic way: (defn bar [n m coll] (when-let [s (seq coll)] (let [a (take n s) b (take m (drop n s))] (concat b a (bar n m (drop (+ n m) s)) On Apr 11, 4:23 pm, ataggart wrote: > How about: > > (defn foo [coll] >   (apply concat >     (map (fn [[a b c d]] [c d a b]) >  

Re: re-arranging sub-partitions

2010-04-11 Thread ataggart
How about: (defn foo [coll] (apply concat (map (fn [[a b c d]] [c d a b]) (partition 4 coll On Apr 11, 3:25 pm, Glen Rubin wrote: > I am working with a collection of sequences ...(e.g. > coll: > ((/f /b /c /4 /5 /6 /3 /6 /f /4 /3 /2 /4 /5 /7 /3 /6...) (/2 /b /c /4 / > 2 / > 6 /3

Re: My non-ELPA Emacs swank-clojure setup

2010-04-11 Thread Constantine Vetoshev
This thread encouraged me to post what I did to make swank-clojure 1.1.0 work with the the latest SLIME. It does not use any of swank- clojure's automatic .jar downloading features (as of version 1.1.0). These instructions won't work on Windows, but may work if you have Cygwin. Note that this sets

re-arranging sub-partitions

2010-04-11 Thread Glen Rubin
I am working with a collection of sequences ...(e.g. coll: ((/f /b /c /4 /5 /6 /3 /6 /f /4 /3 /2 /4 /5 /7 /3 /6...) (/2 /b /c /4 / 2 / 6 /3 /7 /f /4 /3 /2 /4 /5 /7 /3 /6...)...) I want to rearange the sequence into groups of 4 where the later 2 elements are moved to the front for example: (/f /b

Re: My non-ELPA Emacs swank-clojure setup

2010-04-11 Thread Constantine Vetoshev
On Apr 8, 12:45 pm, Ævar Arnfjörð Bjarmason wrote: > If I have 10 Clojure projects I'm going to have 10 src/clojure.jar > files. Do they really need to be there or could I just use the clojure > that comes with my operating system (Debian)? > > When I hack Common Lisp I don't copy sbcl into all my

Re: How to hide data representation with keywords for deftype accessor?

2010-04-11 Thread Laurent PETIT
I would like to add another idea right out of my head: When you say you want to "hide from client code", juxtaposed to the notion of "(def)type", a little warning manifests itself in my head, because as far as I understand them, types are there to provide polymorphic implementations for protocols.

Re: "Introduction to Monads in Clojure" tech talk

2010-04-11 Thread alux
Thank you! Nice step by step intro. Regards, alux On 9 Apr., 06:04, "Mike T. Miller" wrote: > Adam Smyczek's "Introduction to Monads" video is now available. > > http://www.youtube.com/user/LinkedInTechTalks?feature=mhw5#p/u/0/ObR3... > > I'll work on getting an HD version up Friday. > > -mike

Re: (apply partition coll1 coll2 ...)

2010-04-11 Thread Douglas Philips
On 2010 Apr 11, at 1:28 PM, Glen Rubin wrote: I am working with a collection of sequences ...(e.g. coll: ((/f /b /c /4 /5 /6 /3 /6 /f /4 /3 /2 /4 /5 /7 /3 /6) (/2 /b /c /4 / 2 / 6 /3 /7 /f /4 /3 /2 /4 /5 /7 /3 /6)...) I want to partition the sequences into groups of 4, but when I try the fo

(apply partition coll1 coll2 ...)

2010-04-11 Thread Glen Rubin
I am working with a collection of sequences ...(e.g. coll: ((/f /b /c /4 /5 /6 /3 /6 /f /4 /3 /2 /4 /5 /7 /3 /6) (/2 /b /c /4 /2 / 6 /3 /7 /f /4 /3 /2 /4 /5 /7 /3 /6)...) I want to partition the sequences into groups of 4, but when I try the following or something similar it fails saying either p

Re: Haskell-style list functions

2010-04-11 Thread Steve Purcell
On 10 Apr 2010, at 08:46, Yuto Hayamizu wrote: > Hi, all > > I want some list functions in Haskell like mapAccumL in > clojure.contrib, because some sequence operations are difficult with > only functions in clojure.core and contrib. > > Think about writing a function 'accum-seq', which takes a

Re: How to separate code into different files

2010-04-11 Thread Nurullah Akkaya
Assuming you have the following file structure, src/ src/tubes/ src/tubes/core.clj src/tubes/download.clj src/tubes/plugins/a.clj Now to use plugin a from core, (ns tubes.core (:use :reload-all tubes.plugins.a)) or to use download module from within plugin a, (ns tubes.plugin.a (:use :rel

Re: How do I call Foo.class?

2010-04-11 Thread Nurullah Akkaya
For analytics code which expects a call in Java like the following, AccountFeed accountFeed = analyticsService.getFeed(queryUrl, AccountFeed.class); I had to do this, (defn get-class [class] (Class/forName (str "com.google.gdata.data.analytics." class))) Class/forName will return a ja

How to separate code into different files

2010-04-11 Thread -r
Hi all, I am a total newbie to Clojure. This is just my second day. I was wondering how you split code into different files and use them in clojure. For example if i have 2 folders dir1 and dir2 and dir1 has file1.clj and dir 2 has file2.clj, how to call a function in file2 from file1. How to loa

Haskell-style list functions

2010-04-11 Thread Yuto Hayamizu
Hi, all I want some list functions in Haskell like mapAccumL in clojure.contrib, because some sequence operations are difficult with only functions in clojure.core and contrib. Think about writing a function 'accum-seq', which takes a sequence of numbers, and returns a sequence of numbers. Each e

Re: My non-ELPA Emacs swank-clojure setup

2010-04-11 Thread Brian Troutwine
Speaking as a newbie, playing nice with ~/.clojure would be great, giving a more helpful error message would be better. I suffered the same FileNotFoundException given above, nuked ~/.clojure and got going quickly enough. I didn't know _what_ was wrong, however, as I had only stumbled across the so

Re: How do I call Foo.class?

2010-04-11 Thread Lars Nilsson
On Fri, Apr 9, 2010 at 11:31 AM, dknesek wrote: > How do I invoke Foo.class in Clojure? > > Specifically, I'm trying to convert this (working) Java to Clojure. > > service.getEntry(new URL(entryUrl), PortfolioEntry.class); > > When I do this: > > (def entry-url-str (str base-url portfolio-feed-url

Re: How to hide data representation with keywords for deftype accessor?

2010-04-11 Thread B Smith-Mannschott
On Sun, Apr 11, 2010 at 06:39, Sophie wrote: > (deftype A [x]) gives me an accessor (:x anA) > > Then I decide to change data representation of A without impacting > client code, but I don't seem able to define a function > (defn :x [anA] ...) > > Should I be doing something different? It's not d

Re: How to hide data representation with keywords for deftype accessor?

2010-04-11 Thread Konrad Hinsen
Sophie a écrit : (deftype A [x]) gives me an accessor (:x anA) Then I decide to change data representation of A without impacting client code, but I don't seem able to define a function (defn :x [anA] ...) Should I be doing something different? (:x anA) is not a special accessor function, it