Re: Documentation tools

2010-09-09 Thread Sean Corfield
On Wed, Sep 8, 2010 at 1:18 AM, Mark Engelberg mark.engelb...@gmail.com wrote: I don't know that I'd be flattered by that comparison :) LOL. Point well taken :) If you ever read an article presenting some new algorithm, data structure, etc. in an academic journal, the published article will

Re: Standalone 1.2 contrib

2010-09-09 Thread Sean Corfield
On Wed, Sep 8, 2010 at 10:56 PM, Adrian Cuthbertson adrian.cuthbert...@gmail.com wrote: - A personal antipathy towards bloat and anything that just gets downloaded without my fully understanding what it is and why it's there. Yes, this is my main objection to maven and why I've resolutely

Re: Documentation tools

2010-09-09 Thread Laurent PETIT
2010/9/9 Phil Hagelberg p...@hagelb.org: On Tue, Sep 7, 2010 at 11:10 PM, Mark Engelberg mark.engelb...@gmail.com wrote: Files: Many times there are dozens of functions that are interrelated.  Only one or two of them are the crucially important entry points that provide the high-level API.  

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Sean Corfield
On Wed, Sep 8, 2010 at 7:28 AM, CuppoJava patrickli_2...@hotmail.com wrote: I found the easiest way to introduce macros is just to introduce them as small syntactic sugaring. For example, getting rid of the explicit (fn [] ...) for macros like (with-open file ...). Interesting. I don't see any

Re: Documentation tools

2010-09-09 Thread Mark Engelberg
On Wed, Sep 8, 2010 at 11:56 PM, Laurent PETIT laurent.pe...@gmail.com wrote: Full ack here. For the non english speaker I am : is this a pun/playword ? (full ack - f..ck all) ? I assume he meant full acknowledgment -- an expression of agreement. -- You received this message because you are

Re: Documentation tools

2010-09-09 Thread Laurent PETIT
2010/9/9 Mark Engelberg mark.engelb...@gmail.com: On Wed, Sep 8, 2010 at 11:56 PM, Laurent PETIT laurent.pe...@gmail.com wrote: Full ack here. For the non english speaker I am : is this a pun/playword ? (full ack - f..ck all) ? I assume he meant full acknowledgment -- an expression of

Re: can't def m-bind because namespace

2010-09-09 Thread Nicolas Oury
Not really, but monad can be a bit tricky at first. Your first email was a namespace related problem, that has little to do with monads. But it can be better to start with other part of clojure and come back to monads later. They can be useful to refactor code or write a nicer program, but you

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Laurent PETIT
Hello, 2010/9/9 Sean Corfield seancorfi...@gmail.com: On Wed, Sep 8, 2010 at 7:28 AM, CuppoJava patrickli_2...@hotmail.com wrote: I found the easiest way to introduce macros is just to introduce them as small syntactic sugaring. For example, getting rid of the explicit (fn [] ...) for macros

lisp error system in clojure

2010-09-09 Thread Seth
Is there any code out there which reproduces common lisp's restart error handling capabilities? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated

Re: $'s in java class member names and set!

