Re: Good learning resources for Clojure novice but with a long background i programming, both OO and some Fp?

2014-01-11 Thread Sean Corfield
;s a second edition coming: http://manning.com/rathore2/ Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "Perfection is the enemy of the good." -- Gustave Flaubert, French realist novelist (1821-1880) signature.asc Description: Message signed with OpenPGP using GPGMail

Re: Good learning resources for Clojure novice but with a long background i programming, both OO and some Fp?

2014-01-10 Thread Sean Corfield
/pragprog.com/book/shcloj2/programming-clojure Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "Perfection is the enemy of the good." -- Gustave Flaubert, French realist novelist (1821-1880) signature.asc Description: Message signed with OpenPGP using GPGMail

Re: How can I improve this?

2014-01-10 Thread Sean Corfield
, the third "_3" etc): https://www.dropbox.com/s/sxccqvy9qgipzo8/Screenshot%202014-01-10%2016.18.55.png Sean On Jan 10, 2014, at 11:16 AM, Guru Devanla wrote: > Actually, you might have meant line 267? > > > On Fri, Jan 10, 2014 at 11:03 AM, Sean Corfield wrote: >

Re: Good learning resources for Clojure novice but with a long background i programming, both OO and some Fp?

2014-01-10 Thread Sean Corfield
- but I had plenty of background in FP (albeit a bit rusty). Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "Perfection is the enemy of the good." -- Gustave Flaubert, French realist novelist (1821-1880) signature.asc Description: Message signed with OpenPGP using GPGMail

Re: How can I improve this?

2014-01-10 Thread Sean Corfield
java.jdbc does this for column names (in joins): https://github.com/clojure/java.jdbc/blob/master/src/main/clojure/clojure/java/jdbc.clj#L257 Sean On Jan 10, 2014, at 6:59 AM, Colin Yates wrote: > I have a sequence of file names and I want to make them unique. (uniquify > ["a" "b" "c" "a"])

Re: Good learning resources for Clojure novice but with a long background i programming, both OO and some Fp?

2014-01-10 Thread Sean Corfield
s://leanpub.com/fp-oo But, yes, coming from a heavy OOP background can make it challenging to really internalize FP, especially if your OOP background is all Java. Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "Perfection is the enemy of the good." -- G

Re: Clojure/Luminus memory footprint

2014-01-09 Thread Sean Corfield
ing into thrashing GC. We upgraded to Tomcat 7 / Railo 4 (same Clojure) and run with 8GB heaps now on Java 7 with the G1 collector and it has been wonderful :) The JVM is a wonderful beast if you're not memory constrained. Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfie

Re: New release of Light Table (which is now open source!)

2014-01-08 Thread Sean Corfield
On Jan 8, 2014, at 1:35 PM, Mark Engelberg wrote: > You still need to create and manage projects from a command line with lein, > right? Correct. Until someone builds a plugin for that :) Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "Perfection

Re: New release of Light Table (which is now open source!)

2014-01-08 Thread Sean Corfield
yboard to > behave normally I suspect the majority of users think the default behavior is "normal" - and desirable :) Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "Perfection is the enemy of the good." -- Gustave Flaubert, French

Re: New release of Light Table (which is now open source!)

2014-01-08 Thread Sean Corfield
; is very useful since you can sketch out multiple pieces of related code side-by-side. I guess I don't understand why your view of what LT provides is so negative? Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "Perfection is the enemy of the goo

Re: Clojure deployment questions w.r.t. jars, clojure source files, compiled class files

2014-01-07 Thread Sean Corfield
On Tue, Jan 7, 2014 at 4:26 PM, Dave Tenny wrote: > 1) When and under what circumstances projects are compiled in source versus > .class form? Most Clojure projects ship in source form (and are therefore compiled to bytecode on demand as they are loaded). > 2) Why there is no project.clj in the

Re: Auto updating Leiningen dependencies?

2014-01-01 Thread Sean Corfield
Perhaps lein-ancient would be more useful, at least in identifying when there are more recent versions available? https://github.com/xsc/lein-ancient On Wed, Jan 1, 2014 at 4:28 PM, gvim wrote: > Is there are a way to auto-update project.clj dependencies in Leiningen or > configure them to simpl

Re: Storing data on web server with Clojure

2014-01-01 Thread Sean Corfield
I'd say it's really about how you want to interact with the data. If your pattern of interaction suits a database, use one. If you just want to store / load data structures and do everything in memory, do that instead. I use MySQL and MongoDB extensively via Clojure for a complex Internet dating p

Re: protocols and overloading

2013-12-30 Thread Sean Corfield
On Mon, Dec 30, 2013 at 11:30 AM, Cedric Greevey wrote: > On Mon, Dec 30, 2013 at 12:59 PM, Massimiliano Tomassoli >> A class must support encapsulation, inheritance and polymorphism. If it >> doesn't, then it isn't a class. The same way, a method is a function that >> belongs to a class and can b

