Re: Clojure, Swank, and Leiningen with Emacs on Mac OS X

2011-06-08 Thread Randy J. Ray
The contents of .clojure are not at issue, clojure runs just fine from the
command-line, repl, etc.

My problem is with installing SLIME, clojure-mode, etc. without using
package.el. When I tried it, it failed somewhere in the building/compiling
of clojure-mode.el, and the SLIME package was not complete. Starting with
the ESK is not an option for me, as I have too much invested in my current
emacs configuration.

Currently, I keep my emacs configuration on github, as part of a larger repo
that houses all my dot-files (I really should move the emacs stuff into its
own repo, now that I think about it). So I have no problems with downloading
the packages I need, installing them into my configuration manually, etc. I
don't mind doing things in a slightly harder way than the ESK presents, I
just need to know which versions of things like SLIME I should use (the
SLIME web page only has a download for the latest CVS head version).

Randy

On Tue, Jun 7, 2011 at 6:00 PM, John Toohey j...@parspro.com wrote:

 I have a fully working AquaEmacs/Swank/Slime system under OSX. Can you
 tell me what you tried, and I may be able to help you. To start with,
 what is the content of you ~/.clojure directory?

 On Tue, Jun 7, 2011 at 18:00, Randy J. Ray rj...@blackperl.com wrote:
  I am also having some big problems getting a working set-up under MacOS.
 I
  can't really start with the emacs-starters-kit, as I have a very large
  existing configuration. And Aquamacs doesn't ship SLIME as part of the
  distribution. Mainly, I need to know the best place to get the
 clojure-mode,
  clojure-test-mode, slime and swank-clojure packages. I tried using
  package.el to get some of them, but it bombed out before it completed
  building/installing slime or clojure-mode. I considered getting slime
 from
  their web page, but their only download link is a CVS snapshot, and I
 seem
  to remember reading somewhere that the really-new slime versions had some
  problems.
  Is part of the problem my decision to use Aquamacs? I looked at Carbon
 Emacs
  as well, but that's based on an emacs 22 source base, and I'd prefer to
 work
  from 23 or newer (my Linux desktops are running emacs in the 23 range).
 Do
  people roll their own emacs for clojure development on MacOS?
  Randy
 
  On Fri, May 27, 2011 at 7:40 AM, Sathish Kumar sathish...@gmail.com
 wrote:
 
  Hi,
  This is a step by step guide to setup Leiningen, Swank-Clojure and SLIME
  for  Emacs.
 
  http://languageagnostic.blogspot.com/2011/05/clojure-in-emacs.html
 
  It is partly based on technomancy's post here http://technomancy.us/126
 
  Thanks,
  Sathish
 
  On Wed, May 25, 2011 at 12:21 PM, michele michelemen...@gmail.com
 wrote:
 
  And this one
 
  https://github.com/technomancy/leiningen/
 
  On May 22, 10:53 am, dokondr doko...@gmail.com wrote:
   Hello,
   I am trying to install Clojure tools on Mac OS X according to the
   instructions:
   Clojure, Swank, and Leiningen with Emacs on
   Linuxhttp://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html
  
   Everything goes fine until these steps:
  
   ~$ lein deps
  
   ~$ lein swank
  
   In my project.clj I have:
  
   (defproject test-project 0.1.0
 :description Test Project
 :dependencies [[org.clojure/clojure 1.3.0-master-SNAPSHOT]
[org.clojure/clojure-contrib 1.3.0-SNAPSHOT]]
 :dev-dependencies [[swank-clojure 1.2.1]])
  
   Running 'lein deps' gives these errors:
  
   Downloading: org/clojure/clojure-contrib/1.3.0-SNAPSHOT/clojure-
   contrib-1.3.0-SNAPSHOT.pom from cloju\
   re-snapshots
   Downloading: org/clojure/clojure-contrib/1.3.0-SNAPSHOT/clojure-
   contrib-1.3.0-SNAPSHOT.pom from cloja\
   rs
   Downloading: org/clojure/clojure-contrib/1.3.0-SNAPSHOT/clojure-
   contrib-1.3.0-SNAPSHOT.jar from cloju\
   re-snapshots
   Downloading: org/clojure/clojure-contrib/1.3.0-SNAPSHOT/clojure-
   contrib-1.3.0-SNAPSHOT.jar from cloja\
   rs
   An error has occurred while processing the Maven artifact tasks.
Diagnosis:
  
   Unable to resolve artifact: Missing:
   --
   1) org.clojure:clojure-contrib:jar:1.3.0-SNAPSHOT
  
 Try downloading the file manually from the project website.
  
 Then, install it using the command:
 mvn install:install-file -DgroupId=org.clojure -
   DartifactId=clojure-contrib -Dversion=1.3.0-SNA\
   PSHOT -Dpackaging=jar -Dfile=/path/to/file
  
 Alternatively, if you host your own repository you can deploy the
   file there:
 mvn deploy:deploy-file -DgroupId=org.clojure -
   DartifactId=clojure-contrib -Dversion=1.3.0-SNAPS\
   HOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -
   DrepositoryId=[id]
  
 Path to dependency:
   1) org.apache.maven:super-pom:jar:2.0
   2) org.clojure:clojure-contrib:jar:1.3.0-SNAPSHOT
  
   When  I run 'lein swank' I get:
  
   That's not a task. Use lein help to list all tasks.
  
   Any ideas how to install these tools without so much pain?
  
   Thanks,
   Dmitri
 
  

