Re: Jesus, how the heck to do anything?

2011-03-23 Thread Mike Meyer
On Wed, 23 Mar 2011 00:50:10 -0700 (PDT) ultranewb wrote: > Short version: How do I just open an editor, type in some Clojure > code, save it in a file, and then run it? > > Long version: Okay, I'm very new to Clojure. But I'm not a Java > programmer (don't want to be). I don't think you can

Re: Jesus, how the heck to do anything?

2011-03-23 Thread Mike Meyer
On Wed, 23 Mar 2011 15:55:51 -0700 (PDT) ultranewb wrote: > On Mar 24, 1:11 am, Mike Meyer wrote: > > > Long version:  Okay, I'm very new to Clojure.  But I'm not a Java > > > programmer (don't want to be). > > > > I don't think you can

Re: Jesus, how the heck to do anything?

2011-03-25 Thread Mike Meyer
On Thu, 24 Mar 2011 06:22:49 -0700 (PDT) Meikel Brandmeyer wrote: > On 24 Mrz., 13:09, Baishampayan Ghose wrote: > IMHO the Java bashing is overrated. Coming from a polyglot-but-non- > java background, I didn't have much trouble getting things running. Is > the CLASSPATH really so much different

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread Mike Meyer
On Sun, 27 Mar 2011 21:30:54 -0700 (PDT) ultranewb wrote: > But with any other language I've ever used, at most I include a > library I need in a directive at the top, or I include my own code in > a similar directive. Question: how did you find the library you were going to use? If you only se

Re: A newbie's summary - what worked, what didn't

2011-03-28 Thread Mike Meyer
On Mon, 28 Mar 2011 08:46:20 -0700 (PDT) ultranewb wrote: > On Mar 28, 1:15 pm, Mike Meyer wrote: > > Question: how did you find the library you were going to use? > > By looking at the documentation for the system. I guess I was mostly > referring to libraries which come w

Re: Namespace and file structuring

2011-03-28 Thread Mike Meyer
On Mon, 28 Mar 2011 20:50:05 -0400 James Reeves wrote: > > Ah, but as in Java, the "big official libraries" such as java itself > > starts with i.e. java.swing.  But if I was to publish a utilities > > library for swing, i would call it no.terjedahl.java.swing, so that it > > could be used by me

Re: Leiningen capabilities (was Re: A newbie's summary - what worked, what didn't)

2011-03-28 Thread Mike Meyer
On Mon, 28 Mar 2011 18:10:31 -0700 Andy Fingerhut wrote: > Changing subject line for this one. I almost did that myself. > On Mar 28, 2011, at 5:38 PM, Mike Meyer wrote: > > > > Consider this a features request for cake/leiningen: > > 1) A task to search clojars. > &

Re: Leiningen capabilities (was Re: A newbie's summary - what worked, what didn't)

2011-03-30 Thread Mike Meyer
On Tue, 29 Mar 2011 16:49:48 -0700 (PDT) Phil Hagelberg wrote: > On Mar 28, 10:24 pm, Andy Fingerhut wrote: > > And I should have known about this before, but had not used it.  It adds to > > Leiningen the capability to search, and I'm not sure, but perhaps also add > > dependencies that were f

Re: updating a map value

2011-03-30 Thread Mike Meyer
On Wed, 30 Mar 2011 10:21:41 -0700 (PDT) Jeff Rose wrote: > Hola, > I'm looking for a function that updates a map value by calling a > function on it. > > (def foo {:a 1}) > > So instead of this: > (assoc foo :a (inc (:a foo))); => {:a 2} > > Something like this: > (map-fn fo

Init timing for ring web servlet running on Jetty?

2011-03-31 Thread Mike Meyer
I finally got back to the web app that needed init'ing before processing requests, and got that working (not quite as straightforward as the various mails/docs make it look). The problem now is that the init runs when the first request comes in after the app has been started. While this works, it

Re: Init timing for ring web servlet running on Jetty?

2011-03-31 Thread Mike Meyer
On Thu, 31 Mar 2011 06:55:08 -0400 Allen Johnson wrote: > > Is there some way to convince Jetty (or tomcat, or ...) to run the > > init methods of a servlet before the first request comes in? Or maybe > > a pointer to the appropriate forum? > > You can tell a servlet to init on startup with some

Pointer errors?

2011-03-31 Thread Mike Meyer
This is just *strange*. I'm working on converting a servlet that has hardwired vectors of values to read those values from a database. Given that this is simple, I'm using clojure.contrib.sql and an sqlite plugin. Those vectors get walked in the init code to create the hashmap that drives page rend

Re: Pointer errors?

2011-04-02 Thread Mike Meyer
On Thu, 31 Mar 2011 16:51:20 -0400 Stuart Halloway wrote: > > This is just *strange*. I'm working on converting a servlet that has > > hardwired vectors of values to read those values from a > > database. Given that this is simple, I'm using clojure.contrib.sql and > > an sqlite plugin. Those vec

Re: Clojure Code Highlighting in Presentations

2011-04-03 Thread Mike Meyer
On Sun, 3 Apr 2011 18:15:43 +0200 "Heinz N. Gies" wrote: > Hi everyone, > not a clojure technical question but it has to do with the entire topic :). I > know there have been some presentations about clojure already and would like > to ask for some best practice experience regarding embedding C