[ANN] clojure.java.jdbc 0.3.2 released

2013-12-30 Thread Sean Corfield
Clojure contrib wrapper for JDBC. This release contains minor bug fixes compared to 0.3.0, with the main focus being an overhaul of docstrings etc to improve the auto-gen'd documentation: http://clojure.github.io/java.jdbc/ The community documentation on clojure-doc has also had a major overhaul

Re: [ANN] clojure.java.jdbc 0.3.1 released

2013-12-30 Thread Sean Corfield
The tests have been updated to included nil cases now so I shouldn't make the same mistake again. On Mon, Dec 30, 2013 at 8:57 AM, Sean Corfield wrote: > Just found a showstopping bug in 0.3.1 - 0.3.2 will be along shortly. > > TIL: protocols need implementations for both Objec

Re: [ANN] clojure.java.jdbc 0.3.1 released

2013-12-30 Thread Sean Corfield
Just found a showstopping bug in 0.3.1 - 0.3.2 will be along shortly. TIL: protocols need implementations for both Object _and_ nil to work properly in the real world... :( Sean On Mon, Dec 30, 2013 at 8:46 AM, Sean Corfield wrote: > Clojure contrib wrapper for JDBC. > > This release

[ANN] clojure.java.jdbc 0.3.1 released

2013-12-30 Thread Sean Corfield
Clojure contrib wrapper for JDBC. This release contains minor bug fixes compared to 0.3.0, with the main focus being an overhaul of docstrings etc to improve the auto-gen'd documentation: http://clojure.github.io/java.jdbc/ The community documentation on clojure-doc has also had a major overhaul

Re: protocols and overloading

2013-12-29 Thread Sean Corfield
That must have been a long time ago? That problem was solved well before I left the C++ committee in '99 and gcc was normally pretty good at tracking the emerging standard at the time... But, yes, the template compilation model and it's impact on linking modules that specialized the same template

Re: How to debug this trace involving Korma

2013-12-29 Thread Sean Corfield
Reading that tutorial, it looks like it expects you to call (create-tables) manually via the REPL. On Sun, Dec 29, 2013 at 3:47 AM, Zeynel wrote: > The first lines of the trace says: > > Failure to execute query with SQL: > > SELECT "GUESTBOOK" .* FROM "GUESTBOOK" :: [] > JdbcSQLException: > Mess

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-27 Thread Sean Corfield
Whilst the stacktraces can be pretty painful at times - esp. if you're dealing with lazy sequences - they do include filenames and line numbers, at least when you're outside the REPL. There are also a number of tools to clean up stack traces to show only Clojure-related entries and/or color-code th

Re: Akka-like framework in Clojure ?

2013-12-27 Thread Sean Corfield
I got the impression - from talking to someone who tried to wrap Akka in Clojure - that Akka's API was pretty nasty to use from Clojure? Sean On Fri, Dec 27, 2013 at 3:54 PM, Alex Baranosky wrote: > You can just use Akka directly w/ Clojure's excellent Java interop. > > > On Fri, Dec 27, 2013 at

Re: Is Clojure right for me?

2013-12-27 Thread Sean Corfield
On Fri, Dec 27, 2013 at 12:24 PM, Massimiliano Tomassoli wrote: > First, someone said that OOP doesn't alleviate the problems that it's > supposed to solve and this I don't believe. There is no silver bullet: OOP helps with some problems in some ways but it's not perfect. The folks who pioneered

Re: Is Clojure right for me?

2013-12-27 Thread Sean Corfield
On Fri, Dec 27, 2013 at 8:02 AM, Massimiliano Tomassoli wrote: > When I studied OOP at > University my professors taught me that OOP was extremely successful in > reducing the complexity of big systems. That's always been the claim about OOP but big systems have an inherent complexity and you can

Re: Is Clojure right for me?

2013-12-26 Thread Sean Corfield
On Thu, Dec 26, 2013 at 8:32 AM, Massimiliano Tomassoli wrote: > Thank you, Malcolm. I'm completely new to LISP and its dialects and I'm a > little bit worried about the absence of support for OOP in Clojure. I'm a little late to this thread (it's been one of those days!) but having read over you

Re: Finding available methods or docs for a value type

2013-12-24 Thread Sean Corfield
One thing you might find very helpful is Chas Emerick's http://clojureatlas.com which lets you search on concepts (such as maps) and see a cloud of all the related functions. It's a great way to explore how various functions are related to each other and to various data types. You can use it for f

Re: Looking to migrate thousands of Clojure applications from 1.2 to 1.5.

