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"  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  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  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 
> > 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 
> > wrote:
>
> > >>> And this one
>
> > >>>https://github.com/technomancy/leiningen/
>
> > >>> On May 22, 10:53 am, dokondr  wrote:
> > >>> > Hello,
> > >>> > I am trying to install Clojure tools on Mac OS X according to the
> > >>> > instructions:
> > >>> > "Clojure, Swank, and Leiningen with Emacs on
> > >>> > Linux"http://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 "

Re: Please try the alphas and betas!

2011-10-31 Thread JMatt
It can still be difficult to find the right repo and documentation for 
alpha and betas. Especially for the new contrib. It really doesn't have 
anything to do with the Core team or the actual documentation (when it's 
finally found). To me the problem is sifting through the countless highly 
ranked old and/or bad information.

On Monday, October 31, 2011 1:25:30 PM UTC-7, Sean Corfield wrote:
>
>  :repositories [["sonatype-snapshots"
> "https://oss.sonatype.org/content/repositories/snapshots/";]]
>   :dependencies [[org.clojure/clojure "1.4.0-master-SNAPSHOT"] ...]
>
Everyone that I know who writes clojure professionally or on a daily basis 
uses lein to start. The simplest way to expose far more people to alphas 
and betas is to add the sonatype repo to the default-repos function in lein:

https://github.com/technomancy/leiningen/blob/1.x/src/leiningen/core.clj#L128

Is there a reason that lein shouldn't / doesn't support the new repos?

Rich and Core team, thanks for pointing out the importance of using alphas 
and betas. Sometimes it's not clear what we can do to help with the 
project. Posts like this that are actionable definitely provide guidance 
and transparency as to how all of us can give back.


JMatt

-- 
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: Get digits of a number

2011-02-17 Thread JMatt


On Feb 16, 10:29 pm, Andreas Kostler
 wrote:
> Is there an easy and idiomatic way of getting the digits of a number in 
> clojure?

Here is my attempt at this from a few months ago:

(defn to-digit
  "Create a seq of digits from a number."
  ^{:user/comment "For Euler Problems (Specifically 16)"}
  [i & {:keys [type] :or {type int}}]
   (let [ss (str i)] (map type (map (fn [s] (- (int s) 48)) ss

I took a more pragmatic approach to this problem and just assumed the
representation for digits was ASCII. It's possible to simplify this
some but, as is, it'll take seqs of characters or strings. At the time
I remember thinking this function should really return bytes or shorts
or something smaller than an int. Thus the :type option.


JMatt

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