Build tool for mixed Clojure/Java projects

1,296 views
Skip to first unread message

Konrad Hinsen

unread,
Jul 3, 2011, 3:57:55 PM7/3/11
to Clojure
I am looking for a build tool that fulfills the following requirements:

1) Must handle Clojure namespaces that are AOT-compiled.
2) Must handle Clojure namespaces that are not AOT-compiled.
3) Must handle Java source code files.
4) Must handle dependencies in the form of on-disk jar files (not in
any repository)
5) No XML configuration files.

Candidates that I have tried and found insufficient include
- Leiningen (no dependencies without repositories)
- Cake (doesn't handle Java source files)
- Eclipse/Counterclockwise (doesn't handle AOT compilation)
- ant, maven: XML configuration files
- scons: incomplete Java support, no Clojure support

Is there anything else worth trying?

Thanks in advance,
Konrad.

B Smith-Mannschott

unread,
Jul 3, 2011, 4:36:45 PM7/3/11
to clo...@googlegroups.com

Speaking for zero actual experience:
Have you tried Gradle?
http://www.gradle.org/

// ben

> Is there anything else worth trying?
>
> Thanks in advance,
>  Konrad.
>

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

Meikel Brandmeyer

unread,
Jul 3, 2011, 5:27:10 PM7/3/11
to clo...@googlegroups.com
Hi,

Am 03.07.2011 um 22:36 schrieb B Smith-Mannschott:

> On Sun, Jul 3, 2011 at 21:57, Konrad Hinsen <konrad...@fastmail.net> wrote:
>> I am looking for a build tool that fulfills the following requirements:
>>
>> 1) Must handle Clojure namespaces that are AOT-compiled.
>> 2) Must handle Clojure namespaces that are not AOT-compiled.
>> 3) Must handle Java source code files.
>> 4) Must handle dependencies in the form of on-disk jar files (not in any
>> repository)
>> 5) No XML configuration files.
>>
>> Candidates that I have tried and found insufficient include
>> - Leiningen (no dependencies without repositories)
>> - Cake (doesn't handle Java source files)
>> - Eclipse/Counterclockwise (doesn't handle AOT compilation)
>> - ant, maven: XML configuration files
>> - scons: incomplete Java support, no Clojure support
>
> Speaking for zero actual experience:
> Have you tried Gradle?
> http://www.gradle.org/

Speaking with a bit of experience: gradle has a check for all of your points, although clojuresque doesn't handle mixed 1) and 2) points. At the moment it's “either or”. Since you are screwed anyway when you have to use AOT-compilation. But I'm open for arguments why one would want to mix points 1) and 2).

Sincerely
Meikel

Phil Hagelberg

unread,
Jul 3, 2011, 6:06:21 PM7/3/11
to clo...@googlegroups.com
Konrad Hinsen <konrad...@fastmail.net> writes:

> I am looking for a build tool that fulfills the following requirements:

> 4) Must handle dependencies in the form of on-disk jar files (not in
> any repository)

For the record, leiningen can do this by adding a repository with a
file:/// URL; it's just not documented because I think it's a bad idea.

-Phil

Wilson MacGyver

unread,
Jul 3, 2011, 6:11:18 PM7/3/11
to clo...@googlegroups.com
I recommend gradle clojuresque. Our clojure code deploys to WAR. so it's
always AOTed.

but we use features 2,3,4,5 on your list easily. the project has
java, clojure and
groovy code. it just works.

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

--
Omnem crede diem tibi diluxisse supremum.

Anthony Grimes

unread,
Jul 3, 2011, 7:30:15 PM7/3/11
to clo...@googlegroups.com
Cake can indeed handle Java source files. Throw them in src/jvm, I believe. Leiningen and cake can both handle on-disk jar files, but (at least in cakes case) they need to be installed in the local repository.

Ken Wesson

unread,
Jul 3, 2011, 8:16:38 PM7/3/11
to clo...@googlegroups.com

Why?

One pillar of Clojure philosophy is to get out of the way and let
programmers get the job done, with a minimum of fuss and ceremony.
Unlike Java.

Requiring any project that has dependencies, even if these are only
other local projects, have a repository adds gratuitous ceremony.

And this is especially true if the user has little or no prior
experience setting up and working with repositories, as they grow
their programming skillset. Ordinarily, they would gradually progress
from single-file projects to multi-file projects to projects with
common, locally-installed third-party libraries and/or other local
projects as dependencies, and eventually to projects that use and are
hosted on repositories of some sort. Your "I think it's a bad idea"
amounts to thinking that forcing the third and fourth steps in that
progression to be combined into one single giant leap is a *good*
idea, and I'm rather dubious of any such claim. One new source of
complexity should be mastered at a time, in my view, absent a *very*
good reason, and repositories are definitely a humongous source of
complexity, so an especially strong case can be made that that
*particular* new source of complexity should be tackled separately
from any other.

(Just consider: starting out using repositories requires mastering a
whole new client/server app type on a par with email, newsgroups, ftp,
and the web; then there's all these different hosting alternatives --
maven, github, sourceforge, google code, etc. and sometimes software
of the same name or closely related like maven and git, as well as
other software like rcs, cvs, and svn; then there's the associated
terminology: commits, pull requests, push requesus, branches, masters,
forks, checkouts and checkins, and so forth, not all of them
applicable to each individual variation on the theme; then there's
individual projects' often-partly-unwritten rules regarding forking,
commit access, pull/push requests, and what-have-you; and setting up a
local repository of one's own means installing a server, securing it,
installing a client, learning how to use it, and so on and so forth.

Indeed, a lot of people will never before have installed and secured a
server of any kind in their entire lives, I expect; that itself is
something whose learning I think should probably be tackled
separately, but if you haven't already done something like run your
own listserv or web server (not just site, you own httpd process which
if hacked means your own computer is violated), then starting to use
local version control means tackling that at the same time as a load
of other new and moderately complex things. To which your
recommendation adds a third group of complicated new things. So, it's
not even two *steps* combining into one giant leap; it's a step
followed by an already-fairly-large *leap* combining into one
*ridiculous* leap.)

--
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.

Mark Derricutt

unread,
Jul 3, 2011, 9:29:44 PM7/3/11
to clo...@googlegroups.com
The other option is Polyglot Maven, which hasn't really seen much movement lately, but gives you maven power without the XML ( clojure source, yaml, etc. )

http://polyglot.sonatype.org/clojure.html

I'm not sure what the current state is in, and I think since I last committed to it the clojure support has been updated/rewritten ( I believe the wiki docs are out of date now as well ).


--
"Great artists are extremely selfish and arrogant things" — Steven Wilson, Porcupine Tree

Steve

unread,
Jul 3, 2011, 9:51:21 PM7/3/11
to Clojure
On Jul 4, 10:16 am, Ken Wesson <kwess...@gmail.com> wrote:
>
> Requiring any project that has dependencies, even if these are only
> other local projects, have a repository adds gratuitous ceremony.
>

I don't know what it is like with leiningen, but with maven a
"repository" doesn't necessarily mean you're running a client/server
app on a machine - there's a directory (~/.m2/repository) on your
machine that maven checks for artifacts that is considered a local
repository. When you run "mvn install" they get added to this
directory and then your other projects can depend on them.

So if you've already made the leap to using maven with one project,
using it for another is not a big deal.

- Steve

Ken Wesson

unread,
Jul 3, 2011, 10:01:49 PM7/3/11
to clo...@googlegroups.com

OK...ridiculous leap reduced to merely huge leap then, if you only
have to learn 2 of these three things at once: big, interdependent
groups of projects, maven/etc. repository-accessing tools, and server
administration. :)

Phil Hagelberg

unread,
Jul 3, 2011, 10:27:20 PM7/3/11
to clo...@googlegroups.com

Encouraging "works on my machine" builds is by definition antithetical to the very idea of build automation. Leiningen is not a "yes tool".

-Phil

Ken Wesson

unread,
Jul 3, 2011, 10:44:26 PM7/3/11
to clo...@googlegroups.com
On Sun, Jul 3, 2011 at 10:27 PM, Phil Hagelberg <ph...@hagelb.org> wrote:
> Encouraging "works on my machine" builds is by definition antithetical to
> the very idea of build automation. Leiningen is not a "yes tool".

That presupposes that nobody will ever use leiningen for any case
that's intermediate between, or orthogonal to, "personal project,
single file, no unusual deps, just load in REPL in IDE and use" and
"publicly visible large open source project with many deps that
everyone and his great-aunt should be able to build". For example,
"personal project, many files and local/third party deps" is not
covered and neither is "closed-source project for
small-to-medium-sized company without own version control server". For
the former, and arguably the latter, anything involving the word
"repository" in any way shape or form strikes me as
potentially-unnecessary ceremony. (Larger businesses will presumably
have in-house version control and keep proprietary code bases in a
repository, so there's no issue there. Also, larger businesses can
generally just buy their way out of any problem, inconvenience, or
excess of ceremony by hiring an extra person or two to deal with it.
:) Meanwhile, large FOSS projects all seem these days to have public
version control repositories, either freely provided by sites like
github and sourceforge or, in the most high profile and especially
business-backed cases, their very own server farms with project web
sites and repository.)

Shantanu Kumar

unread,
Jul 4, 2011, 1:16:40 AM7/4/11
to Clojure
Maven works, but if you don't want XML why not just use Leiningen?
Split your code base into various modules (each module having its own
project.clj) and have a shell script (or PowerShell script if you're
on Windows) to take care of the dependencies while building across
modules.

For example, take this use-case of modules A, B, C and D:

A --> B --> C
`-> D

(A depends on B and D, B depends on C)

Write a shell script:

--------------------------------
#!/usr/bin/env bash
p_home=`dirname $0`

function mod {
cd $p_home/modules/$1 # arg is module dir
lein deps && lein jar && lein install
}

# To build A (all)
mod "C" && mod "B" && mod "D" && mod "A"
--------------------------------

If AOT gives you trouble, factor those source files out into a
dependency module and so on. IMHO this approach gives much more
flexibility than any constrained multi-module feature of a build tool.

Regards,
Shantanu

Ken Wesson

unread,
Jul 4, 2011, 1:20:10 AM7/4/11
to clo...@googlegroups.com
> Write a shell script ...

And this is how leiningen making users jump through hoops to do fairly
simple builds with local dependencies *itself* can encourage "works on
my machine" builds. :) Which is preferable from that stand point,
after all: a leiningen build script or lots of idiosyncratic shell
scripts?

Phil Hagelberg

unread,
Jul 4, 2011, 1:27:41 AM7/4/11
to clo...@googlegroups.com
Ken Wesson <kwes...@gmail.com> writes:

>> For example, take this use-case of modules A, B, C and D:
>>
>> A --> B --> C
>>    `-> D
>>
>> (A depends on B and D, B depends on C)
>>
>> Write a shell script ...
>
> And this is how leiningen making users jump through hoops to do fairly
> simple builds with local dependencies *itself* can encourage "works on
> my machine" builds. :) Which is preferable from that stand point,
> after all: a leiningen build script or lots of idiosyncratic shell
> scripts?

Off the top of my head:

(ns leiningen.sub
(:use [leiningen.core :only [apply-task task-not-found]]))

(defn sub [task-name & args]
(doseq [project (projects-in-dir)]
(apply-task task-name project args task-not-found)))

Implementation of projects-in-dir left as an exercise for the
reader. Shouldn't be more than four lines. Push the lein-subs plugin to
clojars: problem solved in a repeatable, maintainable way.

-Phil

Konrad Hinsen

unread,
Jul 4, 2011, 3:14:01 AM7/4/11
to clo...@googlegroups.com
On 3 Jul 2011, at 21:57, Konrad Hinsen wrote:

> I am looking for a build tool that fulfills the following
> requirements:
>
> 1) Must handle Clojure namespaces that are AOT-compiled.
> 2) Must handle Clojure namespaces that are not AOT-compiled.
> 3) Must handle Java source code files.
> 4) Must handle dependencies in the form of on-disk jar files (not in
> any repository)
> 5) No XML configuration files.

Thanks for everyone's suggestions and comments!

Some remarks:

Gradle/clojuresque: I never tried them, but it looks like I should!

AOT compilation: My case is probably a bit complex in this respect. I
need AOT compilation only because I want to produce an executable jar,
so there is at least one namespace that must be AOT compiled. For
building that executable jar, it doesn't matter if everything else is
AOT compiled as well. But I want to be able to build a standard
library jar with just the Clojure code to make sure it works with
future Clojure releases. One solution would be to have two completely
different builds, one for the executable jar and one for the library
version, but using the same set of source code files.


On 4 Jul 2011, at 00:06, Phil Hagelberg wrote:

>
>> 4) Must handle dependencies in the form of on-disk jar files (not in
>> any repository)
>

> For the record, leiningen can do this by adding a repository with a
> file:/// URL; it's just not documented because I think it's a bad
> idea.

With absolute filenames in a URL, it's indeed a bad idea because the
project becomes specific to a machine/installation. What I'd like to
see instead is a project-local repository, e.g. a "deps" folder with
jar files and source code directories.

There are several reasons why I want dependencies outside of
repositories:

1) Simplicity. I want to distribute a single tar file to collaborators
(who are new to Clojure and the JVM world) containing all dependencies
and build scripts. I want to tell them "install <name of build tool>,
take this file, play with the source code, and just type <build-
command> to build an executable". They will struggle with a new
language and a new environment already, there's no need to add the
complexities of repositories. To make it worse, we all live behind
proxies that require messy configuration for tools like Maven.

2) Network independence. I often work without Internet access, and I
don't want to be blocked at some point because some build tool wants
to access some repository to see if my version is still current.

3) Confidentiality. Sometimes I work with unpublished code that I
promised not to give to anyone else. I can't keep that promise if the
code leaves my machine in any way. For that case, the file:///
repository would of course be fine.

Having used cake in the past for simpler projects, I know that it can
handle project-local dependencies. Just add a classpath setting
to .cake/config (I'd have to look up the exact name of that variable).
If cake can indeed handle Java code, then it might be just fine for my
needs.


On 4 Jul 2011, at 03:29, Mark Derricutt wrote:

> The other option is Polyglot Maven, which hasn't really seen much
> movement lately, but gives you maven power without the XML ( clojure
> source, yaml, etc. )
>
> http://polyglot.sonatype.org/clojure.html

Being Maven, this would still require repositories, right? Even a
local Maven repository is more than I'd like to impose on my
collaborators.


On 4 Jul 2011, at 07:16, Shantanu Kumar wrote:
>
> Maven works, but if you don't want XML why not just use Leiningen?
> Split your code base into various modules (each module having its own
> project.clj) and have a shell script (or PowerShell script if you're
> on Windows) to take care of the dependencies while building across
> modules.

I'd prefer one build system to two separate layers, one of which I'd
write myself. Moreover, most of my dependencies are not projects, but
simply jar files picked up from various sources.


Thanks again to everyone! I'll look at Java with cake, and also at
Gradle.

Konrad.

Wilson MacGyver

unread,
Jul 4, 2011, 3:22:08 AM7/4/11
to clo...@googlegroups.com
FYI, here is how to add jar deps in gradle for local files, either as
a file or a dir of files

http://stackoverflow.com/questions/2572811/gradle-make-a-3rd-party-jar-available-to-local-gradle-repository

and getting started is at https://bitbucket.org/kotarak/clojuresque/wiki/Home

while the tutorial is written for gradle 1.0.x milestone releases. I
use gradle 0.9.2,
and it works fine for me.

On Mon, Jul 4, 2011 at 3:14 AM, Konrad Hinsen
<konrad...@fastmail.net> wrote:
> 1) Simplicity. I want to distribute a single tar file to collaborators (who
> are new to Clojure and the JVM world) containing all dependencies and build
> scripts. I want to tell them "install <name of build tool>, take this file,

> play with the source code, and just type <build-command> to build an


> executable". They will struggle with a new language and a new environment
> already, there's no need to add the complexities of repositories. To make it
> worse, we all live behind proxies that require messy configuration for tools
> like Maven.

--

Meikel Brandmeyer

unread,
Jul 4, 2011, 3:53:12 AM7/4/11
to clo...@googlegroups.com
Hi,


Am Montag, 4. Juli 2011 09:14:01 UTC+2 schrieb konrad...@laposte.net:

> Thanks for everyone's suggestions and comments!
>
> Some remarks:
>
> Gradle/clojuresque: I never tried them, but it looks like I should!
>
> AOT compilation: My case is probably a bit complex in this respect. I
> need AOT compilation only because I want to produce an executable jar,
> so there is at least one namespace that must be AOT compiled. For
> building that executable jar, it doesn't matter if everything else is
> AOT compiled as well. But I want to be able to build a standard
> library jar with just the Clojure code to make sure it works with
> future Clojure releases. One solution would be to have two completely
> different builds, one for the executable jar and one for the library
> version, but using the same set of source code files.

I would do it like this:

Split the source in two parts: the library part and the application
part. This would help to maintain a clean library API, because you
could use your application as “real” customer. You could build both
parts independently if desired and so on.

On the other hand this is not a requirement. You could just as well
have everything in one tree and create two jars from it. But my
gradle-fu is too limited to suggest a quick solution for that way.

First the former way the source layout would be something like this:

root directory of the project
 │
 ├─ build.gradle (see below)
 │
 ├─ lib
 │   │
 │   ├─ build (clojuresque, other stuff needed for buildscript)
 │   │
 │   └─ runtime (your dependencies go here)
 │
 ├─ library (library subproject)
 │
 └─ app (application subproject)

You need only the following central build.gradle. It will build a
normal library jar for the library subproject and a AOT-compiled
jar for the application.

buildscript {
    repositories { flatDir dirs: project.file('lib/build') }
    dependencies { classpath "clojuresque:clojuresque:1.4.1" }
}

subprojects {
    apply plugin: "java"
    apply plugin: "clojure"

    group = "yourGroupGoesHere"
    version = "some.version.number"

    repositories {
        flatDir dirs: project(':').file('lib/runtime').absoluteFile
    }

    dependencies {
        compile "org.clojure:clojure:1.2.1"
    }
}

project(':library') {
    dependencies {
        compile "some.other:library:1.2.3"
        compile "and.another:one:3.2.1"
    }
}

project(':app') {
    aotCompile = true

    // If you want a fat jar with all dependencies included...
    uberjar.enabled = true
    configurations.compile.transitive = true

    dependencies {
        compile project(':library')
    }

    // more stuff here for main class definition etc.
}

Although not completely working out of the box this should give
you a feeling of how things would look like with gradle. So you
can hopefully quickly evaluate whether it is worth a look at all.

I'm open for any support request to get you going with clojuresque.
Mail me or put the discussions on the newly created google
group: http://groups.google.com/group/clojuresque.

Sincerely
Meikel

Ken Wesson

unread,
Jul 4, 2011, 4:36:18 AM7/4/11
to clo...@googlegroups.com
On Mon, Jul 4, 2011 at 3:14 AM, Konrad Hinsen
<konrad...@fastmail.net> wrote:
> AOT compilation: My case is probably a bit complex in this respect. I need
> AOT compilation only because I want to produce an executable jar, so there
> is at least one namespace that must be AOT compiled. For building that
> executable jar, it doesn't matter if everything else is AOT compiled as
> well. But I want to be able to build a standard library jar with just the
> Clojure code to make sure it works with future Clojure releases. One
> solution would be to have two completely different builds, one for the
> executable jar and one for the library version, but using the same set of
> source code files.

You seem to want to make two things: a library and an application. For
that, I think it's only proper if you have two build scripts, since
you have two build artifacts. Indeed, the application may be better
off depending on the library than directly incorporating its source
code as some of its own.

>> For the record, leiningen can do this by adding a repository with a
>> file:/// URL; it's just not documented because I think it's a bad idea.
>
> With absolute filenames in a URL, it's indeed a bad idea because the project
> becomes specific to a machine/installation. What I'd like to see instead is
> a project-local repository, e.g. a "deps" folder with jar files and source
> code directories.
>
> There are several reasons why I want dependencies outside of repositories:
>
> 1) Simplicity. I want to distribute a single tar file to collaborators (who
> are new to Clojure and the JVM world) containing all dependencies and build
> scripts. I want to tell them "install <name of build tool>, take this file,

> play with the source code, and just type <build-command> to build an


> executable". They will struggle with a new language and a new environment
> already, there's no need to add the complexities of repositories.

This is what I meant about avoiding unnecessary ceremony.

> To make it worse, we all live behind proxies that require messy configuration
> for tools like Maven.
>
> 2) Network independence. I often work without Internet access, and I don't
> want to be blocked at some point because some build tool wants to access
> some repository to see if my version is still current.

The above provide some reasons why the build process should not
*require* an internet connection if all dependencies are already
available locally. I don't have a problem if some build tool checks
for updates, so long as it treats a failed check the same as finding
there's no update, give or take a non-fatal warning or two.

On the other hand, the result on actually finding an update should
probably be a user prompt in interactive mode and a build without the
update in batch mode. Otherwise the update, if it breaks backward
compatibility, could break the build. A build that worked yesterday
and breaks today without one having changed any local files, neither
the build script nor the sources nor anything else, is going to be a
head-scratcher to deal with, and in many contexts time is money.

> 3) Confidentiality. Sometimes I work with unpublished code that I promised
> not to give to anyone else. I can't keep that promise if the code leaves my
> machine in any way. For that case, the file:/// repository would of course
> be fine.

Presumably also for network-independence and avoiding annoying
proxies. But if it needs an absolute path, that may* break the "just
tar up the source tree and mail it to someone" capability and forces
even small collaborative projects to set up and use some kind of code
repository instead. As I've argued elsewhere, repository use scales
poorly at the small-project end, unsurprisingly since repositories
were specifically invented as a tool to make large-scale projects with
huge numbers of collaborators and vast reams of code manageable. Using
a high-falutin' version control system for 12kloc and three developers
is like using a bazooka to swat a fly, a top-of-the-line Oracle
database product on expensive iron to track your personal expenses and
balance your checkbook, or hashmaps instead of arraymaps to store
little three-key objects that number in the tens of thousands. :)

* Unix filesystems seem to be standardized enough in layout that using
absolute paths of \usr\src\whatever and suchlike may be viable.
Except that it won't work for a collaborator whose machine runs
Windows, and, worse, it requires working as root or else letting
unprivileged users create executables in world-readable places -- ick.

> I'd prefer one build system to two separate layers, one of which I'd write
> myself. Moreover, most of my dependencies are not projects, but simply jar
> files picked up from various sources.

Indeed, Maven-based stuff seems oriented around the assumption that
any third-party dependencies you will have, in particular, will
generally be publicly hosted on Maven repositories themselves rather
than just a ten-cent web site or Blogspot article or Facebook page
with a .jar download link. Another case of not scaling well at the
low-size end of things, or at the shallow end of the skill pool or the
low end of the budget scale for that matter. (Setting up a Facebook
profile or a blog on an existing service: free and easy. Uploading a
jar file you built to Rapidshare or some other such site and posting
the link: free and easy. Setting up some kind of publicly-visible code
repository: expensive and complex. Using an existing repository
service site: perhaps free and perhaps less complex, but still fairly
complex.) But this time biting the small-time library's users rather
than its small-time developer...

Steve

unread,
Jul 4, 2011, 6:29:00 AM7/4/11
to Clojure
On Jul 3, 10:01 pm, Ken Wesson <kwess...@gmail.com> wrote:
>
> OK...ridiculous leap reduced to merely huge leap then, if you only
> have to learn 2 of these three things at once: big, interdependent
> groups of projects, maven/etc. repository-accessing tools, and server
> administration. :)
>

It's really not that hard. If you use Enclojure/Netbeans there are
wizards for creating maven clojure projects (I assume so for other
IDEs as well). You create one project, write some code, mvn install.
Create another one, right click on the dependency folder, add the
details for the first project and it's ready for you to use. No
repositories to create or manage, maven handles all that stuff for
you.

I wouldn't normally defend maven, but there are some things it does
well and for this sort of simple "local Project A depends on local
Project B" stuff it's a no-brainer (esp. when the IDEs do most of the
config creation work).

- Steve

Ken Wesson

unread,
Jul 4, 2011, 7:08:53 AM7/4/11
to clo...@googlegroups.com
On Mon, Jul 4, 2011 at 6:29 AM, Steve <stephen....@gmail.com> wrote:
> On Jul 3, 10:01 pm, Ken Wesson <kwess...@gmail.com> wrote:
>>
>> OK...ridiculous leap reduced to merely huge leap then, if you only
>> have to learn 2 of these three things at once: big, interdependent
>> groups of projects, maven/etc. repository-accessing tools, and server
>> administration. :)
>>
>
> It's really not that hard. If you use Enclojure/Netbeans there are
> wizards for creating maven clojure projects (I assume so for other
> IDEs as well). You create one project, write some code, mvn install.
> Create another one, right click on the dependency folder, add the
> details for the first project and it's ready for you to use. No
> repositories to create or manage, maven handles all that stuff for
> you.

That's actually a bit worrying. I'm not sure I want a potential
security hole into my computer, such as a repository, being "handled
for me" without having *some* input into the matter. For example if I
intend to use it purely locally I'd want to firewall the port it's
using to make sure it's unreachable from any address other than
127.0.0.1.

On the one hand, manually managing stuff like that is hard, and it's
complex to learn the first time.

On the other, making it *too* simple, at least when it has
implications for the machine's security, is not generally a good
thing.

> I wouldn't normally defend maven, but there are some things it does
> well and for this sort of simple "local Project A depends on local
> Project B" stuff it's a no-brainer (esp. when the IDEs do most of the
> config creation work).

There's also the fact that everything remains simple (maybe too
simple; see above) only so long as you remain inside the cushioned box
of the particular IDE. As soon as you try to do anything else -- tweak
something from vi or Notepad, significantly refactor and rename and
restructure stuff in a manner that changes some file paths, move to or
sync with another machine, share with a collaborator, even just find
the source files to back them up somewhere safe -- you're in the deep
woods, possibly without a good map. :)

Shantanu Kumar

unread,
Jul 4, 2011, 7:25:31 AM7/4/11
to Clojure
>     (ns leiningen.sub
>       (:use [leiningen.core :only [apply-task task-not-found]]))
>
>     (defn sub [task-name & args]
>       (doseq [project (projects-in-dir)]
>         (apply-task task-name project args task-not-found)))
>
> Implementation of projects-in-dir left as an exercise for the
> reader. Shouldn't be more than four lines. Push the lein-subs plugin to
> clojars: problem solved in a repeatable, maintainable way.