2013-12-24 Thread Sean Corfield
On Tue, Dec 24, 2013 at 7:23 AM, wrote: > Yes, after looking into this, upgrading the libraries before upgrade the > Clojure version is unfeasible in our case. I prefer not to keep a 1.2 > environment around forever but take our time phasing it out to avoid service > disruption. I think the dual

Re: How do I fix *warn-on-reflextion* warnings in 3rd party libraries?

2013-12-23 Thread Sean Corfield
No, lein check will give you reflection warnings on 3rd party libraries... (sean)-(jobs:0)-(/Developer/workspace/worldsingles/ws/model/clojure/worldsingles) (! 505)-> lein check Compiling namespace worldsingles.activity Reflection warning, clojure/core/incubator.clj:84:7 - reference to field getCl

Re: Looking to migrate thousands of Clojure applications from 1.2 to 1.5.

2013-12-22 Thread Sean Corfield
On Sun, Dec 22, 2013 at 4:07 PM, wrote: > A third option I'm considering is to simply keep running 1.2 and replace the > contrib libraries with their modular counterparts, moving to 1.5 only after > that's done. The two difficulties I see here are: > 1) Ensuring all new reports written during thi

Re: Looking to migrate thousands of Clojure applications from 1.2 to 1.5.

2013-12-22 Thread Sean Corfield
On Sun, Dec 22, 2013 at 4:13 PM, wrote: > Could you point to more information regarding the numeric changes? I can't > seem to pinpoint anything in particular here: > https://github.com/clojure/clojure/blob/1.3.x/changes.txt That document links to these: * http://dev.clojure.org/display/design/

Re: Looking to migrate thousands of Clojure applications from 1.2 to 1.5.

2013-12-22 Thread Sean Corfield
If you truly have "thousands" of Clojure 1.2 apps, I'd go with option 1), and look at migrating legacy reports over if you need to do any maintenance on them. Since Clojure is "just" a Java library, it's fairly easy to keep the Clojure version locked in each individual project so there's no reason

Re: Where are the videos for Clojure Conj 2013

2013-12-22 Thread Sean Corfield
According to a note I found on Reddit via Google, Conj videos have historically appeared on the ClojureTV YouTube channel "4-6 weeks after the event" so I would expect them to start appearing "soon" through the New Year... Sean On Sun, Dec 22, 2013 at 1:25 PM, Richard Cole wrote: > Were any vide

Re: How do I fix *warn-on-reflextion* warnings in 3rd party libraries?

2013-12-22 Thread Sean Corfield
On Sun, Dec 22, 2013 at 2:55 PM, Sean Corfield wrote: > For clj-time I'm happy to just see an issue opened on Github (when > it's back from its current 503 woes!) and happier to see a Pull > Request. https://github.com/clj-time/clj-time/issues/100 -- Sean A Corfield -

Re: How do I fix *warn-on-reflextion* warnings in 3rd party libraries?

2013-12-22 Thread Sean Corfield
For clj-time I'm happy to just see an issue opened on Github (when it's back from its current 503 woes!) and happier to see a Pull Request. For clojure.tools.reader, you'll need to open issues in JIRA as Andy indicated. Most of the rest sound like Github-based projects so opening issues, preferabl

Re: clojure.java.jdbc 0.3.0 column name handling

2013-12-21 Thread Sean Corfield
There are two hooks for naming strategies in java.jdbc: * :identifiers - for converting ResultSet column names to keywords * :entities - for converting Clojure keywords/string to SQL entity names :identifiers defaults to clojure.string/lower-case - so SQL column names become lowercase keywords.

Re: Who is "doing something worthwhile" in Clojure?

2013-12-19 Thread Sean Corfield
On Thu, Dec 19, 2013 at 5:19 PM, Rich Morin wrote: > I have no argument with The Climate Corporation's business model; > my problems are with Monsanto. That said, I don't want to dive > off into that discussion. In fact, my comment about them should > probably have been left out of my initial po

[ANN] clojure.java.jdbc 0.3.0 "gold" release

2013-12-17 Thread Sean Corfield
The Clojure contrib library that provides a thin wrapper around JDBC. For Leiningen: [org.clojure/java.jdbc "0.3.0"] Changes since RC1: * Ensure canonical Boolean to workaround strange behavior in some JDBC drivers JDBC-84. * Rename recently introduced test to ensure unique names JDBC-83. *

Re: clojure.java.jdbc 3.0 reusing connections

2013-12-16 Thread Sean Corfield
Just to follow up on this: 0.3.0-rc1 introduces with-db-connection to allow multiple operations on a shared connection easily: (with-db-connection [db-con db-spec] ... operate on db-con multiple times ...) Sean On Tue, Dec 10, 2013 at 4:06 PM, Sean Corfield wrote: > On Tue, Dec 10, 2013