Re: New to Clojure

2011-06-08 Thread Nick Zbinden
While we talk about Functional thinking. The IBM has a series. They
use Java (and Groovy) but it may help you since you allready know
java.

http://www.ibm.com/developerworks/java/library/j-ft1/index.html
http://www.ibm.com/developerworks/java/library/j-ft2/?ca=drs-

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Free Compojure Hosting? (or mostly free)

2011-06-08 Thread Alex Robbins
You can also put stuff up on the java part of Google App Engine. It is
pretty easy with this project: https://github.com/gcv/appengine-magic
You have a limit of ten apps per user, but it works for just getting
stuff up to play with.
Alex

On Tue, Jun 7, 2011 at 11:37 PM, Sean Corfield seancorfi...@gmail.com wrote:
 I thought I'd bump this thread now that Heroku is supporting Clojure
 applications on the new cedar stack:

 https://gist.github.com/1001206

 I decided to try this tonight and went from ground zero (not even
 having a Heroku account) to a working Ring app (that says Hello World
 - w00t!) in just a few minutes - rather amazing!

 Sean

 On Sat, Dec 18, 2010 at 9:55 AM, Alex Baranosky
 alexander.barano...@gmail.com wrote:
 Hi guys,
 I've got a simple toy app I'm writing wrote for fun to help my friend figure
 out where in the Boston area he should move to.  If I was using Rails I
 could throw it up on Heroku, essentially for free, because I have no plan to
 ever have any real traffic go there.  mostly I just want to show it to some
 friends at work, etc.
 Is there a similar free service to use with Compojure?  If not free, then
 what are the cheap options?
 Best,
 Alex

 --
 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 unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Free Compojure Hosting? (or mostly free)