IMHO such a thing can be added to Lein proper as a feature. It's very
useful. Maybe with a :sub key in project.clj:

:sub ["module/dep-B" "module/dep-D"]

Regards,
Shantanu

Michael Wood

unread,
Jul 4, 2011, 7:52:34 AM7/4/11
to clo...@googlegroups.com
Hi

On 4 July 2011 13:08, Ken Wesson <kwes...@gmail.com> wrote:
> On Mon, Jul 4, 2011 at 6:29 AM, Steve <stephen....@gmail.com> wrote:
>> On Jul 3, 10:01 pm, Ken Wesson <kwess...@gmail.com> wrote:
>>>
>>> OK...ridiculous leap reduced to merely huge leap then, if you only
>>> have to learn 2 of these three things at once: big, interdependent
>>> groups of projects, maven/etc. repository-accessing tools, and server
>>> administration. :)
>>>
>>
>> It's really not that hard. If you use Enclojure/Netbeans there are
>> wizards for creating maven clojure projects (I assume so for other
>> IDEs as well). You create one project, write some code, mvn install.
>> Create another one, right click on the dependency folder, add the
>> details for the first project and it's ready for you to use. No
>> repositories to create or manage, maven handles all that stuff for
>> you.
>
> That's actually a bit worrying. I'm not sure I want a potential
> security hole into my computer, such as a repository, being "handled
> for me" without having *some* input into the matter. For example if I
> intend to use it purely locally I'd want to firewall the port it's
> using to make sure it's unreachable from any address other than
> 127.0.0.1.

"Repository" need not imply anything to do with networking. I'm sure
someone will correct me if I'm wrong, but I am pretty sure that the
repository Steve is talking about above is just a hierarchy of files
in your home directory.

--
Michael Wood <esio...@gmail.com>

Daniel Janus

unread,
Jul 4, 2011, 8:10:01 AM7/4/11
to Clojure
> 2) Network independence. I often work without Internet access, and I  
> don't want to be blocked at some point because some build tool wants  
> to access some repository to see if my version is still current.

For the record, this is easily doable with both Leiningen and Cake
(which both use Maven under the hood). One just has to create
a ~/.m2/settings.xml with the following content:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<offline>true</offline>
</settings>

Best,
- Daniel

Hugo Duncan

unread,
Jul 4, 2011, 9:40:35 AM7/4/11
to clo...@googlegroups.com
On Mon, 04 Jul 2011 03:14:01 -0400, Konrad Hinsen
<konrad...@fastmail.net> wrote:

> AOT compilation: My case is probably a bit complex in this respect. I
> need AOT compilation only because I want to produce an executable jar,
> so there is at least one namespace that must be AOT compiled. For
> building that executable jar, it doesn't matter if everything else is
> AOT compiled as well. But I want to be able to build a standard library
> jar with just the Clojure code to make sure it works with future Clojure
> releases. One solution would be to have two completely different builds,
> one for the executable jar and one for the library version, but using
> the same set of source code files.

You might be able to use the :impl-ns option in gen-class to limit the
extent of AOT compilation.

--
Hugo Duncan

Steve

unread,
Jul 4, 2011, 10:16:20 AM7/4/11
to Clojure
On Jul 4, 9:08 pm, Ken Wesson <kwess...@gmail.com> wrote:
>
> That's actually a bit worrying. I'm not sure I want a potential
> security hole into my computer, such as a repository, being "handled
> for me" without having *some* input into the matter. For example if I
> intend to use it purely locally I'd want to firewall the port it's
> using to make sure it's unreachable from any address other than
> 127.0.0.1.
>

No, there's no server, no port, nothing to firewall. It's just a
directory (~/.m2/repository).

>
> There's also the fact that everything remains simple (maybe too
> simple; see above) only so long as you remain inside the cushioned box
> of the particular IDE. As soon as you try to do anything else -- tweak
> something from vi or Notepad, significantly refactor and rename and
> restructure stuff in a manner that changes some file paths, move to or
> sync with another machine, share with a collaborator, even just find
> the source files to back them up somewhere safe -- you're in the deep
> woods, possibly without a good map. :)
>

Well exactly - by using an independent build tool you decrease the
likelihood of your build being tied to a particular IDE. If I'm using
Netbeans on linux, and you're using Eclipse on windows I'd be more
confident of being able to build your project if you're using maven/
lein/cake/etc. than if you're using the IDEs built in project
management facilities or a bunch of shell scripts (or ant for that
matter).

I think that Greenspun's tenth rule has an analogue in hand rolled
build systems - most of them end up being a crappy implementation of
10% of maven's functionality (and maven is not that nice to begin
with :)

- Steve

Ken Wesson

unread,
Jul 4, 2011, 5:13:57 PM7/4/11
to clo...@googlegroups.com
On Mon, Jul 4, 2011 at 10:16 AM, Steve <stephen....@gmail.com> wrote:
> On Jul 4, 9:08 pm, Ken Wesson <kwess...@gmail.com> wrote:
>>
>> That's actually a bit worrying. I'm not sure I want a potential
>> security hole into my computer, such as a repository, being "handled
>> for me" without having *some* input into the matter. For example if I
>> intend to use it purely locally I'd want to firewall the port it's
>> using to make sure it's unreachable from any address other than
>> 127.0.0.1.
>>
>
> No, there's no server, no port, nothing to firewall. It's just a
> directory (~/.m2/repository).

So, not actually a repository, then. :)

> Well exactly - by using an independent build tool you decrease the
> likelihood of your build being tied to a particular IDE. If I'm using
> Netbeans on linux, and you're using Eclipse on windows I'd be more
> confident of being able to build your project if you're using maven/
> lein/cake/etc. than if you're using the IDEs built in project
> management facilities or a bunch of shell scripts (or ant for that
> matter).

One problem with that is that you generally can't *not* use your IDE's
built in project management unless you don't use an IDE at all (vi,
emacs, Notepad, whatever rather than Eclipse, IDEA, Netbeans,
whatever).

> I think that Greenspun's tenth rule has an analogue in hand rolled
> build systems - most of them end up being a crappy implementation of
> 10% of maven's functionality (and maven is not that nice to begin
> with :)

That's not *too* bad, compared to Greenspun's 50%. On the other hand
I'd think the more natural comparison would be to make, which after
all long predates maven and may even be half as old as Common Lisp. :)

Steve

unread,
Jul 4, 2011, 7:11:16 PM7/4/11
to Clojure
On Jul 5, 7:13 am, Ken Wesson <kwess...@gmail.com> wrote:
>
> > No, there's no server, no port, nothing to firewall. It's just a
> > directory (~/.m2/repository).
>
> So, not actually a repository, then. :)
>

Well not as you're defining it :) But yes it is a repository if
repository means "place to store stuff". In particular, "place to
store jars for one project that can be effortlessly depended upon by
another project".

>
> One problem with that is that you generally can't *not* use your IDE's
> built in project management unless you don't use an IDE at all (vi,
> emacs, Notepad, whatever rather than Eclipse, IDEA, Netbeans,
> whatever).
>

No that's not right, Netbeans (and I'm sure Eclipse, no idea about
IDEA) happily creates and works with Maven projects. We have guys
working here using a range of different tools (mostly Java projects
using Netbeans and Eclipse, running on Linux and Windows) and because
we've standardised on Maven we have very few issues sharing projects.

- Steve

Ken Wesson

unread,
Jul 4, 2011, 10:43:46 PM7/4/11
to clo...@googlegroups.com
On Mon, Jul 4, 2011 at 7:11 PM, Steve <stephen....@gmail.com> wrote:
> On Jul 5, 7:13 am, Ken Wesson <kwess...@gmail.com> wrote:
>
>> > No, there's no server, no port, nothing to firewall. It's just a
>> > directory (~/.m2/repository).
>>
>> So, not actually a repository, then. :)
>
> Well not as you're defining it :) But yes it is a repository if
> repository means "place to store stuff".

I was using it in the sense typically meant in phrases like "source
code repository", as seems reasonable given the context, but oh well.

>> One problem with that is that you generally can't *not* use your IDE's
>> built in project management unless you don't use an IDE at all (vi,
>> emacs, Notepad, whatever rather than Eclipse, IDEA, Netbeans,
>> whatever).
>
> No that's not right, Netbeans (and I'm sure Eclipse, no idea about
> IDEA) happily creates and works with Maven projects.

Perhaps, but not by default. File->New->Project creates built-in
project management projects, at least in Eclipse, to judge by the fact
that the result appears to be a project to the built-in project
management functionality. :)

> We have guys working here using a range of different tools (mostly Java
> projects using Netbeans and Eclipse, running on Linux and Windows)
> and because we've standardised on Maven we have very few issues
> sharing projects.

What method was used to create the projects ab initio? Some sort of
direct interaction with Maven, followed by some kind of import into
each IDE instance? Or can one of those IDEs create a Maven project (as
opposed to a built-in project management project) ex nihilo by ticking
some box somewhere?

(The third option, that one or each makes Maven projects natively by
default or even has no distinct "built-in project management project"
type, seems to be excluded by your earlier statement of "I'd be more


confident of being able to build your project if you're using

maven/lein/cake/etc. than if you're using the IDEs built in project
management facilities".)

Sean Corfield

unread,
Jul 5, 2011, 12:34:24 AM7/5/11
to clo...@googlegroups.com
On Mon, Jul 4, 2011 at 7:43 PM, Ken Wesson <kwes...@gmail.com> wrote:
> I was using it in the sense typically meant in phrases like "source
> code repository", as seems reasonable given the context, but oh well.

If you're using git, "source code repository" could easily be local
and not require an Internet connection... so I think it depends on
your experience :)

In the OP comment, I certainly took repository to just mean "somewhere
you store stuff" and hence it could easily be local...
--
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)

Steve

unread,
Jul 5, 2011, 12:58:00 AM7/5/11
to Clojure
On Jul 5, 12:43 pm, Ken Wesson <kwess...@gmail.com> wrote:
>
> What method was used to create the projects ab initio? Some sort of
> direct interaction with Maven, followed by some kind of import into
> each IDE instance? Or can one of those IDEs create a Maven project (as
> opposed to a built-in project management project) ex nihilo by ticking
> some box somewhere?
>

Netbeans can create Maven projects. Eclipse can also create Maven
projects (once you have installed the Maven plugin).
Enclojure lets you create Maven projects with the Clojure specific
configuration already written for you.

They can also both open/import Maven projects created outside the IDE.

- Steve

Michael Wood

unread,
Jul 5, 2011, 9:21:24 AM7/5/11
to clo...@googlegroups.com
On 5 July 2011 06:34, Sean Corfield <seanco...@gmail.com> wrote:
> On Mon, Jul 4, 2011 at 7:43 PM, Ken Wesson <kwes...@gmail.com> wrote:
>> I was using it in the sense typically meant in phrases like "source
>> code repository", as seems reasonable given the context, but oh well.
>
> If you're using git, "source code repository" could easily be local
> and not require an Internet connection... so I think it depends on
> your experience :)

The same goes for CVS or Subversion or Mercurial and probably various
other "source code repositories". If you want to network them you
can, but you have to do something extra (e.g. run cvs-pserver or
mod_dav_svn or svnserve or hg serve etc.)

Things like Debian package archives are the same. They have a
particular structure and set of metadata and they may or may not be
available over the network (via FTP or HTTP). If you have one locally
(e.g. on CD) you can use it without setting up an FTP server or web
server, but of course then nobody else can use it from their machine.

> In the OP comment, I certainly took repository to just mean "somewhere
> you store stuff" and hence it could easily be local...

I take it to me "somewhere you can store stuff in a particular
structure perhaps with metadata" so that maven knows what's there and
how to set up class paths and whatever else it needs to do with it.

--
Michael Wood <esio...@gmail.com>

Stephen C. Gilardi

unread,
Jul 5, 2011, 9:35:00 AM7/5/11
to clo...@googlegroups.com

On Jul 4, 2011, at 7:52 AM, Michael Wood wrote:

> "Repository" need not imply anything to do with networking. I'm sure
> someone will correct me if I'm wrong, but I am pretty sure that the

> repository Steve [Lindsay] is talking about above is just a hierarchy of files
> in your home directory.

Right, there's a per-user repository at ~/.m2/repository .

Without any change to lein, its "install" subcommand will place a jar for the current project within ~/.m2/repository . The jar can be used from there in other local projects. Here's an example:

% cd <project-A-dir>
% lein install
[...]
[INFO] Installing ./projectA-1.0.0-SNAPSHOT.jar to ~/.m2/repository/projectA/projectA/1.0.0-SNAPSHOT/projectA-1.0.0-SNAPSHOT.jar
% cd <project-B-dir>
% lein install
[...]
[INFO] Installing ./projectB-1.0.0-SNAPSHOT.jar to ~/.m2/repository/projectB/projectB/1.0.0-SNAPSHOT/projectB-1.0.0-SNAPSHOT.jar
% cd <project-C-dir>
% cat project.clj
defproject projectC "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.2.1"]
[projectA "1.0.0-SNAPSHOT"]
[projectB "1.0.0-SNAPSHOT"]])
% lein deps
Copying 3 files to <project-C-dir>/lib
% ls lib
clojure-1.2.1.jar projectB-1.0.0-SNAPSHOT.jar
projectA-1.0.0-SNAPSHOT.jar

