Re: Opinions on Equality Semantics

2013-04-08 Thread Philip Potter
One reason for being slightly "impure" here is for greater java interoperability. Clojure gets much of its equality semantics for collections from java.lang.List and java.lang.Set, which define equality to depend only on collection contents and not on concrete type. By having equality semantics whi

Re: [ANN] Instaparse 1.0.0

2013-04-08 Thread Laurent PETIT
Man, this looks like pure gold! Le mardi 9 avril 2013, Mark Engelberg a écrit : > Instaparse is an easy-to-use, feature-rich parser generator for Clojure. > The two stand-out features: > > 1. Converts standard EBNF notation for context-free grammars into an > executable parser. Makes the task of

[ANN] Instaparse 1.0.0

2013-04-08 Thread Mark Engelberg
Instaparse is an easy-to-use, feature-rich parser generator for Clojure. The two stand-out features: 1. Converts standard EBNF notation for context-free grammars into an executable parser. Makes the task of building parsers as lightweight and simple as working with regular expressions. 2. Works

Re: [ANN] java.jdbc 0.3.0-alpha1

2013-04-08 Thread Sean Corfield
Only identifiers (converting from SQL entities to Clojure keywords) are handled "in" java.jdbc directly (inside result-set-seq) - entities are handled in the DSL which generates SQL and therefore it's not related to a connection. If you don't use the DSL, there's no translation going on - you pass

Re: Opinions on Equality Semantics

2013-04-08 Thread Phil Hagelberg
JvJ writes: > Even though the behaviour of lists and vectors differs under specific > functions, they still count as equal, but this statement "If a = b, then (f > a) = (f b)" seems like it would be some sort of rule or axiom about > functional programming. What's the FP purists' view on this

Re: [ANN] java.jdbc 0.3.0-alpha1

2013-04-08 Thread Matching Socks
Could the entities and identifiers functions (translating map-keys to SQL-names and back) be specified along with connection parameters to avoid repetition with each operation? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this grou

Re: Opinions on Equality Semantics

2013-04-08 Thread Andy Fingerhut
I think the general pattern here is equality being a function of _part_ of the value, but not all of it. For Clojure's = on lists/sequences/vectors, it is based upon the sequence of values, but not whether it is a list, sequence, or vector. For Perverse?'s equals it is quite explicit in its defin

Re: Clojure is in GSoC 2013!

2013-04-08 Thread Ambrose Bonnaire-Sergeant
Yay! On Tue, Apr 9, 2013 at 3:33 AM, Daniel Solano Gómez wrote: > Hello, all, > > I am happy to report that Clojure has been accepted as a mentoring > organization for Google Summer of Code 2013. Now is the time for > sudents to start researching their projects and reaching out to members. > At

Re: Function recurring regardless of condition

2013-04-08 Thread Alan Malloy
You might be interested in https://github.com/amalloy/clusp/blob/master/src/snusp/core.clj, my Clojure interpreter for SNUSP (which is brainfuck with different control-flow mechanics). It's purely functional, and IMO does a good job of separating concerns; both of those are things it sounds lik

Re: Opinions on Equality Semantics

2013-04-08 Thread Ben Wolfson
On Mon, Apr 8, 2013 at 4:02 PM, JvJ wrote: > > Even though the behaviour of lists and vectors differs under specific > functions, they still count as equal, but this statement "If a = b, then (f > a) = (f b)" seems like it would be some sort of rule or axiom about > functional programming. What'

Opinions on Equality Semantics