Re: What the hell is going on with the Clojure cheat sheet?

2011-04-05 Thread Mike Meyer
On Tue, 5 Apr 2011 10:00:28 -0400 Ken Wesson wrote: > And why would it come up as a page full of ads (mostly pretty scammy > looking ads, like fake Windows messageboxes and such) instead of a > Host Unknown error?! Because the registrar for clojure.org chose to resolve lapsed domain names to a pa

Re: help--reading keyboard input from Clojure is surprisingly difficult

2011-04-09 Thread Mike Meyer
On Sat, 9 Apr 2011 19:27:13 -0400 Lee Spector wrote: > On Apr 9, 2011, at 6:18 PM, Sean Corfield wrote: > > On Sat, Apr 9, 2011 at 6:46 AM, Lee Spector wrote: > >> But still, I will humbly submit that it's totally freakin' nutso that it > >> should be so hard to do basic user interaction. > > I'

Re: Shebang support for cljr

2011-04-20 Thread Mike Meyer
On Wed, 20 Apr 2011 10:16:05 -0700 (PDT) David Jacobs wrote: > What's the status on this? One of the reasons I don't use Clojure everyday, > much as I like it, is that I want it to integrate seamlessly with Unix for > scripting. Um, I've been using it with shebang scripts for a while now. You'

Re: Shebang support for cljr

2011-04-20 Thread Mike Meyer
On Thu, 21 Apr 2011 01:30:25 +0800 Ambrose Bonnaire-Sergeant wrote: > On Thu, Apr 21, 2011 at 1:28 AM, Mike Meyer wrote: > > Performance pretty much sucks - starting the jvm is just slow. You can > > solve that with nailgun (or something similar), which will let you use > >

Re: Start Clojure programs from Eclipse

2011-04-23 Thread Mike Meyer
On Sat, 23 Apr 2011 19:41:28 -0400 Ken Wesson wrote: > > Well, Java servers probably are yes, but traditional Unix servers > > would normally fork a new process for each incoming connection. > > Poor man's threads. Although the insulation of each one against > crashes in the others might be usefu

Re: Start Clojure programs from Eclipse

2011-04-23 Thread Mike Meyer
On Sat, 23 Apr 2011 23:19:53 -0400 Ken Wesson wrote: > On Sat, Apr 23, 2011 at 8:13 PM, Mike Meyer wrote: > > On Sat, 23 Apr 2011 19:41:28 -0400 > > Ken Wesson wrote: > > or you live in a universe where cosmic rays can flip bits and other > > sources of hardwar

Re: Start Clojure programs from Eclipse

2011-04-23 Thread Mike Meyer
On Sat, 23 Apr 2011 23:42:23 -0400 Ken Wesson wrote: > On Sat, Apr 23, 2011 at 11:35 PM, Mike Meyer wrote: > > On Sat, 23 Apr 2011 23:19:53 -0400 > > Ken Wesson wrote: > > > >> On Sat, Apr 23, 2011 at 8:13 PM, Mike Meyer wrote: > >> > On Sat, 23

Re: Start Clojure programs from Eclipse

2011-04-24 Thread Mike Meyer
On Sun, 24 Apr 2011 01:07:45 -0400 Ken Wesson wrote: > On Sun, Apr 24, 2011 at 12:01 AM, Mike Meyer wrote: > > On Sat, 23 Apr 2011 23:42:23 -0400 > > Ken Wesson wrote: > > > >> On Sat, Apr 23, 2011 at 11:35 PM, Mike Meyer wrote: > >> > On Sat, 23

Re: dead simple compile to jar file

2011-04-28 Thread Mike Meyer
On Wed, 27 Apr 2011 10:45:58 -0700 (PDT) cej38 wrote: > Hi, > I would like the simplest method to compile a few lines of clojure > code into a jar file that I can distribute to some fellow scientists > that don't know much (if anything) about java or clojure. Since I am > not creating a huge p

Re: What is the purpose of the Identity function?

2011-05-07 Thread Mike Meyer
On Sat, 7 May 2011 12:09:45 -0700 Sean Corfield wrote: > Identity on its own isn't really useful - but in combination with > higher-order functions, it can be very indispensible! Bingo. An HOF accepts a function that filters/mogrifies data before processing it in some way. Sometimes, you *don't*

Re: Reading clojure code of larger domain specific projects