This appears to meet Konrad's original specs except (depending on the intended meaning of "repository") for:

> 4) Must handle dependencies in the form of on-disk jar files (not in any repository)

I would argue that the ~/.m2 repository is nearly as easy to work with as any other local, on-disk scheme one might envision and has the benefit of working with any maven-compatible tool.

It also works for arbitrary jars one may have on disk (acquired from any source) via:

http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

--Steve

faenvie

unread,
Jul 5, 2011, 10:15:12 AM7/5/11
to Clojure
hi meikel,

you plugin really rocks.

have you thought about contributing clojuresque as 'clojure-plugin'
for gradle to the gradle project ? so that it will be more integrate
and
managed like ... say the scala-plugin for gradle ?

maybe after gradle has released it's 1.0 version ?

best regards ..

Ken Wesson

unread,
Jul 5, 2011, 12:55:48 PM7/5/11
to clo...@googlegroups.com
On Tue, Jul 5, 2011 at 9:21 AM, Michael Wood <esio...@gmail.com> wrote:
> On 5 July 2011 06:34, Sean Corfield <seanco...@gmail.com> wrote:
>> On Mon, Jul 4, 2011 at 7:43 PM, Ken Wesson <kwes...@gmail.com> wrote:
>>> I was using it in the sense typically meant in phrases like "source
>>> code repository", as seems reasonable given the context, but oh well.
>>
>> If you're using git, "source code repository" could easily be local
>> and not require an Internet connection... so I think it depends on
>> your experience :)
>
> The same goes for CVS or Subversion or Mercurial and probably various
> other "source code repositories".  If you want to network them you
> can, but you have to do something extra (e.g. run cvs-pserver or
> mod_dav_svn or svnserve or hg serve etc.)

I'd be very interested to know how one checks out a file from a CVS
repository without cvs-pserver running. You do a cvs checkout whatever
at the command prompt, the command interpreter runs the cvs client,
and the cvs client then connects to ??? (apparently not the
cvs-pserver you're not running) using ??? (apparently not cvs's wire
protocol over TCP/IP on the 127.0.0.1 loopback interface) to perform
the checkout ...

Laurent PETIT

unread,
Jul 5, 2011, 2:20:42 PM7/5/11
to clo...@googlegroups.com
Yes, I've found Eclipse's maven support rather stable for the last 6
months, so I consider it stable and use it for my projects.
The plugin is called m2eclipse.


2011/7/5 Steve <stephen....@gmail.com>:

Laurent PETIT

unread,
Jul 5, 2011, 2:38:44 PM7/5/11
to clo...@googlegroups.com
Ken, I'm sorry I didn't answer quickly to you on the CCW mailing list.

Unless there's a bug involved (and I suspect there's a rampant one
somewhere :) ), CCW handles AOT compilation.

Would it not handle it, I would not be able to release CCW itself !

Indeed, currently there are cyclic dependencies between java and
clojure code in CCW, and this is handled by Eclipse's Compiler only :
Eclipse compiles java files to (incompletely working) class files.
The CCW builder builds the missing AOT class files (thanks to
Eclipse's compiler having put the necessary signatures in place in the
java class files, even if the implementations are not complete yet).
After the CCW build, Eclipse refreshes the project and does a second
compile pass on its java files, ending the roundtrip with everything
being OK.

Sooo... how does CCW handle AOT compilation ?
Here's the current state of the art. It's subject to laarge
improvements, but I haven't opened this can of worms yet, I'm working
on other more urgent CCW topics.

So there it is :
a) Select your project's node in the Package Explorer
b) Trigger its contextual menu, select "Run as", select "Clojure Application"
I *insist* (*) : you must trigger the Run from the project's node.
Only with the project's node will the incremental compilation be
activated for the started process' JVM.
Then you should see:
1) A java console view for the underlying process' JVM inputs/outputs
2) A (n)REPL client view speaking with the underlying process' JVM via
either the nrepl dependency already present in your project's
classpath, either added "on the fly" to the classpath by the "Clojure
Application" launch configuration machinery (a clever ccw trick)
3) a "background" user job running (generally on the bottom right)
reporting some kind of progress related to the AOT compilation of the
project.
4) when the background user job has finished, you should see that your
project's "classes/" directory is full of AOT compiled class files.

Currently, there's one drawback : CCW does not refrain AOT compilation
from "compiling too much things", nor does it remove AOT compilation
artifacts that should generally not be desired (e.g. anything in
packages not being related to the project's own namespaces).

So now that you have the explanations, if this works for you as it
does for me, Eclipse+CCW will handle for you, out of the box:

1) Must handle Clojure namespaces that are AOT-compiled.

3) Must handle Java source code files.

4) Must handle dependencies in the form of on-disk jar files (not in
any repository)

5) No XML configuration files.


(*) : In contrast, if you trigger a run of "Clojure Application" from
the contextual menu of a specific clojure lib file, the process will
not be started in "project mode", but in "file mode". Which implies
that CCW will just pre-load the selected file on the clojure process,
but do none of what it does when run in "project mode" : neither
attempt to AOT compile the whole project when the process starts,
neither attempt to (again) re-AOT compile the whole project everytime
you save a file in the editor.

HTH,

Cheers,

--
Laurent

2011/7/3 Konrad Hinsen <konrad...@fastmail.net>:


> I am looking for a build tool that fulfills the following requirements:
>
> 1) Must handle Clojure namespaces that are AOT-compiled.
> 2) Must handle Clojure namespaces that are not AOT-compiled.
> 3) Must handle Java source code files.

> 4) Must handle dependencies in the form of on-disk jar files (not in any
> repository)

> 5) No XML configuration files.
>

> Candidates that I have tried and found insufficient include
> - Leiningen (no dependencies without repositories)
> - Cake (doesn't handle Java source files)
> - Eclipse/Counterclockwise (doesn't handle AOT compilation)
> - ant, maven: XML configuration files
> - scons: incomplete Java support, no Clojure support
>
> Is there anything else worth trying?
>

> Thanks in advance,
>  Konrad.

Meikel Brandmeyer

unread,
Jul 6, 2011, 2:06:53 AM7/6/11
to clo...@googlegroups.com
Hi,


Am Dienstag, 5. Juli 2011 18:55:48 UTC+2 schrieb Ken Wesson:

> I'd be very interested to know how one checks out a file from a CVS
> repository without cvs-pserver running. You do a cvs checkout whatever
> at the command prompt, the command interpreter runs the cvs client,
> and the cvs client then connects to ??? (apparently not the
> cvs-pserver you're not running) using ??? (apparently not cvs's wire
> protocol over TCP/IP on the 127.0.0.1 loopback interface) to perform
> the checkout ...

Maybe by doing a “cvs -d /path/to/your/local/repository/directory checkout”? (without having an ancient cvs around to test...)

Sincerely
Meikel

Ken Wesson

unread,
Jul 6, 2011, 3:23:08 AM7/6/11
to clo...@googlegroups.com

How would that be implemented, though? Without the server running to
enforce mutual exclusion and detect edit collisions and everything,
the whole notion of "checkin" and "checkout" appears to become
meaningless.

Meikel Brandmeyer

unread,
Jul 6, 2011, 3:33:32 AM7/6/11
to clo...@googlegroups.com
Hi,


Am Mittwoch, 6. Juli 2011 09:23:08 UTC+2 schrieb Ken Wesson:

>> Maybe by doing a “cvs -d /path/to/your/local/repository/directory checkout”?
>> (without having an ancient cvs around to test...)
>
> How would that be implemented, though? Without the server running to
> enforce mutual exclusion and detect edit collisions and everything,
> the whole notion of "checkin" and "checkout" appears to become
> meaningless.

Obviously this is implemented in cvs because the form above comes from its documentation. In fact since it is on the local machine I would expect something like flock or lockf to work. What happens if “local” means NFS...

So in fact I would consider “local” to be the trivial case to ensure mutual exclusion and edit collisions detection if everyone obeys to flock or such.

Sincerely
Meikel

Michael Wood

unread,
Jul 6, 2011, 4:12:49 AM7/6/11
to clo...@googlegroups.com
On 6 July 2011 08:06, Meikel Brandmeyer <m...@kotka.de> wrote:
> Hi,
>
> Am Dienstag, 5. Juli 2011 18:55:48 UTC+2 schrieb Ken Wesson:
>
>> I'd be very interested to know how one checks out a file from a CVS
>> repository without cvs-pserver running. You do a cvs checkout whatever
>> at the command prompt, the command interpreter runs the cvs client,
>> and the cvs client then connects to ??? (apparently not the

It doesn't "connect to" anything. It reads and writes the files
directly when used like this.

>> cvs-pserver you're not running) using ??? (apparently not cvs's wire
>> protocol over TCP/IP on the 127.0.0.1 loopback interface) to perform
>> the checkout ...
>
> Maybe by doing a “cvs -d /path/to/your/local/repository/directory checkout”?
> (without having an ancient cvs around to test...)

Exactly. And I've just tested it to be sure. Also, CVS originally
did not support networking at all. It was originally designed to be
used by different users on a multi-user machine.

Anyway, the point was that "repository" needn't have anything to do
with networking.

--
Michael Wood <esio...@gmail.com>

Ken Wesson

unread,
Jul 6, 2011, 4:14:25 AM7/6/11
to clo...@googlegroups.com
On Wed, Jul 6, 2011 at 3:33 AM, Meikel Brandmeyer <m...@kotka.de> wrote:
> Hi,
>
> Am Mittwoch, 6. Juli 2011 09:23:08 UTC+2 schrieb Ken Wesson:
>
>> How would that be implemented, though? Without the server running to
>> enforce mutual exclusion and detect edit collisions and everything,
>> the whole notion of "checkin" and "checkout" appears to become
>> meaningless.
>
> Obviously this is implemented in cvs because the form above comes from its
> documentation. In fact since it is on the local machine I would expect
> something like flock or lockf to work. What happens if “local” means NFS...

Sorry, but I think version control and, particularly, dealing with
edit collisions is not something you can solve as easily as just
slapping a lock onto each file access, or else version control servers
could just be FTP servers that locked their shared files during each
access.

> So in fact I would consider “local” to be the trivial case to ensure mutual
> exclusion and edit collisions detection if everyone obeys to flock or such.

And then there's the niggling little matter of Unix file locks being
advisory rather than mandatory. Do you really want proper resolution
of edit collisions (or, worse, the integrity of the under-the-hood
state maintained for the repository vis a vis making sense and being
valid data structures) to be entirely on the honor system? At
*minimum* it would seem that a real database with ACID and
transactions would be needed -- A to avoid race conditions (no
advisory locks here!), C to keep the internal state invariants valid,
I to be able to deal with edit collisions in a sane manner, and D for
the obvious reasons. And a suitable software front-end. And now we're
back to having at least one server in the mix, namely the DBMS at the
backend. :)

Here's a simple question to ask yourself whenever considering using
advisory file locks to guard complex on-disk data with invariants to
maintain: *If the power goes off halfway through some kind of
transaction, can the system recover without a lot of manual hacking to
patch up the state of the on-disk data structures? Will my losses be
limited solely to the one transaction in progress at the moment of the
outage?*

If you don't have a satisfactory answer there, then you probably need
a real database. Of course perhaps you are clever and can design your
own on-disk data structures that will fail-soft in some manner under
such circumstances and convince yourself beyond a reasonable doubt
that it'll work, but if not ...

Michael Wood

unread,
Jul 6, 2011, 4:25:39 AM7/6/11
to clo...@googlegroups.com
On 6 July 2011 09:23, Ken Wesson <kwes...@gmail.com> wrote:
> On Wed, Jul 6, 2011 at 2:06 AM, Meikel Brandmeyer <m...@kotka.de> wrote:
>> Hi,
>>
>> Am Dienstag, 5. Juli 2011 18:55:48 UTC+2 schrieb Ken Wesson:
>>
>>> I'd be very interested to know how one checks out a file from a CVS
>>> repository without cvs-pserver running. You do a cvs checkout whatever
>>> at the command prompt, the command interpreter runs the cvs client,
>>> and the cvs client then connects to ??? (apparently not the
>>> cvs-pserver you're not running) using ??? (apparently not cvs's wire
>>> protocol over TCP/IP on the 127.0.0.1 loopback interface) to perform
>>> the checkout ...
>>
>> Maybe by doing a “cvs -d /path/to/your/local/repository/directory checkout”?
>> (without having an ancient cvs around to test...)
>
> How would that be implemented, though? Without the server running to
> enforce mutual exclusion and detect edit collisions and everything,

If by "edit collisions" you mean merge conflicts, these are all done
on the client. Of course if two clients are trying to write to the
same file in the repository at the same time there could be problems,
so I do think that talking to a server over the network is best, but
CVS originally did not support this and still supports non-networked
access.

> the whole notion of "checkin" and "checkout" appears to become
> meaningless.

No, not meaningless. Just perhaps less reliable.

CVS does not support atomic commits either, which some people find
acceptable and others do not.

--
Michael Wood <esio...@gmail.com>

Michael Wood

unread,
Jul 6, 2011, 4:30:18 AM7/6/11
to clo...@googlegroups.com
On 6 July 2011 10:14, Ken Wesson <kwes...@gmail.com> wrote:
> On Wed, Jul 6, 2011 at 3:33 AM, Meikel Brandmeyer <m...@kotka.de> wrote:
>> Hi,
>>
>> Am Mittwoch, 6. Juli 2011 09:23:08 UTC+2 schrieb Ken Wesson:
>>
>>> How would that be implemented, though? Without the server running to
>>> enforce mutual exclusion and detect edit collisions and everything,
>>> the whole notion of "checkin" and "checkout" appears to become
>>> meaningless.
>>
>> Obviously this is implemented in cvs because the form above comes from its
>> documentation. In fact since it is on the local machine I would expect
>> something like flock or lockf to work. What happens if “local” means NFS...
>
> Sorry, but I think version control and, particularly, dealing with
> edit collisions is not something you can solve as easily as just
> slapping a lock onto each file access, or else version control servers
> could just be FTP servers that locked their shared files during each
> access.

Maybe so, but that is all beside the point. The point was that
"repository" needn't mean "networked".

>> So in fact I would consider “local” to be the trivial case to ensure mutual
>> exclusion and edit collisions detection if everyone obeys to flock or such.
>
> And then there's the niggling little matter of Unix file locks being
> advisory rather than mandatory. Do you really want proper resolution
> of edit collisions (or, worse, the integrity of the under-the-hood
> state maintained for the repository vis a vis making sense and being
> valid data structures) to be entirely on the honor system? At

If the CVS clients are the only ones doing the locking, then why not?

> *minimum* it would seem that a real database with ACID and
> transactions would be needed -- A to avoid race conditions (no
> advisory locks here!), C to keep the internal state invariants valid,

This is why various people moved away from CVS. To get atomic commits etc.

> I to be able to deal with edit collisions in a sane manner, and D for
> the obvious reasons. And a suitable software front-end. And now we're
> back to having at least one server in the mix, namely the DBMS at the
> backend. :)