2013-04-08 Thread JvJ
This is just an idle curiosity up for discussion, but in Clojure, if (= a b) is true, then given some function f, it is not necessarily true that (= (f a) (f b)) For instance: (defn check-eq [f a b] [(= a b) (= (f a) (f b))]) (check-eq #(conj % 1) '(1 2 3) [1 2 3]) [true false] Even though th

Re: java.jdbc delta update examples

2013-04-08 Thread Sean Corfield
If you're using 0.3.0-alpha1, I think I'd recommend using native SQL and the execute! function: (j/execute! my-db "UPDATE employee SET SALARY = SALARY + 1000 WHERE department = ?" [dept]) Sean On Mon, Apr 8, 2013 at 1:31 PM, Craig wrote: > > I am looking for example(s) of using clojure java.jdb

Re: Monads usage

2013-04-08 Thread Armando Blancas
Last week I released a project with a monadic translator that needed to: - work on sequences of expressions, arbitrarily nested - generate Clojure code or stop and report the first error - maintain a symbol table with easy access but not global state The relevant code is here: https://github.com/b

java.jdbc delta update examples

2013-04-08 Thread Craig
I am looking for example(s) of using clojure java.jdbc to perform delta update eg SALARY = SALARY + 1000. Links appreciated. Thanks. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com No

Re: Clojure is in GSoC 2013!

2013-04-08 Thread Laurent PETIT
Exciting times ! On Apr 8, 2013 9:35 PM, "David Nolen" wrote: > WOOT! > > > On Mon, Apr 8, 2013 at 9:33 PM, Daniel Solano Gómez > wrote: > >> Hello, all, >> >> I am happy to report that Clojure has been accepted as a mentoring >> organization for Google Summer of Code 2013. Now is the time for

Re: Clojure is in GSoC 2013!

2013-04-08 Thread David Nolen
WOOT! On Mon, Apr 8, 2013 at 9:33 PM, Daniel Solano Gómez wrote: > Hello, all, > > I am happy to report that Clojure has been accepted as a mentoring > organization for Google Summer of Code 2013. Now is the time for > sudents to start researching their projects and reaching out to members. > A

Clojure is in GSoC 2013!

2013-04-08 Thread Daniel Solano Gómez
Hello, all, I am happy to report that Clojure has been accepted as a mentoring organization for Google Summer of Code 2013. Now is the time for sudents to start researching their projects and reaching out to members. At the same time, we need to start putting together an application template for

ANN Money 1.1.0 is released

2013-04-08 Thread Michael Klishin
ClojureWerkz Money [1] is a Clojure library for working with monetary amounts and currencies, built on top of Joda Money. Release notes for 1.1.0: http://blog.clojurewerkz.org/blog/2013/04/08/money-1-dot-1-0-is-released/ 1. https://github.com/clojurewerkz/money -- MK http://github.com/michaelkl

Re: [GSoC] Clojure refactoring library and integration in Counterclockwise

2013-04-08 Thread Laurent PETIT
2013/4/8 Michael Holzer : > Hi everybody! > > I saw the project suggestion on the ideas page [0] and would be very > interested to work on it. > > First a few words about me and my background: > I'm from Graz, Austria, currently finishing up my studies in > mathematical computer sciences and inform

[GSoC] Clojure refactoring library and integration in Counterclockwise

2013-04-08 Thread Michael Holzer
Hi everybody! I saw the project suggestion on the ideas page [0] and would be very interested to work on it. First a few words about me and my background: I'm from Graz, Austria, currently finishing up my studies in mathematical computer sciences and informatics. I've been playing around with Clo

Re: Monads usage

2013-04-08 Thread Ben Wolfson
I don't know if this is adequately "in the wild" (since it's part of a monad lib itself), but part of my monads library uses a continuation monad to let two mutually recursive functions traverse and rebuild a tree structure without blowing the stack. It would be a pain to do this kind of thing by h

Re: Monads usage

2013-04-08 Thread Timothy Baldridge
oops, gen-plan was missing a helper function: (defn- with-bind [id expr psym body] `(fn [~psym] (let [[~id ~psym] ( ~expr ~psym)] (assert ~psym "Nil plan") ~body))) On Mon, Apr 8, 2013 at 9:32 AM, Timothy Baldridge wrote: > I have a love/hate relationship with monads. I th

Re: Monads usage

2013-04-08 Thread Timothy Baldridge
I have a love/hate relationship with monads. I think their use in Clojure programming is much more limited than most would like to admit. However, I have found a very nice use for them: in my case, I'm attempting to insert a very complex AST into Datomic. I'd like all my data to go into Datomic as

Monads usage

2013-04-08 Thread Carlos Galdino
Hi, I've been reading about monads for the past couple of weeks and I think I got the idea, but I still don't know when to use it since I don't have enough experience with functional programming. So, I'd like to ask you guys if you can point me to some examples of Monads usage "in the wild". B

Re: Signing libraries on clojars

2013-04-08 Thread Mark Engelberg
When I do "lein deploy clojars", the tool hangs after reporting that it has created the jar. Any idea what might be causing it to hang? On Fri, Apr 5, 2013 at 7:19 PM, Nelson Morris wrote: > Yep. There is an issue for making it work over scp, which the > lein-clojars plugin uses, at > https://g

Re: java.lang.OutOfMemoryError when slurping lots of files?

2013-04-08 Thread Adrian Muresan
Thank you very much, that worked splendidly. On Friday, April 5, 2013 5:14:30 PM UTC+2, Alex Nixon wrote: > > Java substrings prevent the original string from being garbage collected; > perhaps this also happens with regex matches? > > You can test the theory by surrounding the values in your ma