2011-05-09 Thread Mike Meyer
On Mon, 9 May 2011 03:24:44 -0700 (PDT) Chris Perkins wrote: > I have been thinking for while that it would be great to have > something equivalent to book clubs for reading code. A group could > meet weekly, all having read the same moderate-sized project, and > discuss. I wonder if this could be

Re: Learning Idiomatic Clojure

2011-05-12 Thread Mike Meyer
On Wed, 11 May 2011 19:10:13 -0700 (PDT) "J.R. Garcia" wrote: > I'm wondering what resources would be best to learn how Clojurians > write their code. > > I've been developing for about 4 years in several object-oriented > languages (mostly C# and Ruby). I understand Clojure's syntax well and >

Re: Learning Idiomatic Clojure

2011-05-12 Thread Mike Meyer
On Thu, 12 May 2011 07:45:50 -0700 (PDT) Adam Burry wrote: > On May 12, 11:54 am, Mike Meyer wrote: > > As others have said, this sounds like you need a book on > > functional/LISP programming. There are some excellent books for other > > LISP dialects. "Structure and

Re: Build tool for mixed Clojure/Java projects

2011-07-11 Thread Mike Meyer
On Mon, 11 Jul 2011 07:51:33 -0400 Ken Wesson wrote: > On Sun, Jul 10, 2011 at 2:01 AM, mike.w.me...@gmail.com > 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 contro

Re: Build tool for mixed Clojure/Java projects

2011-07-11 Thread Mike Meyer
On Mon, 11 Jul 2011 16:21:45 -0400 Ken Wesson 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 remo

Re: Build tool for mixed Clojure/Java projects

2011-07-12 Thread Mike Meyer
On Mon, 11 Jul 2011 20:49:01 -0400 Ken Wesson wrote: > On Mon, Jul 11, 2011 at 7:39 PM, Mike Meyer wrote: > > On Mon, 11 Jul 2011 07:51:33 -0400 > > Ken Wesson wrote: > > > >> On Sun, Jul 10, 2011 at 2:01 AM, mike.w.me...@gmail.com > >> wrote: > >

Re: Build tool for mixed Clojure/Java projects

2011-07-12 Thread Mike Meyer
On Mon, 11 Jul 2011 21:12:20 -0400 Ken Wesson wrote: > On Mon, Jul 11, 2011 at 7:51 PM, Mike Meyer wrote: > > On Mon, 11 Jul 2011 16:21:45 -0400 > > Ken Wesson wrote: > >> > So, "repository" does not imply "server" at all, > >> T

Re: Build tool for mixed Clojure/Java projects

2011-07-12 Thread Mike Meyer
On Tue, 12 Jul 2011 18:13:57 -0400 Ken Wesson wrote: > On Tue, Jul 12, 2011 at 2:31 PM, Mike Meyer 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

Re: Build tool for mixed Clojure/Java projects

2011-07-12 Thread Mike Meyer
On Tue, 12 Jul 2011 18:20:38 -0400 Ken Wesson wrote: > On Tue, Jul 12, 2011 at 3:11 PM, Mike Meyer wrote: > > On Mon, 11 Jul 2011 21:12:20 -0400 > > Ken Wesson wrote: > >> 2. Many developers, one computer. No "remote storage" and if the > >> devel

Re: Build tool for mixed Clojure/Java projects

2011-07-13 Thread Mike Meyer
On Tue, 12 Jul 2011 22:21:39 -0400 Ken Wesson 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 >

Re: precise numbers

2010-10-12 Thread Mike Meyer
On Tue, 12 Oct 2010 12:35:24 -0700 (PDT) cej38 wrote: > The more that I think about it, the more I would rather have a set of > equalities that always work. float= was a good try. Then you can't use floats. As others have explained, floats are imprecise by nature, being limited to finite binar

Re: precise numbers

2010-10-12 Thread Mike Meyer
On Tue, 12 Oct 2010 17:44:20 -0400 Brian Hurt wrote: > On Tue, Oct 12, 2010 at 3:35 PM, cej38 wrote: > > > The more that I think about it, the more I would rather have a set of > > equalities that always work. float= was a good try. > Maybe initially, but not later on... > Floating point is

Re: precise numbers

2010-10-13 Thread Mike Meyer
On Thu, 14 Oct 2010 00:27:39 +0200 "Felix H. Dahlke" wrote: > On 13/10/10 22:28, David Sletten wrote: > > > > On Oct 12, 2010, at 5:44 PM, Brian Hurt wrote: > > > >> For example, in base 10, 1/3 * 3 = 0.9... > > > > It may seem counterintuitive, but that statement is perfectly true. >

Clojure on Android - new REPL front end?

2010-10-15 Thread Mike Meyer
Has anyone taken a look at tying the exiting port of Clojure to Android (that runs a REPL on a socket) to the REPL front end to be found at: http://www.appbrain.com/app/repl/com.folone.replcore ? http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant,

Re: Pros and cons of macro versus functions

2010-10-18 Thread Mike Meyer
On Mon, 18 Oct 2010 08:58:48 -0400 (EDT) lprefonta...@softaddicts.ca wrote: > Choose functions over macros when you can write an equivalent function. >From the LISP community, I'd put it slightly stronger: Only use macros when you have to. But you get the same set of reasons (with explanations).

Re: Improving Contrib

2010-10-19 Thread Mike Meyer
On Tue, 19 Oct 2010 15:51:17 -0700 (PDT) Mibu wrote: > The greatest impediment for me is having to sign a contract to > participate in an open source project. I understand Rich Hickey and > most of you guys live in the litigious US and have to cover > yourselves, but I feel not right about this.

Re: Improving Contrib

2010-10-19 Thread Mike Meyer
On Tue, 19 Oct 2010 16:26:24 -0700 (PDT) Rich Hickey wrote: > > > On Oct 19, 7:01 pm, Mike Meyer 620...@mired.org> wrote: > > On Tue, 19 Oct 2010 15:51:17 -0700 (PDT) > > > > Mibu wrote: > > > The greatest impediment for me is having to sign a contract

Re: Improving Contrib

2010-10-20 Thread Mike Meyer
On Wed, 20 Oct 2010 09:59:26 -0600 "Eric Schulte" wrote: > Mike Meyer writes: > > > It was also more work than submitting patches looks to be for apache, > > django, gnu > > FWIW in gnu projects if your patch is >10 lines long then they do > re

Re: getting started with clojure

2010-10-20 Thread Mike Meyer
On Wed, 20 Oct 2010 18:04:17 -0400 Eric Lavigne wrote: > The short answer is that it's okay to use Clojure directly. You don't > need Leiningen. > > If you are familiar with C programming, the difference between the > Clojure compiler and Leiningen is like the difference between GCC and > Make.

Re: apply a function to a list and another parameter

2010-10-23 Thread Mike Meyer
things), but most of this is a fairly straightforward translation (assuming "listelement(i) is actually something like "list.element(i)" - the ith element in list): (defn testit [times function list s] (dotimes [_ times] (let [start (. System nanoTime) re

Re: to macro or not?

2010-10-28 Thread Mike Meyer
On Thu, 28 Oct 2010 12:55:55 -0700 Raoul Duke wrote: > hi, > > not looking to stir up a pot, looking to learn from people's > experience. i've heard that in CL land, one is told to avoid macros as > long as possible. i've heard other folks in the Clojure world say that > if you aren't using macr

Re: to macro or not?

2010-10-28 Thread Mike Meyer
On Fri, 29 Oct 2010 06:30:27 +0530 Santosh Rajan wrote: > On Fri, Oct 29, 2010 at 1:58 AM, Mike Meyer < > mwm-keyword-googlegroups.620...@mired.org> > > 3) You need it to get the API syntax you want (most commonly, a DSL). > This last point is what I consider the most po

