Re: Moderately off-topic: installing emacs on OSX

2010-12-13 Thread Steve Purcell
Chris Maier  writes:
>> (if window-system (set-exec-path-from-shell-PATH))
>
> This was a huge help for me, but I had to replace the "-i" flag with
> "--login" in order to fully replicate my path that I see in Terminal.
> I have a few things set in /etc/paths.d (TeX, X11, and git,
> specifically), and these get added into the path using Apple's
> /usr/libexec/path_helper command, but only for login shells.
>
> If I use "-i", I'll get path settings from my ~/.bashrc file, but
> nothing from /etc/paths.d.  If I use "--login", I get path settings
> from ~/.bash_profile and /etc/paths.d.  I source ~/.bashrc from
> ~/.bash_profile, so that gets me everything I need.
>
> (PS: I'm running GNU Emacs 23.2 on Snow Leopard 10.6.4)

Thanks for that -- good catch. I'll probably replace -i with --login
myself too.

-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


Re: Posted the Bowling Game Kata in Clojure w/ Video. Thoughts welcome. EOM

2010-12-13 Thread John Szakmeister
On Fri, Dec 10, 2010 at 3:30 PM, Tim Visher  wrote:
> Because posting the link would make some modicum of sense…
>
> http://blog.twonegatives.com/post/2168030248/kata
>
> ^_^

Awesome Tim!  Thanks for taking the time to put that together!

-John

-- 
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: Basic integer-overflow error: (- 0 -9223372036854775808)

2010-12-13 Thread Stuart Halloway
Created http://dev.clojure.org/jira/browse/CLJ-690 for this. Thanks!

Stu

> Ah, I'm embarassed for not trying it on the developer version earlier
> -- I'm running 1.2. Since Clojure 1.3 changes the semantics of -
> w.r.t. overflow, it succesffully catches this.
> 
> However, -' still has this bug as of Clojure 1.3 Alpha 4:
> 
> Clojure 1.3.0-alpha4
> user=> (-' 0 -9223372036854775808)
> -9223372036854775808
> 
> 
> On Dec 12, 9:17 pm, Stuart Halloway  wrote:
>> Hi James,
>> 
>> I am not seeing this behavior on master. If you are, would love to know 
>> additional context.
>> 
>> Stu
>> 
>>> user> (- 0 -9223372036854775808)
>>> -9223372036854775808
>> 
>>> It's worth noting that -9223372036854775808 is Long/MIN_VALUE, and
>>> that this is the expected result with native 64-bit longs, though not
>>> in a language with automatic long-to-BigInteger conversion. It appears
>>> that a few related bugs (e.g.:http://dev.clojure.org/jira/browse/CLJ-32)
>>> have been caught and fixed, but this one still lives.
>> 
>>> (I now appreciate why "How do you detect integer overflows?" is one of
>>> the favorite interview questions of the Software Engineering
>>> Institute.)
>> 
>>> Sincerely,
>>> James Koppel
>> 
>>> --
>>> 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: Posted the Bowling Game Kata in Clojure w/ Video. Thoughts welcome. EOM

2010-12-13 Thread Tim Visher
On Sun, Dec 12, 2010 at 7:32 PM, Alec Battles  wrote:
>> Because posting the link would make some modicum of sense…
>>
>> http://blog.twonegatives.com/post/2168030248/kata
>>
>> ^_^
>
> Excellent blog post.
>
> I have yet to read Dave Thomas's book, though it's very high on my list.
>
> One note: As a fairly seasoned amateur of pretty much anything East
> Asian I object to the idea that 'kata' is Japanese in nature. The
> word/concept in English is, sorry to say it, an example of modern
> Orientalism, and just as much a product of a European image of Japan
> as it is Japanese.
>
> In Japanese, the word 'kata' is quite meaningless on its own. As such,
> the fact that as Europeans/Americans we'd use a Japanese word for this
> concept (rather than a Chinese, Korean, or English one) is also an
> example of modern Orientalism.
>
> Sigh... great blog post though.

Thanks for the feedback.  I'll do a bit more research and see if I can
come up with a better explanation.

--

In Christ,

Timmy V.

http://blog.twonegatives.com/
http://five.sentenc.es/ -- Spend less time on mail

-- 
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: Implementing multimethods in pure Clojure

2010-12-13 Thread Alan
That function is already written for you.

user=> (def x (atom (with-meta [] {:foo 1})))
#'user/x
user=> (meta @x)
{:foo 1}
user=> (swap! x vary-meta assoc :bar 2)
[]
user=> (meta @x)
{:bar 2, :foo 1}

On Dec 11, 2:36 pm, Ken Wesson  wrote:
> On Sat, Dec 11, 2010 at 5:24 PM, Meikel Brandmeyer  wrote:
> > Am 11.12.2010 um 23:10 schrieb Alexander Yakushev:
> >> Oh, that's my fault, I tried with-meta function on the atom and it
> >> wouldn't work. Still, after I defined an atom with some metadata in
> >> it, how can I change it thereafter?
>
> > I believe, you can't. You have to create a new atom.
>
> You can "change" the metadata on the object held by the atom (if that
> object supports metadata) via (swap! a with-meta ...).
>
> One thing a bit annoying is if you want to alter the metadata in an
> incremental way. To do that atomically requires a closure. Or defining
> a swap-meta! function, like so:
>
> (defn swap-meta! [a f & args]
>   (swap! a
>     (fn [x]
>       (with-meta x (apply f (meta x) args)
>
> That abstracts the "do it with a closure" method into a single function.
>
> user=> (def x (atom (with-meta [] {:foo 1})))
> #'user/x
> user=> (meta @x)
> {:foo 1}
> user=> (swap-meta! x assoc :bar 2)
> []
> user=> (meta @x)
> {:bar 2, :foo 1}

-- 
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: Implementing multimethods in pure Clojure

2010-12-13 Thread Alan
See my reply to Ken. I recommend against writing swap-meta! in your
own code, except maybe as a shorthand for (swap! foo vary-meta);
certainly don't implement it from the ground up when the language
already gives you the function you want.

On Dec 12, 2:22 am, Alexander Yakushev 
wrote:
> On Dec 12, 12:36 am, Ken Wesson  wrote:
>
>
>
> > You can "change" the metadata on the object held by the atom (if that
> > object supports metadata) via (swap! a with-meta ...).
>
> > One thing a bit annoying is if you want to alter the metadata in an
> > incremental way. To do that atomically requires a closure. Or defining
> > a swap-meta! function, like so:
>
> > (defn swap-meta! [a f & args]
> >   (swap! a
> >     (fn [x]
> >       (with-meta x (apply f (meta x) args)
>
> I still very often mix up the state and identity in Clojure. What I
> tried to do is to add metadata to the atom itself, not to the value it
> holds. Now I see that it was kind of stupid:).
> Your swap-meta! function is of great use, from now on I will use in
> such cases. Thank you!
> Your swap-meta!

-- 
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: Implementing multimethods in pure Clojure

2010-12-13 Thread Ken Wesson
On Mon, Dec 13, 2010 at 3:27 PM, Alan  wrote:
> That function is already written for you.
>
> user=> (def x (atom (with-meta [] {:foo 1})))
> #'user/x
> user=> (meta @x)
> {:foo 1}
> user=> (swap! x vary-meta assoc :bar 2)
> []
> user=> (meta @x)
> {:bar 2, :foo 1}

Not exactly. My swap-meta! is a bit more concise to use. (Where did
you find vary-meta? There seems to be a lot of stuff that's there, but
hardly anyone knows about.)

-- 
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 1.3 Alpha 4

2010-12-13 Thread Vagif Verdi
Maybe clojure should adopt linux versioning scheme, where even numbers
are stable production clojure and odd numbers are development branch ?


On Dec 12, 7:09 pm, Stuart Halloway  wrote:
> Clojure 1.3 Alpha 2 is now available at
>
>        http://clojure.org/downloads
>
>  0 Changes from 1.3 Alpha 3 to 1.3 Alpha 4
>  1 Changes from 1.3 Alpha 2 to 1.3 Alpha 3
>  2 Changes from 1.3 Alpha 1 to 1.3 Alpha 2
>  3 Changes from 1.2 to 1.3 Alpha 1
>  4 About Alpha Releases
>
> = 0 Changes from 1.3 Alpha 3 to 1.3 Alpha 4
>
>   * normalized unchecked-* fn names
>   * added *unchecked-math* support
>   * fixes to binding conveyance (and *agent*)
>
> = 1 Changes from 1.3 Alpha 2 to 1.3 Alpha 3
>
>   * fixed filter performance issue introduced in 1.3A2
>   * with-redefs macro (useful for stubbing)
>   * print-table
>
> = 2 Changes from 1.3 Alpha 1 to 1.3 Alpha 2
>
>   * code path for using vars is now *much* faster for the common case,
>     and you must explicitly ask for :dynamic bindability
>   * new: clojure.reflect/reflect
>    http://dev.clojure.org/display/design/Reflection+API
>   * new: clojure.data/diff
>
> = 3 Changes from 1.2 to 1.3 Alpha 1
>
>   * enhanced primitive support
>     (http://dev.clojure.org/display/doc/Enhanced+Primitive+Support)
>   * better exception reporting
>   * ancillary namespaces no longer auto-load on startup:
>     clojure.set, clojure.xml, clojure.zip
>
> = 4 About Alpha Releases
>
> 1.3 is the first release of Clojure that will include a series of
> alpha builds. We are adding these builds to support maven and
> leiningen users, who want a specific artifact that they can target (as
> opposed to building from master or "moving-target" snapshots).
>
> If you are the kind of person who used to track master by building
> from source, but no longer do so because you are using maven or
> leiningen, alpha releases are for you.

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


complex number library

2010-12-13 Thread Sunil S Nandihalli
Hello everybody,
 I found two libraries for complex numbers...One in apache.common.math and
the other in clojure-contrib but which clearly states that it is quiet
incomplete ... can anybody make a suggestion for a good alternative..
Thanks,
Sunil.

-- 
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: complex number library

2010-12-13 Thread Sunil S Nandihalli
I really miss having complex numbers as native types... :(

On Tue, Dec 14, 2010 at 3:11 AM, Sunil S Nandihalli <
sunil.nandiha...@gmail.com> wrote:

> Hello everybody,
>  I found two libraries for complex numbers...One in apache.common.math and
> the other in clojure-contrib but which clearly states that it is quiet
> incomplete ... can anybody make a suggestion for a good alternative..
> Thanks,
> Sunil.
>

-- 
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 1.3 Alpha 4

2010-12-13 Thread Sean Corfield
On Sun, Dec 12, 2010 at 7:09 PM, Stuart Halloway
 wrote:
> Clojure 1.3 Alpha 2 is now available at
>
> http://clojure.org/downloads

...and via Leiningen as:

[org.clojure/clojure "1.3.0-alpha4"]

which leads me to ask:

Has there been any thought to making simultaneous clojure/contrib
releases to make it easier for folks using lein / mvn to just update
their deps for all org.clojure entries at the same time?
-- 
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

-- 
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: Implementing multimethods in pure Clojure

2010-12-13 Thread Meikel Brandmeyer
Hi,

Am 13.12.2010 um 21:42 schrieb Ken Wesson:

> (Where did
> you find vary-meta? There seems to be a lot of stuff that's there, but
> hardly anyone knows about.)

http://clojure.github.com/clojure/

Hope that helps.

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: Clojure 1.3 Alpha 4

2010-12-13 Thread Mike Meyer
"Vagif Verdi"  wrote:

>Maybe clojure should adopt linux versioning scheme, where even numbers
>are stable production clojure and odd numbers are development branch ?

Gods please no.
-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

-- 
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: Implementing multimethods in pure Clojure

2010-12-13 Thread Ken Wesson
On Mon, Dec 13, 2010 at 5:38 PM, Meikel Brandmeyer  wrote:
> Hi,
>
> Am 13.12.2010 um 21:42 schrieb Ken Wesson:
>
>> (Where did
>> you find vary-meta? There seems to be a lot of stuff that's there, but
>> hardly anyone knows about.)
>
> http://clojure.github.com/clojure/
>
> Hope that helps.

That's not what I meant. I figure all of us have tabs permanently open
to there (I have two actually). What we don't have is the whole thing
memorized, or the time to read it all rather than use it for reference
and, sometimes, control-F it for things. In particular, my due
diligence with atoms and metadata consisted of searching for functions
that work directly with atoms. Of course vary-meta isn't one of them.
My question of Alan was really more a matter of how he found it --
what called his attention to it.

I don't think there's actually a serious problem with the
documentation here; people can't memorize the documentation as there's
too much of it, nor read it all in advance for the same reason, and
search on particular topics won't always find something useful that's
not quite directly related to that topic, but there's little that can
be done about it. The documentation can't be made much shorter without
making it incomplete, nor can every search scenario be anticipated in
advance. So, sometimes people will not know about various functions,
especially more obscure ones that are uncommonly used.

The only problem, in other words, and it is a minor one, is when
people post (possibly only implied) criticisms of other people for
happening to not know about one of those things. That will lead to a
fair amount of time being wasted both on posting such criticisms and
on defending against same by pointing out what due diligence one
performed and why it didn't find whatever particular thing.

Note: that last is not directed at you, in particular, Meikel. It was
Alan (notably the only partly-anonymous user in this thread thus far)
that was a bit abrupt and seemed to be suggesting that I had done
something wrong, or at least questionable, and then explicitly
recommended other people ignore my code (despite the fact that it
works perfectly), and most likely he simply either got up on the wrong
side of the bed or didn't quite mean it that way but misstated
something. At the same time, it was also Alan who called our attention
to the existence of the vary-meta function. Make of that what you
will.

-- 
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: post your feedback on the conj

2010-12-13 Thread Michael Ossareh
On Wed, Dec 8, 2010 at 02:16, Sam Aaron  wrote:

> The rollout of videos has already started:
>
> http://twitter.com/clojure_conj/status/10324356836102144
>
>
Fogus' talk: http://clojure.blip.tv/file/4501296/

The synopsis says "30 minutes" but it seems there may have been an issue in
the upload / transcode because it throws up an error at 18m 36s (which the
player also considers the end of the video).

-- 
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: Any demand for ClojureCLR support under slime / emacs?

2010-12-13 Thread Nicolas Buduroi
I'm interested, can't provide much programming help in this area
tough. I could always help test it.

On Dec 12, 6:36 pm, Mike K  wrote:
> I really, really want ClojureCLR to play nice with emacs the way
> Clojure does.  I've looked at the swank-clojure sources, but I really
> don't know enough about the Clojure and ClojureCLR internals to make
> much headway with this project.  Still, I'd love to help out in any
> way that I can.
>
> Is anyone else out there interested in such a project?
>
>    Mike

-- 
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: complex number library

2010-12-13 Thread Sunil S Nandihalli
Hello Everybody,
I see that Konrad-Hinsen's complex-library in the contrib is a very good
fit.. But I am afraid about the performance since the basic operations are
being dispatched using multi-methods... Does anybody have any say on this?
Sunil.

On Tue, Dec 14, 2010 at 3:20 AM, Sunil S Nandihalli <
sunil.nandiha...@gmail.com> wrote:

> I really miss having complex numbers as native types... :(
>
>
> On Tue, Dec 14, 2010 at 3:11 AM, Sunil S Nandihalli <
> sunil.nandiha...@gmail.com> wrote:
>
>> Hello everybody,
>>  I found two libraries for complex numbers...One in apache.common.math and
>> the other in clojure-contrib but which clearly states that it is quiet
>> incomplete ... can anybody make a suggestion for a good alternative..
>> Thanks,
>> Sunil.
>>
>
>

-- 
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: complex number library

2010-12-13 Thread David Nolen
On Mon, Dec 13, 2010 at 8:13 PM, Sunil S Nandihalli <
sunil.nandiha...@gmail.com> wrote:

> Hello Everybody,
> I see that Konrad-Hinsen's complex-library in the contrib is a very good
> fit.. But I am afraid about the performance since the basic operations are
> being dispatched using multi-methods... Does anybody have any say on this?
> Sunil.


Contribute a new library that uses protocols and deftype/record ? :)

David

-- 
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: Moderately off-topic: installing emacs on OSX

2010-12-13 Thread javajosh
Ok, I decided to nuke ports, fink, and delete every package they ever
installed. I successfully installed emacs 23.2 via homebrew (there's a
good overview of homebrew here 
http://ascarter.net/2010/02/22/homebrew-for-os-x.html).

I started the emacs it installed, but I didn't know how to access the
scratch buffer, so I started the tutorial. Exit worked (C-x C-c).
Scroll forward did not (C-v). Needless to say, I couldn't complete the
elpa instructions. Additionally, emacs pops up a new colorful window
but keeps the terminal in place. That's not the behavior I personally
want. Perhaps I will try installing without the --cocoa option.

Also tried the elpa self-install script in Aquamacs (where the scratch
buffer comes up first thing), but C-j (the 'eval' keystroke) had no
discernible effect. I tried M-x package-list-packages but it said [No
Match]. So I assume nothing happened.

Sorry to say but I'm rather annoyed with emacs. I find futzing around
with package managers and this stuff to be utterly exhausting.

-- 
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: complex number library

2010-12-13 Thread Sunil S Nandihalli
Thanks David .. but is there a protocol that contains +,*,/,- operations? If
there is one I can simply add those operations...
Sunil.

On Tue, Dec 14, 2010 at 7:07 AM, David Nolen  wrote:

> On Mon, Dec 13, 2010 at 8:13 PM, Sunil S Nandihalli <
> sunil.nandiha...@gmail.com> wrote:
>
>> Hello Everybody,
>> I see that Konrad-Hinsen's complex-library in the contrib is a very good
>> fit.. But I am afraid about the performance since the basic operations are
>> being dispatched using multi-methods... Does anybody have any say on this?
>>  Sunil.
>
>
> Contribute a new library that uses protocols and deftype/record ? :)
>
> David
>
> --
> 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

aliasing symbols from clojure core

2010-12-13 Thread Sunil S Nandihalli
Hello everybody,
I am defining a protocol which defines the functions +,-,*,/ .. so I am
excluding those symbols when I do :refer-clojure but I would like to give an
alias to say something like c+ c- c* and c/ how can I do this?

Thanks,
Sunil

-- 
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: complex number library

2010-12-13 Thread Robert McIntyre
It's not a protocol, but you may want to take a look at
clojure.contrib.generic.arithmetic for inspiration.

I wish you luck in your complex number implementation!  I've done my
own using clojure.contrib.generic and can post if it anyone's
interested.

thanks,
--Robert McIntyre

On Mon, Dec 13, 2010 at 9:55 PM, Sunil S Nandihalli
 wrote:
> Thanks David .. but is there a protocol that contains +,*,/,- operations? If
> there is one I can simply add those operations...
> Sunil.
> On Tue, Dec 14, 2010 at 7:07 AM, David Nolen  wrote:
>>
>> On Mon, Dec 13, 2010 at 8:13 PM, Sunil S Nandihalli
>>  wrote:
>>>
>>> Hello Everybody,
>>> I see that Konrad-Hinsen's complex-library in the contrib is a very good
>>> fit.. But I am afraid about the performance since the basic operations are
>>> being dispatched using multi-methods... Does anybody have any say on this?
>>> Sunil.
>>
>> Contribute a new library that uses protocols and deftype/record ? :)
>> David
>>
>> --
>> 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: aliasing symbols from clojure core

2010-12-13 Thread Robert McIntyre
you can always do

(def c+ clojure.core/+)

right after the namespace declaration.

--Robert McIntyre

On Mon, Dec 13, 2010 at 10:20 PM, Sunil S Nandihalli
 wrote:
> Hello everybody,
> I am defining a protocol which defines the functions +,-,*,/ .. so I am
> excluding those symbols when I do :refer-clojure but I would like to give an
> alias to say something like c+ c- c* and c/ how can I do this?
> Thanks,
> Sunil
>
> --
> 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: aliasing symbols from clojure core

2010-12-13 Thread Sunil S Nandihalli
yeah cool I can do that.. thx. But I remember seeing a syntax for it in the
ns macro...
Sunil.

On Tue, Dec 14, 2010 at 8:54 AM, Robert McIntyre  wrote:

> you can always do
>
> (def c+ clojure.core/+)
>
> right after the namespace declaration.
>
> --Robert McIntyre
>
> On Mon, Dec 13, 2010 at 10:20 PM, Sunil S Nandihalli
>  wrote:
> > Hello everybody,
> > I am defining a protocol which defines the functions +,-,*,/ .. so I am
> > excluding those symbols when I do :refer-clojure but I would like to give
> an
> > alias to say something like c+ c- c* and c/ how can I do this?
> > Thanks,
> > Sunil
> >
> > --
> > 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: complex number library

2010-12-13 Thread Sunil S Nandihalli
Robert would love to see your implementation.. The reason I am going for
protocols .. is performance...
Sunil.

On Tue, Dec 14, 2010 at 8:52 AM, Robert McIntyre  wrote:

> It's not a protocol, but you may want to take a look at
> clojure.contrib.generic.arithmetic for inspiration.
>
> I wish you luck in your complex number implementation!  I've done my
> own using clojure.contrib.generic and can post if it anyone's
> interested.
>
> thanks,
> --Robert McIntyre
>
> On Mon, Dec 13, 2010 at 9:55 PM, Sunil S Nandihalli
>  wrote:
> > Thanks David .. but is there a protocol that contains +,*,/,- operations?
> If
> > there is one I can simply add those operations...
> > Sunil.
> > On Tue, Dec 14, 2010 at 7:07 AM, David Nolen 
> wrote:
> >>
> >> On Mon, Dec 13, 2010 at 8:13 PM, Sunil S Nandihalli
> >>  wrote:
> >>>
> >>> Hello Everybody,
> >>> I see that Konrad-Hinsen's complex-library in the contrib is a very
> good
> >>> fit.. But I am afraid about the performance since the basic operations
> are
> >>> being dispatched using multi-methods... Does anybody have any say on
> this?
> >>> Sunil.
> >>
> >> Contribute a new library that uses protocols and deftype/record ? :)
> >> David
> >>
> >> --
> >> 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
>

-- 
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: complex number library

2010-12-13 Thread Robert McIntyre
here it is:

(defrecord imaginary [real complex])

(defmethod + [imaginary Number] [i r]
   (imaginary. (+ (:real i) r) (:complex i)))
(defmethod + [Number imaginary] [r i]
   (+ i r))
(defmethod + [imaginary imaginary] [i1 i2]
   (imaginary. (+ (:real i1) (:real i2))
   (+ (:complex i1) (:complex i2


(defmethod * [imaginary Number] [i r]
   (imaginary. (* r (:real i)) (* r (:complex i
(defmethod * [Number imaginary] [r i]
   (* i r))
(defmethod * [imaginary imaginary] [i1 i2]
   (let [[a1 b1] [(:real i1) (:complex i1)]
 [a2 b2] [(:real i2) (:complex i2)]]
 (imaginary. (- (* a1 a2) (* b1 b2))
 (+ (* a1 b2) (* a2 b1)

(defmethod / imaginary [i]

   (cond (and (not= (:real i) 0) (not= (:complex i) 0))
 (let [[a b] [(:real i) (:complex i)]
   d (- (/ (/ a) (+ (/ a b) (/ b a
   c (/ (+ 1 (* b d)) a)]
   (imaginary. c d))
 (= (:real i) 0)
 (imaginary. 0 (- (/ (:complex i
 (= (:complex i) 0)
 (imaginary. (/ (:real i)) 0)))


(defmethod / [imaginary imaginary] [i1 i2]
   (* i1 (/ i2)))

(defmethod / [imaginary Number] [i r]
   (* i (/ r)))

(defmethod / [Number imaginary] [r i]
   (* r (/ i)))

(defmulti norm class)
(defmethod norm Number [r] r)
(defmethod norm imaginary [i]
   (sqrt (+ (sq (:real i) ) (sq (:complex i)




(def i (imaginary. 0 1))


It's a very basic complex number implementation.
It uses clojure.generic Math operators instead of clojure.core
Maybe it can help you out.
I'd be interested in hearing your protocol implementation.

--Robert McIntyre


On Mon, Dec 13, 2010 at 10:27 PM, Sunil S Nandihalli
 wrote:
> Robert would love to see your implementation.. The reason I am going for
> protocols .. is performance...
> Sunil.
>
> On Tue, Dec 14, 2010 at 8:52 AM, Robert McIntyre  wrote:
>>
>> It's not a protocol, but you may want to take a look at
>> clojure.contrib.generic.arithmetic for inspiration.
>>
>> I wish you luck in your complex number implementation!  I've done my
>> own using clojure.contrib.generic and can post if it anyone's
>> interested.
>>
>> thanks,
>> --Robert McIntyre
>>
>> On Mon, Dec 13, 2010 at 9:55 PM, Sunil S Nandihalli
>>  wrote:
>> > Thanks David .. but is there a protocol that contains +,*,/,-
>> > operations? If
>> > there is one I can simply add those operations...
>> > Sunil.
>> > On Tue, Dec 14, 2010 at 7:07 AM, David Nolen 
>> > wrote:
>> >>
>> >> On Mon, Dec 13, 2010 at 8:13 PM, Sunil S Nandihalli
>> >>  wrote:
>> >>>
>> >>> Hello Everybody,
>> >>> I see that Konrad-Hinsen's complex-library in the contrib is a very
>> >>> good
>> >>> fit.. But I am afraid about the performance since the basic operations
>> >>> are
>> >>> being dispatched using multi-methods... Does anybody have any say on
>> >>> this?
>> >>> Sunil.
>> >>
>> >> Contribute a new library that uses protocols and deftype/record ? :)
>> >> David
>> >>
>> >> --
>> >> 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
>
> --
> 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 mes

Re: Moderately off-topic: installing emacs on OSX

2010-12-13 Thread gaz jones
homebrew installs a mac application to:

/usr/local/Cellar/emacs/23.2/Emacs.app/

by default which you can run from there, or copy to your /Applications
folder to run. running from the terminal doesnt seem to work so well
in my experience.

On Mon, Dec 13, 2010 at 8:43 PM, javajosh  wrote:
> Ok, I decided to nuke ports, fink, and delete every package they ever
> installed. I successfully installed emacs 23.2 via homebrew (there's a
> good overview of homebrew here 
> http://ascarter.net/2010/02/22/homebrew-for-os-x.html).
>
> I started the emacs it installed, but I didn't know how to access the
> scratch buffer, so I started the tutorial. Exit worked (C-x C-c).
> Scroll forward did not (C-v). Needless to say, I couldn't complete the
> elpa instructions. Additionally, emacs pops up a new colorful window
> but keeps the terminal in place. That's not the behavior I personally
> want. Perhaps I will try installing without the --cocoa option.
>
> Also tried the elpa self-install script in Aquamacs (where the scratch
> buffer comes up first thing), but C-j (the 'eval' keystroke) had no
> discernible effect. I tried M-x package-list-packages but it said [No
> Match]. So I assume nothing happened.
>
> Sorry to say but I'm rather annoyed with emacs. I find futzing around
> with package managers and this stuff to be utterly exhausting.
>
> --
> 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: Moderately off-topic: installing emacs on OSX

2010-12-13 Thread javajosh
Aha! You're a genius!

On Dec 13, 8:06 pm, gaz jones  wrote:
> homebrew installs a mac application to:
>
> /usr/local/Cellar/emacs/23.2/Emacs.app/
>
> by default which you can run from there, or copy to your /Applications
> folder to run. running from the terminal doesnt seem to work so well
> in my experience.
>
> On Mon, Dec 13, 2010 at 8:43 PM, javajosh  wrote:
> > Ok, I decided to nuke ports, fink, and delete every package they ever
> > installed. I successfully installed emacs 23.2 via homebrew (there's a
> > good overview of homebrew 
> > herehttp://ascarter.net/2010/02/22/homebrew-for-os-x.html).
>
> > I started the emacs it installed, but I didn't know how to access the
> > scratch buffer, so I started the tutorial. Exit worked (C-x C-c).
> > Scroll forward did not (C-v). Needless to say, I couldn't complete the
> > elpa instructions. Additionally, emacs pops up a new colorful window
> > but keeps the terminal in place. That's not the behavior I personally
> > want. Perhaps I will try installing without the --cocoa option.
>
> > Also tried the elpa self-install script in Aquamacs (where the scratch
> > buffer comes up first thing), but C-j (the 'eval' keystroke) had no
> > discernible effect. I tried M-x package-list-packages but it said [No
> > Match]. So I assume nothing happened.
>
> > Sorry to say but I'm rather annoyed with emacs. I find futzing around
> > with package managers and this stuff to be utterly exhausting.
>
> > --
> > 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: Clojure 1.3 Alpha 4

2010-12-13 Thread Shantanu Kumar

On Dec 14, 2:27 am, Vagif Verdi  wrote:
> Maybe clojure should adopt linux versioning scheme, where even numbers
> are stable production clojure and odd numbers are development branch ?

AFAICT this will seriously affect Maven/Lein/Cake transitive
dependency management when dealing with version-ranges.

Regards,
Shantanu

>
> On Dec 12, 7:09 pm, Stuart Halloway  wrote:
>
>
>
>
>
>
>
> > Clojure 1.3 Alpha 2 is now available at
>
> >        http://clojure.org/downloads
>
> >  0 Changes from 1.3 Alpha 3 to 1.3 Alpha 4
> >  1 Changes from 1.3 Alpha 2 to 1.3 Alpha 3
> >  2 Changes from 1.3 Alpha 1 to 1.3 Alpha 2
> >  3 Changes from 1.2 to 1.3 Alpha 1
> >  4 About Alpha Releases
>
> > = 0 Changes from 1.3 Alpha 3 to 1.3 Alpha 4
>
> >   * normalized unchecked-* fn names
> >   * added *unchecked-math* support
> >   * fixes to binding conveyance (and *agent*)
>
> > = 1 Changes from 1.3 Alpha 2 to 1.3 Alpha 3
>
> >   * fixed filter performance issue introduced in 1.3A2
> >   * with-redefs macro (useful for stubbing)
> >   * print-table
>
> > = 2 Changes from 1.3 Alpha 1 to 1.3 Alpha 2
>
> >   * code path for using vars is now *much* faster for the common case,
> >     and you must explicitly ask for :dynamic bindability
> >   * new: clojure.reflect/reflect
> >    http://dev.clojure.org/display/design/Reflection+API
> >   * new: clojure.data/diff
>
> > = 3 Changes from 1.2 to 1.3 Alpha 1
>
> >   * enhanced primitive support
> >     (http://dev.clojure.org/display/doc/Enhanced+Primitive+Support)
> >   * better exception reporting
> >   * ancillary namespaces no longer auto-load on startup:
> >     clojure.set, clojure.xml, clojure.zip
>
> > = 4 About Alpha Releases
>
> > 1.3 is the first release of Clojure that will include a series of
> > alpha builds. We are adding these builds to support maven and
> > leiningen users, who want a specific artifact that they can target (as
> > opposed to building from master or "moving-target" snapshots).
>
> > If you are the kind of person who used to track master by building
> > from source, but no longer do so because you are using maven or
> > leiningen, alpha releases are for you.

-- 
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: Moderately off-topic: installing emacs on OSX

2010-12-13 Thread Robert McIntyre
I don't know how applicable this might be for you, but I've had no
problems whatsoever checking out the latest source for emacs 23 and
compiling from source using the mac developer tools, all on my
friend's laptop.  All I did was type make and cross my fingers.

you might give it 5 minutes if other things aren't working out.

sincerely,
--Robert McIntyre

On Mon, Dec 13, 2010 at 11:12 PM, javajosh  wrote:
> Aha! You're a genius!
>
> On Dec 13, 8:06 pm, gaz jones  wrote:
>> homebrew installs a mac application to:
>>
>> /usr/local/Cellar/emacs/23.2/Emacs.app/
>>
>> by default which you can run from there, or copy to your /Applications
>> folder to run. running from the terminal doesnt seem to work so well
>> in my experience.
>>
>> On Mon, Dec 13, 2010 at 8:43 PM, javajosh  wrote:
>> > Ok, I decided to nuke ports, fink, and delete every package they ever
>> > installed. I successfully installed emacs 23.2 via homebrew (there's a
>> > good overview of homebrew 
>> > herehttp://ascarter.net/2010/02/22/homebrew-for-os-x.html).
>>
>> > I started the emacs it installed, but I didn't know how to access the
>> > scratch buffer, so I started the tutorial. Exit worked (C-x C-c).
>> > Scroll forward did not (C-v). Needless to say, I couldn't complete the
>> > elpa instructions. Additionally, emacs pops up a new colorful window
>> > but keeps the terminal in place. That's not the behavior I personally
>> > want. Perhaps I will try installing without the --cocoa option.
>>
>> > Also tried the elpa self-install script in Aquamacs (where the scratch
>> > buffer comes up first thing), but C-j (the 'eval' keystroke) had no
>> > discernible effect. I tried M-x package-list-packages but it said [No
>> > Match]. So I assume nothing happened.
>>
>> > Sorry to say but I'm rather annoyed with emacs. I find futzing around
>> > with package managers and this stuff to be utterly exhausting.
>>
>> > --
>> > 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: Moderately off-topic: installing emacs on OSX

2010-12-13 Thread javajosh


On Dec 9, 11:11 pm, Andy Fingerhut  wrote:

>
> Follow the instructions on the ELPA page for installing it:
>
>      http://tromey.com/elpa/install.html
>
> After you do M-x package-list-packages, go down the list of packages  
> until the cursor is on the line for the package "clojure-mode", press  
> the "i" key to mark it for later installation.  Do the same for the  
> "slime-repl" package.  Then press "x" to execute the installations of  
> those marked packages.

Thanks for the good writeup. After getting emacs installed (I deviated
from your instructions on that part) I executed the packages, and got
this error:

<...lots snipped>
slime.el:9163:1:Warning: the following functions are not known to be
defined:
slime-current-parser-state,
common-lisp-hyperspec-strip-cl-package, hyperspec-lookup

Compiling no file at Mon Dec 13 20:25:18 2010

Compiling file /Users/josh/.emacs.d/elpa/slime-repl-20100404/slime-
repl-pkg.el at Mon Dec 13 20:25:18 2010

Compiling file /Users/josh/.emacs.d/elpa/slime-repl-20100404/slime-
repl.el at Mon Dec 13 20:25:18 2010
slime-repl.el:105:27:Warning: reference to free variable
`slime-connection-output-buffer'
slime-repl.el:122:39:Error: No setf-method known for slime-connection-
output-buffer

==
So, yes, a bunch of warnings and then an error. And BTW I can see why
people joke that Emacs is an operating system.

-- 
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: Moderately off-topic: installing emacs on OSX

2010-12-13 Thread Phil Hagelberg
On Mon, Dec 13, 2010 at 8:27 PM, Robert McIntyre  wrote:
> I don't know how applicable this might be for you, but I've had no
> problems whatsoever checking out the latest source for emacs 23 and
> compiling from source using the mac developer tools, all on my
> friend's laptop.  All I did was type make and cross my fingers.

If you check out the source for Emacs 24, it comes with package.el
already, so once it's released it will definitely be the lowest-hassle
way to get started. No need to worry about instability; I've been
following Emacs trunk since 2007 or so without any issues.

Aquamacs on the other hand is well-known to break basic
functionality--it's impossible for most elisp authors to test their
code on it since it's not cross-platform.

-Phil

-- 
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: Moderately off-topic: installing emacs on OSX

2010-12-13 Thread javajosh
On Dec 13, 8:51 pm, Phil Hagelberg  wrote:
> If you check out the source for Emacs 24, it comes with package.el
> already, so once it's released it will definitely be the lowest-hassle
> way to get started. No need to worry about instability; I've been
> following Emacs trunk since 2007 or so without any issues.

I'll keep that in mind. It would be especially easy if there was a
keystroke for checkout and build - something easy like C-x C-m C-g M-d
M-a checkout-and-compile-with-options

But seriously, it looks like despite the SLIME error it installed, and
the lein stuff installed without a problem, so I have a pretty decent
environment. Phew, that was easy!

-- 
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: Moderately off-topic: installing emacs on OSX

2010-12-13 Thread Phil Hagelberg
On Mon, Dec 13, 2010 at 9:10 PM, javajosh  wrote:
> But seriously, it looks like despite the SLIME error it installed, and
> the lein stuff installed without a problem, so I have a pretty decent
> environment. Phew, that was easy!

Yeah, though it's not so bad on OSes that have a good built-in package manager.

The compilation warnings are annoying but harmless. Basically the
slime devs are sloppy, so their code can't get byte-compiled, but
Emacs is able to fall back to the interpreter so everything works
fine. I've tried to make it clear in the docs that you can ignore the
warnings, but they still look pretty intimidating.

-Phil

-- 
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: complex number library

2010-12-13 Thread Konrad Hinsen

On 13 Dec 2010, at 22:41, Sunil S Nandihalli wrote:

 I found two libraries for complex numbers...One in  
apache.common.math and the other in clojure-contrib but which  
clearly states that it is quiet incomplete ... can anybody make a  
suggestion for a good alternative..


The one in clojure.contrib is indeed quite incomplete, but completing  
it is a trivial job, it just takes some time. Any motivated user could  
do it in my opinion.


A more relevant distinction is that clojure.contrib.complex uses  
Clojure maps and multimethod-based functions. That makes it much less  
efficient than a Java-based library such as Apache commons, but also  
better integrated with other Clojure code. So the first choice you  
should make is between clojure.contrib.complex and any Java library -  
there are a few more in the latter category.


Konrad.

--
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: complex number library

2010-12-13 Thread Konrad Hinsen

On 14 Dec 2010, at 04:22, Robert McIntyre wrote:


It's not a protocol, but you may want to take a look at
clojure.contrib.generic.arithmetic for inspiration.

I wish you luck in your complex number implementation!  I've done my
own using clojure.contrib.generic and can post if it anyone's
interested.


That's actually what clojure.contrib.complex-numbers already uses! And  
it's based on multimethods, not protocols, because of all those binary  
operations.


Konrad.

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