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

2011-10-24 Thread Sean Corfield
On Mon, Oct 24, 2011 at 8:36 PM, jayvandal s...@ida.net 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

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 bsmith.o...@gmail.com wrote: On Sun, Oct 23, 2011 at 21:25, Meikel Brandmeyer m...@kotka.de 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

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 cabjh...@embarqmail.com 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

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 a...@malloys.org 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.

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 thinks.outs...@gmail.com 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

Re: Is Clojure Simple?

2011-10-22 Thread Sean Corfield
On Sat, Oct 22, 2011 at 10:35 AM, Tim Robinson tim.blacks...@gmail.com 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

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 nathan.m...@gmail.com 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=

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 nathan.m...@gmail.com 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

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 wilkerlu...@gmail.com 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,

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 jayunit...@gmail.com 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

Re: Pipe function

2011-10-15 Thread Sean Corfield
On Fri, Oct 14, 2011 at 5:50 PM, Alan Malloy a...@malloys.org 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,

Re: The Website / Wikispaces

2011-10-15 Thread Sean Corfield
On Thu, Oct 13, 2011 at 1:28 PM, Stuart Sierra the.stuart.sie...@gmail.com 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. --

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ć marko.ko...@gmail.com 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

Re: Pipe function

2011-10-15 Thread Sean Corfield
On Sat, Oct 15, 2011 at 12:59 AM, Alan Malloy a...@malloys.org 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

Re: Faster clojure.data.json

2011-10-15 Thread Sean Corfield
On Fri, Oct 14, 2011 at 11:21 AM, Stuart Sierra the.stuart.sie...@gmail.com 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

Re: Sum on a list of maps

2011-10-14 Thread Sean Corfield
On Fri, Oct 14, 2011 at 10:25 AM, der derealme.derea...@gmail.com 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 keys are strings

Re: ANN: clojure.java.jdbc 0.0.7

2011-10-13 Thread Sean Corfield
On Wed, Oct 12, 2011 at 1:42 AM, keeds akee...@gmail.com 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

Re: clojure.contrib.except's future?

2011-10-13 Thread Sean Corfield
On Thu, Oct 13, 2011 at 11:19 AM, ffailla ffai...@gmail.com 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 --

Re: tools.logging vs clojure.contrib.logging

2011-10-12 Thread Sean Corfield
On Wed, Oct 12, 2011 at 8:06 AM, jingguo yaojing...@gmail.com 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:

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

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

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
On Tue, Oct 11, 2011 at 8:47 AM, Sean Corfield seancorfi...@gmail.com 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

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!

Re: metadata on function objects

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

Re: metadata on function objects

2011-10-11 Thread Sean Corfield
On Tue, Oct 11, 2011 at 5:22 PM, Brian Marick mar...@exampler.com 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

Re: ANN: clojure.java.jdbc 0.0.7

2011-10-11 Thread Sean Corfield
On Tue, Oct 11, 2011 at 6:58 PM, jaime xiejianm...@gmail.com 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)

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 chamael...@gmail.com 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

Re: docs for 1.3

2011-10-04 Thread Sean Corfield
On Tue, Oct 4, 2011 at 5:22 AM, Fogus mefo...@gmail.com 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.

Re: How to flatten a nested sequence?

2011-10-04 Thread Sean Corfield
On Tue, Oct 4, 2011 at 2:25 PM, Shoeb Bhinderwala shoeb.bhinderw...@gmail.com 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

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 gepar...@gmail.com 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

Re: docs for 1.3

2011-10-03 Thread Sean Corfield
On Mon, Oct 3, 2011 at 2:05 PM, Sergey Didenko sergey.dide...@gmail.com 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

Re: suggestion for clojure development

2011-10-02 Thread Sean Corfield
On Sat, Oct 1, 2011 at 10:16 PM, Tal Liron tal.li...@gmail.com 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

Re: Equality comparison in 1.3

2011-10-02 Thread Sean Corfield
On Sat, Oct 1, 2011 at 9:52 PM, Daniel doubleagen...@gmail.com 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... --

Re: suggestion for clojure development

2011-10-02 Thread Sean Corfield
On Sat, Oct 1, 2011 at 11:24 PM, Tal Liron tal.li...@gmail.com 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