2010-09-09 Thread Jon Seltzer
Yeah. I tried that but it gives what you expect: Class A defined as follows: package projects.test; public class A { public boolean y; public boolean $z; } REPL: user= (import '(projects.test A)) projects.test.A user= (def m (A.)) #'user/m user= (set! (. m y) true) true user= (set! (. m

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Alessio Stalla
On Sep 8, 5:41 pm, lprefonta...@softaddicts.ca wrote: Writing tons of XML lines to control behavior of frameworks was also a turn off. We use Spring to create low-level Java beans but the XML describing these beans did not change much over time. That is acceptable. I think Lisp is very well

Re: $'s in java class member names and set!

2010-09-09 Thread Michał Marczyk
That's probably due to a problem with clojure.core/munge I recently reported on the Dev list [1] -- see a proposed patch attached to my first e-mail in that thread. I notice there still hasn't been any response to that issue... I think I'm just going to go ahead an open a ticket for this tonight.

Re: $'s in java class member names and set!

2010-09-09 Thread Michał Marczyk
Ticket created: http://www.assembla.com/spaces/clojure/tickets/433-munge-should-not-munge-$-(which-isjavaidentifierpart)--should-munge---(which-is-not) Sincerely, Michał -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: lisp error system in clojure

2010-09-09 Thread Meikel Brandmeyer
Hi, On 9 Sep., 05:31, Seth wbu...@gmail.com wrote: Is there any code out there which reproduces common lisp's restart error handling capabilities? I think clojure.contrib.error-kit is the closest approach. Sincerely Meikel -- You received this message because you are subscribed to the

Re: Standalone 1.2 contrib

2010-09-09 Thread faenvie
*1* a java-based alternative to maven and ant is gradle. pro: - gradle is a fantastic build-framework contra: - gradle is not leightweight - even more thirdparty-dependencys - build-scripts are implemented in a groovy-based DSL - gradle-users have to learn groovy basics i think a

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Andrew Gwozdziewycz
On Thu, Sep 9, 2010 at 3:48 AM, Laurent PETIT laurent.pe...@gmail.com wrote: Hello, 2010/9/9 Sean Corfield seancorfi...@gmail.com: On Wed, Sep 8, 2010 at 7:28 AM, CuppoJava patrickli_2...@hotmail.com wrote: I found the easiest way to introduce macros is just to introduce them as small

Some Problem with Recursion

2010-09-09 Thread Stefan Rohlfing
In order to get some more insight into recursion I wrote the following function but ended up in confusion: (defn prefix-postfix [expr] (if (coll? expr) (let [ [op arg1 arg2] expr] [ (prefix-postfix arg1) (prefix-postfix arg2) op])) expr) I expected the result to be a vector, such

Re: Some Problem with Recursion

2010-09-09 Thread ajuc
On 9 Wrz, 14:30, Stefan Rohlfing stefan.rohlf...@gmail.com wrote: In order to get some more insight into recursion I wrote the following function but ended up in confusion: (defn prefix-postfix [expr]   (if (coll? expr)     (let [ [op arg1 arg2] expr]       [ (prefix-postfix arg1)

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Laurent PETIT
2010/9/9 Andrew Gwozdziewycz apg...@gmail.com: On Thu, Sep 9, 2010 at 3:48 AM, Laurent PETIT laurent.pe...@gmail.com wrote: Hello, 2010/9/9 Sean Corfield seancorfi...@gmail.com: On Wed, Sep 8, 2010 at 7:28 AM, CuppoJava patrickli_2...@hotmail.com wrote: I found the easiest way to introduce

Re: Some Problem with Recursion

2010-09-09 Thread Stefan Rohlfing
The indentation was correct by got messed up when I copying the code. This is how I interpret the function: 'expr' is only returned if (coll? expr) returns 'false', with is not the case with an argument such as '(+ 2 4). Next, this expression is destructured in the 'let' and 'prefix- postfix

Re: Some Problem with Recursion

2010-09-09 Thread Nicolas Oury
(defn prefix-postfix [expr] (if (coll? expr) (let [ [op arg1 arg2] expr] [ (prefix-postfix arg1) (prefix-postfix arg2) op])) ;; HERE: 2 closing brackets first one close the let. second close the if. expr) In Clojure, (if test expr else) is the if expression. Here, you do (if test

Re: Some Problem with Recursion

2010-09-09 Thread ajuc
On 9 Wrz, 15:27, Stefan Rohlfing stefan.rohlf...@gmail.com wrote: The indentation was correct by got messed up when I copying the code. This is how I interpret the function: 'expr' is only returned if (coll? expr) returns 'false', with is not the case with an argument such as '(+ 2 4).

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread ajuc
On 9 Wrz, 14:25, Andrew Gwozdziewycz apg...@gmail.com wrote: The fact that Lisp macros actually operate on the AST means that Lisp macros can make *changes* to the AST (insert things, remove things, rearrange things), and *not* just substitute FOO for BAR. This is a hell of a lot more

Simple things should be simple

2010-09-09 Thread Mike Meyer
I've spent far more time evaluating clojure than I had expected to. Part of the problem is that I'm of two minds. I love the language - it seems to mix in just the right bits of LISP, data structures from modern dynamic languages, and functional programming. On the other hand, I'm repelled by the

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 07:04:00 -0700 (PDT) ajuc aju...@gmail.com wrote: [In C] you can't output different code in macro depending on the structure of its arguments That, of course, is a *crucial* difference. Think about the same restriction outside the macro environment: what would programming be

Re: Simple things should be simple

2010-09-09 Thread Laurent PETIT
2010/9/9 Mike Meyer mwm-keyword-googlegroups.620...@mired.org: I've spent far more time evaluating clojure than I had expected to. Part of the problem is that I'm of two minds. I love the language - it seems to mix in just the right bits of LISP, data structures from modern dynamic languages,

Knowing in advance the complexity of count

2010-09-09 Thread Nicolas Oury
Dear all, I want to write a generic code that use count when it is O(1) and not when it is not O(n), is it a way to do so? Best regards, Nicolas -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Simple things should be simple

2010-09-09 Thread Meikel Brandmeyer
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

Re: Knowing in advance the complexity of count

2010-09-09 Thread Meikel Brandmeyer
Hi, On 9 Sep., 16:45, Nicolas Oury nicolas.o...@gmail.com wrote: is it a way to do so? You can check the Counted marker interface for clojure collections. But this won't cover Strings etc. More information here: http://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/RT.java#L489

Re: Simple things should be simple

2010-09-09 Thread David Nolen
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 text

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 07:46:22 -0700 (PDT) Meikel Brandmeyer m...@kotka.de 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

Re: Simple things should be simple

2010-09-09 Thread Edmund Jackson
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 m...@kotka.de wrote: Hi, I don't know what the

Re: Simple things should be simple

2010-09-09 Thread Laurent PETIT
2010/9/9 Mike Meyer mwm-keyword-googlegroups.620...@mired.org: I've spent far more time evaluating clojure than I had expected to. Part of the problem is that I'm of two minds. I love the language - it seems to mix in just the right bits of LISP, data structures from modern dynamic languages,

Re: Simple things should be simple

2010-09-09 Thread Wilson MacGyver
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

Re: Simple things should be simple

2010-09-09 Thread Wilson MacGyver
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

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 16:28:48 +0100 Edmund Jackson edmundsjack...@gmail.com 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

Re: Simple things should be simple

2010-09-09 Thread Wilson MacGyver
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 really

Re: Simple things should be simple

2010-09-09 Thread David Nolen
On Thu, Sep 9, 2010 at 11:38 AM, Mike Meyer m...@mired.org 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.

Re: Simple things should be simple

2010-09-09 Thread Zach Tellman
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

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 11:30:51 -0400 Wilson MacGyver wmacgy...@gmail.com 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 things should be

Re: Simple things should be simple

2010-09-09 Thread Phil Hagelberg
On Thu, Sep 9, 2010 at 8:38 AM, Mike Meyer mwm-keyword-googlegroups.620...@mired.org 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

Re: Simple things should be simple

2010-09-09 Thread Edmund Jackson
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

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 11:57:23 -0400 David Nolen dnolen.li...@gmail.com wrote: On Thu, Sep 9, 2010 at 11:38 AM, Mike Meyer m...@mired.org 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

Re: Simple things should be simple

2010-09-09 Thread Wilson MacGyver
On Thu, Sep 9, 2010 at 12:05 PM, Mike Meyer m...@mired.org 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

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 09:03:38 -0700 (PDT) Zach Tellman ztell...@gmail.com 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.

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 09:06:49 -0700 Phil Hagelberg p...@hagelb.org wrote: On Thu, Sep 9, 2010 at 8:38 AM, Mike Meyer mwm-keyword-googlegroups.620...@mired.org wrote: And two tools - lein and clojure itself. I'm not sure Clojure should be counted separately since you're not installing it

Re: Simple things should be simple

2010-09-09 Thread David Nolen
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

Re: Clojure 1.2 and the Computer Language Benchmarks Game

2010-09-09 Thread Isaac Gouy
On Sep 2, 4:51 pm, Isaac Gouy igo...@yahoo.com wrote: On Sep 1, 9:46 pm, John Fingerhut andy.finger...@gmail.com wrote: Thanks to many people on this list in Aug 2009 who helped improve my code, to Johannes Friestad for writing a nice fast Clojure program using deftype for the n-body

Re: Simple things should be simple

2010-09-09 Thread Brenton
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 need

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 11:52:30 -0400 Wilson MacGyver wmacgy...@gmail.com wrote: How are you going to handle session? How are you going to handle database from a echo script? What, you've never generated HTML directly from an SQL script? Any good SQL system will do that for you. All of these

Re: $'s in java class member names and set!

2010-09-09 Thread Jon Seltzer
I suspect $ is in munge because Rich and company may want to use it as a special reader character. $'s used to access inner classes work fine. I'd be fine with that as long as there's still a way to access Java identifiers with dollar signs (perhaps a special macro). On Sep 9, 3:49 am, Michał

Re: lisp error system in clojure

2010-09-09 Thread Seth
exact what i want! Heres a nice link which describes it http://pragprog.com/magazines/2009-07/when-things-go-wrong On Sep 9, 6:20 am, Meikel Brandmeyer m...@kotka.de wrote: Hi, On 9 Sep., 05:31, Seth wbu...@gmail.com wrote: Is there any code out there which reproduces common lisp's restart

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Andrew Gwozdziewycz
On Thu, Sep 9, 2010 at 10:04 AM, ajuc aju...@gmail.com wrote: On 9 Wrz, 14:25, Andrew Gwozdziewycz apg...@gmail.com wrote: The fact that Lisp macros actually operate on the AST means that Lisp macros can make *changes* to the AST (insert things, remove things, rearrange things), and *not*

Re: Simple things should be simple

2010-09-09 Thread Bruce Durling
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

Re: Simple things should be simple

2010-09-09 Thread Paul deGrandis
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

Re: Simple things should be simple

2010-09-09 Thread Andrew Gwozdziewycz
On Thu, Sep 9, 2010 at 12:05 PM, Mike Meyer mwm-keyword-googlegroups.620...@mired.org wrote: On Thu, 9 Sep 2010 11:30:51 -0400 Wilson MacGyver wmacgy...@gmail.com 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

Re: Simple things should be simple

2010-09-09 Thread Andrew Gwozdziewycz
On Thu, Sep 9, 2010 at 12:32 PM, David Nolen dnolen.li...@gmail.com 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 -

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 12:32:27 -0400 David Nolen dnolen.li...@gmail.com 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

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 17:15:09 +0100 Edmund Jackson edmundsjack...@gmail.com 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

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 16:35:15 +0100 Bruce Durling b...@otfrom.com 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

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 09:06:33 -0700 (PDT) Paul deGrandis paul.degran...@gmail.com wrote: 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,

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 12:23:25 -0400 Andrew Gwozdziewycz apg...@gmail.com wrote: On Thu, Sep 9, 2010 at 12:05 PM, Mike Meyer mwm-keyword-googlegroups.620...@mired.org wrote: On Thu, 9 Sep 2010 11:30:51 -0400 Wilson MacGyver wmacgy...@gmail.com wrote: I'm not sure what your point is. If I

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 09:41:09 -0700 (PDT) Brenton bashw...@gmail.com 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

Re: Simple things should be simple

2010-09-09 Thread Raoul Duke
On Thu, Sep 9, 2010 at 10:07 AM, Mike Meyer mwm-keyword-googlegroups.620...@mired.org 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

Re: Simple things should be simple

2010-09-09 Thread Brenton
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

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 11:00:48 -0700 Raoul Duke rao...@gmail.com wrote: On Thu, Sep 9, 2010 at 10:07 AM, Mike Meyer mwm-keyword-googlegroups.620...@mired.org 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

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 11:16:11 -0700 (PDT) Brenton bashw...@gmail.com 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

Re: Simple things should be simple

2010-09-09 Thread Raoul Duke
On Thu, Sep 9, 2010 at 11:17 AM, Mike Meyer m...@mired.org 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

Re: Knowing in advance the complexity of count

2010-09-09 Thread Randy Hudson
Inexplicably (counted? abcd) returns false. On Sep 9, 11:33 am, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: actually there is a function called counted? Sunil. On Thu, Sep 9, 2010 at 8:59 PM, Nicolas Oury nicolas.o...@gmail.com wrote: Thank you very much. Never looked closely

Re: Simple things should be simple

2010-09-09 Thread Luke Renn
On Sep 9, 1:40 pm, Mike Meyer mwm-keyword-googlegroups. 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 children, the LOC it takes to deploy a hello

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread alux
Interesting discussion! I think about taking some of the topics into separate threads. Will see, I'm a bit under project pressure. Wont tell you the language ;( But, @Luc pushing the advantage of Lisp macros to the forefront is not obvious if the audience cannot compare with another

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 14:27:48 -0400 David Nolen dnolen.li...@gmail.com 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

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 11:48:36 -0700 (PDT) Saul Hazledine shaz...@gmail.com wrote: On Sep 9, 8:16 pm, Brenton bashw...@gmail.com 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

Re: clojure-contrib master now in submodules

2010-09-09 Thread Brian Carper
On Aug 20, 7:22 am, Stuart Sierra the.stuart.sie...@gmail.com wrote: If you want to use ALL contrib libraries, add a dependency on group org.clojure.contrib, artifact complete, version 1.3.0-SNAPSHOT. This meta-library depends on all other contrib libraries. This doesn't work because as was

Re: matching with wild-cards in clojure multi-methods

2010-09-09 Thread Daniel Werner
On 9 September 2010 07:31, Meikel Brandmeyer m...@kotka.de wrote: derive works with non-qualified keywords, but the contract disallows that: Apparently the contract given in the docstring is being enforced in derive's 2-arg definition, but the must be namespaced parts of the assertions are

Re: Simple things should be simple

2010-09-09 Thread Kevin Downey
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

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 12:04:34 -0700 (PDT) Luke Renn luke.r...@gmail.com wrote: On Sep 9, 1:40 pm, Mike Meyer mwm-keyword-googlegroups. 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

Using a keyword as object get method

2010-09-09 Thread Sam Tingleff
I'm using thrift-generated Java objects heavily inside hadoop and it would be nice to access object properties using keyword notation instead of .getPropertyX. At platform speed of course. Searching the list shows someone else interested in the same thing but no answer.

Re: Simple things should be simple

2010-09-09 Thread Daniel Kersten
On 9 September 2010 19:16, Brenton bashw...@gmail.com 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

Improved stack traces

2010-09-09 Thread Rich Hickey
People frequently complain about Clojure's stack traces, and there are now some enhancements in the master branch. In particular, there is a new function in clojure.repl, pst, which prints a nicer stack trace of the most recent (or a supplied) exception. It also has depth control. pst is

Re: Simple things should be simple

2010-09-09 Thread Luke Renn
On Sep 9, 4:13 pm, Mike Meyer mwm-keyword-googlegroups. 620...@mired.org wrote: Here I thought I could save time by choosing a nice, simple example application that everyone would understand, rather than spending a lot of time explaining (or abstracting out) irrelevant details of some

Re: Simple things should be simple

2010-09-09 Thread Luke Renn
On Sep 9, 2:46 pm, Mike Meyer mwm-keyword-googlegroups. 620...@mired.org 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 $

Re: Improved stack traces

2010-09-09 Thread Alan
I assume I'm just clueless here, but the last commit I see at http://github.com/richhickey/clojure is one from Stuart Halloway in June. Where do I find this so I can try it out? Or, what version do I have to tell leiningen I depend on - 1.2.0-snapshot, 1.3.0-snapshot, or something like that? On

Re: Improved stack traces

2010-09-09 Thread Nicolas Oury
http://github.com/clojure/clojure -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe

drop-while and (pred item) returns nil?

2010-09-09 Thread Jacek Laskowski
Hi, According to drop-while doc, (pred item) will return nil. It struck me as I thought the form would only return a boolean. Is the doc correct? What would be an example? user= (doc drop-while) - clojure.core/drop-while ([pred coll]) Returns a lazy sequence of the

Re: Simple things should be simple

2010-09-09 Thread Lee Spector
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 any

Re: Standalone 1.2 contrib

2010-09-09 Thread Stuart Sierra
Yes, it's in the ZIP file, distributed through http://clojure.org/downloads It's in the ZIP file at target/clojure-contrib-1.2.0.jar You can also download it directly at http://build.clojure.org/releases/org/clojure/clojure-contrib/1.2.0/clojure-contrib-1.2.0.jar Do we need a direct link to the

Re: clojure-contrib master now in submodules

2010-09-09 Thread Stuart Sierra
Can you clarify? Maven-aware build tools (e.g. Leiningen) should not be trying to downlaod the clojure-contrib:complete JAR file. Instead, referencing the complete project as a dependency should transitively give you all its dependencies. Does that not work? -S On Sep 9, 3:47 pm, Brian

Re: Simple things should be simple

2010-09-09 Thread David Nolen
On Thu, Sep 9, 2010 at 5:53 PM, Lee Spector lspec...@hampshire.edu 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

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 14:11:44 -0700 (PDT) Luke Renn luke.r...@gmail.com wrote: On Sep 9, 2:46 pm, Mike Meyer mwm-keyword-googlegroups. 620...@mired.org 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() {  

Re: clojure-contrib master now in submodules

2010-09-09 Thread Brian Carper
On Sep 9, 3:13 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote: Can you clarify?  Maven-aware build tools (e.g. Leiningen) should not be trying to downlaod the clojure-contrib:complete JAR file. Instead, referencing the complete project as a dependency should transitively give you all its

Re: drop-while and (pred item) returns nil?

2010-09-09 Thread Miki
Boolean seems to work: user= (drop-while #( % 4) (range 10)) (4 5 6 7 8 9) user= On Sep 9, 2:51 pm, Jacek Laskowski ja...@laskowski.net.pl wrote: Hi, According to drop-while doc, (pred item) will return nil. It struck me as I thought the form would only return a boolean. Is the doc correct?

Re: Simple things should be simple

2010-09-09 Thread Rainer Schuster
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

Re: clojure-contrib master now in submodules

2010-09-09 Thread Aaron Cohen
On Thu, Sep 9, 2010 at 6:43 PM, Brian Carper briancar...@gmail.com wrote: On Sep 9, 3:13 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote: Can you clarify?  Maven-aware build tools (e.g. Leiningen) should not be trying to downlaod the clojure-contrib:complete JAR file. Instead, referencing

[ANN] ACCU 2011 Conference Call for Proposals -- deadline approaching

2010-09-09 Thread aspro
Call for Proposals - ACCU 2011 April 13-16, 2011. Barcelo Oxford Hotel, Oxford, UK Submission deadline: 26th of September 2010 Email proposals to: Giovanni Asproni, confere...@accu.org http://www.accu.org/conference twitter: @accu2011 #accu2011 We invite you to propose a session for this leading

Re: Simple things should be simple

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 14:01:19 -0700 (PDT) Luke Renn luke.r...@gmail.com wrote: On Sep 9, 4:13 pm, Mike Meyer mwm-keyword-googlegroups. 620...@mired.org wrote: Here I thought I could save time by choosing a nice, simple example application that everyone would understand, rather than spending a

Re: clojure-contrib master now in submodules

2010-09-09 Thread Stuart Sierra
On Sep 9, 7:00 pm, Aaron Cohen aa...@assonance.org wrote: I think the problem is that the complete pom needs to have packagingpom/packaging to indicate there's not an important jar file to download. It does. That's why I'm confused.

Re: clojure-contrib master now in submodules

2010-09-09 Thread Stuart Sierra
Weird. I'll have to look into this some more. Thanks for the report. -S On Sep 9, 6:43 pm, Brian Carper briancar...@gmail.com wrote: Nope.  When I use [org.clojure.contrib/complete 1.3.0-SNAPSHOT] without :classifier bin, Maven dies because it can't find the complete JAR file.  Like

Re: Simple things should be simple

2010-09-09 Thread Luke Renn
On Sep 9, 5:53 pm, Lee Spector lspec...@hampshire.edu 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

Re: drop-while and (pred item) returns nil?

2010-09-09 Thread Alan
I'm not 100% sure what you're asking, but I think I understand you, and in that case you can refer to http://groups.google.com/group/clojure/browse_thread/thread/9c7f726709e24c12/b2e2696b70d924f2?show_docid=b2e2696b70d924f2, in which I ask this very question and get the answers I am looking for.

  1   2   >