Re: Referential integrity constraints using only clojure.java.jdbc?

2013-12-15 Thread Sean Corfield
The difficulties inherent in providing a database-independent abstraction over DDL is precisely why clojure.java.jdbc doesn't do this - and why there are strong recommendations to use other libraries (in combination with java.jdbc) if you want DSLs for that. java.jdbc is intended to be a thin wrap

[ANN] clojure.java.jdbc 0.3.0 RC1 released

2013-12-13 Thread Sean Corfield
A low-level Clojure wrapper for JDBC-based access to databases. https://github.com/clojure/java.jdbc Release 0.3.0-rc1 on 2013-12-12 * Deprecate db-transaction (new in 0.3.0) in favor of with-db-transaction JDBC-81. * Add with-db-metadata macro and metadata-result function to make it easier to w

Re: cider status

2013-12-13 Thread Sean Corfield
On Thu, Dec 12, 2013 at 11:43 PM, Adrian Mowat wrote: > Is cider just a new release of nrepl.el or a different thing entirely? Well, it's a "new release" insofar as it's an updated version of nrepl.el. In order to switch to it, however, you have to remove nrepl.el _and all packages that depend on

Re: Monitoring a Clojure app, possibly with New Relic

2013-12-13 Thread Sean Corfield
Although I can't answer for the New Relic approach on Heroku, I can say that we happily use New Relic to monitor a Clojure app that runs inside Tomcat, as well some standalone command line Clojure apps. For the Tomcat app, we add -javaagent manually in {tomcat}/bin/setenv.sh to point to a local fo

Re: clojure.java.jdbc 3.0 reusing connections

2013-12-10 Thread Sean Corfield
On Tue, Dec 10, 2013 at 2:17 PM, Andrey Antukh wrote: > In my opinion, this has a lot of boilerplate for basic operation like this > (reuse a connection for few operations). I'm open to suggestions for idiomatic enhancements (via JIRA). > The deprecated api of clojure.java.jdbc had some useful m

Re: clojure.java.jdbc 3.0 reusing connections

2013-12-10 Thread Sean Corfield
No, you don't have to use db-transaction (although that will have that effect). You can get a connection and assoc it into the db-spec with a :connection key and pass that across multiple queries etc, and it will reuse the :connection passed in: (with-open [con (get-connection db-spec)] (let [c

Re: clojure java.jdbc db-do-prepared and dynamic parameters

2013-12-08 Thread Sean Corfield
Do you want that specific piece of (procedural) Java converted to Clojure or do you have a real use case in the context of a real problem that you're trying to solve? I suspect just showing you what that piece of Java would look like in Clojure isn't going to teach you how to do this in general...

Re: Am I missing something?

2013-12-05 Thread Sean Corfield
On Wed, Dec 4, 2013 at 6:04 AM, James Laver wrote: > - :form-params uses string keys not keywords so it then needs to be > keywordified before it’s suitable for passing to the database layer Which DB layer requires keywords? Not java.jdbc - it's perfectly happy with string keys. -- Sean A Corfi

Re: Am I missing something?

2013-12-03 Thread Sean Corfield
On Tue, Dec 3, 2013 at 4:20 PM, James Laver wrote: > I did have a quick look at liberator earlier but by that time i'd scratched > most of my itch with compojure. I do intend to look into it in more depth > though since there's a lot of application left to write. Yes, there's a lot of detail in R

Re: Am I missing something?

2013-12-03 Thread Sean Corfield
Take a look at Liberator, which is specifically designed for building REST APIs - but bear in mind the mindset of the Clojure community is generally to compose several libraries to create the specific solution you need, rather than having any "full stack" frameworks. That said, 14 hours to create

Re: tails function?

2013-11-30 Thread Sean Corfield
That would be "heads" not "tails" :) On Sat, Nov 30, 2013 at 3:44 PM, Alex Baranosky wrote: > user> (rest (reductions conj [] [1 2 3 4])) > ([1] [1 2] [1 2 3] [1 2 3 4]) > > > On Sat, Nov 30, 2013 at 2:54 PM, Sean Corfield > wrote: >> >> re

Re: tails function?