Re: strangeloop presentations

2011-10-01 Thread Sean Corfield
On Fri, Sep 30, 2011 at 6:17 PM, Alex Miller a...@puredanger.com 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

Re: suggestion for clojure development

2011-10-01 Thread Sean Corfield
On Sat, Oct 1, 2011 at 8:10 PM, Tal Liron tal.li...@gmail.com 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

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 jaderh...@gmail.com wrote: In the past they've been posted on infoq.com several

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 sunil.nandiha...@gmail.com 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

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 seancorfi...@gmail.com 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

Re: Shameless self promotion - JavaOne

2011-09-29 Thread Sean Corfield
less frequently 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 seancorfi...@gmail.com wrote: http://www.meetup.com/The-Bay-Area-Clojure-User-Group/ -- You received

Re: producing Blub code and vv.

2011-09-29 Thread Sean Corfield
On Thu, Sep 29, 2011 at 3:39 AM, Hank h...@123mail.org 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

Re: producing Blub code and vv.

2011-09-29 Thread Sean Corfield
On Thu, Sep 29, 2011 at 10:48 PM, Hank h...@123mail.org 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

Re: producing Blub code and vv.

2011-09-29 Thread Sean Corfield
On Thu, Sep 29, 2011 at 11:24 PM, Hank h...@123mail.org 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

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: [ANN] Clojure 1.3 Released

2011-09-28 Thread Sean Corfield
On Tue, Sep 27, 2011 at 9:21 PM, Sidharth Kshatriya sid.kshatr...@gmail.com 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

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

Re: help understanding how map works

2011-09-28 Thread Sean Corfield
On Wed, Sep 28, 2011 at 6:32 PM, Cluj alex.sant...@gmail.com 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

Re: [ANN] Clojure 1.3 Released

2011-09-27 Thread Sean Corfield
On Fri, Sep 23, 2011 at 2:44 PM, Christopher Redinger redin...@gmail.com 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

Re: [ANN] Clojure 1.3 Released

2011-09-27 Thread Sean Corfield
On Tue, Sep 27, 2011 at 12:22 PM, Bruce Durling b...@otfrom.com 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

Re: suggestion for clojure development

2011-09-27 Thread Sean Corfield
On Tue, Sep 27, 2011 at 11:57 AM, Arthur Edelstein arthuredelst...@gmail.com 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

Re: suggestion for clojure development

2011-09-27 Thread Sean Corfield
On Tue, Sep 27, 2011 at 4:28 PM, Brian Marick mar...@exampler.com 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

Re: suggestion for clojure development

2011-09-27 Thread Sean Corfield
On Tue, Sep 27, 2011 at 7:33 PM, Arthur Edelstein arthuredelst...@gmail.com 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

Re: suggestion for clojure development

2011-09-27 Thread Sean Corfield
On Wed, Sep 28, 2011 at 12:03 AM, Arthur Edelstein arthuredelst...@gmail.com 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

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 lprefonta...@softaddicts.ca 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

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 the.stuart.sie...@gmail.com 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

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 laurent.pe...@gmail.com 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

Re: advantage of dynamic typing

2011-09-19 Thread Sean Corfield
On Mon, Sep 19, 2011 at 4:19 PM, Dennis Haupt d.haup...@googlemail.com 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

Re: Clojure embedded in a Java Application

2011-09-18 Thread Sean Corfield
On Sun, Sep 18, 2011 at 3:40 AM, Meikel Brandmeyer m...@kotka.de 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 ended

Re: Clojure vs Scala - anecdote

2011-09-15 Thread Sean Corfield
On Wed, Sep 14, 2011 at 11:15 PM, cig clifford.goldb...@gmail.com 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

Re: autoboxing in 1.3 RC-0

2011-09-15 Thread Sean Corfield
On Thu, Sep 15, 2011 at 7:50 AM, David Nolen dnolen.li...@gmail.com 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]

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

2011-09-14 Thread Sean Corfield
On Tue, Sep 13, 2011 at 10:42 PM, jayvandal s...@ida.net 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: debugging

2011-09-14 Thread Sean Corfield
On Wed, Sep 14, 2011 at 12:05 AM, Sergey Didenko sergey.dide...@gmail.com 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

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 leonardoborges...@gmail.com 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

