trying to read table & write file

2012-10-10 Thread Brian Craft
I'm reading a table & dumping to stdout, like this: (sql/with-connection db (dorun (map #(println %) (read-table read-table is doing some gloss calls to parse some floats. Then I try to write it to a file (adapting an example), like this: (sql/with-connection db (with-open [myfile (

Re: pattern for coalescing similar adjacent items in list

2012-10-10 Thread Brian Craft
Cool, thanks! On Wednesday, October 10, 2012 5:52:54 PM UTC-7, Sean Corfield wrote: > > partition-by will probably get you started - turning (a1 a2 a3 b1 b2 c1 c2 > c3 c4) into ((a1 a2 a3) (b1 b2) (c1 c2 c3 c4)) - then map some function > over that? > > On Wed, Oct 10, 2012 at 5:22 PM, Brian Cra

Re: pattern for coalescing similar adjacent items in list

2012-10-10 Thread Sean Corfield
partition-by will probably get you started - turning (a1 a2 a3 b1 b2 c1 c2 c3 c4) into ((a1 a2 a3) (b1 b2) (c1 c2 c3 c4)) - then map some function over that? On Wed, Oct 10, 2012 at 5:22 PM, Brian Craft wrote: > I have a long list (or seq? result of calling map) something like (a1 a2 > a3 b1 b2

pattern for coalescing similar adjacent items in list

2012-10-10 Thread Brian Craft
I have a long list (or seq? result of calling map) something like (a1 a2 a3 b1 b2 c1 c2 c3 c4) I need to replace adjacent items with related attributes with single elements, like (a b c) where 'a' is derived from a1 a2 a3, and so-forth. So, again, I'm not sure how to approach this in a functi

Re: ANN: codeq

2012-10-10 Thread ronen
Awesome! this is my gateway drug into Datomic On Wednesday, October 10, 2012 4:27:37 PM UTC+2, Rich Hickey wrote: > > I released a little app today that imports Git repos into Datomic. My hope > is that it can be used as the underpinnings of some interesting Clojure > tooling. > > More info her

Re: math

2012-10-10 Thread Michael Klishin
2012/10/11 kovas boguta > Looks neat. Can I make a suggestion? > > For these cookbooks, it would be very help to know exactly which > version of clojure (and any libraries used) were used. You can even > just put the associated project.clj content at the top. > > putting project.clj in them is co

Re: math

2012-10-10 Thread kovas boguta
Looks neat. Can I make a suggestion? For these cookbooks, it would be very help to know exactly which version of clojure (and any libraries used) were used. You can even just put the associated project.clj content at the top. That way one will have confidence that this is up-to-date info, and kno

Re: [OT] Re: ANN clojure-doc.org (aka CDS), a new community-driven Clojure documentation site

2012-10-10 Thread Michael Klishin
robermann79: > I'm pretty sure you have already thought about it and it's me that missed > your considerations, but why we are not using a wiki-based tool, like > Wordpress, instead of forking a git branch? > > * Developers prefer writing docs and code examples in their favorite editor and n

Re: [OT] Re: ANN clojure-doc.org (aka CDS), a new community-driven Clojure documentation site

2012-10-10 Thread John Gabriele
On Wednesday, October 10, 2012 6:38:31 PM UTC-4, robermann79 wrote: > > I'm pretty sure you have already thought about it and it's me that missed > your considerations, but why we are not using a wiki-based tool, like > Wordpress, instead of forking a git branch? > > My original goals for CDS we

Re: ANN: codeq

2012-10-10 Thread Mark Derricutt
Mmmm codeq - the Clojure answer to the Smalltalk Image+Changes file….. Interesting. Take codeq as a running "image" at a repl. for every operation, assignment, execution, record a change. Rollback your repl, restart+replay the repl…. . On 11/10/2012, at 3:27 AM, Rich Hickey wrote: > I

[OT] Re: ANN clojure-doc.org (aka CDS), a new community-driven Clojure documentation site

2012-10-10 Thread Roberto Mannai
I'm pretty sure you have already thought about it and it's me that missed your considerations, but why we are not using a wiki-based tool, like Wordpress, instead of forking a git branch? On Mon, Oct 8, 2012 at 6:25 PM, Michael Klishin wrote: > ## Announcing clojure-doc.org > > I am starting a n

Re: math

2012-10-10 Thread John Gabriele
On Tuesday, October 9, 2012 10:38:20 PM UTC-4, Brian Craft wrote: > > I need some basic math functions, e.g. floor. I see there are some in > contrib, but I'm unable to figure out the status of contrib. Seems like > it's deprecated, or in transition, or something? To help answer questions like

Re: ANN clojure-doc.org (aka CDS), a new community-driven Clojure documentation site

2012-10-10 Thread Andrew Brehaut
On Tuesday, October 9, 2012 5:26:23 AM UTC+13, Michael Klishin wrote: > > … > * Do not copy content from blog posts unless you are the author > … > I wrote a brief introduction to web development in clojure[1] last year. If anyone wants to use it as part of or a basis for an article about web de

Re: ANN: a Clojure docs site, and github organization

2012-10-10 Thread Lee Hinman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andy, On 10/10/12 1:30 PM, Andy Fingerhut wrote: > Michael, thanks for the detailed response, and I appreciate the > effort you are putting forth in the clojure-doc.org > site. > > I do have some followup questions on clojure

Re: ANN: a Clojure docs site, and github organization

2012-10-10 Thread Michael Klishin
2012/10/10 Andy Fingerhut > *Whose* goal is it to make those changes to clojuredocs.org? > > Someone that is willing and able to write the code, has the time to do it, > and is authorized to make changes to the clojuredocs.org site? > > I ask not because I expect anyone to make these changes, but

Re: ANN: a Clojure docs site, and github organization

2012-10-10 Thread Andy Fingerhut
Michael, thanks for the detailed response, and I appreciate the effort you are putting forth in the clojure-doc.org site. I do have some followup questions on clojuredocs.org, since you gave some description of what you hope and/or expect to happen there. On Oct 5, 2012, at 1:52 PM, Michael Kli

Re: Interest in Scribble for Clojure?

2012-10-10 Thread Grant Rettke
On Wed, Oct 10, 2012 at 1:11 PM, Gary Johnson wrote: > A lot of scribble's features are geared towards providing tooling for > Literate Programming, I didn't read into Scribble like it's goal was LP, but I could have missed that and not known enough about LP, too. > and currently I'm way more th

Re: Interest in Scribble for Clojure?

2012-10-10 Thread Gary Johnson
A lot of scribble's features are geared towards providing tooling for Literate Programming, and currently I'm way more than satisfied with org-babel. This has been built into Emacs by defaut since IIRC version 23.2 or so. Opening any file in org-mode (`M-x org-mode') immediately provides you wi

Re: CDS tutorials

2012-10-10 Thread John Gabriele
> We will figure out how to reorganize things later. > > His noir tut is multi-part and contains screenshots. I'd suggest it get its own directory under tutorials. ---John -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, sen

Re: Interest in Scribble for Clojure?

2012-10-10 Thread John Gabriele
On Wednesday, October 10, 2012 11:32:22 AM UTC-4, Grant Rettke wrote: > > On Tue, Oct 9, 2012 at 1:00 PM, Michael Fogus > > wrote: > >> Any existing solutions or interest in something like this? > > > > There are no _public_ solutions as far as I know, > > So everyone has their private custom

Re: CDS tutorials

2012-10-10 Thread Michael Klishin
2012/10/10 Dmitri > I saw the new ClojureDocs site and I'd like to contribute some tutorials > I've made on setting up the environment and making web apps. > > I have a tutorial on using Eclipse and CounterClockwise at > https://www.yogthos.net/blog/18-Setting+up+Eclipse+for+Clojure > and I've go

Re: ANN: codeq

2012-10-10 Thread Rich Hickey
On Oct 10, 2012, at 11:02 AM, Meikel Brandmeyer (kotarak) wrote: > Hi, > > Am Mittwoch, 10. Oktober 2012 16:27:37 UTC+2 schrieb Rich Hickey: > I released a little app today that imports Git repos into Datomic. My hope is > that it can be used as the underpinnings of some interesting Clojure too

CDS tutorials

2012-10-10 Thread Dmitri
Hi, I saw the new ClojureDocs site and I'd like to contribute some tutorials I've made on setting up the environment and making web apps. I have a tutorial on using Eclipse and CounterClockwise at https://www.yogthos.net/blog/18-Setting+up+Eclipse+for+Clojure and I've got an extensive Noir tuto

Re: Interest in Scribble for Clojure?

2012-10-10 Thread Grant Rettke
On Tue, Oct 9, 2012 at 1:00 PM, Michael Fogus wrote: >> Any existing solutions or interest in something like this? > > There are no _public_ solutions as far as I know, So everyone has their private custom approaches I guess? I'm curious if people would share them. > although I think it can be d

Re: ANN: codeq

2012-10-10 Thread Rostislav Svoboda
Isn't it somehow related to the thread we had here few X ago: "Idea around SCMs and Clojure" https://groups.google.com/forum/?fromgroups=#!topic/clojure/9N15TA_mJKo -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to c

Re: ANN: codeq

2012-10-10 Thread Jim foo.bar
On 10/10/12 15:27, Rich Hickey wrote: I released a little app today that imports Git repos into Datomic. My hope is that it can be used as the underpinnings of some interesting Clojure tooling. More info here: http://blog.datomic.com/2012/10/codeq.html Rich Good stuff! :-) Jim -- You rece

Re: ANN: codeq

2012-10-10 Thread Meikel Brandmeyer (kotarak)
Hi, Am Mittwoch, 10. Oktober 2012 16:27:37 UTC+2 schrieb Rich Hickey: > > I released a little app today that imports Git repos into Datomic. My hope > is that it can be used as the underpinnings of some interesting Clojure > tooling. > > More info here: > > http://blog.datomic.com/2012/10/code

Re: Parallelising reduce-kv - r/fold into maps

2012-10-10 Thread Wolodja Wentland
On Tue, Oct 09, 2012 at 15:31 -0700, Jean Niklas L'orange wrote: >On Tuesday, October 9, 2012 9:14:51 PM UTC+2, Wolodja Wentland wrote: > > --- snip --- > (reduce-kv >  (fn [ret k v] >   (assoc ret k (func-that-does-something-with v))) >  some-map)) > --- snip --

Re: bug in clojure.lang.ASeq

2012-10-10 Thread Jim foo.bar
My previous post is not exactly true...From the java docs: "Returns an unmodifiable view of the specified list. ... .Query operations on the returned list "read through" to the specified list and attempts to modify the returned list, whether direct or via its iterator, result in an Unsupported

Re: ANN: codeq

2012-10-10 Thread Laurent PETIT
Exciting ! 2012/10/10 Rich Hickey > I released a little app today that imports Git repos into Datomic. My hope > is that it can be used as the underpinnings of some interesting Clojure > tooling. > > More info here: > > http://blog.datomic.com/2012/10/codeq.html > > Rich > > -- > You received th

ANN: codeq

2012-10-10 Thread Rich Hickey
I released a little app today that imports Git repos into Datomic. My hope is that it can be used as the underpinnings of some interesting Clojure tooling. More info here: http://blog.datomic.com/2012/10/codeq.html Rich -- You received this message because you are subscribed to the Google Gro

Re: bug in clojure.lang.ASeq

2012-10-10 Thread Jim foo.bar
Hmmm...It turns out this is not exclusive to Clojure... user=> (java.util.Collections/unmodifiableList '(1 2 3 4 5)) # user=> (def l *1) #'user/l user=> l # user=> (serialize! l "TEST5") nil user=> (.hashCode (deserialize! "TEST5.ser")) 0 Jim On 10/10/12 15:16, Jim foo.bar wrote: Lazy-seqs

Re: Could be my favourite improvement in 1.4

2012-10-10 Thread Jonathan Fischer Friberg
On Thu, Jan 19, 2012 at 8:50 PM, Jeremy Heiler wrote: > On Tue, Dec 20, 2011 at 2:05 AM, Alan Malloy wrote: > > I agree, this horrifies me. It isn't even as simple as "letting them > > be whitespace", because presumably you want (read-string "{a: b}") to > > result in (hash-map 'a 'b), but (read-

Re: bug in clojure.lang.ASeq

2012-10-10 Thread Jim foo.bar
Lazy-seqs also seem to behave: user=> (serialize! (map inc [1 2 3 4]) "TEST4") nil user=> (.hashCode (deserialize! "TEST4.ser")) 986115 Jim On 10/10/12 15:14, Jim foo.bar wrote: I can confirm I am seeing the behavior you describe under Clojure 1.4... user=> (serialize! [1 2 3 4 5] "TEST") nil

Re: bug in clojure.lang.ASeq

2012-10-10 Thread Jim foo.bar
I can confirm I am seeing the behavior you describe under Clojure 1.4... user=> (serialize! [1 2 3 4 5] "TEST") nil user=> (.hashCode (deserialize! "TEST.ser")) 29615266 user=> (serialize! ["a" "b" "c" "d"] "TEST2") nil user=> (.hashCode (deserialize! "TEST2.ser")) 3910595 user=> (serialize! '("a

Re: bug in clojure.lang.ASeq

2012-10-10 Thread N8Dawgrr
I don't think that's a realistic option for me. I have java objects embedded in the Clojure forms, and the graph is pretty big. On Wednesday, October 10, 2012 2:02:45 PM UTC+1, Stuart Sierra wrote: > > I would recommend serializing as strings via pr/read over Java > serialization, but this still

Re: understanding 'binding' use in clojure.java.jdbc

2012-10-10 Thread Stuart Sierra
On Tuesday, October 9, 2012 10:25:05 PM UTC-4, Sean Corfield wrote: > > This is why c.j.jdbc is getting an API overall that will expose functions > that accept the connection or the db-spec directly (and the old API will be > rewritten in terms of the new one for compatibility). Excellent. -S

Re: bug in clojure.lang.ASeq

2012-10-10 Thread Stuart Sierra
I would recommend serializing as strings via pr/read over Java serialization, but this still sounds like a legitimate bug. -S -- 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 Note that p

Re: math

2012-10-10 Thread Tom Clark
Probably the best way to get basic maths functions in Clojure is to use java.lang.Math. Cheers, Tom On Wed, Oct 10, 2012 at 3:38 PM, Brian Craft wrote: > I need some basic math functions, e.g. floor. I see there are some in > contrib, but I'm unable to figure out the status of contrib. Seems lik

ANN couchbase-clj 0.1.0

2012-10-10 Thread otabat
couchbase-clj is a Clojure client for Couchbase Server 2.0. This library provides a thin layer of Clojure that simplifies the complicated Java interface. couchbase-clj 0.1.0 is the initial release. GitHub https://github.com/otabat/couchbase-clj API Docs http://otabat.github.com/couchbase-cl

Re: Could be my favourite improvement in 1.4

2012-10-10 Thread Rik Diede
I'm glad this issue caught my eye. I disagree with this change as well, and I hope it will be reconsidered (see alternative solution below). I strongly agree with what is already said on the JIRA page by Joseph Smith. What syntaxes will we support? Do we add the latest and greatest from a few

Re: understanding 'binding' use in clojure.java.jdbc

2012-10-10 Thread gaz jones
Yeah, you probably shouldn't rely on this but I think it will still work. I have done something similar before when reading from 3 databases simultaneously (3 nested with-connection and with-query-result calls) and I believe (connection) is only called once when creating the prepared statement. On

bug in clojure.lang.ASeq

2012-10-10 Thread N8Dawgrr
Hi, stumbled on a nasty bug in Clojure. I'm transferring Clojure objects around using java serialization. When de-serializing a List (clojure.lang.ASeq) it has a hashCode of 0. This means lookups for the object in HashMaps PersistentHashMaps HashSets etc fail. The pre-serialized version of the

Re: ANN: cronj - task scheduling

2012-10-10 Thread zcaudate
> > okay... the readme is now updated =) -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubs

Re: math

2012-10-10 Thread zcaudate
The apache commons library - http://commons.apache.org/math/ is really rock solid. all the utilities can be found in: http://commons.apache.org/math/apidocs/org/apache/commons/math3/util/FastMath.html see http://stackoverflow.com/questions/12327120/finding-all-the-power-roots-in-clojure for a