Right, I agree it's best to have a server controlling access to the
repository, but that does not mean that the concept of a repository is
linked to having a server or a network.

> Here's a simple question to ask yourself whenever considering using
> advisory file locks to guard complex on-disk data with invariants to
> maintain: *If the power goes off halfway through some kind of
> transaction, can the system recover without a lot of manual hacking to
> patch up the state of the on-disk data structures? Will my losses be
> limited solely to the one transaction in progress at the moment of the
> outage?*

Right, and this is a problem with CVS.

> If you don't have a satisfactory answer there, then you probably need
> a real database. Of course perhaps you are clever and can design your
> own on-disk data structures that will fail-soft in some manner under
> such circumstances and convince yourself beyond a reasonable doubt
> that it'll work, but if not ...

CVS is an old version control system that was far better than the
other things around at the time it was invented, but most people seem
to agree that other, more modern, version control systems are better
and/or more reliable.

--
Michael Wood <esio...@gmail.com>

Ken Wesson

unread,
Jul 6, 2011, 4:37:55 AM7/6/11
to clo...@googlegroups.com
On Wed, Jul 6, 2011 at 4:30 AM, Michael Wood <esio...@gmail.com> wrote:
> On 6 July 2011 10:14, Ken Wesson <kwes...@gmail.com> wrote:
>> Sorry, but I think version control and, particularly, dealing with
>> edit collisions is not something you can solve as easily as just
>> slapping a lock onto each file access, or else version control servers
>> could just be FTP servers that locked their shared files during each
>> access.
>
> Maybe so, but that is all beside the point.  The point was that
> "repository" needn't mean "networked".

Maybe just "repository that isn't fragile or outright broken" then. ;)

> If the CVS clients are the only ones doing the locking, then why not?

ARE they the only ones doing the locking OR otherwise accessing the
files, though?

>> *minimum* it would seem that a real database with ACID and
>> transactions would be needed -- A to avoid race conditions (no
>> advisory locks here!), C to keep the internal state invariants valid,
>
> This is why various people moved away from CVS.  To get atomic commits etc.
>
>> I to be able to deal with edit collisions in a sane manner, and D for
>> the obvious reasons. And a suitable software front-end. And now we're
>> back to having at least one server in the mix, namely the DBMS at the
>> backend. :)
>
> Right, I agree it's best to have a server controlling access to the
> repository, but that does not mean that the concept of a repository is
> linked to having a server or a network.

No, just the concept of a reliable repository. ;)

>> If you don't have a satisfactory answer there, then you probably need
>> a real database. Of course perhaps you are clever and can design your
>> own on-disk data structures that will fail-soft in some manner under
>> such circumstances and convince yourself beyond a reasonable doubt
>> that it'll work, but if not ...
>
> CVS is an old version control system that was far better than the
> other things around at the time it was invented, but most people seem
> to agree that other, more modern, version control systems are better
> and/or more reliable.

Unsurprisingly. With apologies to Leonard McCoy:

"Non-atomic commits. Funduscopic examination. What is this, the Dark Ages?"

Michael Wood

unread,
Jul 6, 2011, 5:00:53 AM7/6/11
to clo...@googlegroups.com
On 6 July 2011 10:37, Ken Wesson <kwes...@gmail.com> wrote:
> On Wed, Jul 6, 2011 at 4:30 AM, Michael Wood <esio...@gmail.com> wrote:
>> On 6 July 2011 10:14, Ken Wesson <kwes...@gmail.com> wrote:
>>> Sorry, but I think version control and, particularly, dealing with
>>> edit collisions is not something you can solve as easily as just
>>> slapping a lock onto each file access, or else version control servers
>>> could just be FTP servers that locked their shared files during each
>>> access.
>>
>> Maybe so, but that is all beside the point.  The point was that
>> "repository" needn't mean "networked".
>
> Maybe just "repository that isn't fragile or outright broken" then. ;)

Perhaps, but I'd still say that even if the repository is made
available over the network and only the server is directly accessing
the repository, it is still a repository and the server is not
accessing it over the network, so the repository itself doesn't have
anything to do with the network ;)

>> If the CVS clients are the only ones doing the locking, then why not?
>
> ARE they the only ones doing the locking OR otherwise accessing the
> files, though?

Yes, unless you have malicious users, in which case you will need the
server. I'm not saying it's not a potential security problem. Just
that co-operative locking of files can work depending on the
circumstances.

>>> *minimum* it would seem that a real database with ACID and
>>> transactions would be needed -- A to avoid race conditions (no
>>> advisory locks here!), C to keep the internal state invariants valid,
>>
>> This is why various people moved away from CVS.  To get atomic commits etc.
>>
>>> I to be able to deal with edit collisions in a sane manner, and D for
>>> the obvious reasons. And a suitable software front-end. And now we're
>>> back to having at least one server in the mix, namely the DBMS at the
>>> backend. :)
>>
>> Right, I agree it's best to have a server controlling access to the
>> repository, but that does not mean that the concept of a repository is
>> linked to having a server or a network.
>
> No, just the concept of a reliable repository. ;)
>
>>> If you don't have a satisfactory answer there, then you probably need
>>> a real database. Of course perhaps you are clever and can design your
>>> own on-disk data structures that will fail-soft in some manner under
>>> such circumstances and convince yourself beyond a reasonable doubt
>>> that it'll work, but if not ...
>>
>> CVS is an old version control system that was far better than the
>> other things around at the time it was invented, but most people seem
>> to agree that other, more modern, version control systems are better
>> and/or more reliable.
>
> Unsurprisingly. With apologies to Leonard McCoy:
>
> "Non-atomic commits. Funduscopic examination. What is this, the Dark Ages?"

:)

--
Michael Wood <esio...@gmail.com>

Meikel Brandmeyer

unread,
Jul 6, 2011, 5:25:39 AM7/6/11
to Clojure
Hi,

Am Dienstag, 5. Juli 2011 16:15:12 UTC+2 schrieb faenvie:

> you plugin really rocks.

Thanks. Glad it helps. :)

> have you thought about contributing clojuresque as 'clojure-plugin'
> for gradle to the gradle project ? so that it will be more integrate
> and managed like ... say the scala-plugin for gradle ?

This would be certainly a possibility, but at the moment the
quality and functionality are not sufficient to warrant
integration into gradle proper. Eg. testing is rather a hack
at the moment and nowhere near the integration level the other
plugins have.

In the end this will be the decision of the gradle maintainers.
There seem to be plans to outsource the plugins into some kind
of forge to allow non-core maintainership but still some official
supervision of quality etc.

It was noticed positively that clojuresque exists, though.

> maybe after gradle has released it's 1.0 version ?

And some more clojuresque versions, I guess. :)

Sincerely
Meikel

Konrad Hinsen

unread,
Jul 6, 2011, 9:31:25 AM7/6/11
to clo...@googlegroups.com
On 5 Jul, 2011, at 20:38 , Laurent PETIT wrote:

> a) Select your project's node in the Package Explorer
> b) Trigger its contextual menu, select "Run as", select "Clojure Application"
> I *insist* (*) : you must trigger the Run from the project's node.
> Only with the project's node will the incremental compilation be
> activated for the started process' JVM.

Ahhhhh......

> Then you should see:

All I see in Eclipse is the REPL view. No Java console view, no "background" job, unless I don't know where to look. After a while, I also get a namespace browser, and shortly thereafter the classes show up in "classes". But this takes around five minutes, perhaps I was simply not patient enough. Or perhaps I started the REPL from something else than the project node.

> Currently, there's one drawback : CCW does not refrain AOT compilation
> from "compiling too much things", nor does it remove AOT compilation
> artifacts that should generally not be desired (e.g. anything in
> packages not being related to the project's own namespaces).

I simply don't put them into the fat jar. Not as convenient as it should be (in particular since I need to do it again every time I make a fat jar), but at least I get the result I want.

> (*) : In contrast, if you trigger a run of "Clojure Application" from
> the contextual menu of a specific clojure lib file, the process will
> not be started in "project mode", but in "file mode".

That difference is not easy to see from the menu text. Apparently it is important nevertheless.

Some quick tests work as they should, so it seems my build is correct. Thanks a lot for your help!

Konrad.


m...@mired.org

unread,
Jul 10, 2011, 2:01:17 AM7/10/11
to clo...@googlegroups.com
Ken Wesson <kwes...@gmail.com> wrote:

>On Wed, Jul 6, 2011 at 4:30 AM, Michael Wood <esio...@gmail.com>
>wrote:
>> On 6 July 2011 10:14, Ken Wesson <kwes...@gmail.com> wrote:
>>> Sorry, but I think version control and, particularly, dealing with
>>> edit collisions is not something you can solve as easily as just
>>> slapping a lock onto each file access, or else version control
>servers
>>> could just be FTP servers that locked their shared files during each
>>> access.
>>
>> Maybe so, but that is all beside the point. The point was that
>> "repository" needn't mean "networked".
>
>Maybe just "repository that isn't fragile or outright broken" then. ;)

In that case, pretty much all unix-based source control systems are "fragile or outright broken", as they all have a "files on disk" mode that doesn't require a server: cvs, svn, git, hg, etc. Even fossil - which uses an ACID SQL database to store things - does this. Perforce is the only exception I can think of.

>> If the CVS clients are the only ones doing the locking, then why not?
>
>ARE they the only ones doing the locking OR otherwise accessing the
>files, though?

Once you allow arbitrary commands to access the data on disk, you have problems. How you do file locking doesn't matter.


>>> *minimum* it would seem that a real database with ACID and
>>> transactions would be needed -- A to avoid race conditions (no
>>> advisory locks here!), C to keep the internal state invariants
>valid,

As I mentioned, fossil does this. However, the database is embedded, meaning it uses those advisory locks to deal with inter-process coordination.


>> This is why various people moved away from CVS. To get atomic
>commits etc.
>>
>>> I to be able to deal with edit collisions in a sane manner, and D
>for
>>> the obvious reasons. And a suitable software front-end. And now
>we're
>>> back to having at least one server in the mix, namely the DBMS at
>the
>>> backend. :)

The only source control system I know that uses an ACID database doesn't need a back end server.


>> Right, I agree it's best to have a server controlling access to the
>> repository, but that does not mean that the concept of a repository
>is
>> linked to having a server or a network.
>
>No, just the concept of a reliable repository. ;)

Only if it's really badly designed. Like early versions of subversion. Of course, they broke even worse if you put them on a server instead of using direct file access.


>>> If you don't have a satisfactory answer there, then you probably
>need
>>> a real database. Of course perhaps you are clever and can design
>your
>>> own on-disk data structures that will fail-soft in some manner under
>>> such circumstances and convince yourself beyond a reasonable doubt
>>> that it'll work, but if not ...
>>
>> CVS is an old version control system that was far better than the
>> other things around at the time it was invented, but most people seem
>> to agree that other, more modern, version control systems are better
>> and/or more reliable.

And all the popular ones have clients that can directly access the repository without a server.

--
Sent from my Android tablet with K-9 Mail. Please excuse my brevity.

Ken Wesson

unread,
Jul 11, 2011, 7:51:33 AM7/11/11
to clo...@googlegroups.com
On Sun, Jul 10, 2011 at 2:01 AM, mike.w...@gmail.com <m...@mired.org> wrote:
[snip most of post whose sole purpose seems to be to gainsay anything I write]

