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

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

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: 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.

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

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: 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 craft.br...@gmail.com 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

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

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 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: 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 b c d) TEST3) nil

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 user=

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 jeremyhei...@gmail.comwrote: On Tue, Dec 20, 2011 at 2:05 AM, Alan Malloy a...@malloys.org 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

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)) #UnmodifiableList (1 2 3 4 5) user= (def l *1) #'user/l user= l #UnmodifiableList (1 2 3 4 5) user= (serialize! l TEST5) nil user= (.hashCode (deserialize! TEST5.ser)) 0 Jim

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

Re: ANN: codeq

2012-10-10 Thread Laurent PETIT
Exciting ! 2012/10/10 Rich Hickey richhic...@gmail.com 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

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

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: 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/codeq.html

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

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

Re: Interest in Scribble for Clojure?

2012-10-10 Thread Grant Rettke
On Tue, Oct 9, 2012 at 1:00 PM, Michael Fogus mefo...@gmail.com 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

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

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

Re: CDS tutorials

2012-10-10 Thread Michael Klishin
2012/10/10 Dmitri dmitri.sotni...@gmail.com 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

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 mef...@gmail.comjavascript: wrote: Any existing solutions or interest in something like this? There are no _public_ solutions as far as I know, So everyone has their

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, send

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

Re: Interest in Scribble for Clojure?

2012-10-10 Thread Grant Rettke
On Wed, Oct 10, 2012 at 1:11 PM, Gary Johnson gwjoh...@uvm.edu 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

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

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

2012-10-10 Thread Michael Klishin
2012/10/10 Andy Fingerhut andy.finger...@gmail.com *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

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 http://clojure-doc.org site. I do have some followup questions on

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 dev

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

[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 michael.s.klis...@gmail.com wrote: ## Announcing

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

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 were to

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 not a

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

Re: math

2012-10-10 Thread Michael Klishin
2012/10/11 kovas boguta kovas.bog...@gmail.com 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

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 here:

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

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 craft.br...@gmail.com wrote: I have a long list (or seq? result of calling map) something

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 Craft

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