Re: Idiomatic Clojure namespace names

2010-07-10 Thread Mike Meyer
On Sat, 10 Jul 2010 03:42:16 -0700 (PDT) Jeff Rose wrote: > On Jul 9, 6:22 pm, Mike Meyer 620...@mired.org> wrote: > > How have you managed to miss the second half of "that's the way they > > do it in Java", which is "and we need to interoperate with other JVM > > languages." Like it or not, one

Re: Idiomatic Clojure namespace names

2010-07-10 Thread Phil Hagelberg
On Sat, Jul 10, 2010 at 3:42 AM, Jeff Rose wrote: > Luckily for us, I think the tide is already rising on this > conversation.  Most prominent Clojure libraries are adopting the same > packaging scheme as clojure.core, and we are uploading our libraries > to the wild and crazy, totally uncensored

Re: Idiomatic Clojure namespace names

2010-07-10 Thread Mikhail Kryshen
On 10 июл, 14:42, Jeff Rose wrote: > I also disagree with this concept of putting the language in the > package name. One of the benefits of compiling down to a common > runtime is that we don't need to care what language something was > written in. I think this kind of meta-data, along with the

Re: Idiomatic Clojure namespace names

2010-07-10 Thread Martin DeMello
On Sat, Jul 10, 2010 at 2:56 PM, Mike Meyer wrote: >>As another suggestion how about clj.handle.library e.g >>clj.mired.proclog >>clj.weavejester.compojure >>clj.acme-corp.dynamite > > Why should I prefer clj.mired, shared with gods knows who over org.mired, > shared with nobody? You wouldn't; s

Re: Idiomatic Clojure namespace names

2010-07-10 Thread Martin DeMello
On Sat, Jul 10, 2010 at 12:06 PM, Saul Hazledine wrote: > > As another suggestion how about clj.handle.library e.g > clj.mired.proclog > clj.weavejester.compojure > clj.acme-corp.dynamite +1 martin -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

Re: Idiomatic Clojure namespace names

2010-07-10 Thread Paul Moore
On 10 July 2010 09:06, James Reeves wrote: > On 9 July 2010 17:46, Paul Moore wrote: >> Is there any benefit to using a name like foo.core (or foo.api) rather >> than simply foo (beyond sytlistic considerations, that is)? > > Clojure compiles "foo" to a package-less class called "foo". > "foo.cio

Re: Idiomatic Clojure namespace names

2010-07-10 Thread Jeff Rose
On Jul 9, 6:22 pm, Mike Meyer wrote: > How have you managed to miss the second half of "that's the way they > do it in Java", which is "and we need to interoperate with other JVM > languages." Like it or not, one of the biggest draws of Clojure is > that it interoperates with Java. Nothing abou

Re: Idiomatic Clojure namespace names

2010-07-10 Thread Mike Meyer
"Saul Hazledine" wrote: >On Jul 10, 12:16 am, Mike Meyer 620...@mired.org> wrote: >> On Fri, 9 Jul 2010 12:49:05 -0700 (PDT) >> >> j-g-faustus wrote: >> > That said, I would leap at a chance to shorten Java names, even if it >> > were just to chop off the leading "com" or "org". >> >> As the ow

Re: Idiomatic Clojure namespace names

2010-07-10 Thread Laurent PETIT
2010/7/10 Meikel Brandmeyer > Hello Laurent, > > Am 09.07.2010 um 18:30 schrieb Laurent PETIT: > > > But still I prefer to have the library name at the end of the namespace, > it's easier to spot than in the middle (e.g. I prefer net.cgrand.parsley to > paredit.core) > > Now that is a strange arg

Re: Idiomatic Clojure namespace names

2010-07-10 Thread Meikel Brandmeyer
Hello Laurent, Am 09.07.2010 um 18:30 schrieb Laurent PETIT: > But still I prefer to have the library name at the end of the namespace, it's > easier to spot than in the middle (e.g. I prefer net.cgrand.parsley to > paredit.core) Now that is a strange argument. net.cgrand.parsley vs. parsley.a

Re: Idiomatic Clojure namespace names

2010-07-10 Thread James Reeves
On 9 July 2010 17:46, Paul Moore wrote: > Is there any benefit to using a name like foo.core (or foo.api) rather > than simply foo (beyond sytlistic considerations, that is)? Clojure compiles "foo" to a package-less class called "foo". "foo.ciore" is compiled to a class called "core" in the packa

Re: Idiomatic Clojure namespace names