> The only source control system I know that uses an ACID database doesn't
> need a back end server.

How exactly is this possible? Databases *are* servers. "Database" and
"DBMS" are used more-or-less synonymously (when "database" isn't used
more broadly than ACID/SQL/etc.) and the "S" in "DBMS" stands for
"server". SQL is to databases/clients as HTTP GET/POST syntax is to
web servers/browsers. Etc.

Alessio Stalla

unread,
Jul 11, 2011, 11:29:42 AM7/11/11
to Clojure
On 11 Lug, 13:51, Ken Wesson <kwess...@gmail.com> wrote:
> On Sun, Jul 10, 2011 at 2:01 AM, mike.w.me...@gmail.com <m...@mired.org> wrote:
>
> [snip most of post whose sole purpose seems to be to gainsay anything I write]
>
> > The only source control system I know that uses an ACID database doesn't
> > need a back end server.
>
> How exactly is this possible? Databases *are* servers.

No, many of them offer access through a server, but the server is
usually one component among many other ones. For example, you are not
required to start the network listener in order to use Oracle. Not
speaking of all the embedded databases such as Neo4j, Derby, etc.

> "Database" and
> "DBMS" are used more-or-less synonymously (when "database" isn't used
> more broadly than ACID/SQL/etc.) and the "S" in "DBMS" stands for
> "server".

No, it stands for "system": http://en.wikipedia.org/wiki/Database_management_system

> SQL is to databases/clients as HTTP GET/POST syntax is to
> web servers/browsers. Etc.

HTTP is defined in terms of network communication, though you could in
principle make process-local HTTP requests. SQL instead doesn't need
to know anything at all about networking.

To return to the source code repository topic - most if not all source
code versioning systems do not need a server in order to host a
repository. That is especially true for distributed VCS's such as
Mercurial or Git, where there's no distinction between repository and
working copy: the project you checked out (or rather cloned) on your
local machine is a full-fledged repository just like the one where you
cloned it from, and you don't need a server to use it. Moreover, non-
distributed VCS's such as CVS and SVN are often based on filesystem
access as well, and access through a networked server is provided as a
layer on top of it. So, "repository" does not imply "server" at all,
at least when we're speaking about source code versioning
repositories.

Alessio

Ken Wesson

unread,
Jul 11, 2011, 4:21:45 PM7/11/11
to clo...@googlegroups.com
On Mon, Jul 11, 2011 at 11:29 AM, Alessio Stalla
<alessi...@gmail.com> wrote:
[snip most of another post whose sole purpose seems to be to gainsay
anything I write]

>> "Database" and
>> "DBMS" are used more-or-less synonymously (when "database" isn't used
>> more broadly than ACID/SQL/etc.) and the "S" in "DBMS" stands for
>> "server".
>
> No, it stands for "system"

I've seen it spelled out as "database management server" innumerable times.

>> SQL is to databases/clients as HTTP GET/POST syntax is to
>> web servers/browsers. Etc.
>
> HTTP is defined in terms of network communication, though you could in
> principle make process-local HTTP requests. SQL instead doesn't need
> to know anything at all about networking.

I didn't say "HTTP", I said "HTTP GET/POST syntax". That's carried
over HTTP the way SQL is carried over a DBMS wire protocol.

> So, "repository" does not imply "server" at all,

This is getting silly. "Repository" is a word that brings immediately
to mind typing checkin and checkout commands at a command prompt in
order to work on source code that is stored remotely. And remotely
implies "server".

Asim Jalis

unread,
Jul 11, 2011, 7:24:31 PM7/11/11
to clo...@googlegroups.com
On Tue, Jul 5, 2011 at 6:35 AM, Stephen C. Gilardi <sque...@mac.com> wrote:
> I would argue that the ~/.m2 repository is nearly as easy to work with as any other local, on-disk scheme one might envision and has the benefit of working with any maven-compatible tool.
>
> It also works for arbitrary jars one may have on disk (acquired from any source) via:
>
>  http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

Thanks. I had the same issue using some generated jar files and this
worked. Here are the concrete commands I used to install the jars into
m2. Posting it here in case someone else finds it useful.

mvn install:install-file \
-DgroupId=com.sforce.soap \
-DartifactId=partner \
-Dversion=22 \
-Dfile=partner.jar \
-Dpackaging=jar \
-DgeneratePom=true

Mike Meyer

unread,
Jul 11, 2011, 7:39:03 PM7/11/11
to clo...@googlegroups.com
On Mon, 11 Jul 2011 07:51:33 -0400
Ken Wesson <kwes...@gmail.com> wrote:

> On Sun, Jul 10, 2011 at 2:01 AM, mike.w...@gmail.com <m...@mired.org> wrote:
> [snip most of post whose sole purpose seems to be to gainsay anything I write]

Because in that article, you were (unusual for you) way off base.

> > The only source control system I know that uses an ACID database doesn't
> > need a back end server.
>
> How exactly is this possible? Databases *are* servers. "Database" and
> "DBMS" are used more-or-less synonymously (when "database" isn't used
> more broadly than ACID/SQL/etc.) and the "S" in "DBMS" stands for
> "server". SQL is to databases/clients as HTTP GET/POST syntax is to
> web servers/browsers. Etc.

I explained it in the part you snipped, but I'll repeat it for you: it
uses an embedded database. A database is *not* a server, it's an
API. The API may well talk to a server - and most do - but there's no
requirement that it do so. This particular embedded database is almost
certainly the most popular SQL database in the world, with hundreds of
millions of installations running worldwide.

SQL doesn't have a position anything like HTTP GET/POST syntax. HTTP's
GET/POST syntax is a wire protocol. Once you it, you can write code to
talk to a server, and get a response. If you know SQL, you can't use a
database *at all*. You have to know an API for the database in
question - and if it's a server, have an implementation that talks
it's wire protocol. ODBC provides a standard API, but not a wire
protocol. Last time I looked, there wasn't a standard wire protocol
for SQL servers.

<mike
--
Mike Meyer <m...@mired.org> http://www.mired.org/
Independent Software developer/SCM consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

Mike Meyer

unread,
Jul 11, 2011, 7:51:10 PM7/11/11
to clo...@googlegroups.com
On Mon, 11 Jul 2011 16:21:45 -0400
Ken Wesson <kwes...@gmail.com> wrote:
> > So, "repository" does not imply "server" at all,
> This is getting silly. "Repository" is a word that brings immediately
> to mind typing checkin and checkout commands at a command prompt in
> order to work on source code that is stored remotely. And remotely
> implies "server".

I was with you until you said "stored remotely". These days, I almost
*never* do checkins or checkouts to a remote server - and I use four
different source control systems on a regular basis: (hg, git, fossil
& perforce). The first three *cannot* do remote checkins or checkouts
- they require the repository be stored on the local disk. The last
one is the only one that behaves the way you describe - and it's a
legacy system I'm trying to get rid of.

Shantanu Kumar

unread,
Jul 11, 2011, 8:24:15 PM7/11/11
to Clojure


On Jul 12, 4:24 am, Asim Jalis <asimja...@gmail.com> wrote:
I have posted about it on another thread too. Maybe you can give this
a try (with Leiningen):

https://github.com/kumarshantanu/lein-localrepo

Regards,
Shantanu

Ken Wesson

unread,
Jul 11, 2011, 8:49:01 PM7/11/11
to clo...@googlegroups.com
On Mon, Jul 11, 2011 at 7:39 PM, Mike Meyer <m...@mired.org> wrote:
> On Mon, 11 Jul 2011 07:51:33 -0400
> Ken Wesson <kwes...@gmail.com> wrote:
>
>> On Sun, Jul 10, 2011 at 2:01 AM, mike.w...@gmail.com <m...@mired.org> wrote:
>> [snip most of post whose sole purpose seems to be to gainsay anything I write]
>
> Because in that article, you were (unusual for you) way off base.

As you say, it would be unusual for me if that were the case -- good
reason to suspect that perhaps I wasn't, but rather was
misinterpreted, or something.

> SQL doesn't have a position anything like HTTP GET/POST syntax.

Sure it does. Queries are bundled into a wire protocol and sent over
the network in pretty much every system I've seen that used a
database. You have the web server over *here*, and it is visible to
the internet because the gateway forwards port 80 to it *here*; it
talks over the LAN to the DBMS over *here* to run various queries and
build a page to serve ...

> HTTP's GET/POST syntax is a wire protocol.

HTTP is a wire protocol. The syntax of GET/POST requests is carried on
that protocol (as are HTML files and other files sent back to the
client) but is not the protocol itself.

> Once you it, you can write code to talk to a server, and get a
> response.

Not if all you know is "GET /index.html". You need to speak HTTP and
then send that.

> If you know SQL, you can't use a database *at all*. You have
> to know an API for the database in question

Just as you need to know HTTP and not just "GET /index.html". The
difference here is that the databases haven't all settled on one
embedding, analogous to HTTP, for the SQL requests, but all the
vendors use their own different one.

> Last time I looked, there wasn't a standard wire protocol
> for SQL servers.

Which doesn't change much of anything. There's HTTP 1.0 and HTTP 1.1
for web servers for that matter, though mostly you can ignore the
differences and, indeed, these days HTTP 1.0 as a whole. It's not hard
to imagine a world where a non-HTTP protocol became a rival to HTTP,
either -- for instance, one with built-in support for mirroring of
static content instead of having to fudge around with things like
Akamai for that, perhaps even one where individual browsers made parts
of their caches (not https stuff, though, obviously, or form contents)
available automatically as alternative sources to take some of the
load off central servers and possibly even maintain some availability
when they were down. If that were to happen, would the things that
interpret GET requests suddenly stop qualifying for being considered
to be "servers"?

Ken Wesson

unread,
Jul 11, 2011, 9:12:20 PM7/11/11
to clo...@googlegroups.com
On Mon, Jul 11, 2011 at 7:51 PM, Mike Meyer <m...@mired.org> wrote:
> On Mon, 11 Jul 2011 16:21:45 -0400
> Ken Wesson <kwes...@gmail.com> wrote:
>> > So, "repository" does not imply "server" at all,
>> This is getting silly. "Repository" is a word that brings immediately
>> to mind typing checkin and checkout commands at a command prompt in
>> order to work on source code that is stored remotely. And remotely
>> implies "server".
>
> I was with you until you said "stored remotely".

Well, the source code is being worked on collaboratively by
geographically separated people in many cases, and from multiple
office cubicle computers in the most geographically-concentrated case.
The canonical master version of the source code must reside in some
single place, which can be at most one of those developers' computers;
so for the rest of them, it's stored remotely.

What's stored locally may range from a single file being worked on at
a time to a copy of the whole code base, but there is still generally
a master copy and there is still therefore some mechanism for updating
the master copy and resolving edit conflicts that collide there.

That mechanism requires the computer holding the non-master copy or
single file to push its diffs to the computer holding the master copy
(and then the latter is a server) or the computer holding the master
copy to pull diffs from the others (and then all the REST are
servers!).

So not only is there a "stored remotely" in there out of necessity for
anything but a single-developer-on-a-single-machine project, but
there's also a "server" in there, or even multiple servers. The
alternatives I can think of are:

1. One developer, one computer. Version control may be overkill in
such a case anyway and it's not how big, major projects are developed.

2. Many developers, one computer. No "remote storage" and if the
developers are co-located no server; otherwise a terminal server. The
former is obviously not parallelizable (though edit conflicts are thus
a non-issue -- single global lock FTW!!!1!1) and the latter is a
throwback to the 1980s or earlier. :)

3. Many computers, one developer manually synching files or just
carrying the codebase around on a thumbdrive. No servers, no remote
storage that isn't simply overwritten when returned-to. The extra
copies, if any, merely amount to backups. Most likely with a
one-developer project with a tower and a laptop, or developing a phone
app on a computer and on their phone.

4. An ad hoc, peer-to-peer system with many evolving versions of the
codebase and patches swapped back and forth but no canonical "master"
copy. This *might* be workable on a small project (a handful of
developers, not too many LOC) but surely cannot scale much above that
without becoming total chaos. There might be no "server" beyond email
in such a case, used for exchanging diff files or whatever. But I
expect any project organized that way to melt down above a fairly
small size of codebase and/or developer headcount. Versions will
become too divergent, the bigger and more numerous they are, until
patches that worked on the sender's copy often won't work, or won't
work without extensive modification, on the recipient's, and then the
ability to share improvements begins to break down rapidly when that
point is reached. In effect, the codebases begin to evolve into
separate species that can no longer interbreed. Perhaps this is how
bacteria, despite being able to share genes in horizontal transfer and
acquire them after birth, nonetheless have distinct species -- they
become incompatible for all but certain broad classes of "plugin
interface implementation" patches such as, unfortunately,
antibiotic-resistance genes.