2013-11-30 Thread Sean Corfield
reductions requires a 2-arg function (reductions was my first thought too, but I couldn't come up with anything elegant with it). On Sat, Nov 30, 2013 at 9:20 AM, Alex Miller wrote: > reductions on rest? > > -- > -- > You received this message because you are subscribed to the Google > Groups "Cl

Re: Is The Joy if Clojure up to date?

2013-11-30 Thread Sean Corfield
+1 for Manning's MEAP approach - I've bought most of my Manning books through the early access program over the years. Also +1 for JoC not really being a beginner's book. I generally recommend Clojure Programming (Emerick, Carper, Grand) as a first book. Programming Clojure 2nd ed is good too. I e

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-29 Thread Sean Corfield
On Fri, Nov 29, 2013 at 3:38 AM, Lars Rune Nøstdal wrote: > Looks interesting. It even has the issue tracker on github still enabled. The reason contrib libraries (and Clojure itself) have the issue tracker disabled on Github is because they use JIRA for tracking issues - and pull requests are no

Re: core.async and performance

2013-11-29 Thread Sean Corfield
On Fri, Nov 29, 2013 at 1:09 AM, Thomas Heller wrote: > I'm actually surprised you get to "stop" at all. You send a couple items > onto the channel but don't close it, therefore the 2nd go block will > potentially block forever waiting for more. Indeed. When I tried Andreas' code in the REPL, it

Re: [ANN] clojure.java.jdbc 0.3.0-beta2 BREAKING CHANGES!

2013-11-25 Thread Sean Corfield
provide patches as well). Sean On Sun, Nov 24, 2013 at 10:39 PM, Sean Corfield wrote: > Based on feedback from the community, I have released > clojure.java.jdbc 0.3.0-beta2 to Maven Central. > > This includes two very important changes: > > * The clojure.java.jdbc.sql and clo

[ANN] clojure.java.jdbc 0.3.0-beta2 BREAKING CHANGES!

2013-11-24 Thread Sean Corfield
Based on feedback from the community, I have released clojure.java.jdbc 0.3.0-beta2 to Maven Central. This includes two very important changes: * The clojure.java.jdbc.sql and clojure.java.jdbc.ddl namespaces have been removed. * The API functions that were already marked as deprecated have moved

[ANN] java.jdbc DSLs moved to jdbc-java/dsl

2013-11-23 Thread Sean Corfield
Based on feedback from the community, and in preparation for java.jdbc 0.3.0-beta2, the DSLs, introduced in 0.3.0-alpha1, have been made available in another project: [java-jdbc/dsl "0.1.0"] via the namespaces java-jdbc.sql java-jdbc.ddl Anyone currently using the org.clojure/java.jdbc.sql or or

Re: java.jdbc DSLs (java.jdbc.sql / java.jdbc.ddl)