2010-07-09 Thread Saul Hazledine
On Jul 10, 12:16 am, Mike Meyer wrote: > On Fri, 9 Jul 2010 12:49:05 -0700 (PDT) > > j-g-faustus wrote: > > That said, I would leap at a chance to shorten Java names, even if it > > were just to chop off the leading "com" or "org". > > As the owner of mired.org, but not of mired.com (and I don't

Re: Idiomatic Clojure namespace names

2010-07-09 Thread Mike Meyer
On Fri, 9 Jul 2010 12:49:05 -0700 (PDT) j-g-faustus wrote: > That said, I would leap at a chance to shorten Java names, even if it > were just to chop off the leading "com" or "org". As the owner of mired.org, but not of mired.com (and I don't know the registered owner) or .net, or of that domain

Re: Idiomatic Clojure namespace names

2010-07-09 Thread j-g-faustus
On Jul 9, 8:14 pm, James Reeves wrote: > Ruby and Rubygems has been using single-segment namespaces for years, > with no major problems. I don't think name clashes are a problem in > practise, because projects tend to have original names. It works up to a point. It is claimed that university-leve

Re: Idiomatic Clojure namespace names

2010-07-09 Thread Paul Moore
On 9 July 2010 17:30, Laurent PETIT wrote: > Indeed, foo.api sounds better than foo.core to me, now than I'm exposed to > that (core sounds more like 'internals'). But still I prefer to have the > library name at the end of the namespace, it's easier to spot than in the > middle (e.g. I prefer net

Re: Idiomatic Clojure namespace names

2010-07-09 Thread Mike Meyer
On Fri, 9 Jul 2010 19:14:00 +0100 James Reeves wrote: > On 8 July 2010 16:56, Chas Emerick wrote: > > Clojars is a disaster as an authoritative software artifact repository IMO, > > and nothing about how it's being used should be taken as a template for > > anything else. > Ruby and Rubygems has

Re: Idiomatic Clojure namespace names

2010-07-09 Thread James Reeves
On 8 July 2010 16:56, Chas Emerick wrote: > Clojars is a disaster as an authoritative software artifact repository IMO, > and nothing about how it's being used should be taken as a template for > anything else. Ruby and Rubygems has been using single-segment namespaces for years, with no major pr

Re: Idiomatic Clojure namespace names

2010-07-09 Thread Phil Hagelberg
On Thu, Jul 8, 2010 at 11:09 PM, j-g-faustus wrote: > From their FAQ on the same page: > - I have a patched version of the foo project developed at foo.com, > what groupId should I use? > * When you patch / modify a third party project, that patched version > becomes your project and therefore sho

Re: Idiomatic Clojure namespace names

2010-07-09 Thread Laurent PETIT
Hello, 2010/7/9 Saul Hazledine > On Jul 8, 8:38 pm, Laurent PETIT wrote: > > My opinion: no need to create problems when there already are accepted > > solutions. > > > > In the java world, there are conventions for naming things. Stick with > them. > > > > I do see your point and if this is th

Re: Idiomatic Clojure namespace names

2010-07-09 Thread Saul Hazledine
On Jul 8, 8:38 pm, Laurent PETIT wrote: > My opinion: no need to create problems when there already are accepted > solutions. > > In the java world, there are conventions for naming things. Stick with them. > I do see your point and if this is the way the consensus moves I'll follow it. However,

Re: Idiomatic Clojure namespace names

2010-07-09 Thread Mike Meyer
On Fri, 9 Jul 2010 03:01:01 -0700 (PDT) Jeff Rose wrote: > I've asked myself this same question 50 times now. My best experience > so far with a community that had packages was Ruby, and it was > incredibly simple. Everyone can choose whatever name they like for > their package as long as it is

Re: Idiomatic Clojure namespace names

2010-07-09 Thread j-g-faustus
On Jul 9, 5:58 am, Mike Meyer wrote: > The other non- project requirement (a page linking the project to the domain > name) is pretty much contrary to the quote from the Java specification. By my reading, they are talking about something different - the "groupId" which identifies the project i

Re: Idiomatic Clojure namespace names

2010-07-09 Thread Jeff Rose
I've asked myself this same question 50 times now. My best experience so far with a community that had packages was Ruby, and it was incredibly simple. Everyone can choose whatever name they like for their package as long as it isn't up on rubygems yet. I am strongly in favor of dropping these r

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Mike Meyer
"Armando Blancas" wrote: >> So they wouldn't object if I wanted to use my wordpress or sourceforge >> domains? > >If I understand this correctly, they wouldn't: > >http://maven.apache.org/guides/mini/guide-central-repository-upload.html By my reading, they would. A wordpress domain is simply ou

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Armando Blancas
> So they wouldn't object if I wanted to use my wordpress or sourceforge > domains? If I understand this correctly, they wouldn't: http://maven.apache.org/guides/mini/guide-central-repository-upload.html -- You received this message because you are subscribed to the Google Groups "Clojure" gro

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Mike Meyer
"Armando Blancas" wrote: >> Personally, I trust the inventors of the convention more than people >> running a single project. But that begs two questions: how do they >> define "ownership" of a domain, > >Sounds like common usage; e.g. as the owner of mired.org you get to >use it as groupId. So

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Armando Blancas
> Personally, I trust the inventors of the convention more than people > running a single project. But that begs two questions: how do they > define "ownership" of a domain, Sounds like common usage; e.g. as the owner of mired.org you get to use it as groupId. and (the question that launched the

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Mike Meyer
On Thu, 8 Jul 2010 21:29:56 +0200 Meikel Brandmeyer wrote: > Hi, > > Am 08.07.2010 um 18:52 schrieb Mike Meyer: > > > People seem to be confused by the Java namespace convention deriving > > names from DNS. They think that the names actually have something to > > do with the domains in question

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Laurent PETIT
My opinion: no need to create problems when there already are accepted solutions. In the java world, there are conventions for naming things. Stick with them. -> You want to fly under the radar in your enterprise with jars full of clojure sources ? Don't get catched because your lib risks a clash

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Meikel Brandmeyer
Hi, Am 08.07.2010 um 18:52 schrieb Mike Meyer: > People seem to be confused by the Java namespace convention deriving > names from DNS. They think that the names actually have something to > do with the domains in question. This isn't the case. Quoting the > Java Language Specification "The sugg

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Mike Meyer
On Thu, 8 Jul 2010 09:22:01 -0700 Phil Hagelberg wrote: > On Thu, Jul 8, 2010 at 7:15 AM, Meikel Brandmeyer wrote: > >> So maybe it's best to use the Java convention after all? > >> It has been proven to scale, is widely used and plays well with > >> whatever else is running on the JVM, which ar

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Armando Blancas
I'll do the simple thing when I can, so in those cases I use foo. On Jul 7, 9:13 am, James Reeves wrote: > I've kinda asked this question before, but I framed in the context of > a suggestion, and the discussion got bogged down with no real answer. > > So this time, let me keep it simple: if I ha

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Phil Hagelberg
On Thu, Jul 8, 2010 at 7:15 AM, Meikel Brandmeyer wrote: >> So maybe it's best to use the Java convention after all? >> It has been proven to scale, is widely used and plays well with >> whatever else is running on the JVM, which are strong points in its >> favor. > > I still don't buy it. The com

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Pedro Henriques dos Santos Teixeira
On Thu, Jul 8, 2010 at 2:25 AM, j-g-faustus wrote: > On Jul 8, 5:21 am, Mike Meyer 620...@mired.org> wrote: > > So maybe it's best to use the Java convention after all? > It has been proven to scale, is widely used and plays well with > whatever else is running on the JVM, which are strong points

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Chas Emerick
On Jul 8, 2010, at 10:15 AM, Meikel Brandmeyer wrote: What happens with the prefix-with-your-domain prefix can be seen on clojars at the moment. People upload stuff under names they don't own. There are several vimclojure packages. Not a single of these are projects on their own right. Just var

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Mike Meyer
On Thu, 8 Jul 2010 07:15:45 -0700 (PDT) Meikel Brandmeyer wrote: > Hi, > > On Jul 8, 7:25 am, j-g-faustus wrote: > > > So maybe it's best to use the Java convention after all? > > It has been proven to scale, is widely used and plays well with > > whatever else is running on the JVM, which are

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Meikel Brandmeyer
Hi, On Jul 8, 7:25 am, j-g-faustus wrote: > So maybe it's best to use the Java convention after all? > It has been proven to scale, is widely used and plays well with > whatever else is running on the JVM, which are strong points in its > favor. I still don't buy it. The company I work for chan

Re: Idiomatic Clojure namespace names

2010-07-08 Thread j-g-faustus
On Jul 8, 5:21 am, Mike Meyer wrote: > You're overlooking that one of the major benefits of Clojure is that > it interoperates with other JVM languages. So any idiom it uses needs > to have some assurance that it won't clash with an idiom used by those > other languages. It's a good point. > Tha

Re: Idiomatic Clojure namespace names

2010-07-07 Thread Daniel Gagnon
> > > Why would you ever type that more than once? Just use :as. > > Because you use it in more than one file / project. -- 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

Re: Idiomatic Clojure namespace names

2010-07-07 Thread Michael Gardner
On Jul 7, 2010, at 8:53 PM, j-g-faustus wrote: > The disadvantage is of course that you end up with names like > org.apache.http.client.params.ClientPNames/ > CONNECTION_MANAGER_FACTORY_CLASS_NAME > which gets old really quick if you have to type it a lot :) Why would you ever type that more than

Re: Idiomatic Clojure namespace names

2010-07-07 Thread Mike Meyer
On Wed, 7 Jul 2010 18:53:39 -0700 (PDT) j-g-faustus wrote: > On Jul 7, 7:55 pm, James Reeves wrote: > > For the purposes of this discussion, let us assume that "foo" is a > > suitably unique library name, and it is highly unlikely there exist > > any other libraries with the same name. > > It s

Re: Idiomatic Clojure namespace names

2010-07-07 Thread j-g-faustus
On Jul 7, 7:55 pm, James Reeves wrote: > For the purposes of this discussion, let us assume that "foo" is a > suitably unique library name, and it is highly unlikely there exist > any other libraries with the same name. It sounds like Clojure doesn't have an idiom for namespace names yet, so I gu

Re: Idiomatic Clojure namespace names

2010-07-07 Thread Mike Meyer
"Meikel Brandmeyer" wrote: >Hi, > >Am 07.07.2010 um 21:41 schrieb Mike Meyer: > >> Why bother renaming it when you move? > >Why come into a situation where bothering is a question? You would have to ask the people at sun.com who created the convention that one. >PS: You K-9 Mail sends every me

Re: Idiomatic Clojure namespace names

2010-07-07 Thread Meikel Brandmeyer
Hi, Am 07.07.2010 um 21:41 schrieb Mike Meyer: > Why bother renaming it when you move? Why come into a situation where bothering is a question? Sincerely Meikel PS: You K-9 Mail sends every message twice. -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: Idiomatic Clojure namespace names

2010-07-07 Thread Mike Meyer
"Meikel Brandmeyer" wrote: >Hi, > >Am 07.07.2010 um 18:13 schrieb James Reeves: > >> - foo.core >> - com.github.weavejester.foo > >I would go with one of these two. At the moment I prefer the former. I think >putting domain names in the package is suboptimal for a quite simple reason. >I'm a h

Re: Idiomatic Clojure namespace names

2010-07-07 Thread Saul Hazledine
On Jul 7, 5:24 pm, Laurent PETIT wrote: > if you intend to share the library, then use the classical prefix notation: > >   * either of the form net.reeves.james.foo  ( or any reversed tld you "own" ) >   * either of the form com.yourcorp.foo > com.read.to.easy.that.not.its.but -- You received

Re: Idiomatic Clojure namespace names

2010-07-07 Thread Pedro Henriques dos Santos Teixeira
On Wed, Jul 7, 2010 at 2:55 PM, James Reeves wrote: > On 7 July 2010 17:24, Laurent PETIT wrote: >> Of course, if your library has an especially cryptic name (as we have >> with counterclockwise: ccw), then having also directly foo may also >> not interfere with other's namespaces. That's the pat

Re: Idiomatic Clojure namespace names

2010-07-07 Thread Meikel Brandmeyer
Hi, Am 07.07.2010 um 18:13 schrieb James Reeves: > - foo.core > - com.github.weavejester.foo I would go with one of these two. At the moment I prefer the former. I think putting domain names in the package is suboptimal for a quite simple reason. I'm a hobbyist. I don't own a domain. Eh? What

Re: Idiomatic Clojure namespace names

2010-07-07 Thread James Reeves
On 7 July 2010 17:24, Laurent PETIT wrote: > Of course, if your library has an especially cryptic name (as we have > with counterclockwise: ccw), then having also directly foo may also > not interfere with other's namespaces. That's the path we took for > counterclockwise, and our top-level namesp

Re: Idiomatic Clojure namespace names

2010-07-07 Thread Peter Schuller
This is not in answer to the question, but I just wanted to say: I love that fact that Clojure got namespaces "right" in the sense of allowing aliasing on import. Some languages don't do this, and you end up with very difficult naming issues since you suddenly have a huge desire to keep it short *w

Re: Idiomatic Clojure namespace names

2010-07-07 Thread Laurent PETIT
Hi, 2010/7/7 James Reeves : > I've kinda asked this question before, but I framed in the context of > a suggestion, and the discussion got bogged down with no real answer. > > So this time, let me keep it simple: if I have a small Clojure > library, "foo", which only has one namespace, what is the