This could be made slightly more scalable by modularizing, specifying
module interfaces, and letting the modules evolve separately,
versioning each one by patch level, so the version of a module is
bumped every time it's patched. Patches expected to be acquired and
applied in order to keep each module up to date with everyone else's
work. Obvious problem with patch-numbering collisions, where two
developers hack on module Y and both produce distinct patch 1337s
unaware of what the other is doing -- in other words, edit conflicts.
Repositories that number every commit sort-of implement this, but with
a master copy and a database of some sort tracking the changes and the
commit numbers and some mechanism for resolving edit collisions.
Collisions are also detected right away, since both developers will
submit their changes to the central repository. In the peer-to-peer
model each might deliver their own "patch 1337" to a bunch of others
and both could spread for a while among different subsets of the
developers before eventually colliding in one developer's copy of
module Y who receives one of the patches and then, later, the other.
Before that, problems could arise if developer X talks to developer Z
and gets patch 1338 for module Y, tries to apply it, and despite
having patch 1337 it doesn't work because patch 1338 depends on one
patch 1337 and developer X has the *other* patch 1337. Z tells him he
mustn't have patch 1337, he insists he does, confusion ensues until at
some point someone thinks to compare Xs and Zs patch 1337s and
discovers that they're not the same...whence, collision fun again.

So, unless 4 can be made workable, then the typical use scenario for a
version control system involves both a) "remote storage" of code and
b) a "server". Their exact roles may vary. The exact way that
checkouts and commits work may vary. But without those two things in
*some* way shape or form the poorly-scaling anarchy of case 4 above
seems to me to be inevitable. Hell, even time sharing an old Unix
terminal server with a shell-and-emacs account for each developer
means remote code storage (on the Unix box) and a server (if only a
telnet/ssh server). :)

Michael Wood

unread,
Jul 12, 2011, 3:52:27 AM7/12/11
to clo...@googlegroups.com
Hi Ken

On 12 July 2011 03:12, Ken Wesson <kwes...@gmail.com> wrote:
> On Mon, Jul 11, 2011 at 7:51 PM, Mike Meyer <m...@mired.org> wrote:
>> On Mon, 11 Jul 2011 16:21:45 -0400
>> Ken Wesson <kwes...@gmail.com> wrote:
>>> > So, "repository" does not imply "server" at all,
>>> This is getting silly. "Repository" is a word that brings immediately
>>> to mind typing checkin and checkout commands at a command prompt in
>>> order to work on source code that is stored remotely. And remotely
>>> implies "server".
>>
>> I was with you until you said "stored remotely".
>
> Well, the source code is being worked on collaboratively by
> geographically separated people in many cases, and from multiple
> office cubicle computers in the most geographically-concentrated case.
> The canonical master version of the source code must reside in some
> single place, which can be at most one of those developers' computers;
> so for the rest of them, it's stored remotely.

This may be the case, but a "repository" in no way implies that there
are multiple developers involved. Just as (I thought we had agreed
before this thread was revived) a "repository" in no way implies a
network.

Also, even if there is some central, authoritative repository, the
individual developers may (e.g. in the case of Git or Mercurial) still
have local repositories that are not inextricably linked to the
central repository.

> What's stored locally may range from a single file being worked on at
> a time to a copy of the whole code base, but there is still generally
> a master copy and there is still therefore some mechanism for updating
> the master copy and resolving edit conflicts that collide there.

The conflict resolution in CVS or Subversion or Mercurial or Git all
happens locally. Not in some central server or repository. Some
crude form of conflict detection might happen in the central
repository, but so what? That does not mean that "repository =>
network", which was your original argument, and it does not mean that
a repository is inherently shared between multiple developers.

> That mechanism requires the computer holding the non-master copy or
> single file to push its diffs to the computer holding the master copy
> (and then the latter is a server) or the computer holding the master
> copy to pull diffs from the others (and then all the REST are
> servers!).


If there is a central repository then yes, changes need to be pushed
to it or pulled into it from elsewhere. But the existence of a
networked repository or a repository shared on a multi-user machine
with no networking involved does not preclude the existence of
non-networked, single-user repositories. So again, a repository does
not imply that there is a network involved.

> So not only is there a "stored remotely" in there out of necessity for
> anything but a single-developer-on-a-single-machine project, but
> there's also a "server" in there, or even multiple servers. The
> alternatives I can think of are:
>
> 1. One developer, one computer. Version control may be overkill in
> such a case anyway and it's not how big, major projects are developed.

I'd disagree that version control is overkill, but that has is
irrelevant. Anyway, we're not talking about "big, major projects".
We're talking about the meaning of the word "repository".

I only skimmed the last bit. Sorry :) I don't think it changes the
fact that "repository" does not imply a network. All the talk about
best practices etc. are irrelevant to the argument.

--
Michael Wood <esio...@gmail.com>

Meikel Brandmeyer

unread,
Jul 12, 2011, 4:04:26 AM7/12/11
to clo...@googlegroups.com
Hi,

Am Dienstag, 12. Juli 2011 03:12:20 UTC+2 schrieb Ken Wesson:

So, unless 4 can be made workable, ...

Did you try darcs?

Sincerely
Meikel

Ken Wesson

unread,
Jul 12, 2011, 4:06:44 AM7/12/11
to clo...@googlegroups.com
On Tue, Jul 12, 2011 at 3:52 AM, Michael Wood <esio...@gmail.com> wrote:
> Hi Ken
> On 12 July 2011 03:12, Ken Wesson <kwes...@gmail.com> wrote:
>> On Mon, Jul 11, 2011 at 7:51 PM, Mike Meyer <m...@mired.org> wrote:
>>> I was with you until you said "stored remotely".
>>
>> Well, the source code is being worked on collaboratively by
>> geographically separated people in many cases, and from multiple
>> office cubicle computers in the most geographically-concentrated case.
>> The canonical master version of the source code must reside in some
>> single place, which can be at most one of those developers' computers;
>> so for the rest of them, it's stored remotely.
>
> This may be the case, but a "repository" in no way implies that there
> are multiple developers involved.

No, simple statistics suffices for that. When a project is big enough
to use a repository and not simply a source tree on one guy's
computer, it's generally got multiple developers.

> Also, even if there is some central, authoritative repository, the
> individual developers may (e.g. in the case of Git or Mercurial) still
> have local repositories that are not inextricably linked to the
> central repository.

Except that to make any change "official" it must be pulled/pushed
into that central repository -- which requires a client/server
protocol in the general case.

> The conflict resolution in CVS or Subversion or Mercurial or Git all
> happens locally.  Not in some central server or repository.

Perhaps, but detection has to happen centrally, wherever resolution is handled.

> Some crude form of conflict detection might happen in the central
> repository, but so what?

"So what?" So, without conflict detection you have anarchy and with it
you have a server. Take your pick. :)

> If there is a central repository then yes, changes need to be pushed
> to it or pulled into it from elsewhere.  But the existence of a
> networked repository or a repository shared on a multi-user machine
> with no networking involved does not preclude the existence of
> non-networked, single-user repositories.

What (other than satisfying Maven's peculiar, autistic needs from its
world) is the use case, precisely, for such repositories?

>> 1. One developer, one computer. Version control may be overkill in
>> such a case anyway and it's not how big, major projects are developed.
>
> I'd disagree that version control is overkill, but that has is
> irrelevant.

Obviously not, since it cuts to the heart of whether *in practice* the
typical repository will be networked or not.

Version control is overkill unless the project has gotten above a
threshold in terms of sheer size of code body. Though we might
disagree on the exact positioning of that threshold, the likelihood is
overwhelming that by the time it's even approached a project has
accreted multiple developers -- for one thing, it's hard for a single
developer to keep that much code straight in his head, unless it's so
modularized that the components are essentially separate projects with
fairly stable APIs and each below the threshold for version control
being a big win. For another that would have to be one heckuva
prolific single developer; for a code base to get really huge usually
requires it to have many people adding to it.

Mike Meyer

unread,
Jul 12, 2011, 2:31:19 PM7/12/11
to clo...@googlegroups.com
On Mon, 11 Jul 2011 20:49:01 -0400
Ken Wesson <kwes...@gmail.com> wrote:

> On Mon, Jul 11, 2011 at 7:39 PM, Mike Meyer <m...@mired.org> wrote:
> > On Mon, 11 Jul 2011 07:51:33 -0400
> > Ken Wesson <kwes...@gmail.com> wrote:
> >
> >> On Sun, Jul 10, 2011 at 2:01 AM, mike.w...@gmail.com <m...@mired.org> wrote:
> >> [snip most of post whose sole purpose seems to be to gainsay anything I write]
> >
> > Because in that article, you were (unusual for you) way off base.
>
> As you say, it would be unusual for me if that were the case -- good
> reason to suspect that perhaps I wasn't, but rather was
> misinterpreted, or something.

You write clearly enough that misinterpretation isn't likely. You were
simply making false statements.

> > SQL doesn't have a position anything like HTTP GET/POST syntax.
>
> Sure it does. Queries are bundled into a wire protocol and sent over
> the network in pretty much every system I've seen that used a
> database. You have the web server over *here*, and it is visible to
> the internet because the gateway forwards port 80 to it *here*; it
> talks over the LAN to the DBMS over *here* to run various queries and
> build a page to serve ...
>
> > HTTP's GET/POST syntax is a wire protocol.
>
> HTTP is a wire protocol. The syntax of GET/POST requests is carried on
> that protocol (as are HTML files and other files sent back to the
> client) but is not the protocol itself.
>
> > Once you it, you can write code to talk to a server, and get a
> > response.
>
> Not if all you know is "GET /index.html". You need to speak HTTP and
> then send that.

If all you know is "GET /index.html", then you don't know the syntax
of the HTTP GET statement. The terminator - a pair of line endings -
is part of the syntax. If you send that string and the terminator to
an HTTP server, it should send back the contents of index.html.

> > If you know SQL, you can't use a database *at all*. You have
> > to know an API for the database in question
> Just as you need to know HTTP and not just "GET /index.html". The
> difference here is that the databases haven't all settled on one
> embedding, analogous to HTTP, for the SQL requests, but all the
> vendors use their own different one.

Sorry, but "GET /index.html" *is* HTTP. Oh, it's not all of it, by any
means - but it's enough to talk to a server. A much closer analogy
would be that SQL is like the URL syntax in the HTTP GET/POST
request. Knowing the URL isn't enough to talk to a web server. You
have to know the wire protocol, or the API for a library that
implements it for you.

> > Last time I looked, there wasn't a standard wire protocol
> > for SQL servers.
> Which doesn't change much of anything. There's HTTP 1.0 and HTTP 1.1
> for web servers for that matter, though mostly you can ignore the
> differences and, indeed, these days HTTP 1.0 as a whole. It's not hard
> to imagine a world where a non-HTTP protocol became a rival to HTTP,
> either -- for instance, one with built-in support for mirroring of
> static content instead of having to fudge around with things like
> Akamai for that, perhaps even one where individual browsers made parts
> of their caches (not https stuff, though, obviously, or form contents)
> available automatically as alternative sources to take some of the
> load off central servers and possibly even maintain some availability
> when they were down. If that were to happen, would the things that
> interpret GET requests suddenly stop qualifying for being considered
> to be "servers"?

Only if they also stopped listening for requests on something like a
socket. Which was your objection to running a repository: you think it
means you have to have something listening on a socket. This isn't the
case. In particular, it isn't the case for the maven repository that
was being recommended as a solution to the problem.

Mike Meyer

unread,
Jul 12, 2011, 3:11:33 PM7/12/11
to clo...@googlegroups.com
On Mon, 11 Jul 2011 21:12:20 -0400
Ken Wesson <kwes...@gmail.com> wrote:

> On Mon, Jul 11, 2011 at 7:51 PM, Mike Meyer <m...@mired.org> wrote:
> > On Mon, 11 Jul 2011 16:21:45 -0400
> > Ken Wesson <kwes...@gmail.com> wrote:
> >> > So, "repository" does not imply "server" at all,
> >> This is getting silly. "Repository" is a word that brings immediately
> >> to mind typing checkin and checkout commands at a command prompt in
> >> order to work on source code that is stored remotely. And remotely
> >> implies "server".
> >
> > I was with you until you said "stored remotely".

> there's also a "server" in there, or even multiple servers. The
> alternatives I can think of are:
>
> 1. One developer, one computer.
>

> 2. Many developers, one computer. No "remote storage" and if the
> developers are co-located no server; otherwise a terminal server. The
> former is obviously not parallelizable (though edit conflicts are thus
> a non-issue -- single global lock FTW!!!1!1) and the latter is a
> throwback to the 1980s or earlier. :)

Most systems that support such a model - and yes, they're still being
both developed and used - are well enough written to avoid a single
global lock.

> 3. Many computers, one developer

> 4. An ad hoc, peer-to-peer system with many evolving versions of the


> codebase and patches swapped back and forth

This is the model used by the Linux kernel, among others. You might
argue that one of Linus's repositories is a "master" copy, as that's
the one that Linux kernel releases are cut from, but that's really the
only thing that distinguishes it from any of the others. Each
developer gets to decide where they want to take patches from and
which patches they're actually going to use in any given build, but
most can't put code in the so-called "master" repository.

> So, unless 4 can be made workable,

I'd say a project with 14 million LOC and thousands of developers
using it for five years demonstrates that it's both workable and
scalable.

Ken Wesson

unread,
Jul 12, 2011, 6:13:57 PM7/12/11
to clo...@googlegroups.com
On Tue, Jul 12, 2011 at 2:31 PM, Mike Meyer <m...@mired.org> wrote:
> You write clearly enough that misinterpretation isn't likely. You were
> simply making false statements.

I do not do that, and I won't tolerate being called names and
badmouthed in public. This discussion is over.

Ken Wesson