Re: to macro or not?

2010-10-28 Thread Mike Meyer
On Thu, 28 Oct 2010 18:12:39 -0700 (PDT) andrei wrote: > > I'll try to extend Mike's answer by one more example. Consider `and` > Lisp macro. It is not a function, because it must evaluate it's > arguments lazily, and using macros is the only way to do it. Actually, this is the first case, and

Re: Can't locate str_utils in classpath

2010-10-31 Thread Mike Meyer
On Sun, 31 Oct 2010 00:09:31 -0700 (PDT) Steven Arnold wrote: > That was it. I had to add the entire path up to and including to > contrib jar in order for "clj" to work. Merely adding the directory > to the classpath was not sufficient, and the clj script ignored the > value of my env variable

From jetty to war?

2010-11-01 Thread Mike Meyer
Ok, I've got a simple web application that works running on embedded jetty using the ring jetty adapter. I would now like to deploy it in an infrastructure that will restart it if it dies, the system reboots, etc. I've already got tomcat doing most of that, so the obvious choice is a WAR file. Trou

Re: A question regarding map destructuring

2010-11-01 Thread Mike Meyer
On Mon, 1 Nov 2010 19:25:59 -0700 (PDT) Mike K wrote: > This question is a bit abstruse, so please bear with me :-) [elided] > So this can't be how it works, but I don't know how else to interpret > the documentation. Is this a special case meaning "if there are > optional arguments AND they are

Re: A question regarding map destructuring

2010-11-02 Thread Mike Meyer
On Mon, 1 Nov 2010 23:41:47 -0700 (PDT) Meikel Brandmeyer wrote: > Hi, > > On 2 Nov., 03:25, Mike K wrote: > > > (print-value-a [:b 7 :a 3]) > > ; actually prints nil > > You have to use apply. (apply print-value-a [:b 7 :a 3]). > > Furthermore: how could (let [{a :a} [:b 7 :a 3]] [a]) possi