2011-06-08 Thread Mark Rathwell
Also released since this thread started, not free, but starting at about
$14/month USD, Amazon's Elastic Beanstalk (
http://aws.amazon.com/elasticbeanstalk/) .  And VMWare has their Cloud
Foundry hosting in beta for free, but it will cost money once it is out (
http://www.cloudfoundry.com/).

GAE is changing their pricing structure soon (
http://www.google.com/enterprise/appengine/appengine_pricing.html) but they
will still have a free offering with lower quotas than now.

I've used both Elastic Beanstalk and appengine-magic with success.



On Wed, Jun 8, 2011 at 7:02 AM, Alex Robbins
alexander.j.robb...@gmail.comwrote:

 You can also put stuff up on the java part of Google App Engine. It is
 pretty easy with this project: https://github.com/gcv/appengine-magic
 You have a limit of ten apps per user, but it works for just getting
 stuff up to play with.
 Alex

 On Tue, Jun 7, 2011 at 11:37 PM, Sean Corfield seancorfi...@gmail.com
 wrote:
  I thought I'd bump this thread now that Heroku is supporting Clojure
  applications on the new cedar stack:
 
  https://gist.github.com/1001206
 
  I decided to try this tonight and went from ground zero (not even
  having a Heroku account) to a working Ring app (that says Hello World
  - w00t!) in just a few minutes - rather amazing!
 
  Sean
 
  On Sat, Dec 18, 2010 at 9:55 AM, Alex Baranosky
  alexander.barano...@gmail.com wrote:
  Hi guys,
  I've got a simple toy app I'm writing wrote for fun to help my friend
 figure
  out where in the Boston area he should move to.  If I was using Rails I
  could throw it up on Heroku, essentially for free, because I have no
 plan to
  ever have any real traffic go there.  mostly I just want to show it to
 some
  friends at work, etc.
  Is there a similar free service to use with Compojure?  If not free,
 then
  what are the cheap options?
  Best,
  Alex
 
  --
  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 unsubscribe from this group, send email to
  clojure+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/clojure?hl=en

 --
 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 unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: New to Clojure

2011-06-08 Thread Santosh M
Thank you mike will definitely go through the links. :). I don't have
any background of lisp.

Cheers

Santosh

On Jun 7, 3:30 pm, Mike Anderson mike.r.anderson...@gmail.com wrote:
 Hi Santosh,

 I was in your position a little over a year ago. Some recommendations
 that may help:

 - If you're coming from a Java environment, you may find it easiest to
 move to Clojure by using a Clojure plugin for your favourite Java IDE.
 I use the Counterclockwise plugin for Eclipse which is excellent, but
 I've heard great things about Enclojure for Netbeans too.
 - It's worth watching the video for Clojure for Java Programmers by
 Clojure creator Rich Hickey 
 -http://blip.tv/clojure/clojure-for-java-programmers-1-of-2-989128
 - I also strongly recommend this video if you want to understand
 Clojure's data structures and approach to 
 concurrency:http://www.infoq.com/presentations/Value-Identity-State-Rich-Hickey
 - I've found StackOverflow to be a great resource for Clojure tricks
 and hints

 Hope this helps - and good luck!

    Mike.

 On Jun 7, 8:30 pm, Santosh M santoshvmadhyas...@gmail.com wrote:







  I want to learn clojure. I already know Java. Please tell me how to
  proceed.

  Regards

  Santosh

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Building a vector of vector list

2011-06-08 Thread Mushfaque Chowdhury
Hi all

I'm trying to build a vector data structure that can be printed using
the core prn function.

Here's my test case


(defn ea-xmi [dname  packages]
  [:xmi {:version 2.1
 :nsuml http://schema.omg.org/spec/UML/2.1;
 :nsxmi http://schema.omg.org/spec/XMI/2.1;
 :customprofile http://www.sparxsystems.com/profiles/
thecustomprofile/1.0}
   (map #(eval %) packages)])

(defn ea-document [dname  packages]
  [:Documentation {:exporter Enterprise Architect :exporterVersion
6.5}]
  [:Model {:type uml:Model :name (str/join [dname
_Model]) :visibility public}])

And this is how I want to call it:- (this I dont want to change - it's
the dsl)

(def output
  (ea-xmi Oil
(ea-document Fundamental)))

What I get as the output is:-
[:xmi {:version 2.1, :nsuml http://schema.omg.org/spec/UML/2.1, :nsxmi
http://sc
hema.omg.org/spec/XMI/2.1, :customprofile http://www.sparxsystems.com/profiles/t
hecustomprofile/1.0} ([:Model {:type uml:Model, :name
Fundamental_Model, :visibi
lity public}])]


Whereas I would want:-

[:xmi {:version 2.1, :nsuml http://schema.omg.org/spec/UML/2.1, :nsxmi
http://schema.omg.org/spec/XMI/2.1, :customprofile
http://www.sparxsystems.com/profiles/thecustomprofile/1.0} [:Model
{:type uml:Model, :name Fundamental_Model, :visibility public}]]

The difference is minimal, just the additional () around the second
vector. Why is this and how do I remove it (at construction time). I'm
guessing it's how I call eval within map, but I've tried identity and
apply and still can't get it right. Any ideas?

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Aw: Building a vector of vector list

2011-06-08 Thread Meikel Brandmeyer
Hi,

you just need a slight change in your ea-xmi function.

(defn ea-xmi
  [dname  packages]
  (into [:xmi {:version 2.1
   :nsuml http://schema.omg.org/spec/UML/2.1;
   :nsxmi http://schema.omg.org/spec/XMI/2.1;
   :customprofile 
http://www.sparxsystems.com/profiles/thecustomprofile/1.0}]
(map #(eval %) packages)))

Note, that I am one of the eval-is-not-what-you-want advocates. So... The 
eval there is almost surely not what you want.

Sincerely
Meikel

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: New to Clojure

2011-06-08 Thread looselytyped
Hi Santosh,

I have been playing around with Clojure for some time now, and outside
of echoing most of the suggestions listed above (specifically
StackOverFlow hints/tricks, OSS projects on GitHub/BitBucket and most
importantly the REPL with Leiningen) I have one more suggestion -
Being a Java guy (and Ruby) myself, one thing I found myself
struggling with is the functional nature of Clojure. I still struggle
with it so I will elaborate on how I am trying to work around it.

  - The Little Schemer [http://www.amazon.com/Little-Schemer-Daniel-P-
Friedman/dp/0262560992] - I found this book to be a good refresher on
recursion, and thinking along those lines. I just went through it (I
wrote all the code samples in Clojure), and am starting the next one
in the series which is
  - The Seasoned Schemer [http://www.amazon.com/Seasoned-Schemer-
Daniel-P-Friedman/dp/026256100X]

I started playing with the 99 Lisp Programs exercise suggested by
Shantanu a while back, and one thing that helped me was to use Clojure
core only (rather than using Clojure Contrib along with it). YMMV.

There are few books out there that can help - The Joy of Clojure IMO
being a really good one to pick, but it's one that you should read
after getting your hands dirty with Clojure first. Practical Clojure
is another good book, and relatively new so it covers some of the
newer constructs in Clojure as compared to Stu's Programming
Clojure (Though I believe Aaron Bedra is working on the second
edition of that book).

Finally, I agree with many others on this thread - Emacs is a popular
editor among many a lisp programmer, and Clojure is no different.
Unfortunately if you are not familiar with it, it presents a two-fold
problem - you need to learn to use the editor along with learning
Clojure. My take on this - if you are familiar with an IDE like
Eclipse or NetBeans or even IntelliJ just download the plugin and
start writing code.

Hope this helps.

Raju


On Jun 8, 12:49 am, Santosh M santoshvmadhyas...@gmail.com wrote:
 Thank you mike will definitely go through the links. :). I don't have
 any background of lisp.

 Cheers

 Santosh

 On Jun 7, 3:30 pm, Mike Anderson mike.r.anderson...@gmail.com wrote:







  Hi Santosh,

  I was in your position a little over a year ago. Some recommendations
  that may help:

  - If you're coming from a Java environment, you may find it easiest to
  move to Clojure by using a Clojure plugin for your favourite Java IDE.
  I use the Counterclockwise plugin for Eclipse which is excellent, but
  I've heard great things about Enclojure for Netbeans too.
  - It's worth watching the video for Clojure for Java Programmers by
  Clojure creator Rich Hickey 
  -http://blip.tv/clojure/clojure-for-java-programmers-1-of-2-989128
  - I also strongly recommend this video if you want to understand
  Clojure's data structures and approach to 
  concurrency:http://www.infoq.com/presentations/Value-Identity-State-Rich-Hickey
  - I've found StackOverflow to be a great resource for Clojure tricks
  and hints

  Hope this helps - and good luck!

     Mike.

  On Jun 7, 8:30 pm, Santosh M santoshvmadhyas...@gmail.com wrote:

   I want to learn clojure. I already know Java. Please tell me how to
   proceed.

   Regards

   Santosh

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Building a vector of vector list

2011-06-08 Thread Mushfaque Chowdhury
Thanks Meikel

I'm hoping that the into function is not going to make things
inefficient but I'll give it a go.

I also agree, eval is not what I want, because it does feel wrong.
Something tells me that I should be using apply, but I've not yet
figured out why/how.

Ronnie

On Jun 8, 2:07 pm, Meikel Brandmeyer m...@kotka.de wrote:
 Hi,

 you just need a slight change in your ea-xmi function.

 (defn ea-xmi
   [dname  packages]
   (into [:xmi {:version 2.1
                :nsuml http://schema.omg.org/spec/UML/2.1;
                :nsxmi http://schema.omg.org/spec/XMI/2.1;
                :customprofile
 http://www.sparxsystems.com/profiles/thecustomprofile/1.0}]
         (map #(eval %) packages)))

 Note, that I am one of the eval-is-not-what-you-want advocates. So... The
 eval there is almost surely not what you want.

 Sincerely
 Meikel

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Building a vector of vector list

2011-06-08 Thread Mushfaque Chowdhury
Ahh yes, this works (with apply):-

(defn ea-xmi [dname  packages]
   (into [:xmi {:version 2.1
 :nsuml http://schema.omg.org/spec/UML/2.1;
 :nsxmi http://schema.omg.org/spec/XMI/2.1;
 :customprofile http://www.sparxsystems.com/profiles/
thecustomprofile/1.0}]
 (apply identity packages)))

What I want is just to call each function defined in 'packages'.
Basically evaluate the list of HigherOrderFunctions specified in
'packages'

If anyone can suggest something even cleaner, that would be great.

Ronnie
On Jun 8, 3:01 pm, Mushfaque Chowdhury mushfaque.chowdh...@gmail.com
wrote:
 Thanks Meikel

 I'm hoping that the into function is not going to make things
 inefficient but I'll give it a go.

 I also agree, eval is not what I want, because it does feel wrong.
 Something tells me that I should be using apply, but I've not yet
 figured out why/how.

 Ronnie

 On Jun 8, 2:07 pm, Meikel Brandmeyer m...@kotka.de wrote:







  Hi,

  you just need a slight change in your ea-xmi function.

  (defn ea-xmi
    [dname  packages]
    (into [:xmi {:version 2.1
                 :nsuml http://schema.omg.org/spec/UML/2.1;
                 :nsxmi http://schema.omg.org/spec/XMI/2.1;
                 :customprofile
  http://www.sparxsystems.com/profiles/thecustomprofile/1.0}]
          (map #(eval %) packages)))

  Note, that I am one of the eval-is-not-what-you-want advocates. So... The
  eval there is almost surely not what you want.

  Sincerely
  Meikel

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Aw: Re: Building a vector of vector list

2011-06-08 Thread Meikel Brandmeyer
Hi again,

this works only because you call your function with just one package. I get 
the impression you just want:

(defn ea-xmi
  [dname  packages]
  (into [:xmi {:version 2.1
   :nsuml http://schema.omg.org/spec/UML/2.1;
   :nsxmi http://schema.omg.org/spec/XMI/2.1;
   :customprofile 
http://www.sparxsystems.com/profiles/thecustomprofile/1.0}]
 packages))

Sincerely
Meikel

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Google Benchmark: needs a Clojure implementation...

2011-06-08 Thread edlich
On 8 Jun., 07:58, Mark Engelberg mark.engelb...@gmail.com wrote:
 Is there a free source for the original article containing the
 detailed description of the algorithm?

Well I think the original article by Paul Havlac is availble if you
have ACM access
here: http://portal.acm.org/citation.cfm?id=262005

The algorithm in the benchmark paper above is not so easy to
understand.
But if you browse the sourcecode of the implementations (i.e. in your
favourite
language), you will fast get a vision of how to implement this in
Clojure.
(Klick Source Browse in the multi language bench).

Best
Stefan Edlich

P.S. I'll try to find a student for this...

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure, Swank, and Leiningen with Emacs on Mac OS X

2011-06-08 Thread JMatt
Randy,

Check out my configuration. It is similar to what you want to do. It
works with Aquamacs, emacs23.x , emacs24 and there is a branch that
works on Windows with some hacking. I individually included external
dependencies in the vendors directory; including clojure-mode, slime
and emacs-starter-kit. It is a relatively good starting point to
derive your own usable solution. I didn't really intend it to be used
by other people, thus the name pollution with jmatt-emacs and it not
being a drop-in easy solution.

https://github.com/jmatt/jmatt-emacs

Also I'd recommend looking at overtone's live-coding-emacs. It allowed
me to find a number of clojure niceties that would otherwise have
taken a long time to stumble upon.

https://github.com/overtone/live-coding-emacs


JMatt

On Jun 8, 1:57 am, Randy J. Ray rj...@blackperl.com wrote:
 The contents of .clojure are not at issue, clojure runs just fine from the
 command-line, repl, etc.

 My problem is with installing SLIME, clojure-mode, etc. without using
 package.el. When I tried it, it failed somewhere in the building/compiling
 of clojure-mode.el, and the SLIME package was not complete. Starting with
 the ESK is not an option for me, as I have too much invested in my current
 emacs configuration.

 Currently, I keep my emacs configuration on github, as part of a larger repo
 that houses all my dot-files (I really should move the emacs stuff into its
 own repo, now that I think about it). So I have no problems with downloading
 the packages I need, installing them into my configuration manually, etc. I
 don't mind doing things in a slightly harder way than the ESK presents, I
 just need to know which versions of things like SLIME I should use (the
 SLIME web page only has a download for the latest CVS head version).

 Randy









 On Tue, Jun 7, 2011 at 6:00 PM, John Toohey j...@parspro.com wrote:
  I have a fully working AquaEmacs/Swank/Slime system under OSX. Can you
  tell me what you tried, and I may be able to help you. To start with,
  what is the content of you ~/.clojure directory?

  On Tue, Jun 7, 2011 at 18:00, Randy J. Ray rj...@blackperl.com wrote:
   I am also having some big problems getting a working set-up under MacOS.
  I
   can't really start with the emacs-starters-kit, as I have a very large
   existing configuration. And Aquamacs doesn't ship SLIME as part of the
   distribution. Mainly, I need to know the best place to get the
  clojure-mode,
   clojure-test-mode, slime and swank-clojure packages. I tried using
   package.el to get some of them, but it bombed out before it completed
   building/installing slime or clojure-mode. I considered getting slime
  from
   their web page, but their only download link is a CVS snapshot, and I
  seem
   to remember reading somewhere that the really-new slime versions had some
   problems.
   Is part of the problem my decision to use Aquamacs? I looked at Carbon
  Emacs
   as well, but that's based on an emacs 22 source base, and I'd prefer to
  work
   from 23 or newer (my Linux desktops are running emacs in the 23 range).
  Do
   people roll their own emacs for clojure development on MacOS?
   Randy

   On Fri, May 27, 2011 at 7:40 AM, Sathish Kumar sathish...@gmail.com
  wrote:

   Hi,
   This is a step by step guide to setup Leiningen, Swank-Clojure and SLIME
   for  Emacs.

  http://languageagnostic.blogspot.com/2011/05/clojure-in-emacs.html

   It is partly based on technomancy's post herehttp://technomancy.us/126

   Thanks,
   Sathish

   On Wed, May 25, 2011 at 12:21 PM, michele michelemen...@gmail.com
  wrote:

   And this one

  https://github.com/technomancy/leiningen/

   On May 22, 10:53 am, dokondr doko...@gmail.com wrote:
Hello,
I am trying to install Clojure tools on Mac OS X according to the
instructions:
Clojure, Swank, and Leiningen with Emacs on
Linuxhttp://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html

Everything goes fine until these steps:

~$ lein deps

~$ lein swank

In my project.clj I have:

(defproject test-project 0.1.0
  :description Test Project
  :dependencies [[org.clojure/clojure 1.3.0-master-SNAPSHOT]
                 [org.clojure/clojure-contrib 1.3.0-SNAPSHOT]]
  :dev-dependencies [[swank-clojure 1.2.1]])

Running 'lein deps' gives these errors:

Downloading: org/clojure/clojure-contrib/1.3.0-SNAPSHOT/clojure-
contrib-1.3.0-SNAPSHOT.pom from cloju\
re-snapshots
Downloading: org/clojure/clojure-contrib/1.3.0-SNAPSHOT/clojure-
contrib-1.3.0-SNAPSHOT.pom from cloja\
rs
Downloading: org/clojure/clojure-contrib/1.3.0-SNAPSHOT/clojure-
contrib-1.3.0-SNAPSHOT.jar from cloju\
re-snapshots
Downloading: org/clojure/clojure-contrib/1.3.0-SNAPSHOT/clojure-
contrib-1.3.0-SNAPSHOT.jar from cloja\
rs
An error has occurred while processing the Maven artifact tasks.
 Diagnosis:

Unable to resolve artifact: Missing:
--
1) 

Re: Clojure, Swank, and Leiningen with Emacs on Mac OS X

2011-06-08 Thread diamon...@yahoo.com
This worked for me in both Linux and Mac OS X.

http://biztech.sheprador.com/?p=89

--Andrew

On Jun 8, 4:57 am, Randy J. Ray rj...@blackperl.com wrote:
 The contents of .clojure are not at issue, clojure runs just fine from the
 command-line, repl, etc.

 My problem is with installing SLIME, clojure-mode, etc. without using
 package.el. When I tried it, it failed somewhere in the building/compiling
 of clojure-mode.el, and the SLIME package was not complete. Starting with
 the ESK is not an option for me, as I have too much invested in my current
 emacs configuration.

 Currently, I keep my emacs configuration on github, as part of a larger repo
 that houses all my dot-files (I really should move the emacs stuff into its
 own repo, now that I think about it). So I have no problems with downloading
 the packages I need, installing them into my configuration manually, etc. I
 don't mind doing things in a slightly harder way than the ESK presents, I
 just need to know which versions of things like SLIME I should use (the
 SLIME web page only has a download for the latest CVS head version).

 Randy



 On Tue, Jun 7, 2011 at 6:00 PM, John Toohey j...@parspro.com wrote:
  I have a fully working AquaEmacs/Swank/Slime system under OSX. Can you
  tell me what you tried, and I may be able to help you. To start with,
  what is the content of you ~/.clojure directory?

  On Tue, Jun 7, 2011 at 18:00, Randy J. Ray rj...@blackperl.com wrote:
   I am also having some big problems getting a working set-up under MacOS.
  I
   can't really start with the emacs-starters-kit, as I have a very large
   existing configuration. And Aquamacs doesn't ship SLIME as part of the
   distribution. Mainly, I need to know the best place to get the
  clojure-mode,
   clojure-test-mode, slime and swank-clojure packages. I tried using
   package.el to get some of them, but it bombed out before it completed
   building/installing slime or clojure-mode. I considered getting slime
  from
   their web page, but their only download link is a CVS snapshot, and I
  seem
   to remember reading somewhere that the really-new slime versions had some
   problems.
   Is part of the problem my decision to use Aquamacs? I looked at Carbon
  Emacs
   as well, but that's based on an emacs 22 source base, and I'd prefer to
  work
   from 23 or newer (my Linux desktops are running emacs in the 23 range).
  Do
   people roll their own emacs for clojure development on MacOS?
   Randy

   On Fri, May 27, 2011 at 7:40 AM, Sathish Kumar sathish...@gmail.com
  wrote:

   Hi,
   This is a step by step guide to setup Leiningen, Swank-Clojure and SLIME
   for  Emacs.

  http://languageagnostic.blogspot.com/2011/05/clojure-in-emacs.html

   It is partly based on technomancy's post herehttp://technomancy.us/126

   Thanks,
   Sathish

   On Wed, May 25, 2011 at 12:21 PM, michele michelemen...@gmail.com
  wrote:

   And this one

  https://github.com/technomancy/leiningen/

   On May 22, 10:53 am, dokondr doko...@gmail.com wrote:
Hello,
I am trying to install Clojure tools on Mac OS X according to the
instructions:
Clojure, Swank, and Leiningen with Emacs on
Linuxhttp://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html

Everything goes fine until these steps:

~$ lein deps

~$ lein swank

In my project.clj I have:

(defproject test-project 0.1.0
  :description Test Project
  :dependencies [[org.clojure/clojure 1.3.0-master-SNAPSHOT]
                 [org.clojure/clojure-contrib 1.3.0-SNAPSHOT]]
  :dev-dependencies [[swank-clojure 1.2.1]])

Running 'lein deps' gives these errors:

Downloading: org/clojure/clojure-contrib/1.3.0-SNAPSHOT/clojure-
contrib-1.3.0-SNAPSHOT.pom from cloju\
re-snapshots
Downloading: org/clojure/clojure-contrib/1.3.0-SNAPSHOT/clojure-
contrib-1.3.0-SNAPSHOT.pom from cloja\
rs
Downloading: org/clojure/clojure-contrib/1.3.0-SNAPSHOT/clojure-
contrib-1.3.0-SNAPSHOT.jar from cloju\
re-snapshots
Downloading: org/clojure/clojure-contrib/1.3.0-SNAPSHOT/clojure-
contrib-1.3.0-SNAPSHOT.jar from cloja\
rs
An error has occurred while processing the Maven artifact tasks.
 Diagnosis:

Unable to resolve artifact: Missing:
--
1) org.clojure:clojure-contrib:jar:1.3.0-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=org.clojure -
DartifactId=clojure-contrib -Dversion=1.3.0-SNA\
PSHOT -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the
file there:
      mvn deploy:deploy-file -DgroupId=org.clojure -
DartifactId=clojure-contrib -Dversion=1.3.0-SNAPS\
HOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -
DrepositoryId=[id]

  Path to dependency:
        1) org.apache.maven:super-pom:jar:2.0
        2) 

Problem implementing interface with defrecord

2011-06-08 Thread diamon...@yahoo.com
I'm trying to use defrecord to implement the interface
org.apache.http.conn.params.ConnPerRoute.

That interface consists of exactly one method, with the following
signature:

int getMaxForRoute(HttpRoute route);

The documentation for this interface is at
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.httpcomponents/httpclient/4.0.1/org/apache/http/conn/params/ConnPerRoute.java?av=f

Here's a snippet from the repl illustrating the problem:

user= (first (.getMethods org.apache.http.conn.params.ConnPerRoute))
#Method public abstract int
org.apache.http.conn.params.ConnPerRoute.getMaxForRoute(org.apache.http.conn.routing.HttpRoute)

user= (defrecord ConnPerRouteImpl [connections]
  org.apache.http.conn.params.ConnPerRoute
(getMaxForRoute [route] connections))
java.lang.IllegalArgumentException: Can't define method not in
interfaces: getMaxForRoute (NO_SOURCE_FILE:15)

So... what's going on here? The repl says that the first method in
org.apache.http.conn.params.ConnPerRoute is getMaxForRoute.

Then the repl says defrecord cannot define the method getMaxForRoute
because it's in the ConnPerRoute interface. I get the same result when
I use type hints.

Why??

-- Andrew

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: New to Clojure

2011-06-08 Thread hci
I was in the same boat last year. My experience with Clojure started
with Java interop, by writing Clojure code to solve some small
problems using existing Java libraries. For example, I used Clojure to
fetch and process application logs in a MySQL database and visualize
the results with a Java graph library. These experience got me into
productive mode quickly and became familiar with the syntax of the
language.

However, I was not transformed into a Clojure programmer by just doing
Java-interop because I was still thinking in Java way. It should be
noted that the Clojure way is very different from the Java way. A
transformation in thinking is necessary. I did the transformation by
studying the Joy of Clojure book and did programming exercise on
4clojure.com. The former showed me the Clojure way and I practiced
walking the way with the later. A good thing about 4clojure.com is
that there is an immediate feedback on how well one does. The code
either pass the unit tests or not. If it passes, one can see how short
their own code compared with others. In searching a shorter solution,
one often learns some functional tricks. Also, the site forces one to
work with core Clojure functions only, and the use of def is not
allowed.

On Jun 7, 12:30 pm, Santosh M santoshvmadhyas...@gmail.com wrote:
 I want to learn clojure. I already know Java. Please tell me how to
 proceed.

 Regards

 Santosh

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Problem implementing interface with defrecord

2011-06-08 Thread Meikel Brandmeyer
Hi,

Am 08.06.2011 um 21:25 schrieb diamon...@yahoo.com:

 So... what's going on here?

You have to specify the “this” parameter.

(defrecord ConnPerRouteImpl [connections]
  org.apache.http.conn.params.ConnPerRoute
  (getMaxForRoute [this route] connections))

Sincerely
Meikel

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Problem implementing interface with defrecord

2011-06-08 Thread diamond
Thank you. That works. 

I knew it had to be something simple... like me not reading the doc closely 
enough.

--Andrew

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: ANN: Emacs auto-complete plugin for slime users

2011-06-08 Thread Andreas Liljeqvist
This is great stuff for sure!

I have a problem though:
If I press 'tab' before the doc strings show up I get a
Nullpointerexception.
Any ideas?

2010/8/14 Steve Purcell st...@sanityinc.com

 Hi all,

 A while ago I hooked Slime's completion and documentation features into the
 popular Emacs auto-completion framework auto-complete (
 http://www.emacswiki.org/emacs/AutoComplete).

 Since it may be of interest to others, I've released the completion plugin
 on github: http://github.com/purcell/ac-slime

 Here's a screenshot of the plugin in action in a clojure-mode buffer,
 showing the (very handy) pop-up documentation:






 -Steve
 --
 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 unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Radically simplified Emacs and SLIME setup

2011-06-08 Thread Mark Engelberg
It's been a couple of weeks, so I thought I'd check in and see whether
anyone has yet been successful at using the new clojure-jack-in
process on Windows.  Did the 1.9.2 release successfully resolve the
cannot find the path specified error for anyone else?

Thanks,

Mark

On Mon, May 30, 2011 at 3:10 PM, Mark Engelberg
mark.engelb...@gmail.com wrote:
 The package installer saw the 1.9.2 release, which I installed.  I'm
 still getting the cannot find the path specified error though.

 Thanks for all the help you all have provided so far; let me know if
 you have any other ideas for me to try.

 Thanks,

 Mark


-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Announcement: stockings clojure library for easy access to financial data

2011-06-08 Thread jaime
I tried to run the example behind a proxy but the connection failed.
Anyone who knows how to resolve this??

I'm using Eclipse and plugin counterclockwise, the Eclipse itself can
check for update behind the proxy.

Thanks,
Jaime

On Jun 1, 3:09 am, fxt f...@fxtlabs.com wrote:
 Hi everyone,

 I just wanted to announce release 1.0 of my latest project: 
 stockings.https://github.com/fxtlabs/stockingshttp://stockings.fxtlabs.comhttp://clojars.org/com.fxtlabs/stockings

 I mentioned some of this work to some of you at the last Bonjure
 (Montreal Clojure User Group) meeting, so I thought someone might be
 interested.

 Stockings is a Clojure library that gives you easy access to financial
 data such as current and historicalstockquotes, current currency
 exchange rates,stocksymbol suggestions,stockand company info by
 trading exchanges and industry sectors, and more.

 It integrates information from different web services in a consistent
 way, doing all the error handling, JSON, XML, and CSV parsing, and all
 the other quirky data massaging for you.

 I hope some of you will find it useful. Any feedback is welcome.

 Thank you,

 fxt

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: New to Clojure

2011-06-08 Thread Santosh M
Thank you all for the suggestions.
Will keep posting my queries on the google groups. :)

On Jun 8, 12:33 pm, hci huahai.y...@gmail.com wrote:
 I was in the same boat last year. My experience with Clojure started
 with Java interop, by writing Clojure code to solve some small
 problems using existing Java libraries. For example, I used Clojure to
 fetch and process application logs in a MySQL database and visualize
 the results with a Java graph library. These experience got me into
 productive mode quickly and became familiar with the syntax of the
 language.

 However, I was not transformed into a Clojure programmer by just doing
 Java-interop because I was still thinking in Java way. It should be
 noted that the Clojure way is very different from the Java way. A
 transformation in thinking is necessary. I did the transformation by
 studying the Joy of Clojure book and did programming exercise on
 4clojure.com. The former showed me the Clojure way and I practiced
 walking the way with the later. A good thing about 4clojure.com is
 that there is an immediate feedback on how well one does. The code
 either pass the unit tests or not. If it passes, one can see how short
 their own code compared with others. In searching a shorter solution,
 one often learns some functional tricks. Also, the site forces one to
 work with core Clojure functions only, and the use of def is not
 allowed.

 On Jun 7, 12:30 pm, Santosh M santoshvmadhyas...@gmail.com wrote:







  I want to learn clojure. I already know Java. Please tell me how to
  proceed.

  Regards

  Santosh

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: New to Clojure

2011-06-08 Thread Santosh M
I just found out three books on closure, please tell me which is the
best one to start with?

1 - The Joy of Clojure
2 - Programming Clojure
3 - Practical Clojure



On Jun 8, 9:03 pm, Santosh M santoshvmadhyas...@gmail.com wrote:
 Thank you all for the suggestions.
 Will keep posting my queries on the google groups. :)

 On Jun 8, 12:33 pm, hci huahai.y...@gmail.com wrote:







  I was in the same boat last year. My experience with Clojure started
  with Java interop, by writing Clojure code to solve some small
  problems using existing Java libraries. For example, I used Clojure to
  fetch and process application logs in a MySQL database and visualize
  the results with a Java graph library. These experience got me into
  productive mode quickly and became familiar with the syntax of the
  language.

  However, I was not transformed into a Clojure programmer by just doing
  Java-interop because I was still thinking in Java way. It should be
  noted that the Clojure way is very different from the Java way. A
  transformation in thinking is necessary. I did the transformation by
  studying the Joy of Clojure book and did programming exercise on
  4clojure.com. The former showed me the Clojure way and I practiced
  walking the way with the later. A good thing about 4clojure.com is
  that there is an immediate feedback on how well one does. The code
  either pass the unit tests or not. If it passes, one can see how short
  their own code compared with others. In searching a shorter solution,
  one often learns some functional tricks. Also, the site forces one to
  work with core Clojure functions only, and the use of def is not
  allowed.

  On Jun 7, 12:30 pm, Santosh M santoshvmadhyas...@gmail.com wrote:

   I want to learn clojure. I already know Java. Please tell me how to
   proceed.

   Regards

   Santosh

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: New to Clojure

2011-06-08 Thread Sean Corfield
On Wed, Jun 8, 2011 at 9:15 PM, Santosh M santoshvmadhyas...@gmail.com wrote:
 I just found out three books on closure, please tell me which is the
 best one to start with?

 1 - The Joy of Clojure
 2 - Programming Clojure
 3 - Practical Clojure


Because Practical Clojure is more modern than Programming Clojure -
and covers changes introduced in Clojure 1.2 - I'd recommend Practical
Clojure as the best to start with. Then follow that with The Joy of
Clojure which will teach you a lot about the *why* of functional
programming.
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

Perfection is the enemy of the good.
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en