Re: ANN framework.one (MVC web application framework)

2011-11-08 Thread Sean Corfield
On Tue, Nov 8, 2011 at 8:11 PM, jaime wrote: > Is there any docs describe the principles/concepts (not only for MVC) > of this framework?? Yes, the CFML version's wiki should cover that: >> The original FW/1 documentation is >> here:https://github.com/seancorfield/fw1/wiki If that doesn't cove

Re: Another newbie question

2011-11-08 Thread Sean Corfield
On Tue, Nov 8, 2011 at 4:09 PM, pron wrote: > Yes, but it lacks cross-referencing and linking from within the docstrings > themselves (like Javadoc's @See). You can use :see-also metadata to cause autodoc to generate cross-references with links... I think it would be pretty easy to extend autodoc

Re: Another newbie question

2011-11-08 Thread Sean Corfield
On Tue, Nov 8, 2011 at 3:14 AM, pron wrote: > Yeah, sure, but docstrings aren't linkable. It's interesting that Java, with > all its faults, has an incredible documentation system. Have you looked at autodoc? It's responsible for generating stuff like this: http://clojure.github.com/java.jdbc/

Re: ANN: clojure.java.jdbc 0.0.7

2011-11-07 Thread Sean Corfield
On Mon, Nov 7, 2011 at 3:04 PM, keeds wrote: > Some more (blind) delving shows that the only difference between the > versions is that clojure1.2 and contrib pass the 14 value as a > java.lang.Integer whereas clojure1.3 and java.jdbc pass the value 14 as a > java.lang.Long and this is what blows t

Re: Another newbie question

2011-11-07 Thread Sean Corfield
On Mon, Nov 7, 2011 at 10:23 AM, Dennis Haupt wrote: > actually, we avoid dynamically typed languages like the plague. Why? Genuinely curious... -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ "Perfection is the en

Re: Another newbie question

2011-11-07 Thread Sean Corfield
On Mon, Nov 7, 2011 at 2:19 AM, pron wrote: > What other team practices do you use? E.g. what do you use for effective > documentation? docstrings? > I understand my questions could be directed at most dynamic languages, and > I'm absolutely not entering the static vs. dynamic debate Hmm, but i

Re: problems of a newbie

2011-11-07 Thread Sean Corfield
On Mon, Nov 7, 2011 at 4:20 AM, Dennis Haupt wrote: > which is a good thing. type safety is good. Is it? -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ "Perfection is the enemy of the good." -- Gustave Flaubert, F

Re: cljr install makes .cjr directory

2011-11-06 Thread Sean Corfield
On Sun, Nov 6, 2011 at 8:51 PM, jayvandal wrote: > Whay does cljr-installer.jar make directories  with .(period) in front > of the dir name as .cljr and .lein and m2. .(program-name) is fairly standard for programs to store configuration. .m2 is the local repository cache for Maven 2. .lein is

Re: Another newbie question

2011-11-06 Thread Sean Corfield
On Sun, Nov 6, 2011 at 3:56 AM, pron wrote: > I realize there are always tradeoffs, and perhaps the pros outweigh the > cons, but I would like to know how you deal with such problems, that > invariably arise in large-team development. Why do you think this sort of problem is invariably going to a

Re: problems of a newbie

2011-11-06 Thread Sean Corfield
On Sun, Nov 6, 2011 at 12:15 PM, Dennis Haupt wrote: > if by compatible you mean "has a specific set of functions and fields", > then scala can do that without sacrificing static type safety: Yes, I started working with Scala in 2009 and it's certainly much better than Java but it still forces yo

Re: problems of a newbie

2011-11-06 Thread Sean Corfield
On Sun, Nov 6, 2011 at 11:12 AM, Dennis Haupt wrote: > let me guess: you had some classes that were used more than they should > have been because they were the best match and introducing a better one > would have taken more time - and since they could do so much, they were > just used at more and

Re: problems of a newbie

2011-11-06 Thread Sean Corfield
On Sunday, November 6, 2011, Dennis Haupt wrote: > this is a double edged sword. you *do* get it right *if* you think it > through, but reality is often more complex than you assume. if you > suddenly see that you forgot to handle special case x, you are > punished harder than in . I'll go a litt

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread Sean Corfield
On Thu, Nov 3, 2011 at 4:40 PM, Gary Trakhman wrote: > You can even consider a live scripting facility (while the game's running) > with the repl and some api to access your game's state.  All of those > functions are available. I'm a bit fuzzy on how to enable an application to be connected to f

Re: 2011 ClojureCLR survey analysis

2011-11-03 Thread Sean Corfield
On Thu, Nov 3, 2011 at 10:35 AM, dmiller wrote: > An analysis of the 2011 ClojureCLR survey and a plan of action is now > available here: > > http://clojureclr.blogspot.com/2011/11/survey-says-call-to-action.html Nice set of analyses David - great work! On this one: http://clojureclr.blogspot.c

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread Sean Corfield
As Chas says, RT.var() is probably your easier point of entry here. I use Clojure as a scripting language within a JVM-based application (not Java, but it uses Java interop to access Clojure) and the patterns I use are: * clojure.lang.RT.var( "the.namespace", "some-name" ) - get a reference to the

Re: Any reason interleave needs 2 or more collections?

2011-11-02 Thread Sean Corfield
I seem to recall seeing a ticket opened in JIRA for this recently with a patch so maybe it'll get incorporated. On Wed, Nov 2, 2011 at 6:28 PM, Alex Baranosky wrote: > Something interesting I've noticed: > > I've recently realized I could simplify some application code of mine by > using interlea

ANN clojure.java.jdbc 0.1.1

2011-11-02 Thread Sean Corfield
Should hit Maven Central "soon". Changes in 0.1.1: * Fix JDBC-21 by adding support for db-spec as URI (Phil Hagelberg). * Fix JDBC-22 by deducing driver class name from subprotocol (Phil Hagelberg). * Add Postgres dependency so tests can be automated (Phil Hagelberg). * Add ability to specify tes

Re: update to clojure.tools.cli

2011-11-01 Thread Sean Corfield
On Tue, Nov 1, 2011 at 10:59 AM, gaz jones wrote: > The update is therefore going to break the existing API which you > obviously need to be aware of if you are currently using 0.1.0 and > intend to upgrade to 0.2.0. ... > Apologies for anyone upset by the timing / notification of the changes > --

Re: update to clojure.tools.cli

2011-11-01 Thread Sean Corfield
It's on Maven Central now... On Tue, Nov 1, 2011 at 11:59 AM, Aaron Bedra wrote: > It's strange that it hasn't made it to central yet. ... > On Tue, Nov 1, 2011 at 1:59 PM, gaz jones wrote: >> The release has been cut, but the last time I checked it still hadn't >> hit maven central, so this is

Re: Loop performance issue with variable

2011-11-01 Thread Sean Corfield
On Tue, Nov 1, 2011 at 4:29 AM, redraiment wrote: > user=> (def n 1) > #'user/n > user=> (time (loop [cnt 1 sum 0] (if (zero? cnt) sum (recur > (dec cnt) (+ sum cnt) > "Elapsed time: 605.564858 msecs" > 50005000 > user=> (time (loop [cnt n sum 0] (if (zero? cnt) sum (re

Re: Please try the alphas and betas!

2011-10-31 Thread Sean Corfield
On Mon, Oct 31, 2011 at 8:06 AM, Timothy Baldridge wrote: > I'd like to second what Bill said...I don't really have the time to > setup a clojure build process to test out the 1.4 Alphas/Betas, but if > there was a way for me to get to it via lein...I would just target 1.4 > for all my day-to-day

Unfuddle API?

2011-10-26 Thread Sean Corfield
Has anyone done any experimentation with the Unfuddle API using Clojure? I'm considering building something because a) World Singles uses Unfuddle and b) World Singles uses Clojure and c) it might possibly be useful (I haven't thought of _how_ yet, it just seems like an interesting exercise... per

Re: Clojure Conj extracurricular activities spreadsheet

2011-10-25 Thread Sean Corfield
On Tue, Oct 25, 2011 at 8:26 PM, Luc Prefontaine wrote: > Please add me to "Clojure and the web", Me too please. I already added myself to Clojure Tooling before the document got locked down :) -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -

Re: where do you put clojure.java.jdbc?????

2011-10-24 Thread Sean Corfield
On Mon, Oct 24, 2011 at 8:36 PM, jayvandal wrote: > I am running Vista. I installed Clojure as c:\clojure. You don't need to "install" Clojure if you're using Leiningen (and I'd recommend you use Leiningen for managing project dependencies). > Where and how do you put the file > > [org.clojure/j

Re: Rich Hickey: "Simple Made Easy" from Strange Loop 2011

2011-10-24 Thread Sean Corfield
On Fri, Oct 21, 2011 at 10:05 AM, Michael Forster wrote: > Yes:  Was that a nil value for the key :foo in my map or did :foo not > exist? If you need to distinguish between ":foo is missing" and ":foo's value indicates non-existence", what about: (get my-map :foo ::missing) -- Sean A Corfield -

Re: bit-or arity appears limited to 2 items

2011-10-23 Thread Sean Corfield
On Fri, Oct 21, 2011 at 4:12 PM, rugby_road wrote: > The bit-or arity seems to be limited to 2, rather than more, which > seems to disagree with the documentation.  I get "Wrong number of args > (3) passed to: core$bit-or" for (bit-or 1 1 1).  Have I misunderstood > this operation; shouldn't it ta

Re: partial, but instead of args + additional, get additional + args

2011-10-23 Thread Sean Corfield
On Sun, Oct 23, 2011 at 1:04 PM, Ben Smith-Mannschott wrote: > On Sun, Oct 23, 2011 at 21:25, Meikel Brandmeyer wrote: >> The idiomatic solution is #(f % a1 a2 a3). I'm failing to see the issue with >> “nice” and “expressive”, but that is most likely just me. > I find myself reaching for partial

Re: Is Clojure Simple?

2011-10-22 Thread Sean Corfield
On Sat, Oct 22, 2011 at 10:35 AM, Tim Robinson wrote: > (is 'complected' even a word? - lol) . OED: http://photo.pds.org:5004/view/Entry/37640?redirectedFrom=complect#eid > Do the Clojure language designers plan to make changes to Clojure to > make it simpler? And if so, how so? This reminds me

Re: partial, but instead of args + additional, get additional + args

2011-10-22 Thread Sean Corfield
On Sat, Oct 22, 2011 at 8:31 AM, Tyler Perkins wrote: > Just take an idea from Haskell (as usual!). Function 'flip' returns a > function taking its first two arguments in order opposite the given > function: That works nicely for functions with two arguments but in this situation I tend to have m

Re: Function to generate a SQL IN clause from a list of values

2011-10-22 Thread Sean Corfield
On Fri, Oct 21, 2011 at 10:47 PM, Alan Malloy wrote: > Can't repeat this strongly enough. Do not, ever, decide you can escape/ > sanitize the strings yourself so you don't need a parameterized query. > Maybe it works, but one of these days you'll slip up and get something > wrong. Just prepare a s

Re: Function to generate a SQL IN clause from a list of values

2011-10-21 Thread Sean Corfield
On Fri, Oct 21, 2011 at 5:54 PM, Shoeb Bhinderwala wrote: > I wrote the following function to create a SQL IN clause from a list > of values. Essentially the function creates a single string which is a > comma separated quoted list of the values surrounded by parenthesis. If you're using clojure.

Re: Clojure 1.3 treatment of integers and longs

2011-10-21 Thread Sean Corfield
On Fri, Oct 21, 2011 at 12:52 AM, nathanmarz wrote: > user=> (class (Integer/parseInt "1")) > java.lang.Long (Integer/parseInt "1") returns an int - which Clojure promotes to long (since it only has 64-bit primitives) and class takes an Object so long is boxed to Long. > user=> (class (Integer/v

Re: partial, but instead of args + additional, get additional + args

2011-10-20 Thread Sean Corfield
On Thu, Oct 20, 2011 at 8:15 PM, Wilker wrote: > In the case of <> it's ok because they are reverse of each other, but in > some circustances there is no reverse function, and you finish can't be > using partial, instead you do like: > > (take-while #(< % 2000) primes) > > I mean, there is no such

Re: Clojure 1.3 treatment of integers and longs

2011-10-20 Thread Sean Corfield
On Thu, Oct 20, 2011 at 1:11 PM, nathanmarz wrote: > of contention is what Clojure does when it has to box a primitive int. My understanding is that Clojure 1.3 has 64-bit primitives, i.e., longs and double. You only have a primitive int if you coerce the value to int (for an interop call that ex

Re: Digest for clojure@googlegroups.com - 13 Messages in 5 Topics

2011-10-16 Thread Sean Corfield
On Sun, Oct 16, 2011 at 9:26 PM, Jay Vyas wrote: > Hi guys : Ive posted a question about looking for a DSL in clojure that > replaces a good oo solution to an easily understandable, domain oriented > problem (like the jpetstore application), on stackoverflow.  Still now > answers though --- though

Re: Faster clojure.data.json

2011-10-15 Thread Sean Corfield
On Fri, Oct 14, 2011 at 11:21 AM, Stuart Sierra wrote: > I spent some time this morning on performance enhancements to > clojure.data.json, including a fix for DJSON-1. I just pushed release > 0.1.2 to Sonatype; it will reach Maven Central in a few hours. I updated CongoMongo to depend on 0.1.2 -

Re: "Pipe" function

2011-10-15 Thread Sean Corfield
On Sat, Oct 15, 2011 at 12:59 AM, Alan Malloy wrote: > As you notice lower, I like this argument-order so that I can chain > operations on values better Yes. > But, that map is handy, so we have (to-fix), which is basically a > partial setting all *but* the first arg (tying nicely into what you

Re: ANN: clojure.java.jdbc 0.0.7

2011-10-15 Thread Sean Corfield
On Thu, Oct 13, 2011 at 1:35 AM, Marko Kocić wrote: > Looking at the log seems like MS Access doesn't support prepared statements. Ah, so there was a path in c.c.sql that didn't use PreparedStatement which meant it supported MS Access? (by accident, I'm sure :) If someone with a Windows system c

Re: The Website / Wikispaces

2011-10-14 Thread Sean Corfield
On Thu, Oct 13, 2011 at 1:28 PM, Stuart Sierra wrote: > You can see the redirect with: > > wget http://clojure.org/ Ah, session.wikispaces.com .. thanx. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ Railo Tec

Re: "Pipe" function

2011-10-14 Thread Sean Corfield
On Fri, Oct 14, 2011 at 5:50 PM, Alan Malloy wrote: > I really liked this one too, though my first draft of it was more like > (defn pipe [test f] >  (fn [value] >    (...))) ... > fix is basically your pipe, except it takes a series of test/f pairs, > and to-fix is my original version, returning

Re: Sum on a list of maps

2011-10-14 Thread Sean Corfield
On Fri, Oct 14, 2011 at 10:25 AM, der wrote: > Given a list of maps of the followign format: ({"Type" "A", "Value" > "5"} {"Type" "B", "Value" "4"} {"Type" "A", "Value" "7.2"} {"Type" > "A", "Value" "25.4"} {"Type" "B", "Value" "2.982"}) Folks are posting solutions but I wondered why your map key

Re: clojure.contrib.except's future?

2011-10-13 Thread Sean Corfield
On Thu, Oct 13, 2011 at 11:19 AM, ffailla wrote: > Does anyone now if clojure.contrib.except being ported to the new > contrib?  Thanks. So far no one has volunteered to maintain it so the question hadn't come up... -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/

Re: ANN: clojure.java.jdbc 0.0.7

2011-10-12 Thread Sean Corfield
On Wed, Oct 12, 2011 at 1:42 AM, keeds wrote: > I'm having problems with MS Access ODBC driver with JDBC ODBC bridge and > parameterised statements. Given how flawed MS Access is, I'm not sure it's an appropriate target for clojure.java.jdbc but if you can provide more detail about exactly what q

Re: The Website / Wikispaces

2011-10-12 Thread Sean Corfield
Just to swim against the flow: I've never seen confusion between clojure.org and wikispaces so I've been watching this thread with interest and bewilderment. Can someone provide a tried and true navigation path that shows this problem? If it's as common as this thread would suggest, I'm really surp

Re: Exception handling changes in Clojure 1.3.0

2011-10-12 Thread Sean Corfield
On Wed, Oct 12, 2011 at 7:37 AM, Stefan Kamphausen wrote: > To my humble ears this sounds like the best idea so far.  Something like > ClojureRTException ... The problem - in Clojure code using try/catch - is that you don't know whether the real exception will be wrapped or not (because you may b

Re: tools.logging vs clojure.contrib.logging

2011-10-12 Thread Sean Corfield
On Wed, Oct 12, 2011 at 8:06 AM, jingguo wrote: > Is tools.logging is a replacement of clojure.contrib.logging? > Which one should I use? If these pages could be more clear on answering your question, please let me know and I'll update them: http://dev.clojure.org/display/doc/Clojure+Contrib htt

Re: ANN: clojure.java.jdbc 0.0.7

2011-10-11 Thread Sean Corfield
On Tue, Oct 11, 2011 at 6:58 PM, jaime wrote: > will the 1.0.0 be included in core or contrib package? The Clojure/core team have indicated they are considering a "batteries included" distribution that will bundle new contrib libraries but the exact form (and version numbers) have not been discus

Re: metadata on function objects

2011-10-11 Thread Sean Corfield
On Tue, Oct 11, 2011 at 5:22 PM, Brian Marick wrote: > I understand that. Useful code is sometimes given a function object to work > with, not a Var. Ah, I get your point now... What about: (meta (var odd?)) (meta (resolve 'odd?)) -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- h

Re: metadata on function objects

2011-10-11 Thread Sean Corfield
On Tue, Oct 11, 2011 at 5:13 PM, Brian Marick wrote: > In 1.3, this metadata is missing: > > user=> (meta odd?) > nil user=> (meta #'clojure.core/odd?) {:ns #, :name odd?, :arglists ([n]), :added "1.0", :static true, :doc "Returns true if n is odd, throws an exception if n is not an integer", :li

ANN: clojure.java.jdbc 0.0.7

2011-10-11 Thread Sean Corfield
Changes in 0.0.7: * Fix JDBC-9 by renaming duplicate columns instead of throwing an exception. - thanx to Peter Siewert! * Fix JDBC-16 by ensuring do-prepared works with no param-groups provided. * Fix JDBC-17 by adding type hints to remove more reflection warnings. - thanx to Stuart Sierra! D

Re: Faster JSON library

2011-10-11 Thread Sean Corfield
On Tue, Oct 11, 2011 at 8:47 AM, Sean Corfield wrote: > I'll try to run tests against 1.4.0-master-SNAPSHOT today (that'll > have this change, right?). I get a NPE from the 1.4 compiler on Congomongo. Details reported on clojure-dev. -- Sean A Corfield -- (904) 302-SEAN An

Re: Exception handling changes in Clojure 1.3.0

2011-10-11 Thread Sean Corfield
Would a good solution to this be for try/catch to _automatically_ unroll RTE if there's no matching Exception class specified? I understand _why_ the change to wrap exceptions was made but without the equivalent unwrapping in try/catch this just moves the pain from the library/language out to the

Re: Faster JSON library

2011-10-11 Thread Sean Corfield
Nice! This will let me remove some workarounds for reflection warnings I was getting and probably give me better performance too :) I'll try to run tests against 1.4.0-master-SNAPSHOT today (that'll have this change, right?). Sean On Fri, Oct 7, 2011 at 1:20 PM, Stuart Halloway wrote: > This re

Re: Faster JSON library

2011-10-07 Thread Sean Corfield
On Fri, Oct 7, 2011 at 12:08 PM, Tal Liron wrote: > (I know, I should open a bug) http://dev.clojure.org/jira/browse/DJSON :) -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ Railo Technologies, Inc. -- http://ww

Re: Faster JSON library

2011-10-07 Thread Sean Corfield
That would be http://dev.clojure.org/jira/browse/DJSON-1 which I opened at the end of July... On Fri, Oct 7, 2011 at 11:10 AM, Lars Nilsson wrote: > Trying to be a little bit constructive here, in case I come across as > complaining, I took the source for c.d.json and put it into a > leiningen pr

Re: How to flatten a nested sequence?

2011-10-04 Thread Sean Corfield
On Tue, Oct 4, 2011 at 2:25 PM, Shoeb Bhinderwala wrote: > Thanks. Didn't think it would exist in clojure.core. I highly recommend trying out Chas Emerick's Clojure Atlas: http://clojureatlas.com - it makes searching for functions AND concepts really easy and provides a great way to see the relat

Re: docs for 1.3

2011-10-04 Thread Sean Corfield
On Tue, Oct 4, 2011 at 5:22 AM, Fogus wrote: > Good catch.  That was my fault.  It's now nested under the Core page > in the same space. Thanx for the swift update - appreciated! -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worlds

Re: docs for 1.3

2011-10-03 Thread Sean Corfield
On Mon, Oct 3, 2011 at 2:05 PM, Sergey Didenko wrote: > Clearly (the main) clojure.org is not the main documentation source > for 1.3. To prove it - try to find the mention of "Factory function > taking a map", e.g. map->MyRecord there. The defrecord improvements seem to be covered here. http://

Re: Exception handling changes in Clojure 1.3.0

2011-10-03 Thread Sean Corfield
On Mon, Oct 3, 2011 at 12:03 PM, Constantine Vetoshev wrote: > This stopped working in 1.3.0. The caught exception does not match > EntityNotFoundException; it is now a RuntimeException with the > original typed exception chained to it. This caused me some pain in clojure.java.jdbc and I actually

Re: suggestion for clojure development

2011-10-02 Thread Sean Corfield
On Sat, Oct 1, 2011 at 11:24 PM, Tal Liron wrote: > You're right, it sounds in line with my hopes! Great! > Would it be possible to think of a better name for this sister project than > "new contrib"? Something that implies its tight relationship with Clojure? I > suggest "Clojure Core". Given

Re: Equality comparison in 1.3

2011-10-01 Thread Sean Corfield
On Sat, Oct 1, 2011 at 9:52 PM, Daniel wrote: > user=> (= 23.0 23) > false With every language I've ever worked in, I've always been told that comparing floating point numbers for equality is a bad idea so I'm actually glad to see that the above comparison is false... -- Sean A Corfield -- (904)

Re: suggestion for clojure development

2011-10-01 Thread Sean Corfield
On Sat, Oct 1, 2011 at 10:16 PM, Tal Liron wrote: > And the issue for me now is concern about what will happen to all > these contribs in the future if a core language feature changes, such as the > dynamic Var issue in 1.3. If these contribs are not being built and shipped > as part of Clojure, i

Re: suggestion for clojure development

2011-10-01 Thread Sean Corfield
On Sat, Oct 1, 2011 at 8:10 PM, Tal Liron wrote: > I did realize pretty early on that the contribs were not all of prime > quality, but what other choice did I have? Fall back to standard JVM API? I'm curious, what parts of contrib are you relying on that haven't found active maintainers? Perhaps

Re: strangeloop presentations

2011-10-01 Thread Sean Corfield
On Fri, Sep 30, 2011 at 6:17 PM, Alex Miller wrote: > Yes, we are working on getting them published. Rich Hickey's keynote > is in the first batch and has already been edited, just waiting to be > synced to slides and scheduled at InfoQ. You know that you should have saved the best to last and ma

Re: strangeloop presentations

2011-09-30 Thread Sean Corfield
It was stated at the conference that InfoQ was videoing everything and will post it over the next six months as they get time to edit/produce each session. Sean On Fri, Sep 30, 2011 at 10:41 AM, Scott Jaderholm wrote: > In the past they've been posted on infoq.com several months later. > Scott >

Re: producing Blub code and vv.

2011-09-29 Thread Sean Corfield
On Thu, Sep 29, 2011 at 11:24 PM, Hank wrote: >> Would it even be idiomatic Java to always have classes full of only >> static methods? > ... the Java-ists have an idiom ("design pattern") called singleton. > They're not static methods but once-instance classes. Doesn't that kind of prove my poin

Re: producing Blub code and vv.

2011-09-29 Thread Sean Corfield
On Thu, Sep 29, 2011 at 10:48 PM, Hank wrote: > A good source for this is the O'Reilly book "Functional Programming in > Java". There you can see how idioms from one language can be applied > to another. Oh yes, I know about that book but the question is: how idiomatic is that code in Java? You c

Re: producing Blub code and vv.

2011-09-29 Thread Sean Corfield
On Thu, Sep 29, 2011 at 3:39 AM, Hank wrote: > I'd like to check the interest in the community for a comprehensive > Clojure library/framework/whathaveyou that helps produce Java/Python/ > Ruby/... a.k.a. "Blub" (http://www.paulgraham.com/avg.html) code, i.e. > instead of writing a Clojure program

Re: Shameless self promotion - JavaOne

2011-09-29 Thread Sean Corfield
equently in addition, going forward. Because of Java One, we'll almost certainly meet up in San Francisco this coming week. Sean > On Wednesday, September 28, 2011, Sean Corfield > wrote: >> http://www.meetup.com/The-Bay-Area-Clojure-User-Group/ -- You received this message beca

Re: how do I use data.priority-map

2011-09-29 Thread Sean Corfield
On Thu, Sep 29, 2011 at 2:39 AM, Sean Corfield wrote: > I'll shake the tree to encourage releases to Maven for the rest of the > contrib libraries. I could/should make a release of > data.priority-map... I helped Mark get his three contrib libraries > migrated and setup and

Re: how do I use data.priority-map

2011-09-29 Thread Sean Corfield
On Thu, Sep 29, 2011 at 12:11 AM, Sunil S Nandihalli wrote: > answering my own question ... > aah .. I can just go to the sonatype repository and findout .. thanks If something isn't listed on Maven Central here http://search.maven.org/#search%7Cga%7C1%7Corg.clojure then you'll have to dig around

Re: help understanding how map works

2011-09-28 Thread Sean Corfield
On Wed, Sep 28, 2011 at 6:32 PM, Cluj wrote: > Thank you! Obvious once someone explains it :) You could also do: (map vector '("A" "B" "C")) -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ Railo Technologies, Inc. -

Re: how do I use data.priority-map

2011-09-28 Thread Sean Corfield
No builds have yet been released to Maven. You can, however, use the snapshot from Sonatype. Add the following to project.clj: :repositories {"sonatype-oss-public" "https://oss.sonatype.org/content/groups/public/"} That causes Leiningen to search the Sonatype repository. Then add this depende

Re: [ANN] Clojure 1.3 Released

2011-09-28 Thread Sean Corfield
On Tue, Sep 27, 2011 at 9:21 PM, Sidharth Kshatriya wrote: > Can you tell me why Clojure scored over Scala for you. For my Scala / Clojure anecdote, see: http://groups.google.com/group/clojure/browse_thread/thread/b18f9006c068f0a0/ We like CFML for View templating and Controllers but we expect

Re: Shameless self promotion - JavaOne

2011-09-28 Thread Sean Corfield
The Bay Area Clojure User Group is scheduled to meet on Thursday October 6th. Any out of town Clojurians who would be around for that meetup and might be persuaded to come and talk about what they're doing with Clojure? http://www.meetup.com/The-Bay-Area-Clojure-User-Group/ Sean On Tue, Sep 27,

Re: tools.trace (was Re: trace-forms macro on the clojure mailing list)

2011-09-27 Thread Sean Corfield
Thank you Luc! On Tue, Sep 27, 2011 at 11:44 PM, Luc Prefontaine wrote: > First shot of tools.trace is now available on github: > > http://github.com/clojure/tools.trace > > As for the traceforms macro, you will notice that when an exception is > trapped, I recompose > an new exception with the

Re: suggestion for clojure development

2011-09-27 Thread Sean Corfield
On Wed, Sep 28, 2011 at 12:03 AM, Arthur Edelstein wrote: > You may think > I'm doing it wrong, but I don't think I'm alone at all. I don't think you're doing anything wrong - and I'm sure many people only do minimal research on tools they use. I just think your expectations of Clojure the langua

Re: suggestion for clojure development

2011-09-27 Thread Sean Corfield
On Tue, Sep 27, 2011 at 7:33 PM, Arthur Edelstein wrote: > I hope so, too, but very often this doesn't happen in practice. Much > useful code is not maintained. My position on free open source software is that if it's that useful to someone, then that someone has at least some obligation to contr

Re: suggestion for clojure development

2011-09-27 Thread Sean Corfield
On Tue, Sep 27, 2011 at 4:28 PM, Brian Marick wrote: > I think "is it actively maintained?" is not a particularly interesting > question for a community. The question is: "is this a useful library?" Then: > "is the original author maintaining it?" And then, if not: "who will pick it > up?" Wel

Re: suggestion for clojure development

2011-09-27 Thread Sean Corfield
On Tue, Sep 27, 2011 at 11:57 AM, Arthur Edelstein wrote: > raises the question of what happens to all of the many existing > Clojure 1.2-based libraries in Clojars and on github. Many of these > are very useful, but not necessarily actively maintained. A lot of Are therein lies the problem: if t

Re: [ANN] Clojure 1.3 Released

2011-09-27 Thread Sean Corfield
On Tue, Sep 27, 2011 at 12:22 PM, Bruce Durling wrote: > That is great to hear. So happy to see someone use a lot of clojure in > production. Congrats on the release. Thanx. You can get a lot done with just a little Clojure. We stand at 1,829 lines of production Clojure code and 448 lines of unit

Re: [ANN] Clojure 1.3 Released

2011-09-27 Thread Sean Corfield
On Fri, Sep 23, 2011 at 2:44 PM, Christopher Redinger wrote: > We are pleased to announce today the release of Clojure 1.3: We took Clojure 1.3 into production today, along with a lot more Clojure code compared to our previous production release. We've converted all of our profile publishing and

Re: clojure.contrib.io, clojure.contrib.http.agent and clojure.contrib.http.connection for Clojure 1.3

2011-09-26 Thread Sean Corfield
On Mon, Sep 26, 2011 at 6:45 AM, Stuart Sierra wrote: > Most of clojure.contrib.io was moved into Clojure itself, as > clojure.java.io. When I created http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go I did it based on the modules folder here https://github.com/clojure/clojure-c

Re: Spread work onto multiple threads (in pure Clojure)

2011-09-21 Thread Sean Corfield
On Wed, Sep 21, 2011 at 6:06 PM, ronen wrote: > (defn email-approved [approved] >  (doall (pmap deref (for [req approved] (future (email-request > req)) Wouldn't the following be close enough to what you want? (defn email-approved [approved] (doall (pmap email-request approved))) -- Sean

Re: advantage of dynamic typing

2011-09-19 Thread Sean Corfield
On Mon, Sep 19, 2011 at 4:19 PM, Dennis Haupt wrote: > an advantage i see is very, very concise code since you have no type > annotations at all. the downside is that exactly this code might be > unreadable - because you just have no idea what it uses and what it > does without tests or documentat

Re: Fund raising's goal has been reached !

2011-09-19 Thread Sean Corfield
Excellent! See you at the Conj! On Mon, Sep 19, 2011 at 6:49 AM, Laurent PETIT wrote: > I'm happy to inform you that the appeal I've started previous week, for > sending me to the conj, has been a success! > > I'm very grateful to all the donors who've contributed to make this dream > possible!

Re: Clojure embedded in a Java Application

2011-09-18 Thread Sean Corfield
On Sun, Sep 18, 2011 at 3:40 AM, Meikel Brandmeyer wrote: >> Var keyword = RT.var("clojure.core", "keyword"); >> Var hashMap = RT.var("clojure.core", "hash-map"); >> hashMap.invoke(keyword.invoke("foo"), 1, keyword.invoke("bar"), x); > > This one is more simple. This is clojure code. Since I've e

Re: autoboxing in 1.3 RC-0

2011-09-15 Thread Sean Corfield
On Thu, Sep 15, 2011 at 7:50 AM, David Nolen wrote: > Loop itself will return boxed values I think. Looks that way. The following code has no reflection warning: (loop [x 1 changed 0] (if (= x 10) changed (recur (inc x) (long (loop [y 1 changed-y changed] chang

Re: Clojure vs Scala - anecdote

2011-09-15 Thread Sean Corfield
On Wed, Sep 14, 2011 at 11:15 PM, cig wrote: > Impressive, wonder if they were running this on a single node or more > widespread? We run an instance of the process on multiple nodes, configured slightly differently. We needed "some" parallelization to improve throughput but didn't need a massive

Re: [ANN] Clojure 1.3 RC0

2011-09-14 Thread Sean Corfield
On Wed, Sep 14, 2011 at 9:43 AM, Aaron Bedra wrote: > And the supporting ticket in JIRA > > http://dev.clojure.org/jira/browse/CLJ-31 Nice. Now I understand better why this was disabled. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http:

Re: Problem with insert-values (clojure.contrib.sql)

2011-09-14 Thread Sean Corfield
On Wed, Sep 14, 2011 at 12:51 AM, finbeu wrote: > Yes, if I understand it correctly, instead of db, I just use the pooled-db > It would be good to have an example that connects the pooled db stuff with > the normal db stuff. Ah, that would make it clearer.. > (defn db-update-or-insert > "Updat

Re: [ANN] Clojure 1.3 RC0

2011-09-14 Thread Sean Corfield
On Wed, Sep 14, 2011 at 8:45 AM, Paul Stadig wrote: > This compiles fine in 1.2.1, but fails in 1.3.0-RC0 Intentional removal: https://github.com/clojure/clojure/blob/master/changes.txt "1.3 Disallow recur across try" -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.

Re: Neighbors function from The Joy of Clojure

2011-09-14 Thread Sean Corfield
On Wed, Sep 14, 2011 at 5:58 AM, Leonardo Borges wrote: > (defn neighbors >   ([size yx] (neighbors [[-1 0] [1 0] [0 -1] [0 1]] size yx)) >   ([deltas size yx] >     (filter (fn [new-yx] >               (every? #(< -1 % size) new-yx)) >      (map #(map + yx %) deltas > > This syntax made me sc

Re: debugging

2011-09-14 Thread Sean Corfield
On Wed, Sep 14, 2011 at 12:05 AM, Sergey Didenko wrote: > Also bear in mind that due to the functional nature of Clojure you can > debug a lot of problems using tracing, like clojure.contrib.trace (for > < 1.3) Coming soon to 1.3! Luc Prefontaine has volunteered to maintain this library as clojur

Re: run clj file get user/counter-app error?

2011-09-13 Thread Sean Corfield
On Tue, Sep 13, 2011 at 10:42 PM, jayvandal wrote: > I am running a  swing tutorial clojure program file and when I run the > result is > ++ > user=> (load-file "c:/clojure-1.2.1/counter-app.clj") > #'user/counter-app > user=> > +

Re: Problem with insert-values (clojure.contrib.sql)

2011-09-13 Thread Sean Corfield
On Tue, Sep 13, 2011 at 10:43 PM, finbeu wrote: > But how do I use the connectionpool now from clojure.java.jdbc? Did you read that documentation? Does it not provide enough information? Let me know so I can make it better. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfi

Re: Clojure vs Scala - anecdote

2011-09-13 Thread Sean Corfield
On Tue, Sep 13, 2011 at 9:48 AM, Nathan Sorenson wrote: > I adore Clojure as well, but could this success not be partially due > to the "reimplementing for the second time" phenomenon? i.e. if you re- > wrote the entire thing in Scala again, perhaps you would see similar > gains in brevity etc? W

Re: [ANN] Clojure 1.3 RC0

2011-09-13 Thread Sean Corfield
On Tue, Sep 13, 2011 at 6:02 AM, Christopher Redinger wrote: > Clojure 1.3 RC0 is now available at http://clojure.org/downloads > Changes since Beta 3: > * Optimization should not demote BigInts (CLJ-836) > * Added Intrinsics Could someone speak to this change since it didn't have an attached JIR

Re: Problem with insert-values (clojure.contrib.sql)

2011-09-13 Thread Sean Corfield
On Tue, Sep 13, 2011 at 6:49 AM, finbeu wrote: > BTW: Does someone know how I can keep the connection always open? If I > understand it right, "with-connection" does a connect and login to the db > each time it gets called. Isn't this quite inefficient? Take a look at https://github.com/clojure/

Re: Misleading Exception due to function name containing ->

2011-09-12 Thread Sean Corfield
On Mon, Sep 12, 2011 at 8:16 AM, Stefan Kamphausen wrote: > Maybe the example becomes clearer with a little less foo and a little more > bar and baz: > > shell> lein repl > REPL started; server listening on localhost port 64913 > user=> (defn foo [arg] "foo") > #'user/foo > user=> (defn bar->baz [

<    10   11   12   13   14   15   16   17   18   19   >