2013-11-23 Thread Sean Corfield
On Sat, Nov 23, 2013 at 8:27 PM, Keith Irwin wrote: > Personally, the DSL doesn’t bother me at all. (Just a data point.) I get > where you’re going with it, and support the idea, FWIW, but if it were gone, > I wouldn’t notice. My needs are 1) so simple, strings work, or 2) so > complicated, a (

Re: [ANN] Clojure 1.6.0-alpha3

2013-11-23 Thread Sean Corfield
On Sat, Nov 23, 2013 at 12:47 PM, Colin Fleming wrote: > BTW (and I may be a little late here) - is there a plan to add keyword > creation to the API? Keywords are a pretty common part of many Clojure APIs, > it would be good to allow their creation without forcing people to use > Keyword.intern()

Re: java.jdbc DSLs (java.jdbc.sql / java.jdbc.ddl)

2013-11-23 Thread Sean Corfield
On Sat, Nov 23, 2013 at 3:06 PM, Alexander Hudek wrote: > As Dave said, we can move to honeysql without too much trouble. However, it > would be extremely useful to move the sql namespace to a separate library as > an interim solution. OK, I'll get that done soon. > Out of curiosity, what exactl

Re: java.jdbc DSLs (java.jdbc.sql / java.jdbc.ddl)

2013-11-22 Thread Sean Corfield
On Fri, Nov 22, 2013 at 1:04 PM, Armando Blancas wrote: > We use select several times in one module; it wouldn't be hard to just copy > and paste the function somewhere. Technically, copying it into your code means absorbing some EPL code and copyright © 2013 Sean Corfield stuff s

Re: [ANN] SQLingvo 0.5.9 released.

2013-11-22 Thread Sean Corfield
Nice! Another SQL DSL I can point people to for use with clojure.java.jdbc if I completely remove the basic DSL from java.jdbc.sql! Sean On Fri, Nov 22, 2013 at 4:36 AM, r0man wrote: > SQLingvo is a Clojure DSL to generate SQL statements. > > README, source code and examples: > > https://git

Re: java.jdbc DSLs (java.jdbc.sql / java.jdbc.ddl)

2013-11-20 Thread Sean Corfield
is that I came very close many times to throwing java.jdbc >> out because of the experience of a very wide API which was effectively two >> APIs and a DSL which didn't meet a reasonable definition of a full 'DSL' >> (even if the documentation states it is minimal). M

Re: 2013 State of Clojure & ClojureScript survey results

2013-11-19 Thread Sean Corfield
Yes, the path separator is O/S dependent: user> (import '(java.io File)) java.io.File user> (reduce #(File. %1 %2) ["one" "two" ".." "three"]) # user> (.getCanonicalFile (reduce #(File. %1 %2) ["one" "two" ".." "three"])) # user> (.getPath (reduce #(File. %1 %2) ["one" "two" ".." "three"])) "one/

java.jdbc DSLs (java.jdbc.sql / java.jdbc.ddl)

2013-11-19 Thread Sean Corfield
In response to the (very reasonable) question from Alex Hudek in a recent thread, here are some of my responses to questions that have arisen about the inclusion of the minimal DSLs in the java.jdbc contrib library: > Just wondering if the intention is to make the DSL the primary way to work > wit

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Sean Corfield
On Tue, Nov 19, 2013 at 2:28 PM, Michael Klishin wrote: > 2013/11/20 Andrey Antukh >> About license question: if these functions had not copied, but written >> from scratch, them would be the same functions with minimal differences or >> none... > Sorry but that's a ridiculous argument. You must

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Sean Corfield
gt; have it as a separate add-on? > > Thanks for the work on jdbc. :-) > > Alex > > > On Tuesday, November 19, 2013 2:28:16 PM UTC-5, Sean Corfield wrote: >> >> To Michael: It is fairly up to date - there have only been a few small >> changes to java.jdbc since the last u

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Sean Corfield
On Sun, Nov 17, 2013 at 1:57 AM, Andrey Antukh wrote: > Additionally I have > copied some useful functions like parsing dbspec to URI or a map of > protocol->cases > and the rest are written from scratch. Looking through the source code, there are quite a few functions copied directly from parts

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Sean Corfield
To Michael: It is fairly up to date - there have only been a few small changes to java.jdbc since the last updates to that part of clojure-doc.org. Now that java.jdbc 0.3.0 has hit beta and has a stable API for release, I feel more comfortable about updating the clojure-doc.org pages to include the

Re: Releasing Caribou today: Open Source Clojure Web Ecosystem

2013-11-12 Thread Sean Corfield
"Funded and supported by Instrument in Portland, OR: http://weareinstrument.com/ " On Tue, Nov 12, 2013 at 5:03 PM, Marcus Blankenship wrote: > Very nice, Ryan! Is there a company that’s shepherding the product? > > Best, > Marcus > > On Nov 12, 2013, at 5:02 PM, Se

Re: Releasing Caribou today: Open Source Clojure Web Ecosystem

2013-11-12 Thread Sean Corfield
Wow... That's pretty impressive for an initial alpha release! Sean On Tue, Nov 12, 2013 at 3:52 PM, Ryan Spangler wrote: > Hello Clojure, > > Excited to announce today the release of Caribou! http://let-caribou.in/ > > We have been building web sites and web applications with it for over two >

Re: Regarding Clojure's license

2013-11-12 Thread Sean Corfield
As James said, you've misunderstood the rationale. It's also worth pointing out that a lot of US companies won't use GPL-licensed software (and won't pay for a closed source version), and many aren't comfortable with LGPL either. EPL, Apache and others are more acceptable to many commercial organiz

Re: newbie question: how to include external libraries from Leiningen REPL

2013-11-07 Thread Sean Corfield
On Thu, Nov 7, 2013 at 5:18 AM, Starry SHI wrote: > Hi, I am new to clojure and I find lein REPL very convenient to use. But I > have one question: in REPL, how to include functions defined in other > libraries and call them in my clojure code? As Marshall indicated, you need to edit your project

[ANN] clojure.java.jdbc 0.3.0 beta 1 released

2013-11-04 Thread Sean Corfield
What? Clojure contrib wrapper for JDBC operations. Where? https://github.com/clojure/java.jdbc Dependency? [org.clojure/java.jdbc "0.3.0-beta1"] Details? The clojure.java.jdbc library has finally hit "feature complete" for the upcoming 0.3.0 release and so the first beta release has been made a

Re: Scala interop (or, aliasing imported Java classes)