Re: From jetty to war?

2010-11-03 Thread Mike Meyer
Sean Corfield wrote .. > Why are folks so insistent on monolingual systems? We're facing that now, and with a mono-lingual system, you know everyone can contribute to any part of the project. If different parts are in different languages, then people working in one area won't necessarily be able

Re: From jetty to war?

2010-11-03 Thread Mike Meyer
On Wed, 3 Nov 2010 16:26:13 -0700 Sean Corfield wrote: > On Wed, Nov 3, 2010 at 3:31 PM, Mike Meyer > wrote: > > We're facing that now, and with a mono-lingual system, you know > > everyone can contribute to any part of the project. If different parts > > are in dif

Re: Some questions about Clojure Protocols

2010-11-04 Thread Mike Meyer
On Thu, 4 Nov 2010 00:50:35 -0700 Paul Hobbs wrote: > Strong type systems make programming in the large easier. Paul, "Strong typing" has so many definitions that your statement is nearly meaningless. See http://www.wordiq.com/definition/Strong_typing for a few. Now, if you have some prove t

Re: Python is way faster than Clojure on this task

2010-11-04 Thread Mike Meyer
On Thu, 4 Nov 2010 22:28:12 +0100 Pepijn de Vos wrote: > Hi all, > > I have written a Python script to analyze Minecraft levels and render a > graph. Then I did the same with Clojure. It takes Python 10 seconds to > analyze a map, while it takes Clojure over a minute. > > After having tried d

Polymorphic protocols and containers....

2010-11-04 Thread Mike Meyer
It seems like the polymorphism of protocols breaks inside the methods. This is a problem for having a function that's polymorphic between an object and a container of the same objects. For instance: user=> (defprotocol Tune (tweek [this])) Tune user=> (deftype Knob [name] Tune (tweek [this] (prin

Re: From jetty to war?

2010-11-05 Thread Mike Meyer
On Fri, 5 Nov 2010 13:42:44 -0700 Sean Corfield wrote: > On Fri, Nov 5, 2010 at 12:41 PM, Michael Ossareh wrote: > > I've regularly found that the multi-disciplinarian programmer is far more > > adept at solving issues in a creative manner than the "I've a skilled hammer > > and I'll wield it in

Re: could clojure be androids joker card

2010-11-07 Thread Mike Meyer
On Sun, 7 Nov 2010 12:42:09 +0100 Jacek Laskowski wrote: > On Sun, Nov 7, 2010 at 10:10 AM, Santosh Rajan wrote: > > > I would really like to see Clojure work on android the same way. > > Hi, > > I can hardly explain it myself and that's why I'm asking others > whenever I stumble upon such a

Clojure vs. serial ports

2010-11-09 Thread Mike Meyer
I'm working on a clojure web app that manipulates the serial port. Well, uses it, anyway. The basic structure is to create a map from web-visible names to devices accessible via the serial ports. The problem is that Clojure and the serial port drivers don't seem to get along very well. I'm using t