unread,
Jul 12, 2011, 6:20:38 PM7/12/11
to clo...@googlegroups.com
On Tue, Jul 12, 2011 at 3:11 PM, Mike Meyer <m...@mired.org> wrote:
> On Mon, 11 Jul 2011 21:12:20 -0400
> Ken Wesson <kwes...@gmail.com> wrote:
>> 2. Many developers, one computer. No "remote storage" and if the
>> developers are co-located no server; otherwise a terminal server. The
>> former is obviously not parallelizable (though edit conflicts are thus
>> a non-issue -- single global lock FTW!!!1!1) and the latter is a
>> throwback to the 1980s or earlier. :)
>
> Most systems that support such a model - and yes, they're still being
> both developed and used - are well enough written to avoid a single
> global lock.

Another misunderstanding. Many developers working at one physical,
co-located computer has the keyboard and monitor as "a single global
lock". In the terminal server case there could be a finer locking
granularity. As for "still developed and used", what for? Perhaps
top-secret stuff where they really want to guard against the code
leaking? I guess they might use this model to develop the code that
runs on Predator drones, or something, not because more modern methods
don't exist but because more secure methods don't exist; the code
never leaves the one server and really robust credentials can be
checked before someone can log in to even view it there, AND they get
a log of the IP address of everyone who does see it. Trying to leak it
would be a pain involving copying one screenful, pasting it,
scrolling, etc. And access could be further limited to a LAN inside a
high security facility with armed guards and code-locked physical
doors.

However, another outlier exception rather than example of typical
software development and repository use. :)

>> 4. An ad hoc, peer-to-peer system with many evolving versions of the
>> codebase and patches swapped back and forth
>
> This is the model used by the Linux kernel, among others. You might
> argue that one of Linus's repositories is a "master" copy, as that's
> the one that Linux kernel releases are cut from, but that's really the
> only thing that distinguishes it from any of the others. Each
> developer gets to decide where they want to take patches from and
> which patches they're actually going to use in any given build, but
> most can't put code in the so-called "master" repository.

Which means it's not really case 4 at all. ANY open source project
potentially has "eccentric patches" circulate among techie users and
developers that don't appear in the master branch -- at the very least
if they want to give a patch extensive testing before committing it to
master, then several developers might apply it to their local versions
for a while and see how things go.

>> So, unless 4 can be made workable,
>
> I'd say a project with 14 million LOC and thousands of developers
> using it for five years demonstrates that it's both workable and
> scalable.

Except that it has an official build repository with more stringent
criteria for what gets in there, so not really.

Mike Meyer

unread,
Jul 12, 2011, 7:21:13 PM7/12/11
to clo...@googlegroups.com
On Tue, 12 Jul 2011 18:13:57 -0400
Ken Wesson <kwes...@gmail.com> wrote:

> On Tue, Jul 12, 2011 at 2:31 PM, Mike Meyer <m...@mired.org> wrote:
> > You write clearly enough that misinterpretation isn't likely. You were
> > simply making false statements.
>
> I do not do that, and I won't tolerate being called names and
> badmouthed in public. This discussion is over.

I'm sorry, I didn't mean to imply that you were lying. I'm sure you
thought the statements were true. You were just wrong in this case.

Mike Meyer

unread,
Jul 12, 2011, 7:47:56 PM7/12/11
to clo...@googlegroups.com
On Tue, 12 Jul 2011 18:20:38 -0400
Ken Wesson <kwes...@gmail.com> wrote:

> On Tue, Jul 12, 2011 at 3:11 PM, Mike Meyer <m...@mired.org> wrote:
> > On Mon, 11 Jul 2011 21:12:20 -0400
> > Ken Wesson <kwes...@gmail.com> wrote:
> >> 2. Many developers, one computer. No "remote storage" and if the
> >> developers are co-located no server; otherwise a terminal server. The
> >> former is obviously not parallelizable (though edit conflicts are thus
> >> a non-issue -- single global lock FTW!!!1!1) and the latter is a
> >> throwback to the 1980s or earlier. :)
> >
> > Most systems that support such a model - and yes, they're still being
> > both developed and used - are well enough written to avoid a single
> > global lock.
>
> Another misunderstanding. Many developers working at one physical,
> co-located computer has the keyboard and monitor as "a single global
> lock". In the terminal server case there could be a finer locking
> granularity. As for "still developed and used", what for?

What makes you think a computer can have only a single
keyboard/monitor? After all, what is a terminal server but a computer
with lots of keyboard/monitors that routes the terminals out to
network servers of some kind? But this is all irrelevant - from the
point of view of an application, it doesn't make any difference if
someone is issuing commands from a device directly connected to the
hardware, from a device connected to a terminal server, or sitting at
a second computer and connected back to the single computer where the
work is being done.

Which is why such things are still being developed. There's
fundamentally no difference between many developers running commands
on the single computer to manipulate the data and many developers
running clients that talk to apache running on that single computer
and causing it to issue those commands. This lets a developer leverage
the apache networking code to create a client/server model, and most
modern SCMs can be run that way.

> >> 4. An ad hoc, peer-to-peer system with many evolving versions of the
> >> codebase and patches swapped back and forth
> >
> > This is the model used by the Linux kernel, among others. You might
> > argue that one of Linus's repositories is a "master" copy, as that's
> > the one that Linux kernel releases are cut from, but that's really the
> > only thing that distinguishes it from any of the others. Each
> > developer gets to decide where they want to take patches from and
> > which patches they're actually going to use in any given build, but
> > most can't put code in the so-called "master" repository.
>
> Which means it's not really case 4 at all.

Well, it's very clearly not cases 1, 2 or 3. There are many developers
and many computers, and case 4 is the only one that allows for
that. So this is either case 4, or you need to provide another case
for it.

> >> So, unless 4 can be made workable,
> >
> > I'd say a project with 14 million LOC and thousands of developers
> > using it for five years demonstrates that it's both workable and
> > scalable.
> Except that it has an official build repository with more stringent
> criteria for what gets in there, so not really.

Half right. As I said, it's got one repository that the official
builds come from. Other people are free use builds from their own
repositories, and often do - I don't think any of the GNU/Linux
distributions actually use binaries built by Linus. Instead, they each
have their own "master" repository from which they do their "official"
builds.

However, the criteria for what gets into that so-called "master"
repository are no more stringent than for any other repository in the
project: only patches the owner wants get in.

Ken Wesson

unread,
Jul 12, 2011, 10:21:39 PM7/12/11
to clo...@googlegroups.com
On Tue, Jul 12, 2011 at 7:47 PM, Mike Meyer <m...@mired.org> wrote:
>> Another misunderstanding. Many developers working at one physical,
>> co-located computer has the keyboard and monitor as "a single global
>> lock". In the terminal server case there could be a finer locking
>> granularity. As for "still developed and used", what for?
>
> What makes you think a computer can have only a single
> keyboard/monitor?

And yet another misunderstanding. If it has more, it's a terminal
server of some sort rather than just having its one local console. And
there's that "s" word again. :)

> But this is all irrelevant

Hardly.

> from the point of view of an application, it doesn't make any difference if
> someone is issuing commands from a device directly connected to the
> hardware, from a device connected to a terminal server, or sitting at
> a second computer and connected back to the single computer where the
> work is being done.

The application's perspective is what's irrelevant. It just means the
sysadmin has to secure a telnetd/sshd/whatever rather than a version
control server.

> Which is why such things are still being developed. There's
> fundamentally no difference between many developers running commands
> on the single computer to manipulate the data and many developers
> running clients that talk to apache running on that single computer
> and causing it to issue those commands.

Well, actually, there is. You see, when using a terminal server to
talk to a central unix box, a) all of the CPU and memory resources for
separate editing sessions, as well as those for file access and doing
the version control work (if any), are consumed on the server, and b)
all of your developers are stuck using vi and/or emacs in text mode on
a crummy little 80x24 display.

When using regular version control servers, on the other hand, a) the
server's only responsible for the CPU and memory use needed for file
access and version control work, with the editing etc. using the
developers' own desktop machines' resources, and b) the developers get
to use whatever editors, IDEs, and whatnot they're most comfortable
with, and get to use GUIs if they want to, so have more choice.

The security situation is also starkly different. There's a server to
secure in every case; but in the first case, you also have a bunch of
people running around with shell accounts on the server, whereas their
interactions with the server are far more constrained in the second
case. On the other hand, you can more tightly control the source code
in the first case -- all other things being equal (e.g. the only
machines that can talk to the server are in a locked-down part of a
military base, say, including the server), dumb terminals instead of
smart desktop computers means the source code isn't copied to many
general-purpose computers but stays on just the one. Spying means
actually taking pictures of the terminal screen while scrolling,
rather than just smuggling in a thumb drive or something; the server
can be in an even more tightly locked down room with even fewer people
having access than the terminals.

So, for the standard threat model (this big open source project is a
likely target for hackers out to bring the web site down for kicks or
maliciously sneak bad stuff such as security holes into the product
we're building; we have thousands of potential developers and can't
vet them all; and we're operating on a budget) remote, smart clients
and a dumb server works better. For the military-paranoia threat model
(Iran will try very hard to get ahold of the source code for our
next-generation Predator drones; we have 18 developers, all unix
wizards with top security clearance; and we have thirty billion
black-budget Pentagon dollars to spare on beefing up the server to
handle high loads) dumb terminals and smart server works better, given
the whole lot are on a closed, local network behind physically locked
and guarded doors.

>> Which means it's not really case 4 at all.
>
> Well, it's very clearly not cases 1, 2 or 3.

No, it's case zero: standard multi-developer, multi-computer, single
canonical master copy on one computer/cluster somewhere. The thing
cases 1 through 4 were *alternatives* to.

>> Except that it has an official build repository with more stringent
>> criteria for what gets in there, so not really.
>
> Half right.

All right.

> As I said, it's got one repository that the official
> builds come from. Other people are free use builds from their own
> repositories, and often do

Same as any case-zero, open source development effort.

> I don't think any of the GNU/Linux
> distributions actually use binaries built by Linus. Instead, they each
> have their own "master" repository from which they do their "official"
> builds.

Forks, each their own example of case zero.

> However, the criteria for what gets into that so-called "master"
> repository are no more stringent than for any other repository in the
> project: only patches the owner wants get in.

Technically true, but meaningless. The master gets tens of zillions of
submissions instead of next-to-none for the typical random Linux
hacker who has his own repository of the kernel code. He's got to be
proportionately more selective just to not be spending 27 hours a day
patching the kernel with minus three left over for eating, sleeping,
and all of that stuff. :)

Kevin Kelley

unread,
Jul 13, 2011, 12:21:17 AM7/13/11
to clo...@googlegroups.com
Guys, geez, go cure cancer or something.

Kevin

Mike Meyer

unread,
Jul 13, 2011, 7:49:57 PM7/13/11
to clo...@googlegroups.com
On Tue, 12 Jul 2011 22:21:39 -0400
Ken Wesson <kwes...@gmail.com> wrote:
> >> Which means it's not really case 4 at all.
> >
> > Well, it's very clearly not cases 1, 2 or 3.
>
> No, it's case zero: standard multi-developer, multi-computer, single
> canonical master copy on one computer/cluster somewhere. The thing
> cases 1 through 4 were *alternatives* to.
>
> Technically true, but meaningless. The master gets tens of zillions of
> submissions

Completely and totally wrong. Linus developed the model used by the
Linux kernel specifically to avoid having some master copy on a
central server with tens of zillions of submissions. He wrote a SCM
that allowed the distributed, ad-hoc model to work without such a
central server. All because his experience with the kernel up to that
point was that he had reached the scalability limits of your case zero
model.

And now you're claiming it's a central server model in order to
justify your erroneous assumption that having a repository implies
having a server? I'm not sure whether that's more funny or pathetic.

Ken Wesson

unread,
Jul 13, 2011, 9:47:42 PM7/13/11
to clo...@googlegroups.com
On Wed, Jul 13, 2011 at 7:49 PM, Mike Meyer <m...@mired.org> wrote:
> On Tue, 12 Jul 2011 22:21:39 -0400
> Ken Wesson <kwes...@gmail.com> wrote:
>> >> Which means it's not really case 4 at all.
>> >
>> > Well, it's very clearly not cases 1, 2 or 3.
>>
>> No, it's case zero: standard multi-developer, multi-computer, single
>> canonical master copy on one computer/cluster somewhere. The thing
>> cases 1 through 4 were *alternatives* to.
>>
>> Technically true, but meaningless. The master gets tens of zillions of
>> submissions
>
> Completely and totally wrong.

Meyer, your *opinion* of me has been made *abundantly* clear by your
numerous recent posts publicly attacking my character and questioning
my intelligence and/or honesty. Everyone, by now, knows you hate me
and knows what you think of me. There is therefore no point in your
repeating it over and over again, and no point in your replying to any
more of my posts since it's a foregone conclusion what you are going
to say and that I am not going to agree with it.

That you would go so far as to suggest that Linus doesn't get large
numbers of kernel patches crossing his (perhaps not literal) desk,
when such is simply not a logical belief to hold, purely for the
purpose of publicly disagreeing with me as an excuse for belittling me
once again, proves that you have little interest in reasoned discourse
with me.

Meanwhile, I have no interest at all in any other kind of discourse,
so it seems we have nothing to talk about.

Good-bye.

Reply all
Reply to author
Forward
0 new messages