Re: [ANN] Clojure 1.3 RC0

2011-09-14 Thread Sean Corfield
On Wed, Sep 14, 2011 at 8:45 AM, Paul Stadig p...@stadig.name 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 --

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

2011-09-14 Thread Sean Corfield
On Wed, Sep 14, 2011 at 12:51 AM, finbeu info_pe...@t-online.de 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

Re: [ANN] Clojure 1.3 RC0

2011-09-14 Thread Sean Corfield
On Wed, Sep 14, 2011 at 9:43 AM, Aaron Bedra aaron.be...@gmail.com 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

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

2011-09-13 Thread Sean Corfield
On Tue, Sep 13, 2011 at 6:49 AM, finbeu info_pe...@t-online.de 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

Re: [ANN] Clojure 1.3 RC0

2011-09-13 Thread Sean Corfield
On Tue, Sep 13, 2011 at 6:02 AM, Christopher Redinger redin...@gmail.com 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

Re: Clojure vs Scala - anecdote

2011-09-13 Thread Sean Corfield
On Tue, Sep 13, 2011 at 9:48 AM, Nathan Sorenson n...@sfu.ca 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

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

2011-09-13 Thread Sean Corfield
On Tue, Sep 13, 2011 at 10:43 PM, finbeu info_pe...@t-online.de 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

Re: How to compose futures?

2011-09-11 Thread Sean Corfield
On Sun, Sep 11, 2011 at 1:29 AM, Laurent PETIT laurent.pe...@gmail.com wrote: now that I've stepped back a little bit and acknowledged my ignorance (while working on it : currently reading Java concurrency in practice :-) ) Kevin pulled me up on this too (in IRC) and pointed me at the Java

Re: Migration to 1.3 for mortals

2011-09-10 Thread Sean Corfield
On Sat, Sep 10, 2011 at 2:59 AM, Jan Rychter jrych...@gmail.com wrote: Thanks for the explanations. I'll summarize: clojure-contrib is being reorganized. There is no clear migration path for applications that use the monolithic 1.2 contrib. Not all of 1.2 contrib code made its way into new

Re: Migration to 1.3 for mortals

2011-09-10 Thread Sean Corfield
On Fri, Sep 9, 2011 at 11:04 AM, Sean Corfield seancorfi...@gmail.com wrote: On Fri, Sep 9, 2011 at 1:09 AM, Jan Rychter jrych...@gmail.com wrote: Take an example -- even in the relatively simple case of clojure.contrib.combinatorics: note that it is NOT listed on http://dev.clojure.org

Re: Migration to 1.3 for mortals

2011-09-10 Thread Sean Corfield
On Sat, Sep 10, 2011 at 9:46 AM, Jan Rychter jrych...@gmail.com wrote: If you use Clojure to build an application that you subsequently launch and maintain, it is pretty much a given that you use contrib. Lots of it, in fact. I think that depends on when you started building stuff with

Re: Migration to 1.3 for mortals

2011-09-10 Thread Sean Corfield
On Sat, Sep 10, 2011 at 2:52 PM, Luc Prefontaine lprefonta...@softaddicts.ca wrote: We were in production in Jan 2009 before Clojure 1.0 came out. We face the issue of un-rooting ourselves from the old contrib stuff. After analysis, 97% of the stuff we need from the old contrib is now

Re: Migration to 1.3 for mortals

2011-09-09 Thread Sean Corfield
On Fri, Sep 9, 2011 at 1:09 AM, Jan Rychter jrych...@gmail.com wrote: Take an example -- even in the relatively simple case of clojure.contrib.combinatorics: note that it is NOT listed on http://dev.clojure.org/display/doc/Clojure+Contrib, and if I follow the github repos I'll end up in

Re: Migration to 1.3 for mortals

2011-09-08 Thread Sean Corfield
On Wed, Sep 7, 2011 at 5:44 AM, Jan Rychter jrych...@gmail.com wrote: How do we mere mortals (that develop and maintain large apps) migrate to 1.3? It's a good question - and it's being discussed right now on the clojure-dev list because the biggest obstacle to folks moving to Clojure 1.3 is

