Re: something stupid I'm trying to do

2010-05-01 Thread Sean Corfield
On Fri, Apr 30, 2010 at 2:30 PM, Michael Wood wrote: > On 30 April 2010 18:25, Mark J. Reed wrote: > [...] >> (defn pairup >>     ([a b] (list [a b])) >>     ([a b & rest]   (cons [a b] (apply pairup rest Why not: (defn pairup ( [] nil ) ( [ a b & rest ] ( cons [ a b ] ( apply pairu

Re: Any Clojure job out there?

2010-05-03 Thread Sean Corfield
On Mon, May 3, 2010 at 10:21 AM, Olivier Lefevre wrote: > I find it interesting that they use both Clojure and Scala besides Java: > I would have thought that these two represent opposite takes on post- or > beyond-Java alternatives and that they'd use either one or the other. I'm using Scala ins

Re: seancorfield /clj-soap

2013-05-18 Thread Sean Corfield
Since my name was invoked via mention of this repo, I figured it was a good chance to post from the readme: "Note however that I am not actively maintaining this library and would welcome someone taking it over. I updated Tetsuya's code to use a more modern Clojure environment purely to test it fo

Re: seancorfield /clj-soap

2013-05-20 Thread Sean Corfield
complex. > > Marc > > I really wish the service I need to integrate with was REST based… > > On 19/05/2013, at 12:43 AM, Sean Corfield wrote: > >> Since my name was invoked via mention of this repo, I figured it was a >> good chance to post from the readme: >>

Re: ClassNotfound Exception while loading JAR files in Clojure 1.2

2013-05-22 Thread Sean Corfield
You'll need to provide more details about exactly which Clojure JARs you use and the stack trace for the exception (at least telling us which class is not found and enough of the stack trace for us to see where the reference is coming from). My suspicion is you're using the Clojure 1.2 contrib lib

Re: How to: reduce boolean operations?

2013-05-22 Thread Sean Corfield
On Wed, May 22, 2013 at 9:32 AM, Peter Mancini wrote: > (defn all-true? > [coll] > (every? (fn [x] (= x true)) coll)) (defn all-true? [coll] (every? true? coll)) -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com

Re: realizing a lazy line-seq inside with-open

2013-05-27 Thread Sean Corfield
Just use doall: (doall [msg sig-strs]) No need for the let / result / promise / deliver. On Mon, May 27, 2013 at 5:32 PM, Elango Cheran wrote: > Hi everyone, > I had a function that reads the contents of a file (in this case, it > represents a license) and then verifies the contents. > > As I s

Re: realizing a lazy line-seq inside with-open

2013-05-27 Thread Sean Corfield
On Mon, May 27, 2013 at 9:50 PM, Kevin Downey wrote: > doall doesn't recurse, so you are not realizing the lazy-seq, you want > something like [msg (doall sig-strs)] Thank you Kevin! When Elango said my suggestion didn't work, I was puzzled. Now it makes sense! -- Sean A Corfield -- (904) 302-SEA

Re: "I don't feel the absence of a debugger, because I've learnt enough that I don't ever need a debugger."

2013-05-28 Thread Sean Corfield
On Tue, May 28, 2013 at 1:35 PM, Softaddicts wrote: > I came to the same conclusion as Stuart after 30+ years of coding in various > languages/assemblers and architectures. Interesting thread and I find myself in agreement with Luc here. I've been programming commercially for about 30 years and I

Re: Use of io!

2013-05-30 Thread Sean Corfield
On Thu, May 30, 2013 at 1:10 AM, Alex Baranosky wrote: > Do any of you ever use io! ? I've never used it, but could see using it if > I had a transaction-heavy application. > > On Wed, May 29, 2013 at 11:43 PM, Michael Klishin > wrote: >> The point is to mark side-effecting code so that you can'

Re: [ANN] core.rrb-vector -- RRB-Tree-based confluently persistent vectors

2013-06-01 Thread Sean Corfield
Guidelines for contrib READMEs can be found here: http://dev.clojure.org/display/design/Contrib+Library+READMEs On Sat, Jun 1, 2013 at 10:58 PM, Michael Klishin wrote: > > 2013/6/2 Michał Marczyk >> >> For anybody interested in even more background, here are two additional >> links: >> >> 1. The

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-09 Thread Sean Corfield
On Sun, Jun 9, 2013 at 11:07 AM, Steven Degutis wrote: > We realized we can't change clojure.test because (1) this would break > backwards compatibility, and (2) clojure.test is really slow-moving since it > lives inside Clojure. Are there any JIRA tickets open against clojure.test? That would se

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-09 Thread Sean Corfield
FWIW, about the only thing about clojure.test that I miss occasionally when using Expectations is 'each' fixtures for a subset of tests but the work involved in wrapping an expression in a try/finally with the resource setup and tear down I need is usually so minimal that's it's not even worth writ

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-09 Thread Sean Corfield
On Sun, Jun 9, 2013 at 5:50 PM, Steven Degutis wrote: > Changing clojure.test seems like the wrong way to go. Being attached to a CA > makes it hard to contribute to. It's a one-off action. Sign it, send it in. Then you can contribute to Clojure or any of its contrib libraries from then on. Not e

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-09 Thread Sean Corfield
No. Read http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go On Sun, Jun 9, 2013 at 6:41 PM, Steven Degutis wrote: > Is this still current? http://clojure.github.io/clojure-contrib/ > > On Sunday, June 9, 2013 8:19:15 PM UTC-5, Sean Corfield wrote: >> >> On

Re: Best IDE

2013-06-10 Thread Sean Corfield
We have an admin option to start (& stop) a repl server inside our application so we can nrepl from Emacs into any live running instance and evaluate code in that live context - great for debugging "only happens on production" issues as well as making interactive development and debugging locally m

Re: Clojure in production

2013-06-11 Thread Sean Corfield
The latest data from World Singles llc (which is listed on that Success Stories page): Clojure source 76 files 13178 total loc, 1064 fns, 554 of which are private, 152 vars, 2 macros, 17 atoms Clojure tests 37 files 3016 total loc Clojure WebDriver tests 11 files 371 total loc We're on Clojure 1.

Re: expectations documentation

2013-06-11 Thread Sean Corfield
This is very helpful Jay, thank you! We switched from clojure.test to Expectations after Clojure/West 2012 and we've been very happy with the framework. Centralized documentation will certainly make life easier for my team! Sean On Tue, Jun 11, 2013 at 11:39 AM, Jay Fields wrote: > expectations

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-11 Thread Sean Corfield
That was what I was suggesting the other day... I see more value in providing a standardizing test result format and better reporting tools / integration with IDEs etc than in YATF (Yet Another testing Framework). On Tue, Jun 11, 2013 at 1:18 PM, Brandon Bloom wrote: >> Maybe it makes sense to se

Re: Newbie dependency loading issue

2013-06-17 Thread Sean Corfield
What did you put in your project.clj file? On Mon, Jun 17, 2013 at 6:30 PM, P Martin wrote: > Hi, > > I want to get the clojure.math.numeric-tower namespace into my code using: > > > (require '[clojure.math.numeric-tower :as math]) > > > I also follow the directions on the github for the library

Re: Multiple args: opts map vs inline arguments

2013-06-18 Thread Sean Corfield
What I tend to do when I run into this situation is to split my function in two and provide: 1. an API function that accepts the key/value pairs as named arguments - per the library coding guidelines 2. an implementation function that accepts a map of args as its last argument (and destructures i

Re: Clojure in production

2013-06-18 Thread Sean Corfield
It's the dog's b*ll*cks! :) (since we're doing cultural slang, let's get some Britishness in there!) Sean On Tue, Jun 18, 2013 at 9:04 PM, Russell Whitaker wrote: > But... is it also the bee's knees? > > Russell Whitaker > Sent from my iPhone > > On Jun 13, 2013, at 5:38 PM, Travis Vachon wrot

Re: database wrapper lib

2013-06-21 Thread Sean Corfield
On Fri, Jun 21, 2013 at 8:56 AM, Michael Klishin wrote: > Relational databases: https://github.com/clojure/java.jdbc (this one is not > very extensively documented but is also small compared to Korma) FYI, Korma is built on top of java.jdbc and if you want a different DSL on top of java.jdbc, I h

Re: putting 2-element colls into a map: works with vectors, but not with lists?

2013-06-24 Thread Sean Corfield
On Mon, Jun 24, 2013 at 8:49 AM, John Gabriele wrote: > Why does `into` fail when the 2-element collections are lists and not > vectors? : Because the implementation special cases vectors :) It's the one place where a two element vector is treated like a Map$Entry so that you are not forced to s

Re: core.async

2013-06-30 Thread Sean Corfield
On Sun, Jun 30, 2013 at 4:42 PM, David Pollak wrote: > Looking forward to it > being published (even as SNAPSHOT) in a Maven repo. It's accessible like this: (defproject async "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME"; :license {:name "Eclipse

Re: Offline Clojure docs

2013-06-30 Thread Sean Corfield
There are a couple of iPhone apps with Clojure docs: https://itunes.apple.com/us/app/clojuredoc/id401479442?mt=8 <-- free, hasn't been updated for ages, but this is what I use anyway https://itunes.apple.com/us/app/clojure-bee-api-documentation/id524862532?mt=8 <-- $0.99, hasn't been updated in a

Re: [ANN] clojure-sql 0.1.0: relational algebra in clojure

2013-07-05 Thread Sean Corfield
And there's HoneySQL: https://github.com/jkk/honeysql (that's the one java.jdbc will recommend going forward since I worked with the author, Justin Kramer, on compatibility and direction for java.jdbc and HoneySQL at Clojure/conj last year) On Fri, Jul 5, 2013 at 3:59 AM, r0man wrote: > Hi Carl

Re: [ANN] clojure-sql 0.1.0: relational algebra in clojure

2013-07-05 Thread Sean Corfield
On Fri, Jul 5, 2013 at 8:53 PM, Carlo Zancanaro wrote: > Is there a > reason you don't use the database's table/column name quoting? It means that > keywords like :first-name cannot be used as table names without a fair bit > of trouble. The DSL in java.jdbc supports :entities and :identifiers to

[ANN] java.jdbc documentation has moved!

2013-07-09 Thread Sean Corfield
Extended documentation on java.jdbc is now available on clojure-doc.org: http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html This opens up contributions to the community at large so I hope to see plenty of activity as folks send PRs for their favorite hints, tips, and tricks with this l

Re: how to create in-memory hsqldb database via java.jdbc

2013-07-09 Thread Sean Corfield
Feel free to submit PRs to improve the documentation at: http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html On Mon, Jul 8, 2013 at 9:22 AM, Colin Yates wrote: > Found it - typically - messed around for hours, then post, the find it. > > The answer is to use something like 'mem:XYZ' fo

Re: java.jdbc - (sql/where ...) with multiple values (i.e. 'x in (1,2,3')

2013-07-09 Thread Sean Corfield
clojure.java.jdbc.sql is a deliberately minimal DSL - Justin Kramer's HoneySQL is what I recommend for more expressive SQL construction (that's the "official" recommendation based on discussions Justin and I had about java.jdbc and HoneySQL at Clojure/conj 2012). Sean On Mon, Jul 8, 2013 at 5:47

Multiple REPLs in Emacs? (was: test run startup time

2013-07-11 Thread Sean Corfield
On Wed, Jul 10, 2013 at 10:53 AM, Jay Fields wrote: > I work in emacs with 2 repls running - 1 for running my app and 1 for > running my tests. What is the magic to get this working and how does Emacs / nrepl.el know which REPL to send commands to? I've often wanted multiple active REPLs (usuall

Re: ClassCastException in APersistentVector.doEquiv with custom implementation of IPersistentVector

2013-07-11 Thread Sean Corfield
On Wed, Jul 10, 2013 at 11:00 AM, Vincent wrote: > I guess I can proxy APersistentVector, but the Clojure docs [1] advise to > use reify in favour to proxy whenever possible. My goal is to have my byte > stream behave like a standard Clojure vector. Given the definition of IPersistentVector, I wo

Re: Multiple REPLs in Emacs? (was: test run startup time

2013-07-11 Thread Sean Corfield
1, 2013 at 5:53 PM, Sean Corfield > wrote: >> >> On Wed, Jul 10, 2013 at 10:53 AM, Jay Fields wrote: >> > I work in emacs with 2 repls running - 1 for running my app and 1 for >> > running my tests. >> >> What is the magic to get this working and how doe

Re: [ANN]: Introducing lein-try

2013-07-13 Thread Sean Corfield
This seems to work beautifully outside a project - and it's very useful! I will no longer need to create a million scratch projects to try stuff out - thank you! However, inside a project, I can't get it to work. (! 501)-> cd clojure (! 502)-> lein try hiccup 1.0.2 nREPL server started on port 59

Re: [ANN]: Introducing lein-try

2013-07-13 Thread Sean Corfield
It doesn't work when I spell it correctly either (and I had done several tests - but of course the results of misspelling it look the same as it not working - and it's indicative of my day that I pasted the result of a bad test! :) C:\Users\Sean\clojure>lein new five ... C:\Users\Sean\clojure>cd f

Re: [ANN]: Introducing lein-try

2013-07-14 Thread Sean Corfield
lem. > > On Jul 13, 2013 11:30 PM, "Sean Corfield" wrote: >> >> It doesn't work when I spell it correctly either (and I had done >> several tests - but of course the results of misspelling it look the >> same as it not working - and it's i

Re: An example app using core.async and tools.namespace

2013-07-15 Thread Sean Corfield
This is a great example of both Stuart Sierra's suggested workflow (from his talk at Clojure/West) and of using core.async to simplify concurrent, collaborating processes! Thanks for sharing! Sean On Mon, Jul 15, 2013 at 11:10 AM, mybuddymichael wrote: > I recently rewrote my team's IRC bot to u

Re: Request for clojure help

2013-07-16 Thread Sean Corfield
On Tue, Jul 16, 2013 at 2:16 PM, Keith Maynard wrote: > (defn perms > ( [] [[]]) This is not pattern matching in Clojure. It defines an alternative arity version of the function so that (perms) would return [[]]. > ([xs] > > (for [x xs p (perms (removeFirst x xs))] (cons x p)) ) > > ) Yo

Re: Request for clojure help

2013-07-16 Thread Sean Corfield
ut the various idioms in all these amazing > languages. Thanks for clearing up my attempt at a multimethod :) > > Regards, > > Keith > > On Tuesday, July 16, 2013 6:03:14 PM UTC-4, Sean Corfield wrote: >> >> On Tue, Jul 16, 2013 at 2:16 PM, Keith Maynard wrote: >&

Socket.IO and Clojure?

2013-07-16 Thread Sean Corfield
At work we're starting down the path of building a new piece of functionality based on WebSockets and the external team we're working with is a Node.js shop so their go to solution is Socket.IO and they've produced a very nice front end in CoffeeScript and a prototype back end on Node.js. I'd real

Re: Socket.IO and Clojure?

2013-07-17 Thread Sean Corfield
-poll for now. So we will start there and > eventually get to web sockets. We are considering http://http-kit.org/ for > that. For communication between message generators and open client sockets > we are exploring some pub sub solution. > > Hope this helps. > > Thanks > Anand

Re: --> macro proposal

2013-07-17 Thread Sean Corfield
See this discussion: https://groups.google.com/forum/#!topic/clojure/67JQ7xSUOM4 (kinda hard to Google for functions with -> in their name so it took me a bit of digging!) Sean On Wed, Jul 17, 2013 at 10:15 AM, Steven Degutis wrote: > In that case, shouldn't it be named let-> instead of as->? >

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Sean Corfield
We only have :use in a couple of "legacy" tests and two scratch projects. We've switched from :use to :require .. :refer :all for situations where :use used to make sense (primarily in a test ns where we want to just refer in all of the ns being tested). We have a handful of places where we :refer

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Sean Corfield
On Tue, Jul 23, 2013 at 12:57 PM, Lee Spector wrote: > I'm sure I'm coming from a minority perspective on this, but for the kind of > work I do it's often more important to be able to quickly sketch out and test > ideas, without any ceremony about which functions come from where, than it is > t

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Sean Corfield
On Tue, Jul 23, 2013 at 1:53 PM, Ben Wolfson wrote: > On Tue, Jul 23, 2013 at 1:50 PM, Stefan Kamphausen > wrote: >> It complects require and refer ;-) > How so? Because use = require + refer (essentially). -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Si

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Sean Corfield
On Tue, Jul 23, 2013 at 2:13 PM, Ben Wolfson wrote: > If that's all that's required for one thing to complect two others, > clojure's rife with the stuff. if-let complects if and let. Destructuring > assignment complects assignment and getting values from a data structure (as > the macroexpansion

Re: clojure.java.jdbc - jdbc metadata support?

2013-07-24 Thread Sean Corfield
That's great and would be a worthwhile addition but don't forget to get your CA signed and sent in, otherwise your contributions cannot be accepted. See http://clojure.org/contributing for more details. Sean On Wed, Jul 24, 2013 at 4:03 PM, Mark wrote: > I'm pretty interested in getting at least

Re: clojure.java.jdbc - jdbc metadata support?

2013-07-24 Thread Sean Corfield
? I'm still a Clojure noob so I'm not sure if the approach is correct. All > feedback welcome. > > > > > On Wednesday, July 24, 2013 4:21:56 PM UTC-7, Sean Corfield wrote: >> >> That's great and would be a worthwhile addition but don't forget to

Re: clojure.java.jdbc - jdbc metadata support?

2013-07-24 Thread Sean Corfield
e: > > Use reg ex as you suggest > Eliminated reflection warnings > Learned me a zipmap for great success > > > On Wednesday, July 24, 2013 7:09:27 PM UTC-7, Sean Corfield wrote: >> >> I'll reply off-list. There's a lot of stuff in that code to digest. &g

Idiomatic use of records?

2013-07-25 Thread Sean Corfield
I tend to use plain ol' maps for data structures but was showing someone defrecord the other day and had some questions about idiomatic usage: Given: (defrecord Point [x y]) Which constructor form is considered more idiomatic: (Point. 10 10) or (->Point 10 10) Which accessor form is considered

Re: Idiomatic use of records?

2013-07-25 Thread Sean Corfield
class even if you've referred > the whole ns. Particularly confusing when you have packages with dash / > underscores in the package name. > > > [1] > http://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/ > > Neale Swinnerton > {t

Re: is intellij idea a good ide for clojure development?

2013-07-25 Thread Sean Corfield
On Thu, Jul 25, 2013 at 12:05 PM, Greg wrote: > 1. On IntelliJ > 2. On Emacs and "Emacs Live" > 3. On Light Table > 4. On Sublime Text (ST) > 5. Conclusion I've tried IntelliJ several times and just can't on with the way it operates. Clearly a very personal thing. I used to use Eclipse a lot - a

Re: core.async: async java.jdbc

2013-07-31 Thread Sean Corfield
On Wed, Jul 31, 2013 at 10:29 AM, Alice wrote: > (go > (jdbc/db-transaction [t-con db-spec] > (http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ "Perfection is the enemy of the good." -- Gustave Flaubert, French realist novelist (1821-1880) -- -- You received this mess

Re: core.async: async java.jdbc

2013-07-31 Thread Sean Corfield
On Wed, Jul 31, 2013 at 10:58 AM, Alice wrote: > It doesn't produce a compile time error but I think it's not the correct > code because the transaction can be committed while insert-async! is still > executing. Right. I was just showing how to avoid the compile error (because you need http://cor

Re: how to get use clojure.contrib.import-static

2013-07-31 Thread Sean Corfield
Sounds like you're looking at a very old example - monolithic clojure.contrib was deprecated when Clojure 1.3 came out. Some modules had active maintainers and migrated to new modular contrib libraries. Looking at: http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go I don't even

Re: core.async: throwing an exception into the channel

2013-08-01 Thread Sean Corfield
My first thought was: Since channels can have arbitrary values, how would you distinguish your magical "thrown" exception value from an exception value put into a channel for normal delivery? And no matter how you annotate that, it'll still just be a regular value. So the only way you could have t

Re: [ANN] Immutant 1.0.0 released

2013-08-01 Thread Sean Corfield
Excellent! I look forward to trying this! Any plans for a Clojure / Immutant cartridge for OpenShift? Sean On Wed, Jul 31, 2013 at 1:49 PM, Jim Crossley wrote: > Today we finally released Immutant 1.0.0! > > Read about it here: http://bit.ly/imm100 > > For those unfamiliar, Immutant is an appli

Re: [ANN] Immutant 1.0.0 released

2013-08-01 Thread Sean Corfield
I need to push) if you want to play with it > now. > > I'll blog about it soon. > > Jim > > > On Thu, Aug 1, 2013 at 12:32 PM, Sean Corfield > wrote: >> >> Excellent! I look forward to trying this! >> >> Any plans for a Clojure / Immutant cartr

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Sean Corfield
On Tue, Aug 6, 2013 at 7:51 AM, Greg wrote: > (ns one.fresh-server > (:refer-clojure :exclude [ancestors printf]) > (:use core.matrix > [ring.adapter.jetty :only (run-jetty)] Except most code I've seen uses (nested) vectors not lists. > [ring.middleware.file :only (wrap-file)

Re: IDE feature

2013-08-08 Thread Sean Corfield
On Thu, Aug 8, 2013 at 5:00 PM, Mark Engelberg wrote: > Getting back to the point of the original post, one of the nice features of > DrRacket is that when you type `]`, it automatically puts either ']' or ')' Having used DrRacket quite a bit lately, I do not find its handling of parens to be par

Re: IDE feature

2013-08-08 Thread Sean Corfield
On Thu, Aug 8, 2013 at 7:03 PM, Stanislav Sedov wrote: > One should definitely try it to see if it works for him, but saying it is a > panacea > for balancing parens/braces is a bit for stretch as other tools solve this > problem > as well. It's important to draw the distinction between "parent

Re: [ANN] Leiningen 2.3.0 released

2013-08-08 Thread Sean Corfield
It failed for me on Mac OS X 10.8.4 - this has also been a problem on Windows for me (which doesn't have curl / wget anyway). Can we please get the Leiningen JAR posted somewhere that is not prone to this sort of SSL problem? (! 536)-> lein upgrade The script at /Developer/workspace/worldsingles/b

Re: [ANN] Leiningen 2.3.0 released

2013-08-08 Thread Sean Corfield
I'm still getting the 403 forbidden error. Mac and Windows. On Thu, Aug 8, 2013 at 10:06 PM, Phil Hagelberg wrote: > On Thursday, August 8, 2013 8:52:47 PM UTC-7, Frank Hale wrote: >> Looks like I was way too fast. Upgrading just worked for me. Thank you! > > > I got the ACL wrong on the initial

Re: IDE feature

2013-08-09 Thread Sean Corfield
On Fri, Aug 9, 2013 at 6:58 AM, Laurent PETIT wrote: > What does it do? (first time I encounter it) DrRacket? It's the "standard" IDE for the Racket language (and all of its teaching subsets etc). -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Sean Corfield
On Fri, Aug 9, 2013 at 12:14 AM, Phillip Lord wrote: > Unfortunately, after upgrading the bash script, so it leaves a broken install. I keep my lein script under Git so it was easy to revert, but we're still on 2.1.3 because I ran into a number of problems with 2.2.0 (that I no longer remember bu

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Sean Corfield
Gmail search is defeating my efforts to locate what my problems with 2.2.0 were so I'll just wait until I can download 2.3.0 and re-run all our tests anyway. Sigh. On Fri, Aug 9, 2013 at 8:12 AM, Sean Corfield wrote: > On Fri, Aug 9, 2013 at 12:14 AM, Phillip Lord > wrote: >&

Re: IDE feature

2013-08-09 Thread Sean Corfield
7;ll bet Laurent means paredit-convolute-sexpr :-) > > Ambrose > > > On Fri, Aug 9, 2013 at 11:09 PM, Sean Corfield > wrote: >> >> On Fri, Aug 9, 2013 at 6:58 AM, Laurent PETIT >> wrote: >> > What does it do? (first time I encounter it) >> >&g

Re: IDE feature

2013-08-09 Thread Sean Corfield
forward barf C-} after moving the cursor down two lines - convolute leaves it in front of (if ...). Sean On Fri, Aug 9, 2013 at 8:49 AM, Laurent PETIT wrote: > > > Le vendredi 9 août 2013, Sean Corfield a écrit : >> >> Ah, yes... it turns this ( | represents the cursor ): >&g

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Sean Corfield
Yup, this killed my whole team for half a day today since I'd pushed the 2.3.0 script to our repo after the upgrade worked for me, and then hit the road for So. Cal. and everyone else then had a broken build for the rest of the day because the upgrade process broke due to this 403 forbidden issue a

Re: [ANN] Leiningen 2.3.0 released

2013-08-12 Thread Sean Corfield
On Sat, Aug 10, 2013 at 8:26 AM, Phil Hagelberg wrote: > None of these problems have had anything to do with SSL. On Windows it definitely has been a problem in the past. I'm pretty sure some users have run into problems with the S3 Amazon SSL certificate in the past on non-Windows platforms too,

Re: Leiningen 2.3.0 and uberjar

2013-08-12 Thread Sean Corfield
Or just: lein do clean, compile, uberjar On Sun, Aug 11, 2013 at 11:07 AM, Christian Sperandio wrote: > The workaround works fine, thanks for your help :) > > > I give below the workaround, thus everybody can get it: > > $ lein clean && lein compile && lein uberjar > > -- > -- > You received thi

Re: [ANN] Leiningen 2.3.0 released

2013-08-12 Thread Sean Corfield
On Mon, Aug 12, 2013 at 9:39 AM, Phil Hagelberg wrote: > I recall issues around the certificate GitHub used, but I'm not aware of any > troubles that have been reported with the Amazon certificates. We switched > to Amazon when GitHub turned off its upload functionality at the end of > 2012, so ev

Re: [ANN] Leiningen 2.3.1 released

2013-08-13 Thread Sean Corfield
Thank you! I've upgraded our team to 2.3.1, as well as our QA system. So far, no problems. Sean On Tue, Aug 13, 2013 at 10:37 AM, Phil Hagelberg wrote: > > Hello folks. > > With some help from Nelson Morris I've pushed out the 2.3.1 release of > Leiningen. This fixes the self-install issues as

Re: calling java static member using string?

2013-08-13 Thread Sean Corfield
Perhaps clj-time might help you? https://github.com/clj-time/clj-time (ns time.core (:require [clj-time.core :as time] [clj-time.local :as local] [clj-time.predicates :as p])) (p/monday? (time/now)) ;; false (p/tuesday? (time/now)) ;; false (p/wednesday? (time/now)) ;;

Re: clojure.java.jdbc, idiomatic way to use a connection

2013-08-14 Thread Sean Corfield
The `db-spec` can have a `:connection` member and all operations will use that. You are responsible for closing it when you're done. Something like (untested, off the top of my head): (with-open [conn (get-connection db-spec)] (let [db (assoc db-spec :connection conn)] ... (query db ...)

Generating a "Java bean" via Clojure?

2013-08-16 Thread Sean Corfield
I was working with a Java library recently and needed to create a "Java bean" to pass into it. It can be done via `gen-class` but it seems kind of verbose having to explicitly write out all of the getters and setters, and it seems you could also do it via `deftype` but that's also rather painful (I

Re: What's your preference, partial or closures?

2013-08-16 Thread Sean Corfield
I went down the partial path for a long time but have moved more and more toward currying and closures lately as it seems to produce cleaner code - and this also seems to be the way Clojure/core have moved with the reducers library and other places...? Sean On Fri, Aug 16, 2013 at 3:00 PM, Alan S

Re: function creation, partial or #()

2013-08-16 Thread Sean Corfield
On Fri, Aug 16, 2013 at 4:32 PM, Timothy Baldridge wrote: > I'm just going to throw this out there, but I almost always consider using > #() instead of (fn []) to be bad practice. I still use #() for anonymous single argument functions that are small, single forms, but I've started switching to (

Re: vec to map with consolidated vals

2013-08-16 Thread Sean Corfield
How about this: (defn to-consolidated-map [parts] (apply merge-with concat (map (fn [[k v]] {k (list v)}) parts))) On Fri, Aug 16, 2013 at 9:57 PM, David Chelimsky wrote: > I've got a vector of 2-element vectors e.g. [[:a 1] [:b 2]] where the first > val of any vec might appear in another

Re: vec to map with consolidated vals

2013-08-17 Thread Sean Corfield
t; (defn to-consolidated-map [parts] > (apply merge-with + (map (partial apply hash-map) parts))) > > I like this one because it describes the solution the way I thought about it > - I just didn't know about merge-with. It also has the benefit of using core > fns rather tha

Re: function creation, partial or #()

2013-08-17 Thread Sean Corfield
ed on some pretty limited context. > > > On Friday, August 16, 2013, Sean Corfield wrote: >> >> On Fri, Aug 16, 2013 at 4:32 PM, Timothy Baldridge >> wrote: >> > I'm just going to throw this out there, but I almost always consider >> > using >>

Re: What's your preference, partial or closures?

2013-08-17 Thread Sean Corfield
On Sat, Aug 17, 2013 at 5:43 PM, yair wrote: > What do you mean by currying in this context? Is there a way to do this in > clojure apart from using partial? (defn some-func ([a b c] (process a b c)) ([a b] (fn [c] (some-func a b c))) ([a] (fn ([b] (fn [c] (some-func a b c)))

Re: Current state of the art in Web deployment?

2013-08-18 Thread Sean Corfield
On Sun, Aug 18, 2013 at 9:21 AM, John Jacobsen wrote: > My main concern was just the need to ssh into the server and run leiningen in > the background, as opposed to setting up a "real" server which starts at boot > time. I'm OK w/ wrapping 'lein ring server-headless' with Apache/Nginx, if > t

[ANN] clj-time 0.6.0 released - some API deprecations

2013-08-18 Thread Sean Corfield
What: A Clojure wrapper for Joda Time Where: https://github.com/clj-time/clj-time Details: An API cleanup that deprecates several inconsistent / abbreviated names and introduces preferred replacements. Deprecated API will remain under 0.7.0 so you will have plenty of time to update yo

Re: What's your preference, partial or closures?

2013-08-18 Thread Sean Corfield
You're crazy :) On Sun, Aug 18, 2013 at 9:04 PM, Chris Allen wrote: > Am I crazy or does this scream macro? > > On Saturday, August 17, 2013 6:02:03 PM UTC-7, Sean Corfield wrote: >> >> On Sat, Aug 17, 2013 at 5:43 PM, yair wrote: >> > What do you mean by cu

[ANN] FW/1 0.2.1 for Clojure released

2013-08-19 Thread Sean Corfield
What: Framework One - a lightweight MVC framework for convention-based Clojure web application development. Where: https://github.com/framework-one/fw1-clj Usage: Easiest way to get started: lein new fw1 myapp && cd myapp && PORT= lein run Now you have a minimal web ap

Re: [ANN] Immutant 1.0.0 released

2013-08-20 Thread Sean Corfield
hursday, August 1, 2013 1:22:05 PM UTC-4, Sean Corfield wrote: >> >> Great news! Every conference I've been to lately, I've been bugging >> the OpenShift guys - I know they have been rewriting the cartridge >> spec so I'm glad to hear an Immutant cartridge is

Re: Multiple Clojure contexts in the same JVM

2013-08-20 Thread Sean Corfield
Just FYI (and you probably already know this David), most of the clojure.lang.RT class is considered an implementation detail and is subject to change without notice. I believe 1.6 will bring a new API that is intended to provide a supported way to embed Clojure into JVM-based applications. Based

Re: send agent inside doseq

2013-08-20 Thread Sean Corfield
Very likely Juan, as seen here: (let [agents (map agent (range 30 35))] (doseq [a agents] (send a + 100) (println @a)) (doseq [a agents] (println @a))) For me that prints: 30 31 32 33 34 130 131 132 133 134 but I suspect that's more luck that anything since there's no reason the

Re: as-> macro enhancement request?

2013-08-20 Thread Sean Corfield
Your example could be written: (-> foo bar (baz quuz) blah) But I suspect you meant something like this: (-> foo bar (as-> <> (baz whiz <> quuz)) blah) In other words, you use as-> with -> for just those cases where you need something that isn't in the first or last argu

Re: [ANN] Leiningen 2.3.2 released

2013-08-20 Thread Sean Corfield
Upgrading on Mac/Linux was painless as usual - and everything here seems to run fine with 2.3.2 - but Windows continues to be a pain in the rear... You can't lein upgrade so I updated the version string in lein.bat and tried lein self-install: C:\Users\Sean>lein self-install Downloading Leiningen

Re: send agent inside doseq

2013-08-20 Thread Sean Corfield
On Tue, Aug 20, 2013 at 9:31 PM, Kuba Roth wrote: > The reason I looked into 'intern' can only be explained by totally lack of > experience in Clojure and more general functional programming. Ah, is your background OOP? You'll find the functional world is pretty different. No "variables" in the

Re: [ANN] Leiningen 2.3.2 released

2013-08-21 Thread Sean Corfield
gt; > Lein 2.3.2 fixed #1150 and #1292 on Windows, tested on Windows 7 and Windows > XP. Is there any particular issue# your use case relates to? Please > mention/file the issues -- I will see if I can find a fix. > > Shantanu > > > On Wednesday, 21 August 2013 10:43:36 UTC+5:3

Re: [ANN] Leiningen 2.3.2 released

2013-08-21 Thread Sean Corfield
Does that work to upgrade an already installed version of Leiningen? On Wed, Aug 21, 2013 at 9:50 AM, David Powell wrote: > Have you tried http://leiningen-win-installer.djpowell.net/ - it should > work... > > -- > Dave > > > > On Wed, Aug 21, 2013 at 6:13

Re: [ANN] Leiningen 2.3.2 released

2013-08-21 Thread Sean Corfield
d, Aug 21, 2013 at 5:57 PM, Sean Corfield > wrote: >> >> Does that work to upgrade an already installed version of Leiningen? > > > Not really. But if you took your existing leiningen off the path, and ran > the installer it might get things up and running: > It bundles

Re: [ANN] Leiningen 2.3.2 released

2013-08-21 Thread Sean Corfield
I'll be interested to see what lein upgrade does next time on Windows, now that I'm running the latest .bat file. If it suggests editing the file, I'll open an issue :) Sean On Wed, Aug 21, 2013 at 10:46 AM, Sean Corfield wrote: > I have a working Leiningen. I have wget an

Re: [ANN] Leiningen 2.3.2 released

2013-08-21 Thread Sean Corfield
I went back to my Windows 8 laptop and updated lein.bat to the version on leiningen.org and then tested the up/down-grades and they worked perfectly - great to see the latest Windows batch file working so well! Sean On Wed, Aug 21, 2013 at 3:21 PM, Sean Corfield wrote: > As I told Phil on

Re: Two Way DOM binding in clojurescript

2013-08-22 Thread Sean Corfield
flapjax seems to be abandonware? Last source update a year ago, last website update two years ago. Or is it just one of those rare "completely stable, needs no enhancements" libraries? On Thu, Aug 22, 2013 at 1:09 AM, wrote: > Hi, you might be interested in flapjax-cljs, a clojurescript wrapper

Re: Two Way DOM binding in clojurescript

2013-08-22 Thread Sean Corfield
On Thu, Aug 22, 2013 at 2:41 PM, wrote: > I don't know. My guess would be that it is some kind of an academic project > that evolve mostly when a student decides to work on it during a project > (thus not often). > The mailing list is still active though. Good to know, thanx. I've seen flapjax m

  1   2   3   4   5   6   7   8   9   10   >