. The reason that the Unix version is so
simple isn't just a simple launcher script, or the #! hack, or any one
things. It's that "simple things should be simple" is axiomatic for
those tools (I'm not sure which came first - the software tools
project or unix, but they both
On Fri, 10 Sep 2010 23:21:01 +0200
Meikel Brandmeyer wrote:
> Hi,
>
> Am 10.09.2010 um 21:17 schrieb Mike Meyer:
>
> > 1) Write program in chosen unix-friendly interpreted language.
>
> You lost exactly here. "unix-friendly". Since you keep putting your context
> over everything, I will also
Hi Mike,
I think this is more about convenience than simplicity. In both Unix and Java
deployment is complex, and often complicated as well. In spite of this, small,
one-off things should be convenient to deploy, and Unix does this better in
some contexts.
There is no reason we can't make one-
Hi,
Am 10.09.2010 um 21:17 schrieb Mike Meyer:
> 1) Write program in chosen unix-friendly interpreted language.
You lost exactly here. "unix-friendly". Since you keep putting your context
over everything, I will also keep on putting mine over everything. Ruby,
Python, Perl, Tcl, ... are all no
On Fri, Sep 10, 2010 at 12:17 PM, Mike Meyer
wrote:
> 1) Write program in chosen language that runs on the JVM.
> 2) Compile program to class file(s).
> 3) Use some tool to create a manifest file.
> 4) Run jar to create jar file.
> 5) Distribute jar file.
>
> Users can then run it via double-click
On Fri, 10 Sep 2010 07:11:18 -0700
gary ng wrote:
> On Fri, Sep 10, 2010 at 4:47 AM, John Cromartie wrote:
> > #!/usr/local/bin/clj
> >
> > (println "Content-type: text/plain\n")
> > (println "Hello, World!")
> > ^D
> >
> > Is that simple enough?
> >
> That was my thought too, java/clojure conso
On Fri, 10 Sep 2010 00:03:22 -0700 (PDT)
Meikel Brandmeyer wrote:
> Hi,
>
> On 9 Sep., 20:46, Mike Meyer 620...@mired.org> wrote:
>
> > The first problem with that is that this stuff seems show up
> > *everywhere* in Javaland. It's not just web apps, it's pretty much
> > anything.
>
> You jus
On Fri, Sep 10, 2010 at 1:27 AM, Laurent PETIT wrote:
> These last few months, working on ccw has been particularly
> interesting because I've had feedback from users, especially Lee. Lee
> has challenged a lot of what I had considered to be "simple things" in
> ccw. I can say that when you're in
On Sep 10, 1:32 am, Mike Meyer wrote:
> I think that Java's strength is enterprise-level, highly scalable web
> servers make people assume that every problem must be a nail for that
> hammer.
I think that Unix's strength is small independent programs
communicating over standard I/O makes you as
Finally,
> cat - > /usr/local/www/apache22/cgi-bin/hello-world
>
> #!/usr/local/bin/clj
>
> (println "Content-type: text/plain\n")
> (println "Hello, World!")
> ^D
I can start using Clojure again :)
John
--
You received this message because you are subscribed to the Google
Groups "Clojure" gro
On Fri, Sep 10, 2010 at 4:47 AM, John Cromartie wrote:
> #!/usr/local/bin/clj
>
> (println "Content-type: text/plain\n")
> (println "Hello, World!")
> ^D
>
> Is that simple enough?
>
That was my thought too, java/clojure console app should not be more
complex than python etc. The issue is the star
Just to be contrary ;)
A one time investment of 2 minutes (I did have to scrounge in contrib
to locate these after all):
(defn make-stupid-simple-script [f content]
(spit f content)
(sh "chmod" "755" (.getName f)))
for the eternal pleasure of using:
user=> (make-stupid-simple-script (File.
On Sep 9, 11:47 am, Mike Meyer wrote:
> On Thu, 9 Sep 2010 16:28:48 +0100
>
> Edmund Jackson wrote:
> > Hi Mike,
>
> > Could you perhaps present a counter-example of greater simplicity ?
>
> $ cat - > /usr/local/www/apache22/cgi-bin/hello-world.sh
> #!/bin/sh
>
> echo 'Content-type: text/pla
On Sep 9, 6:06 pm, Phil Hagelberg wrote:
> On Thu, Sep 9, 2010 at 8:38 AM, Mike Meyer
>
> wrote:
> > And two tools - lein and clojure itself.
>
> I'm not sure Clojure should be counted separately since you're not
> installing it yourself.
>
> > So we go from 3, 0, 1 to 6, 4, 2. I'm not sure that
2010/9/10 Meikel Brandmeyer :
> Hi,
>
> On 10 Sep., 10:27, Laurent PETIT wrote:
>
>> while I admit I haven't read *all* the answers to Meikel's question in
>> their entirety, what I've understood is that :
>>
>> * he's not talking about clojure the language, but its ecosystem
>> (the JVM host an
Hi,
On 10 Sep., 10:27, Laurent PETIT wrote:
> while I admit I haven't read *all* the answers to Meikel's question in
> their entirety, what I've understood is that :
>
> * he's not talking about clojure the language, but its ecosystem
> (the JVM host and the J2EE stuff -de facto standard for w
2010/9/10 Meikel Brandmeyer :
> Hi,
>
> On 9 Sep., 20:46, Mike Meyer 620...@mired.org> wrote:
>
>> The first problem with that is that this stuff seems show up
>> *everywhere* in Javaland. It's not just web apps, it's pretty much
>> anything.
>
> You just lost me completely with your argumentation
Hi,
On 9 Sep., 20:46, Mike Meyer wrote:
> The first problem with that is that this stuff seems show up
> *everywhere* in Javaland. It's not just web apps, it's pretty much
> anything.
You just lost me completely with your argumentation. I wrote a small
desktop utility (simple problem, simple so
he curve.
The fast majority of web servers don't need that, they just need a
simple way to get the code running. Which is why "simple things
should be simple" is important - there are a lot more of them than
there are of the others.
http://www.mired.org/consult
(use '[clojure.contrib.server-socket :only (create-server)]
'[clojure.contrib.duck-streams :only (read-lines)])
(create-server 8080
(fn [in out] (when-not (empty? (read-lines in)) (spit out "Hello,
World!\n"
4/0/0
John
On Thu, Sep 9, 2010 at 9:21 PM, Matt wrote:
>> You cannot deplo
> You cannot deploy a .clj script on a running Tomcat (yet).
In the unstable 0.8 version of Conjure, you can create a war file by
simply adding leiningen-war to your dev-dependencies and running "lein
uberwar". You can then simply drop the war file into a Tomcat server.
The web.xml file is already
On Sep 9, 2010, at 7:06 PM, Luke Renn wrote:
> I'm sure many here would disagree with me, but I would not recommend
> Clojure for a college level Lisp course just yet. I would probably
> recommend Racket or Dr. Scheme.
>
I've taught with Dr. Scheme but I like Clojure a lot better than Scheme!
i don't know if this has been said as such, but:
a) there's an inflection / transition point from "simple things" to
"complex things".
b) some systems are in the simple world, but when you get complex they
restrict you or fall apart (rails?).
vs.
other systems are fine in the large, but suck for
On Sep 9, 2010, at 6:36 PM, David Nolen wrote:
>
> I started using Processing since version 22 (around 2003/4). Let's just
> say... that it takes a lot of time and external contribution to reach the
> level of documentation, stability and cross platform reliability that
> Processing now has.
On Thu, 9 Sep 2010 16:06:54 -0700 (PDT)
Luke Renn wrote:
> That was kind of my point. I would expect these kinds of questions,
> examples, and objections from someone looking at Clojure/Ring to teach
> with, not necessarily someone who want to deploy highly scalable web
> applications.
I'm curio
nd technologies I'm talking about here.
But - because they play well in an environment where "simple things
should be simple" is an axiom, they also let me do zero-config
deployment of simple applications. There's no fundamental reason
clojure can't be used that way. Nuts, I've
On Thu, Sep 9, 2010 at 4:02 PM, Mike Meyer
wrote:
> No, they've explained what *they* consider to be simple. That isn't
> the same thing as actually *being* simple.
+1 :-)
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send e
On Sep 9, 5:53 pm, Lee Spector wrote:
> On Sep 9, 2010, at 3:04 PM, Luke Renn wrote:
>
> > What exactly are you evaluating Clojure for? Because unless it's
> > teaching elementary school children, the LOC it takes to deploy a
> > hello world webapp is irrelevant.
>
> > Luke
>
> From the sidelines
; of time explaining (or abstracting out) irrelevant details of some
> > real-world application before asking the question about the overhead
> > required to deploy java web apps.
> The subject of the thread is Simple Things Should Be Simple. Others
> in this thread have done a good jo
no this discussion is going to be ... won't say it.
Quiz:
- is your solution functional (regarding the requirements=
- is your solution scallable? (groing large or running
plattformindependent?)
- is your solution easily maintainable (in the sense of mutating it
some days to get complex and have
that in something more suitable to large-scale
programming as well - like I said, pretty much any language that plays
well on Unix, whether it's interpreted, compiled or both. And if I
needed to link in extra dependencies, I'd use a make file, or CPAN, or
whatever was appropriate.
The thin
On Thu, Sep 9, 2010 at 5:53 PM, Lee Spector wrote:
>
> One of my favorite examples of making the simple stuff simple is Processing
> (processing.org), which can be downloaded and installed with a single
> click, and allows you to make an applet with the graphical equivalent of
> HelloWorld with o
On Sep 9, 2010, at 3:04 PM, Luke Renn wrote:
> What exactly are you evaluating Clojure for? Because unless it's
> teaching elementary school children, the LOC it takes to deploy a
> hello world webapp is irrelevant.
>
> Luke
>From the sidelines -- because I know little about web apps per se in
On Sep 9, 2:46 pm, Mike Meyer wrote:
> I have to compile and link it first. Not a problem. My 3/0/1 solution
> could just as well have been:
>
> $ cat - > hello.c
> main() {
> puts("Content-type: text/plain\n\nHello world!\n") ;
> }
> ^D
> $ cc hello.c
> $ cp a.out /usr/local/apache22/cg
e asking the question about the overhead
> required to deploy java web apps.
The subject of the thread is Simple Things Should Be Simple. Others
in this thread have done a good job attempting to explain that they
are in fact simple so I won't continue. Perhaps you should play
around with rin
On 9 September 2010 19:16, Brenton wrote:
> Mike,
>
> While evaluating Clojure, just remember, you don't have use it for
> everything. When you need something simple, as in your examples, then
> use cgi. When you need to do something more complex then Clojure can
> help.
>
> You cannot deploy a .
On Thu, 9 Sep 2010 12:04:34 -0700 (PDT)
Luke Renn wrote:
> On Sep 9, 1:40 pm, Mike Meyer 620...@mired.org> wrote:
> > The thing is, I'm evaluating clojure - that's what drags clojure into
> > it.
> What exactly are you evaluating Clojure for? Because unless it's
> teaching elementary school chil
just skimming the thread all I see is mention of war files, which,
well, who cares? just get ring and the ring jetty adapter, you don't
even after to presume the existence of an installed webserver or
servlet container. http://github.com/hiredman/place-for-things is
something I have been playing wi
On Thu, 9 Sep 2010 11:48:36 -0700 (PDT)
Saul Hazledine wrote:
> On Sep 9, 8:16 pm, Brenton wrote:
> >
> > Even though Clojure doesn't already have what you are looking for it
> > would not be difficult to make it work. For example, you could create
> > a generic web app that would have an embedd
On Thu, 9 Sep 2010 14:27:48 -0400
David Nolen wrote:
> On Thu, Sep 9, 2010 at 2:17 PM, Mike Meyer <
> mwm-keyword-googlegroups.620...@mired.org> wrote:
> > > run the risk of fubaring some or all of the previous applications.
> > That problem exists no matter how you do the configuration. But the
>
On Sep 9, 1:40 pm, Mike Meyer wrote:
> The thing is, I'm evaluating clojure - that's what drags clojure into
> it.
What exactly are you evaluating Clojure for? Because unless it's
teaching elementary school children, the LOC it takes to deploy a
hello world webapp is irrelevant.
Luke
--
You
On Thu, Sep 9, 2010 at 11:17 AM, Mike Meyer wrote:
> That problem exists no matter how you do the configuration. But the
> less per-application configuration you have to do, the less likely it
> is to happen.
(i might be not-quite-following, but)
no, i think the problem i mentioned explicitly do
On Sep 9, 8:16 pm, Brenton wrote:
>
> Even though Clojure doesn't already have what you are looking for it
> would not be difficult to make it work. For example, you could create
> a generic web app that would have an embedded REPL as well as the
> ability to dynamically load code from external fi
On Thu, 9 Sep 2010 11:16:11 -0700 (PDT)
Brenton wrote:
> While evaluating Clojure, just remember, you don't have use it for
> everything. When you need something simple, as in your examples, then
> use cgi. When you need to do something more complex then Clojure can
> help.
The first problem wit
On Thu, Sep 9, 2010 at 2:17 PM, Mike Meyer <
mwm-keyword-googlegroups.620...@mired.org> wrote:
> > run the risk of fubaring some or all of the previous applications.
>
> That problem exists no matter how you do the configuration. But the
> less per-application configuration you have to do, the les
On Thu, 9 Sep 2010 11:00:48 -0700
Raoul Duke wrote:
> On Thu, Sep 9, 2010 at 10:07 AM, Mike Meyer
> wrote:
> > The difference is that that 4 lines has to be repeated *for every
> > project*. Yeah, /usr/local/etc/apache/conf.d is a lot more
> > complicated. But I only need to do it once, and it w
Mike,
While evaluating Clojure, just remember, you don't have use it for
everything. When you need something simple, as in your examples, then
use cgi. When you need to do something more complex then Clojure can
help.
You cannot deploy a .clj script on a running Tomcat (yet). When you
install Tom
On Thu, Sep 9, 2010 at 10:07 AM, Mike Meyer
wrote:
> The difference is that that 4 lines has to be repeated *for every
> project*. Yeah, /usr/local/etc/apache/conf.d is a lot more
> complicated. But I only need to do it once, and it works for every
> application.
until you need to change it to su
On Thu, 9 Sep 2010 09:41:09 -0700 (PDT)
Brenton wrote:
> Mike,
>
> Your point has been made, simple things are simple. When you need to
> print "hello world" you don't need to bring Clojure into the picture.
> You could have given a much simpler example of needing to print "hello
> world" on the
php
> >> script on a unix
> >> system, but apache and mod_php weren't setup. I'd first have to install
> >> them
> >> and configure them.
> >
> > That simple things should be simple. Setting up a web server - and
> > associated tools
lem using a framework that gives them
to me. The thing is, if I don't need them, I don't *want* to have to
deal things that provide them.
Simple things should be simple.
Say I'm having a problem with the cpu in a web server overheating. I
want to install a simple hack so I can ch
On Thu, 9 Sep 2010 16:35:15 +0100
Bruce Durling wrote:
> Mike,
>
> If you are happy with cgi and if we posit that clojure is a compiled
> language and leiningen is the same as make. The I submit the following
> bit of fluff:
>
> At a prompt:
>
> $ lein new hw
> $ cd hw
> $ lein deps
>
> Then
On Thu, 9 Sep 2010 17:15:09 +0100
Edmund Jackson wrote:
> You assume the presence of a configured web server but not a text editor ?
Actually, I did assume a text editor - provided any text editor would
do. I chose to use my favorite simple text editor (cat) here.
> The only constructive thing
On Thu, 9 Sep 2010 12:32:27 -0400
David Nolen wrote:
> On Thu, Sep 9, 2010 at 12:22 PM, Mike Meyer <
> mwm-keyword-googlegroups.620...@mired.org> wrote:
>
> > Clojure great. No questions about that. WAR files, CLASSPATHs, having
> > to wrap *every little command* in it's own script - that's what
On Thu, Sep 9, 2010 at 12:32 PM, David Nolen wrote:
> On Thu, Sep 9, 2010 at 12:22 PM, Mike Meyer
> wrote:
>>
>> Clojure great. No questions about that. WAR files, CLASSPATHs, having
>> to wrap *every little command* in it's own script - that's what I'm
>> looking at.
>
> I've already shown that
I'd first have to install them
>> and configure them.
>
> That simple things should be simple. Setting up a web server - and
> associated tools - to the point that you can install applications on
> it isn't necessarily simple, so I don't expect it to be simple. On the
I think the point is missed with this example.
Given your hello world example, how much effort does it take you to
add URL args, make it operate like a RESTful resource, change the
route that triggers it, add user sessions, address security concerns,
template out responses, tweak those templates w
Mike,
If you are happy with cgi and if we posit that clojure is a compiled
language and leiningen is the same as make. The I submit the following
bit of fluff:
At a prompt:
$ lein new hw
$ cd hw
$ lein deps
Then edit project.clj to look as follows:
(defproject hw "0.0.1"
:description "The sm
xity they incur if I don't need them.
Simple things should be simple. It seems to me as if once you drag
java into the equation, nothing is simple. I'm trying to figure out if
that's correct or not.
> I mean, I can counter by just create a hello.html in apache
> and put "
Mike,
Your point has been made, simple things are simple. When you need to
print "hello world" you don't need to bring Clojure into the picture.
You could have given a much simpler example of needing to print "hello
world" on the command line. echo "hello world" is much simpler than
what you would
On Thu, Sep 9, 2010 at 12:22 PM, Mike Meyer <
mwm-keyword-googlegroups.620...@mired.org> wrote:
> Clojure great. No questions about that. WAR files, CLASSPATHs, having
> to wrap *every little command* in it's own script - that's what I'm
> looking at.
I've already shown that you don't need WAR f
On Thu, 9 Sep 2010 09:06:49 -0700
Phil Hagelberg wrote:
> On Thu, Sep 9, 2010 at 8:38 AM, Mike Meyer
> wrote:
> > And two tools - lein and clojure itself.
> I'm not sure Clojure should be counted separately since you're not
> installing it yourself.
Installation isn't the issue, use is the issu
On Thu, 9 Sep 2010 09:03:38 -0700 (PDT)
Zach Tellman wrote:
> Lines of code are a terrible metric for language complexity. If I
> write a function and abstract away half the code, have I made Clojure
> twice as simple?
Ah, I'm sorry - I'm not looking at *language* complexity. I'm looking
at the
On Thu, Sep 9, 2010 at 12:05 PM, Mike Meyer wrote:
> On Thu, 9 Sep 2010 11:30:51 -0400
>> Now it's true that there are some overhead to make sure your webapp produce
>> a war file and can be deployed to ANY containers. It's not 3/1/0 as you
>> claimed.
>
> A) I didn't claim I could do this with w
On Thu, 9 Sep 2010 11:57:23 -0400
David Nolen wrote:
> On Thu, Sep 9, 2010 at 11:38 AM, Mike Meyer wrote:
>
> > Yup - the goal is simplicity. Robustness is important, but I expect
> > the web server to take care of that. What I'm really expecting to lose
> > here is performance.
> performance?
You assume the presence of a configured web server but not a text editor ?
The only constructive thing I can say is that the set of things that may be
considered simple in the clojure setup above is vastly greater than the
alternative you present. If the cost is a 4 line 'boilerplate' (and I'm
poi
On Thu, Sep 9, 2010 at 8:38 AM, Mike Meyer
wrote:
> And two tools - lein and clojure itself.
I'm not sure Clojure should be counted separately since you're not
installing it yourself.
> So we go from 3, 0, 1 to 6, 4, 2. I'm not sure that qualifies as
> simple, but at least there's less boilerpla
On Thu, 9 Sep 2010 11:30:51 -0400
Wilson MacGyver wrote:
> I'm not sure what your point is. If I want to write a hello world php
> script on a unix
> system, but apache and mod_php weren't setup. I'd first have to install them
> and configure them.
That simple thing
Lines of code are a terrible metric for language complexity. If I
write a function and abstract away half the code, have I made Clojure
twice as simple?
If you want to really evaluate Clojure, write a non-trivial
application and see whether the complexity is still manageable. Code
golf doesn't t
On Thu, Sep 9, 2010 at 11:38 AM, Mike Meyer wrote:
> Yup - the goal is simplicity. Robustness is important, but I expect
> the web server to take care of that. What I'm really expecting to lose
> here is performance.
performance?
> You mean src/nano_web/core.clj.
>
Good catch.
> So we go f
How are you going to handle session? How are you going to handle
database from a echo script?
I mean, I can counter by just create a hello.html in apache
and put "hello world" in there. It's 1 line, 0 to deploy. And it's FAST.
It's even cached and uses no cpu time being served.
that doesn't reall
On Thu, 9 Sep 2010 16:28:48 +0100
Edmund Jackson wrote:
> Hi Mike,
>
> Could you perhaps present a counter-example of greater simplicity ?
$ cat - > /usr/local/www/apache22/cgi-bin/hello-world.sh
#!/bin/sh
echo 'Content-type: text/plain\n'
echo Hello World
^D
$ chomd 755 /usr/local/www/apa
On Thu, 9 Sep 2010 10:59:28 -0400
David Nolen wrote:
> If you're going for simplicity over robustness and you have lein installed,
> all you need to do is the following:
>
> lein new nano-web
Yup - the goal is simplicity. Robustness is important, but I expect
the web server to take care of
I'm not sure what your point is. If I want to write a hello world php
script on a unix
system, but apache and mod_php weren't setup. I'd first have to install them
and configure them.
This is only easy these days because most linux come with apache installed,
php installed, mod_php preconfigured f
I'm not sure what your point is. If I want to write a hello world php
script on a unix
system, but apache and mod_php weren't setup. I'd first have to install them
and configure them.
This is only easy these days because most linux come with apache installed,
php installed, mod_php preconfigured f
al programming.
>
> On the other hand, I'm repelled by the java infrastructure around
> it. Having been brought up on Unix systems and the software tools
> approach (well, exposed to them relatively early, anyway), I'm a firm
> believer that simple things should be simple,
Hi Mike,
Could you perhaps present a counter-example of greater simplicity ?
Edmund
On Thu, Sep 9, 2010 at 4:03 PM, Mike Meyer <
mwm-keyword-googlegroups.620...@mired.org> wrote:
> On Thu, 9 Sep 2010 07:46:22 -0700 (PDT)
> Meikel Brandmeyer wrote:
>
> > Hi,
> >
> > I don't know what the fu
On Thu, 9 Sep 2010 07:46:22 -0700 (PDT)
Meikel Brandmeyer wrote:
> Hi,
>
> I don't know what the full definition of "deploy" is, but here is an
> example, that should serve as a starting point: http://m.3wa.com/?p=472
That's a good example of simple things not being simple.
Before I've seen a
On Thu, Sep 9, 2010 at 10:07 AM, Mike Meyer <
mwm-keyword-googlegroups.620...@mired.org> wrote:
> So, I'm asking for someone to show me I'm wrong. In particular, if I
> wanted to deploy a simple web app (the classic "Hello World") on your
> favorite java or clojure web framework, how many lines of
Hi,
I don't know what the full definition of "deploy" is, but here is an
example, that should serve as a starting point: http://m.3wa.com/?p=472
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to cl
al programming.
>
> On the other hand, I'm repelled by the java infrastructure around
> it. Having been brought up on Unix systems and the software tools
> approach (well, exposed to them relatively early, anyway), I'm a firm
> believer that simple things should be simple,
repelled by the java infrastructure around
it. Having been brought up on Unix systems and the software tools
approach (well, exposed to them relatively early, anyway), I'm a firm
believer that simple things should be simple, and complex things
should be possible. That's fundamental, bu
82 matches
Mail list logo