2013-11-03 Thread Sean Corfield
That would need quoting wouldn't it? (import '(the.java.package {Clazz1 Alias1 Clazz2 Alias2} Clazz3)) or: (import '(the.java.package Clazz1 Clazz2 Clazz3 :rename {Clazz1 Alias1 Clazz2 Alias2})) On Sun, Nov 3, 2013 at 11:22 AM, Sean Corfield wrote: > Perhaps a

Re: Scala interop (or, aliasing imported Java classes)

2013-11-03 Thread Sean Corfield
Perhaps a small extension to (import ..) is warranted then, since the underlying machinery seems to support aliases? (import [the.java.package {Clazz1 Alias1 Clazz2 Alias2} Clazz3]) or, maybe more in keeping with require: (import [the.java.package Clazz1 Clazz2 Clazz3 :rename {Clazz1 Ali

Re: [ANN] Clojure 1.6.0-alpha1 release

2013-11-01 Thread Sean Corfield
ovember 1, 2013 5:38:49 PM UTC-5, Sean Corfield wrote: >> >> Thanx Alex. Are these release notes kept somewhere in the Github repo? >> I looked at changes.md but that's still 1.5.1 and couldn't see any >> obvious new document for 1.6 Alpha 1...? >> >&

Re: [ANN] Clojure 1.6.0-alpha1 release

2013-11-01 Thread Sean Corfield
Thanx Alex. Are these release notes kept somewhere in the Github repo? I looked at changes.md but that's still 1.5.1 and couldn't see any obvious new document for 1.6 Alpha 1...? Sean On Fri, Nov 1, 2013 at 11:14 AM, Alex Miller wrote: > Clojure 1.6.0-alpha1 is now available. > > Try it via > -

Re: .length vs. count for string length

2013-11-01 Thread Sean Corfield
This thread made me run a quick audit of our code and we had about a dozen calls to .length, a dozen calls to .substring, and a handful of calls to .replace - of which a few were in truly performance sensitive code (doing Unicode-related processing across large strings, so they had lots of other Ja

Re: road map for clojure?

2013-10-30 Thread Sean Corfield
Roadmap: http://dev.clojure.org/jira/browse/CLJ#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel On Wed, Oct 30, 2013 at 4:02 PM, julius wrote: > Hi, > > Is clojure under dev? there is no much commits in months, any plan or road > map for clojure? > > thanks > > -- > -- > Yo

Re: What non-deprecated Clojure Web libraries to use?

2013-10-27 Thread Sean Corfield
I'm using FW/1 (but then it's my framework, ported from CFML :) which is based on Ring and uses Enlive and Selmer for templating. It uses conventions rather than configuration (although you can specify routes if you want to override configuration). https://github.com/framework-one/fw1-clj Sean

Re: Rolling back transactions with clojure.java.jdbc

2013-10-25 Thread Sean Corfield
at being said, I'm not terribly familiar with how atoms >> work in Clojure. >> >> Thanks for your help! >> >> Mark >> >> On Friday, October 25, 2013 2:10:18 AM UTC-4, Sean Corfield wrote: >>> >>> Remove :transaction? true from the delete

Re: Rolling back transactions with clojure.java.jdbc

2013-10-24 Thread Sean Corfield
Remove :transaction? true from the delete! call. You're telling delete! to run inside its own transaction - you don't want that: that's why your deletes do not rollback. Sean On Thu, Oct 24, 2013 at 2:03 PM, Mark wrote: > I've been working on a small utility script to clean up a very large tabl

Re: problems with state-t monad transformer

2013-10-22 Thread Sean Corfield
It sounds like you're running into the chunked sequence behavior of map (it's lazy but it realizes chunks of the sequence for efficiency rather than strictly on-demand). I'd say the possibilities are: don't use side-effecting functions in your monads or define a fully lazy version of map and defin

Re: Dependency management

2013-10-17 Thread Sean Corfield
I'll +1 Archiva. It's easy to setup and pretty simple to use. For a long time I resisted the idea of running an internal Maven repo at World Singles so we relied on lein-localrepo and other somewhat hacky techniques (that Technomancy regularly ribbed me about :) and once we reached three "rogue" li

Re: reflection warning with threading macro

2013-10-15 Thread Sean Corfield
My guess would be the ^String is attached to the following expression in both cases but the macro-expansion process loses that metadata... On Tue, Oct 15, 2013 at 10:51 AM, Brian Craft wrote: > This gives me a reflection warning: > > (.write out ^String (-> slist meta :hex)) > > This does not: >

Re: is PG's "imperative outside-in" advice any good?

2013-10-15 Thread Sean Corfield
On Tue, Oct 15, 2013 at 10:19 AM, Jim - FooBar(); wrote: > wasn't cond-> designed exactly for that? > > (let [x (some-expression)] > (cond-> x > (p x) f > ((comlpement p) x) g))) That's uglier than the if :) Sometimes I wish there was a variant of cond-> that took functions instead of bo

Re: is PG's "imperative outside-in" advice any good?

2013-10-15 Thread Sean Corfield
On Tue, Oct 15, 2013 at 10:15 AM, Guru Devanla wrote: > The case you listed is where let binding becomes important so as to not > perform duplicate evaluation. That is one place the utility of let stands > out along with its scope. Yup, exactly. I just see it often enough that I feel that it shou

Re: is PG's "imperative outside-in" advice any good?

2013-10-15 Thread Sean Corfield
[x condition consequent alternative] > (if (condition x) > (consequent x) > (alternative x > > (conditional (some-expression) p f g) > > > > Am 15.10.2013 19:02, schrieb Sean Corfield: > > >> Yeah, I found when I first got started with Clojure I te

Re: is PG's "imperative outside-in" advice any good?

2013-10-15 Thread Sean Corfield
Yeah, I found when I first got started with Clojure I tended to use let for intermediate named results but over time I've moved to using small, private top-level functions instead because I want to focus on the names of the _functionality_ rather than the names of intermediate _data_. I still use l

Re: making a lot of small calcs parallel

2013-10-14 Thread Sean Corfield
I nearly suggested that but it sounded so counter-intuitive and I didn't have time to construct a test-bed for it... glad you figured it out. That means that your float-seq has to be fully realized in memory tho', right? On Mon, Oct 14, 2013 at 9:58 PM, Brian Craft wrote: > Answering my own quest

Re: with-open

2013-10-11 Thread Sean Corfield
Perhaps you want something like: (with-backend [b (select-the-backend)] (do-something b)) and have with-backend call the appropriate init / finish methods? Sean On Fri, Oct 11, 2013 at 2:33 PM, Brian Craft wrote: > I'm working on module that may use a number of different backends, some of >

Re: monger read reference

2013-10-11 Thread Sean Corfield
Whilst this doesn't answer your question directly, I will note that CongoMongo 0.4.1 includes support for read preferences... On Thu, Oct 10, 2013 at 7:51 PM, Gary Zhao wrote: > Hello > > Anyone knows if I can set read reference in monger? e.g. "nearest". I didn't > see it on their documentation.

Re: Teaching Clojure to students (how ?)

2013-10-09 Thread Sean Corfield
Another very useful "getting started" plugin is lein-try: https://github.com/rkneufeld/lein-try Then you can do stuff like: lein try [quil "1.6.0"] ;; taken from the quil getting started wiki: (use 'quil.core) (sketch :setup (fn [] (background 20) (ellipse 50 50 80 80)) :title "The moon del

Re: *db* binding with jetty

2013-09-23 Thread Sean Corfield
Take a look at http://clojure-doc.org/articles/ecosystem/java_jdbc/connection_pooling.html You would want to set up a connection pool and pass that into your app as part of its context. Does that help? Sean On Mon, Sep 23, 2013 at 11:25 AM, Brian Craft wrote: > Trying to get a small app off t

[ANN] clojure.java.jdbc 0.3.0-alpha5 available on Maven Central

2013-09-17 Thread Sean Corfield
Clojure JDBC contrib library takes another step toward an 0.3.0 with a fifth alpha release! Release 0.3.0-alpha5 on 2013-09-15 * DDL now supports entities naming strategy JDBC-53. * Attempt to address potential memory leaks due to closures - see Christophe Grand's blog post on Macros, closures and

Re: The Eclipse Public License is not a good license

2013-09-14 Thread Sean Corfield
On Sat, Sep 14, 2013 at 5:31 PM, Musical Notation wrote: >> Each Contributor must identify itself as the originator of its Contribution, >> if any, in a manner that reasonably allows subsequent Recipients to identify >> the originator of the Contribution. > That's my problem. People are, of cours

Re: clojure.java.jdbc connection pool example

2013-09-13 Thread Sean Corfield
There are examples in the documentations for both c3p0 and BoneCP: http://clojure-doc.org/articles/ecosystem/java_jdbc/connection_pooling.html Note: this is the home for the "official" java.jdbc documentation so that it can be augmented by the community, rather than locked in the java.jdbc repo w

Re: finding retained head

2013-09-12 Thread Sean Corfield
;>> (find-doc "part-of-name-here") >>>> Source: (source function-name-here) >>>> Javadoc: (javadoc java-object-or-class-here) >>>> Exit: Control+D or (exit) or (quit) >>>> >>>> user=> (defn f [g] (g)) >

Re: finding retained head

2013-09-11 Thread Sean Corfield
Just to confirm, (t2 0 (range 100)) -- using doseq instead of dorun -- does NOT run out of memory, correct? On Wed, Sep 11, 2013 at 8:59 AM, Brian Craft wrote: > This appears to have no effect on the problem. I tested with > jdbc/transaction, and with Sean's simple example: > > user=> (defn f

Re: The Eclipse Public License is not a good license

2013-09-11 Thread Sean Corfield
Perhaps a more productive way to approach this issue would have been to ask if the group could point you to a discussion of why Clojure is under the EPL instead of starting from a point of criticism, and challenging the care with which the license was selected? Searching the archives would have tu

<    3   4   5   6   7   8   9   10   11   12   >