Re: Incorrect behaviour for large s-expressions :(

2010-11-14 Thread Mike Meyer
On Sun, 14 Nov 2010 00:48:13 -0500 Robert McIntyre wrote: > So my friend and I were screwing around, battling versions of LISP as > nerds are wont to do, when I came across this: > > (eval `(clojure.core/+ ~@(take 1e4 (iterate inc 1 > Invalid method Code length 89884 in class file user$eval1

Re: Incorrect behaviour for large s-expressions :(

2010-11-14 Thread Mike Meyer
On Sun, 14 Nov 2010 08:43:11 -0500 Robert McIntyre wrote: > @Mike Meyer > Using apply is different than what I'm doing. Yup. > When I use eval I'm trying to evaluate a huge s-expression. > When you use apply you're evaluating a s-expression with three > elements.

Re: Weird result for (get max key)

2010-11-19 Thread Mike Meyer
On Fri, 19 Nov 2010 17:52:03 -0800 (PST) Bob Shock wrote: > I had a bug in my code where I meant to type: > > (get map key) > > and instead typed: > > (get max key) > > It seems that any function name I put in for "max" always returns nil. > > user=> (get max 3) > nil > user=> (get min 3) >

Re: Clojure vs Clisp...How big is the difference??

2010-11-21 Thread Mike Meyer
On Sun, 21 Nov 2010 16:26:07 -0800 (PST) coco wrote: > Hi everybody...I'm interested in learning clojure but there're only a > few books and more focused to advanced programmers...I found today a > nice book about Clisp but I don't know how different is itplease > can tell if can be recommen

Re: discussing Clojure with non-CS types

2010-11-24 Thread Mike Meyer
On Wed, 24 Nov 2010 09:20:49 -0800 (PST) cej38 wrote: > I am a physicist. I have been using Clojure full time for the last > year and a half. The reasons that Rich (and most other Clojure > evangelists) give for using Clojure, are all nice and good, but they > point to what computer scientists

Question about an idiom.....

2010-11-24 Thread Mike Meyer
On Wed, 24 Nov 2010 00:37:07 -0800 (PST) LauJensen wrote: You just touched on an idiom I see fairly often here that bugs me. I'm not intentionally singling you - or CQL! - out for this, but you made a comment that sets up my question perfectly. > (let [photo-counts (-> (table :photos) >

Re: Question about an idiom.....

2010-11-24 Thread Mike Meyer
On Wed, 24 Nov 2010 22:51:09 +0100 Daniel Werner wrote: > On 24 November 2010 21:40, Mike Meyer > wrote: > > Could someone explain where this urge to write (-> expr (func arg)) > > instead of (func expr arg) comes from? > > I like to use -> and ->> becaus

Ring startup processing?

2010-11-27 Thread Mike Meyer
My simple web app (http://blog.mired.org/2010/11/x10-controller-in-clojure.html) has some stuff that needs to happen just once (in this case, opening the serial port). It's not clear how to get this to happen using ring. If I do it inside my ring handler, then it gets run on every request, and I ha

Re: parameters destructuring & sets?

2010-12-06 Thread Mike Meyer
On Mon, 6 Dec 2010 16:30:10 -0500 Ken Wesson wrote: > On Mon, Dec 6, 2010 at 1:05 PM, Stuart Sierra > wrote: > > On Dec 6, 8:36 am, Ken Wesson wrote: > >> Furthermore, the comment (not made by Hickey) that map order "may be > >> unstable" is more than a little puzzling in light of the fact that

Re: parameters destructuring & sets?

2010-12-06 Thread Mike Meyer
On Mon, 6 Dec 2010 17:07:15 -0500 Ken Wesson wrote: > On Mon, Dec 6, 2010 at 4:44 PM, Mike Meyer > wrote: > > On Mon, 6 Dec 2010 16:30:10 -0500 > > Ken Wesson wrote: > > > >> On Mon, Dec 6, 2010 at 1:05 PM, Stuart Sierra > >> wrote: &

Re: Lots of newbie clojure questions

2010-12-06 Thread Mike Meyer
On Mon, 6 Dec 2010 16:50:40 -0800 (PST) javajosh wrote: > 1. What is the justification for using a map as a function? I find > this to be very confusing. The same as using a keyword for a function - it lets you write shorter code. > 2. In practice, I find myself wincing when needing to decide w

Re: How can I avoid needing this other function?

2010-12-06 Thread Mike Meyer
On Tue, 7 Dec 2010 00:44:52 -0500 Alex Baranosky wrote: > Here is the code I'm working on. The first function is wanted. The second > is not. (and the duplication is waiting to be factored out somehow...) > > Is there an idiomatic Clojure way to use map-of-distances on the "Line of > Note" belo

Re: Lots of newbie clojure questions

2010-12-07 Thread Mike Meyer
On Tue, 7 Dec 2010 02:58:11 -0500 Ken Wesson wrote: > On Tue, Dec 7, 2010 at 2:15 AM, javajosh wrote: > > Mike and I have had a nice off-line conversation where we enumerated > > the possible things that can come after open-parens. I listed 7, he > > added 3: That wasn't meant to be offline, bu

Re: Moderately off-topic: installing emacs on OSX

2010-12-10 Thread Mike Meyer
On Sat, 11 Dec 2010 01:07:51 + Alec Battles wrote: > > I don't use OS X so I can't comment on such a consensus, but while I > > appreciate the sentiment, it's actually harmful to some degree to have > > lots of blog posts scattered around everywhere that all have slightly > > different advice

Re: Clojure 1.3 Alpha 4

2010-12-13 Thread Mike Meyer
"Vagif Verdi" wrote: >Maybe clojure should adopt linux versioning scheme, where even numbers >are stable production clojure and odd numbers are development branch ? Gods please no. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- You received this message because you

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread Mike Meyer
On Tue, 14 Dec 2010 21:04:11 -0500 Ken Wesson wrote: > On Tue, Dec 14, 2010 at 8:23 PM, Benny Tsai wrote: > > As Brian said, primitive math is now the default in 1.3.  If auto- > > promotion on overflow is desired, you can use the +', -', *', inc', > > dec' functions (note the single quote suffi

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread Mike Meyer
On Wed, 15 Dec 2010 13:02:13 -0500 Ken Wesson wrote: > On Wed, Dec 15, 2010 at 12:51 PM, Eric Schulte wrote: > > Ken Wesson writes: > > > >> Are you honestly suggesting I search the archives > > > > It is common courtesy on open-source lists such as this one to check if > > a question you are a

Improving the documentation

2010-12-16 Thread Mike Meyer
On Thu, 16 Dec 2010 10:18:47 -0700 Terrance Davis wrote: > *begin rant* > > I have yet to see anyone who posts the classic "rtfm" (even politely) > response search previous posts and realize that "rtfm" responses have > already been sent and refrain from sending the same explanation of how >

Re: Improving the documentation

2010-12-16 Thread Mike Meyer
On Thu, 16 Dec 2010 17:50:58 -0500 Stuart Halloway wrote: > > On Thu, 16 Dec 2010 10:18:47 -0700 > > Terrance Davis wrote: > > > >> *begin rant* > >> > >> I have yet to see anyone who posts the classic "rtfm" (even politely) > >> response search previous posts and realize that "rtfm" response

Re: about the repl

2010-12-18 Thread Mike Meyer
On Fri, 17 Dec 2010 22:45:01 -0800 (PST) tor wrote: > Is there a way to activate word completion in the repl? I find myself > hitting tab all the time... Since nobody else mentioned it (or even offered a solution other than "Try my environment"), you can use rlwrap (should be available in your s

Re: HTML5 Validator

2010-12-18 Thread Mike Meyer
[Going ever further off topic] On Sat, 18 Dec 2010 20:52:09 -0500 John Sanda wrote: > On Sat, Dec 18, 2010 at 3:10 PM, Alyssa Kwan wrote: > > I'd like to unit test my html output for well-formedness. What's an > > easy way to test it for HTML5 validity? Are there good Clojure libs > > for t

Re: Ah-hah! Clojure is a Lisp

2010-12-19 Thread Mike Meyer
On Sun, 19 Dec 2010 21:24:42 -0500 Ken Wesson wrote: > On Sun, Dec 19, 2010 at 8:25 PM, Tim Daly wrote: > > > > > > On 12/19/2010 8:20 PM, Ken Wesson wrote: > >> > >> On Sun, Dec 19, 2010 at 8:18 PM, Tim Daly > >>  wrote: > >>> > >>>  I didn't mean to imply that other people > >>> don't have the

Re: Ah-hah! Clojure is a Lisp

2010-12-20 Thread Mike Meyer
On Mon, 20 Dec 2010 19:26:49 +0100 Meikel Brandmeyer wrote: > Hi, > > if you prefer text over talk: > > http://clojure.googlegroups.com/web/AreWeThereYet.pdf Thanks for the link. To bad it made Tufte kill a kitten. I had forgotten there was a textual representation with a lower information de

Re: Ah-hah! Clojure is a Lisp

2010-12-20 Thread Mike Meyer
On Mon, 20 Dec 2010 16:27:11 -0500 Ken Wesson wrote: > On Mon, Dec 20, 2010 at 3:00 PM, Mike Meyer > wrote: > > On Mon, 20 Dec 2010 19:26:49 +0100 > > Meikel Brandmeyer wrote: > >> http://clojure.googlegroups.com/web/AreWeThereYet.pdf > > > > Thanks for

SCA FAQ link at clojure.org/contributing....

2010-12-21 Thread Mike Meyer
The link to the SCA FAQ on the page at clojure.org/contributing now returns a document not found page. Given that the Clojure CA is based on the Sun Contributor Agreement and what Oracle has since done with NotQuiteSoOpenSolaris, this would seem to be an important document to have available.

Re: Quicksort with accumulator

2010-12-28 Thread Mike Meyer
f-let [coll (seq coll)] > (partify (first coll) (rest coll) [[] [(first coll)] []] acc) > acc)) > > (defn qsort > "Perform Quicksort, with apologies to C.A.R. Hoare" > [coll] > (if-let [coll (seq coll)] > (qsort* coll []) > [])) > > Regard

Re: Speed of clojure hash map vs java hash map

2010-12-29 Thread Mike Meyer
On Tue, 28 Dec 2010 22:28:54 -0800 Mark Engelberg wrote: [Standing on soapbox] > On Tue, Dec 28, 2010 at 10:15 PM, David Nolen wrote: > > Even in in a single threaded context raw insert performance isn't the final > > word. What if you want to be able to deliver a snapshot for reporting? > > W

Re: Interesting challenge

2010-12-30 Thread Mike Meyer
On Thu, 30 Dec 2010 12:03:14 -0500 David Nolen wrote: > From the Qi mailing list: > > http://groups.google.com/group/qilang/browse_thread/thread/e4a2f534fad5032a > > "I contend that this kind of problem cannot be solved (efficiently) in any > pure functional programming language. You may disagr

Re: Funding 2011?

2011-01-04 Thread Mike Meyer
On Tue, 4 Jan 2011 09:31:13 -0500 Rich Hickey wrote: > On Nov 28, 2010, at 9:07 PM, Jeremy Dunck wrote: > > In Dec 2009, Rich asked the community to step up and support core > > development -- and the community came through. > > I'm interested in clojure, but not using it professionally yet. I wa

Re: Getting started with Counterclockwise

2011-01-29 Thread Mike Meyer
"Laurent PETIT" wrote: >2011/1/20 Ken Wesson > >> On Wed, Jan 19, 2011 at 9:39 AM, Rayne >wrote: >> > Aren't you a developer? >> >> I'm not a CCW developer. >> >> > If a code.google link is the top of google results, that's what I'm >> > going to click and check out first. code.google is a proj

Re: Getting started with Counterclockwise

2011-01-30 Thread Mike Meyer
"Ken Wesson" wrote: >On Sat, Jan 29, 2011 at 1:46 PM, Mike Meyer > wrote: >> Ditto.  Most often, the "code" site is the sole project site, and >everything is there. Some larger projects may have a separate "home" >page, but it's always prom

Re: Getting started with Counterclockwise

2011-01-30 Thread Mike Meyer
"Ken Wesson" wrote: >On Sun, Jan 30, 2011 at 12:07 PM, Mike Meyer > wrote: >> Sure, Sturgeon's law is closer to 99% than 90% for the web.  But if >you don't even look at the right page to start with > >That is why I say it behooves projects that wish to

Re: Getting started with Counterclockwise

2011-01-30 Thread Mike Meyer
"Ken Wesson" wrote: >On Sun, Jan 30, 2011 at 12:31 PM, Mike Meyer > wrote: >> "Ken Wesson" wrote: >>>That is why I say it behooves projects that wish to grow a large >>>user-base to have a highly-ranked google result be clearly the pl

Re: Getting started with Counterclockwise

2011-01-30 Thread Mike Meyer
On Sun, 30 Jan 2011 13:38:24 -0500 Ken Wesson wrote: > On Sun, Jan 30, 2011 at 1:24 PM, Mike Meyer > wrote: > > "Ken Wesson" wrote: > > > >>On Sun, Jan 30, 2011 at 12:31 PM, Mike Meyer > >> wrote: > >>> "Ken Wesson" wrote: &g

Re: Getting started with Counterclockwise

2011-01-30 Thread Mike Meyer
On Sun, 30 Jan 2011 13:51:40 -0500 Ken Wesson wrote: > On Sun, Jan 30, 2011 at 1:45 PM, Mike Meyer > wrote: > >> Not until after they go there once or twice, find confusing project > >> pages with no clear starting point for prospective end users, and form >

Re: Any news on pull requests?

2011-02-04 Thread Mike Meyer
On Fri, 4 Feb 2011 18:00:24 -0800 Sean Corfield wrote: > On Fri, Feb 4, 2011 at 5:24 PM, Eugen Dück wrote: > > Furthermore, I was really surprised to find on > > http://clojure.org/contributing > > that I have to send a (non-e)mail around the world to be able to > > contribute > Written accepta

Re: Any news on pull requests?

2011-02-04 Thread Mike Meyer
On Fri, 4 Feb 2011 18:36:34 -0800 Sean Corfield wrote: > On Fri, Feb 4, 2011 at 6:16 PM, Eugen Dück wrote: > > Is it really necessary, though? We all agree to EULAs and make other > > more significant legal commitments online all the time, and in some > > cases without having proven who and wher

Re: Any news on pull requests?

2011-02-05 Thread Mike Meyer
On Sat, 5 Feb 2011 00:09:41 -0500 Christopher Petrilli wrote: > For example, the following projects REQUIRE contributor agreements, in > writing, signed and either scanned or on paper, prior to accepting any > patches or commits: > > - Free Software Foundation > - Apache, and everything under it

Re: Any news on pull requests?

2011-02-06 Thread Mike Meyer
On Sat, 5 Feb 2011 20:42:54 -0500 Christopher Petrilli wrote: > On Sat, Feb 5, 2011 at 1:23 PM, Mike Meyer > wrote: > > On Sat, 5 Feb 2011 00:09:41 -0500 > > Christopher Petrilli wrote: > >> For example, the following projects REQUIRE contributor agreements, in >

Re: Tricky Macro to write.

2011-02-10 Thread Mike Meyer
On Wed, 9 Feb 2011 20:34:56 -0800 (PST) CuppoJava wrote: > Description: (bind-later bindings & body) and (do-binding & body) > (bind-later) is used like a let-form, except that it doesn't > *immediately* make the bindings available. > The bindings become available only within (do-binding). > (do

Re: Problems with lazy-xml

2011-02-10 Thread Mike Meyer
On Thu, 10 Feb 2011 07:22:55 -0800 (PST) Marko Topolnik wrote: > I am required to process a huge XML file with 300,000 records. The > structure is like this: > > > > > > > ... > ... > ... 299,998 more > > > > Obviously, it is of key importance not to allocate

<    1   2   3   4   >