Re: Clojure vs Scala - anecdote

2011-09-07 Thread Sean Corfield
On Wed, Sep 7, 2011 at 10:17 AM, Dennis Haupt d.haup...@googlemail.com wrote: so the scala actors add much more overhead than the clojure equivalent? The main problem is that the current implementation of actors in Scala suffers from known memory leaks and performance problems - problems that

Re: Clojure 1.3 Beta 3

2011-09-04 Thread Sean Corfield
On Sun, Sep 4, 2011 at 7:15 AM, cri chuck.irvine...@gmail.com wrote: Is there a list of everything new in 1.3? Thanks Looks like four commits since beta2: https://github.com/clojure/clojure/commits/master load resources when baseLoader() is null, refs #673 CLJ-815 de-alpha docstring for juxt

Re: No such var while calling a (:require) 'd function

2011-09-04 Thread Sean Corfield
On Sun, Sep 4, 2011 at 11:37 AM, Timothy Washington twash...@gmail.com wrote: (ns bkell   (:import java.io.FileReader)   (:require commands.add)   (:require commands.update)   (:require commands.get)   (:require commands.remove)   (:require commands.authenticate)   (:require domain)   

Re: coming from statically typed oo languages - how do deal with complex objects graphs in clojure?

2011-09-04 Thread Sean Corfield
On Sun, Sep 4, 2011 at 11:40 AM, Dennis Haupt d.haup...@googlemail.com wrote: - Nested defns are not good. why? imo, nested function/method definitions are a tool to fine-tune accessibility. just like public/private, but much more powerful. why Right, but defn binds function names at the

Re: An open call to the community: Let's prepare for 1.3

2011-09-04 Thread Sean Corfield
On Sun, Sep 4, 2011 at 12:59 AM, Alan Malloy a...@malloys.org wrote: Well, ^something still is equivalent to ^{:tag something}, which as I understand it is useful for compiler typehinting. It's probably also worth noting that metadata combines in 1.3.0: (defn ^:foo ^:bar fubar [] ) In 1.2.1,

Re: No such var while calling a (:require) 'd function

2011-09-04 Thread Sean Corfield
On Sun, Sep 4, 2011 at 1:20 PM, Timothy Washington twash...@gmail.com wrote: I was hacking away at this at the meantime. I defined 'remove' functions in 2 other places - bkell , commands. I ended up renaming commands/remove to commands/removek, and now all invocations are working. But I'm

Re: No such var while calling a (:require) 'd function

2011-09-04 Thread Sean Corfield
On Sun, Sep 4, 2011 at 2:06 PM, Timothy Washington twash...@gmail.com wrote: That's interesting. When I try that require A), I get the error in B). Seems that it's trying to find the commands.clj file. Yes. If you look at how various projects work with multiple files in a single namespace, I

Re: new Getting Started page

2011-09-03 Thread Sean Corfield
On Fri, Sep 2, 2011 at 11:11 PM, Kevin Downey redc...@gmail.com wrote: I spent a lot of time on a windows netbook writing solutions to euler project problems notepad++ and just pasting the functions into a repl running in a console. It worked great. Yup, and that's just fine _for you_ but you

Re: new Getting Started page

2011-09-03 Thread Sean Corfield
On Sat, Sep 3, 2011 at 11:58 AM, Colin Yates colin.ya...@gmail.com wrote: Getting started should be the smallest set of steps possible; the REPL. http://try-clojure.org is probably the very simplest step. Nothing to download or install and it has a built in tutorial. And that is the very first

Re: An open call to the community: Let's prepare for 1.3

2011-09-03 Thread Sean Corfield
On Sat, Sep 3, 2011 at 3:43 PM, Lee Hinman matthew.hin...@gmail.com wrote: I recommend the lein-multi plugin for testing against multiple versions of Clojure: https://github.com/maravillas/lein-multi Makes it easy to make sure you continue to support both 1.2 and 1.3 for a while. Good idea.

Re: An open call to the community: Let's prepare for 1.3

2011-09-03 Thread Sean Corfield
On Sat, Sep 3, 2011 at 4:40 PM, Luc Prefontaine lprefonta...@softaddicts.ca wrote: Being curious I checked references to contrib in our code base. Anyone knows what will happen to clojure.contrib.def and clojure.contrib.trace ? According to

Re: An open call to the community: Let's prepare for 1.3

2011-09-03 Thread Sean Corfield
On Sat, Sep 3, 2011 at 5:37 PM, Luc Prefontaine lprefonta...@softaddicts.ca wrote: So the only thing left on my list is c.c.trace. Any ideas of the future plans ? Stuart Sierra may chip in since he seems to have been the author of that? It does look useful. -- Sean A Corfield -- (904)

Re: new Getting Started page

2011-09-02 Thread Sean Corfield
I think this is a much better on ramp for folks new to Clojure and the bullet list of the current Getting Started page really should be the next page not the first one. On Fri, Sep 2, 2011 at 3:13 PM, nchurch nchubr...@gmail.com wrote: There was some discussion about the Getting Started page

Re: Eval in future ... Bug or feature?

2011-09-02 Thread Sean Corfield
Looks like it doesn't work in 1.2.1 but does work in 1.3.0: (! 516)- lein repl REPL started; server listening on localhost port 61980 user= (clojure-version) 1.2.1 user= (defn my-inc [x] (+ x 1)) #'user/my-inc user= (eval '(my-inc 1)) 2 user= (future (eval '(my-inc 1))) java.lang.Exception:

Re: new Getting Started page

2011-09-02 Thread Sean Corfield
On Fri, Sep 2, 2011 at 5:27 PM, jonathan.watmo...@gmail.com jonathan.watmo...@gmail.com wrote: 1. Download clojure and unzip 2. Move to the folder and type 'java -cp clojure.jar clojure.main' in a terminal Because this is exactly what's wrong with the current getting started process. It's not

Re: Top secret clojure project names

2011-09-01 Thread Sean Corfield
On Thu, Sep 1, 2011 at 2:31 PM, JAX jayunit...@gmail.com wrote: Hi guys: I assume some of you have secret Clojure projects at work, that your bosses don't know about. LOL! That would be hard for me - every commit and every ticket update / comment is emailed to the whole project team which

Re: a question about using the delay macro

2011-08-23 Thread Sean Corfield
I was trying to construct a simple example of what I actually have in my apps that use pooling on top of java.jdbc. My actual code *does* work to create a singleton but you're right, I've contracted my code too far in trying to create a simple example of it... I'll have another attempt! Sean On

Re: clojure.java.jdbc: mapping BigDecimal to double

2011-08-23 Thread Sean Corfield
No, you'd have to do it yourself. Since not all BigDecimal values would fit correctly in double, it would be dangerous for resultset-seq to do it. I expect there are all sorts of JDBC data types that don't quite match Clojure types but I don't think automatically mapping them would be a good

Re: clojure.java.jdbc: mapping BigDecimal to double

2011-08-23 Thread Sean Corfield
On Tue, Aug 23, 2011 at 6:54 PM, HiHeelHottie hiheelhot...@gmail.com wrote: Completely agree with you that it shouldn't automatically map out of the box. As a newbie to clojure and jdbc, do you have any advice on how I can get into resultset-seq* to do the mapping? I think it would be better

Re: try catch and finally

2011-08-16 Thread Sean Corfield
On Tue, Aug 16, 2011 at 12:36 PM, rakesh rakesh.pulip...@gmail.com wrote: In java the finally block is executed after the catch block. But in clojure, I observed that the finally block is executed before catch block. Is this behavior right. Are you sure? user= (try (println in try) (throw

Re: Small bug in clojure.core/bases?

2011-08-14 Thread Sean Corfield
On Sun, Aug 14, 2011 at 9:04 PM, Stephen Compall stephen.comp...@gmail.com wrote: I personally favor seqable? as the test for plural return values. sequential? almost qualifies, but excludes sets.  seq? fails on account of rejecting even vectors, but you may feel differently. And just to do my

Re: is my understanding correct for function identity?

2011-08-13 Thread Sean Corfield
On Sat, Aug 13, 2011 at 9:45 AM, jaime xiejianm...@gmail.com wrote: The only reason that I can imagine is this: because we often use higher-order functions, these higher-order functions will accept functions as its parameters, in such a situation, when we want to use a higher-order function

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