Re: [ANN] clojure.java.jdbc 0.2.3 available on Maven Central

2012-06-26 Thread mnicky
Thanks! However it'd be nice if it was released as a separate library.

Also, I thought that clojure.contrib.datalog worked for SQL queries... That 
would be even better ;)

On Monday, June 25, 2012 1:50:19 PM UTC+2, Niels van Klaveren wrote:
>
> You can use the Datomic datalog implementation to query Clojure 
> collections . I think this is the same 
> use clojure.contrib.datalog had.
>
> On Monday, June 25, 2012 12:47:29 PM UTC+2, mnicky wrote:
>>
>>
>>
>> On Saturday, June 23, 2012 1:20:30 AM UTC+2, Niels van Klaveren wrote:
>>>
>>>  
>>> I was thinking if an SQL generation DSL / library could be based on 
>>> core.logic ? 
>>>  
>>>
>> Something like revival of clojure.contrib.datalog would be great.
>>
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

leinigen 1.7.1 stalled when used from Jenkins

2012-06-26 Thread Pierre Allix
Hello,

I have a build script called from Jenkins that calls "lein clean". 
Unfortunately lein stalled when executed from the script whereas it works 
fine if I do executed it from the command line.

Leiningen is stalled executing this command:

java 
-Xbootclasspath/a:/home/jboss/.m2/repository/org/clojure/clojure/1.2.1/clojure-1.2.1.jar
 
-client -XX:+TieredCompilation 
-Dleiningen.original.pwd=/home/jboss/.jenkins/workspace/Carneades/src/CarneadesEngine
 
-Dleiningen.trampoline-file=/tmp/lein-trampoline-2614 -cp 
:test/:src/:resources/:/home/jboss/.lein/self-installs/leiningen-1.7.1-standalone.jar
 
jline.ConsoleRunner clojure.main -e (use 'leiningen.core)(-main) /dev/null 
clean

Strace shows this error:
strace -p 2640
Process 2640 attached - interrupt to quit
--- SIGTTOU (Stopped (tty output)) @ 0 (0) ---
futex(0xb6cf4bd8, FUTEX_WAIT, 2641, NULLp^C 

and trying to execute the command from the command line shows this 
stacktrace  (but here i'm not sure that my escaping of parenthesis and 
quote with backslashes is correct)


java 
-Xbootclasspath/a:/home/jboss/.m2/repository/org/clojure/clojure/1.2.1/clojure-1.2.1.jar
 
-client -XX:+TieredCompilation 
-Dleiningen.original.pwd=/home/jboss/.jenkins/workspace/Carneades/src/CarneadesEngine
 
-Dleiningen.trampoline-file=/tmp/lein-trampoline-27012 -cp 
:test/:src/:resources/:/home/jboss/.lein/self-installs/leiningen-1.7.1-standalone.jar
 
jline.ConsoleRunner clojure.main -e \(use \'leiningen.core\)\(\-main\) help
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at jline.ConsoleRunner.main(ConsoleRunner.java:69)
Caused by: clojure.lang.LispReader$ReaderException: java.lang.Exception: 
EOF while reading
at clojure.lang.LispReader.read(LispReader.java:180)
at clojure.core$read.invoke(core.clj:2884)
at clojure.core$read.invoke(core.clj:2882)
at clojure.main$eval_opt.invoke(main.clj:233)
at clojure.main$initialize.invoke(main.clj:254)
at clojure.main$script_opt.invoke(main.clj:270)
at clojure.main$main.doInvoke(main.clj:354)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at clojure.lang.Var.invoke(Var.java:377)
at clojure.lang.AFn.applyToHelper(AFn.java:172)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
... 5 more
Caused by: java.lang.Exception: EOF while reading
at clojure.lang.LispReader.readDelimitedList(LispReader.java:1043)
at clojure.lang.LispReader$ListReader.invoke(LispReader.java:900)
at clojure.lang.LispReader.read(LispReader.java:145)
... 16 more



Any ideas?

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: [ANN] clojure.java.jdbc 0.2.3 available on Maven Central

2012-06-26 Thread Niels van Klaveren
Yeah, it's a pain to include Datomic's Datalog implementation through Maven 
dependencies, since you need to install the jar by hand. Afaik 
clojure.contrib.datalog didn't compile to SQL. Theoretically it should be 
possible to do so, since Datalog is a superset of SQL. However, the extra 
functionality in Datalog would be hard to implement in SQL (for instance, 
recursive queries), and result in a lot of not very optimal SQL queries.

On Tuesday, June 26, 2012 11:45:15 AM UTC+2, mnicky wrote:
>
> Thanks! However it'd be nice if it was released as a separate library.
>
> Also, I thought that clojure.contrib.datalog worked for SQL queries... 
> That would be even better ;)
>
> On Monday, June 25, 2012 1:50:19 PM UTC+2, Niels van Klaveren wrote:
>>
>> You can use the Datomic datalog implementation to query Clojure 
>> collections . I think this is the same 
>> use clojure.contrib.datalog had.
>>
>> On Monday, June 25, 2012 12:47:29 PM UTC+2, mnicky wrote:
>>>
>>>
>>>
>>> On Saturday, June 23, 2012 1:20:30 AM UTC+2, Niels van Klaveren wrote:

  
 I was thinking if an SQL generation DSL / library could be based on 
 core.logic ? 
  

>>> Something like revival of clojure.contrib.datalog would be great.
>>>
>>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: lein-daemon 0.3

2012-06-26 Thread Jack Moffitt
>>> I've released a new version of lein-daemon. daemon is like 'lein run',
>>> only it runs the process in the background rather than blocking.
>>>
>>> 0.3 and up is a complete re-write, that no longer depends on apache
>>> commons daemon. The new version has no dependencies on any external
>>> programs.
>>>
>>> For more, see https://github.com/arohner/lein-daemon

Was there any particular reason for the removal of Commons Daemon
other than reducing dependencies? Does everyone just use lein run and
lein daemon in production as opposed to uberjars and jsvc?

jack.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Buggy FP behavior with Clojure 1.3

2012-06-26 Thread Armando Blancas
I don't get the exception on 1.4.0:

~ $ clj
Clojure 1.4.0
user=> 1e309
Infinity
user=> 


On Monday, June 25, 2012 11:09:14 PM UTC-7, Sean Corfield wrote:
>
> On Mon, Jun 25, 2012 at 10:30 PM, dennis zhuang  
> wrote: 
> > Added a postfix "M" to make the number as BigDecimal or "N" as a 
> BigInteger: 
>
> Yes... 
>
> user=> 1e309M 
> 1E+309M 
>
> The "Infinity" exception seems wrong but clearly using BigDecimal makes it 
> work. 
> -- 
> Sean A Corfield -- (904) 302-SEAN 
> An Architect's View -- 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 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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: How I can convert this python line to clojure?

2012-06-26 Thread Antonio Recio
@Lars Nilson: You are right, I have take a look 
at vtkDataSetAttributes.java and there is not any reference to SCALARS.

In vtk documentation they have included SCALARS.
http://www.vtk.org/doc/nightly/html/classvtkDataSetAttributes.html#a156a8842bffd9139fa81193cca0d5bcbaefbcc1c766a1bad6e1e09d5be8388e3d

And you can find SCALARS in the python example
http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Graphics/Python/SingleYoungsMaterialInterface.py

Why is not included SCALARS in the java version? Which could be the 
equivalent in java/clojure?

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: How I can convert this python line to clojure?

2012-06-26 Thread Lars Nilsson
On Tue, Jun 26, 2012 at 1:45 PM, Antonio Recio  wrote:
> @Lars Nilson: You are right, I have take a look at vtkDataSetAttributes.java
> and there is not any reference to SCALARS.
>
> In vtk documentation they have included SCALARS.
> http://www.vtk.org/doc/nightly/html/classvtkDataSetAttributes.html#a156a8842bffd9139fa81193cca0d5bcbaefbcc1c766a1bad6e1e09d5be8388e3d
>
> And you can find SCALARS in the python example
> http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Graphics/Python/SingleYoungsMaterialInterface.py
>
> Why is not included SCALARS in the java version? Which could be the
> equivalent in java/clojure?

I'd hazard a guess it's a deficiency in the automatically generated
Java source code from the C++ version. Until that is rectified, you'd
need to use the integer values represented by the num (by looking at
the C++ docs to figure out what they are. SCALARS would be 0 for
instance) or define your own set of symbols for the values in
vtkDataSetAttributes::AttributeTypes, and other enums like it, for
more readable code in your own codebase..

Lars Nilsson

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


ANN Monger 1.0.0 is released

2012-06-26 Thread Michael Klishin
After a few weeks of post-RC cooling down, Monger 1.0.0 is released to clojars.

Changes from 1.0.0-rc2:
https://github.com/michaelklishin/monger/blob/master/ChangeLog.md

Get started in an instant:
http://clojuremongodb.info/articles/getting_started.html

Read documentation guides:
http://clojuremongodb.info

Watch Monger on Github:
https://github.com/michaelklishin/monger

If you use or consider using Clojure with MongoDB, please give Monger a try!

MK

mich...@defprotocol.org



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: How I can convert this python line to clojure?

2012-06-26 Thread Antonio Recio
I would like convert this python line to clojure:
vtkCompositeDataSet.NAME()

When I read vtkCompositeDataSet.java I find this:
  private native long NAME_16();
  public vtkInformationStringKey NAME() {
long temp = NAME_16();

if (temp == 0) return null;
return 
(vtkInformationStringKey)vtkObject.JAVA_OBJECT_MANAGER.getJavaObject(temp);
  }

I have tried in clojure this, but it doesn't work :
user=> (println (vtk.vtkCompositeDataSet$Attr/NAME))
#

How I can write it in clojure?

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: How I can convert this python line to clojure?

2012-06-26 Thread Lars Nilsson
On Tue, Jun 26, 2012 at 3:34 PM, Antonio Recio  wrote:
> I would like convert this python line to clojure:
> vtkCompositeDataSet.NAME()
>
> When I read vtkCompositeDataSet.java I find this:
>   private native long NAME_16();
>   public vtkInformationStringKey NAME() {
>     long temp = NAME_16();
>
>     if (temp == 0) return null;
>     return
> (vtkInformationStringKey)vtkObject.JAVA_OBJECT_MANAGER.getJavaObject(temp);
>   }
>
> I have tried in clojure this, but it doesn't work :
> user=> (println (vtk.vtkCompositeDataSet$Attr/NAME))
> # vtk.vtkCompositeDataSet$Attr, compiling:(REPL:13)>
>
> How I can write it in clojure?

vtkCompositeDataSet does not appear to have an Attr
enum/class/whatever inside it in the C++ API. As
vtkCompositeDataSet.NAME is not a static function in the Java API
(discovered by yet again looking at the generated Java source code)
you'll need an object instance, in contrast to C++ where it is
declared static.. The following works for me (as in, it returns a Java
object of type vtkInformationStringKey), but I have no idea how
meaningful it is..

(.NAME (vtkCompositeDataSet.)) or (.NAME (new vtkCompositeDataSet))

I'm guessing you'll want to get in touch with VTK people at this point
to get better answers to how to use the Java API in general (I've just
dug into the generated Java code for every answer I've given so far).

Lars Nilsson

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Overtone 0.7

2012-06-26 Thread Sam Aaron
Hi all, 

I just thought I'd give you a quick heads up that Overtone 0.7 has been 
released. It represents around 6 months worth of solid work (~500 commits) and 
we're really rather pleased with how far we've come. I'm especially pleased to 
welcome our new committers. Without these people (and also all the 
long-standing trench-dwelling committers) Overtone wouldn't be such an exciting 
and fun project to hack on:

* Damion Junk
* Jacob Lee
* Fabian Steeg
* Michael Bernstein
* Ian Davies



Now, I thought I'd run you through some of the aspects I'm most thrilled about:

## Tap into Quil

Overtone now ships with the tap cgen. This little gem packs way above its 
weight. It essentially gives you the ability to reach into any aspect of the 
SuperCollider synth engine and tap the values flowing through. These values are 
then magically swapped into an atom which you can then deref from Clojure-land 
and do what you will with the contents. This is awesome for hooking Overtone up 
with visualisation libraries such as Quil.

## Freesound trickery

Overtone core hacker Kevin Neaton has been working wonders with our Freesound 
support. For those not in the know, freesound.org is an open-source sound 
sample database full of creative-commons licensed sound snippets. Kevin has 
been working with these guys to improve their support for large sample bundles, 
and as a result the sampled-piano samples are now hosted on freesound.org. This 
should prove to be a lot more reliable than the previous solution. Also, he's 
added search capability right into the REPL - so no need to leave the comfort 
of your Clojure prompt in order to explore the huge world of free samples out 
there.

## MIDI event stream

On boot, Overtone now hooks up to any connected MIDI device and broadcasts all 
events onto the global event stream. This makes working with your MIDI keyboard 
and controllers easier than ever. We're really enjoying the event stream and 
feel there's a lot more potential to discover with it.

So, what are you waiting for? Create a new lein project, add "overtone 0.7.0" 
as a dependency, start a REPL, and start making sounds. As always, the 
cheatsheet is your honourable guide to the plethora of functionality at your 
disposal:

http://cloud.github.com/downloads/overtone/overtone/overtone-cheat-sheet.pdf

For those that like peering into the murky details, here's the more lengthy 
changelog:

https://github.com/overtone/overtone/blob/master/CHANGELOG.md

Happy Hacking!

Sam

---
http://sam.aaron.name




-- 
http://sam.aaron.name


-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Buggy FP behavior with Clojure 1.3

2012-06-26 Thread Allen Johnson
When I run the repl from leiningen (v2.0.0-preview6) I get the
Infinity exception.  But when I run the repl straight from the
clojure.jar it works without error.

java -jar ~/.m2/repository/org/clojure/clojure/1.4.0/clojure-1.4.0.jar

AJ

On Tue, Jun 26, 2012 at 11:25 AM, Armando Blancas  wrote:
> I don't get the exception on 1.4.0:
>
> ~ $ clj
> Clojure 1.4.0
> user=> 1e309
> Infinity
> user=>
>
>
> On Monday, June 25, 2012 11:09:14 PM UTC-7, Sean Corfield wrote:
>>
>> On Mon, Jun 25, 2012 at 10:30 PM, dennis zhuang 
>> wrote:
>> > Added a postfix "M" to make the number as BigDecimal or "N" as a
>> > BigInteger:
>>
>> Yes...
>>
>> user=> 1e309M
>> 1E+309M
>>
>> The "Infinity" exception seems wrong but clearly using BigDecimal makes it
>> work.
>> --
>> Sean A Corfield -- (904) 302-SEAN
>> An Architect's View -- 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 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Buggy FP behavior with Clojure 1.3

2012-06-26 Thread Timothy Baldridge
> On Tue, Jun 26, 2012 at 11:25 AM, Armando Blancas  wrote:
>> I don't get the exception on 1.4.0:


Is this a 64bit vs 32bit issue?

Timothy

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Overtone 0.7

2012-06-26 Thread Base
Fantastic!!!

On Tuesday, June 26, 2012 3:31:28 PM UTC-5, Sam Aaron wrote:
>
> Hi all, 
>
> I just thought I'd give you a quick heads up that Overtone 0.7 has been 
> released. It represents around 6 months worth of solid work (~500 commits) 
> and we're really rather pleased with how far we've come. I'm especially 
> pleased to welcome our new committers. Without these people (and also all 
> the long-standing trench-dwelling committers) Overtone wouldn't be such an 
> exciting and fun project to hack on: 
>
> * Damion Junk 
> * Jacob Lee 
> * Fabian Steeg 
> * Michael Bernstein 
> * Ian Davies 
>
>
>
> Now, I thought I'd run you through some of the aspects I'm most thrilled 
> about: 
>
> ## Tap into Quil 
>
> Overtone now ships with the tap cgen. This little gem packs way above its 
> weight. It essentially gives you the ability to reach into any aspect of 
> the SuperCollider synth engine and tap the values flowing through. These 
> values are then magically swapped into an atom which you can then deref 
> from Clojure-land and do what you will with the contents. This is awesome 
> for hooking Overtone up with visualisation libraries such as Quil. 
>
> ## Freesound trickery 
>
> Overtone core hacker Kevin Neaton has been working wonders with our 
> Freesound support. For those not in the know, freesound.org is an 
> open-source sound sample database full of creative-commons licensed sound 
> snippets. Kevin has been working with these guys to improve their support 
> for large sample bundles, and as a result the sampled-piano samples are now 
> hosted on freesound.org. This should prove to be a lot more reliable than 
> the previous solution. Also, he's added search capability right into the 
> REPL - so no need to leave the comfort of your Clojure prompt in order to 
> explore the huge world of free samples out there. 
>
> ## MIDI event stream 
>
> On boot, Overtone now hooks up to any connected MIDI device and broadcasts 
> all events onto the global event stream. This makes working with your MIDI 
> keyboard and controllers easier than ever. We're really enjoying the event 
> stream and feel there's a lot more potential to discover with it. 
>
> So, what are you waiting for? Create a new lein project, add "overtone 
> 0.7.0" as a dependency, start a REPL, and start making sounds. As always, 
> the cheatsheet is your honourable guide to the plethora of functionality at 
> your disposal: 
>
>
> http://cloud.github.com/downloads/overtone/overtone/overtone-cheat-sheet.pdf 
>
> For those that like peering into the murky details, here's the more 
> lengthy changelog: 
>
> https://github.com/overtone/overtone/blob/master/CHANGELOG.md 
>
> Happy Hacking! 
>
> Sam 
>
> --- 
> http://sam.aaron.name 
>
>
>
>
> -- 
> http://sam.aaron.name 
>
>
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Distributed transactions

2012-06-26 Thread Jim Crossley
Well, it took a little longer than I thought it would, but we announced 
support for XA on Immutant today: 
http://immutant.org/news/2012/06/26/transactions/

Enjoy!
Jim

On Saturday, December 31, 2011 7:59:27 PM UTC-5, Jim Crossley wrote:
>
>
>
> On Dec 31, 7:33 pm, Stuart Halloway  wrote: 
> > > On Dec 31, 1:16 pm, Jeff Heon  wrote: 
> > >> Immutant is going to have distributed (XA) transactions. 
> > >> The're "furiously" working on it 8) 
> > 
> > >>http://immutant.org/ 
> > 
> > > "Furiously" is probably not the right word, but XA is definitely on 
> > > the roadmap. It's just a matter of wiring up the TransactionManager 
> > > provided by JBoss AS7. We've done this already for Ruby with 
> > > TorqueBox, so it should be straightforward. With any luck, we'll have 
> > > it wired up by Februrary, certainly in time for Clojure/West. 
> > 
> > > Jim 
> > 
> > What wiring is needed, beyond knowing how to call a Java API from 
> Clojure? 
>
> At a minimum, we need to obtain a TransactionManager (easy) and define 
> XAResource implementations for each resource participating in the 
> transaction (easy for messaging, not as easy for db). In ruby, the 
> activerecord jdbc adapter helps us with the latter, allowing us to 
> automatically create XAResource's for each key listed in the Rails 
> database.yml file, using standard ruby conventions to provide XA "for 
> free" when a rails app is deployed under TorqueBox. 
>
> We need to figure out what those conventions are for clojure. Or help 
> define them. 
>
> Also, the Java API's for XA are kinda awkward. I hope we can wrap them 
> a bit to make the common usage patterns simple. 
>
> Now, back to drinking.  :) 
>
> Jim 
>
> > 
> > Stu 
> > 
> > Stuart Halloway 
> > Clojure/corehttp://clojure.com

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Buggy FP behavior with Clojure 1.3

2012-06-26 Thread Armando Blancas
Tried it on my old XP laptop and got the same result with 32 bits.

On Tuesday, June 26, 2012 2:46:07 PM UTC-7, tbc++ wrote:
>
> > On Tue, Jun 26, 2012 at 11:25 AM, Armando Blancas  
> wrote: 
> >> I don't get the exception on 1.4.0: 
>
>
> Is this a 64bit vs 32bit issue? 
>
> Timothy 
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Buggy FP behavior with Clojure 1.3

2012-06-26 Thread Sean Corfield
Makes sense. I got the exception on my System76 Netbook which,
although technically 64-bit, is mostly running 32-bit software,
including Java.

On Tue, Jun 26, 2012 at 5:56 PM, Armando Blancas  wrote:
> Tried it on my old XP laptop and got the same result with 32 bits.
>
>
> On Tuesday, June 26, 2012 2:46:07 PM UTC-7, tbc++ wrote:
>>
>> > On Tue, Jun 26, 2012 at 11:25 AM, Armando Blancas 
>> > wrote:
>> >> I don't get the exception on 1.4.0:
>>
>>
>> Is this a 64bit vs 32bit issue?
>>
>> Timothy

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Buggy FP behavior with Clojure 1.3

2012-06-26 Thread Colin Jones
To address the Infinity exception that Sean & AJ are seeing, I think the 
issue there is that in REPLy / lein repl, we do a `read` of the input, and 
then `pr-str` the result and send it on to nREPL. So when nREPL goes to 
re-read the value back in, that's what triggers the compiler error.

user=> (pr-str (read-string "1e308"))
"1.0E308"
user=> (pr-str (read-string "1e309"))
"Infinity"

;;; and then across the wire...

user=> (eval (read-string "1.0E308"))
1.0E308
user=> (eval (read-string "Infinity"))
CompilerException java.lang.RuntimeException: Unable to resolve symbol: 
Infinity in this context, compiling:(NO_SOURCE_PATH:1) 


Incidentally, the reason for the full read rather than a dumb 
send-on-newline strategy is so that we can accumulate multiple lines of a 
form before sending to nREPL. Round-tripping read/pr-str like this has 
seemed to work out fine so far, but I'm imagining there may be other edge 
cases like this that could get tricky. So maybe there's an alternate 
strategy we can come up with. I'd appreciate suggestions on the Github 
issue I just opened for it: https://github.com/trptcolin/reply/issues/71

-Colin



On Tuesday, June 26, 2012 4:37:56 PM UTC-5, mefesto wrote:
>
> When I run the repl from leiningen (v2.0.0-preview6) I get the 
> Infinity exception.  But when I run the repl straight from the 
> clojure.jar it works without error. 
>
> java -jar ~/.m2/repository/org/clojure/clojure/1.4.0/clojure-1.4.0.jar 
>
> AJ 
>
> On Tue, Jun 26, 2012 at 11:25 AM, Armando Blancas  
> wrote: 
> > I don't get the exception on 1.4.0: 
> > 
> > ~ $ clj 
> > Clojure 1.4.0 
> > user=> 1e309 
> > Infinity 
> > user=> 
> > 
> > 
> > On Monday, June 25, 2012 11:09:14 PM UTC-7, Sean Corfield wrote: 
> >> 
> >> On Mon, Jun 25, 2012 at 10:30 PM, dennis zhuang  
> >> wrote: 
> >> > Added a postfix "M" to make the number as BigDecimal or "N" as a 
> >> > BigInteger: 
> >> 
> >> Yes... 
> >> 
> >> user=> 1e309M 
> >> 1E+309M 
> >> 
> >> The "Infinity" exception seems wrong but clearly using BigDecimal makes 
> it 
> >> work. 
> >> -- 
> >> Sean A Corfield -- (904) 302-SEAN 
> >> An Architect's View -- 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 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 unsubscribe from this group, send email to 
> > clojure+unsubscr...@googlegroups.com 
> > For more options, visit this group at 
> > http://groups.google.com/group/clojure?hl=en 
>

On Tuesday, June 26, 2012 4:37:56 PM UTC-5, mefesto wrote:
>
> When I run the repl from leiningen (v2.0.0-preview6) I get the 
> Infinity exception.  But when I run the repl straight from the 
> clojure.jar it works without error. 
>
> java -jar ~/.m2/repository/org/clojure/clojure/1.4.0/clojure-1.4.0.jar 
>
> AJ 
>
> On Tue, Jun 26, 2012 at 11:25 AM, Armando Blancas  
> wrote: 
> > I don't get the exception on 1.4.0: 
> > 
> > ~ $ clj 
> > Clojure 1.4.0 
> > user=> 1e309 
> > Infinity 
> > user=> 
> > 
> > 
> > On Monday, June 25, 2012 11:09:14 PM UTC-7, Sean Corfield wrote: 
> >> 
> >> On Mon, Jun 25, 2012 at 10:30 PM, dennis zhuang  
> >> wrote: 
> >> > Added a postfix "M" to make the number as BigDecimal or "N" as a 
> >> > BigInteger: 
> >> 
> >> Yes... 
> >> 
> >> user=> 1e309M 
> >> 1E+309M 
> >> 
> >> The "Infinity" exception seems wrong but clearly using BigDecimal makes 
> it 
> >> work. 
> >> -- 
> >> Sean A Corfield -- (904) 302-SEAN 
> >> An Architect's View -- 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 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 unsubscribe from this group, send email to 
> > clojure+unsubscr...@googlegroups.com 
> > For more options, visit this group at 
> > http://groups.google.com/group/clojure?hl=en 
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: [ANN] clojure.java.jdbc 0.2.3 available on Maven Central

2012-06-26 Thread Chas Emerick
Random thought: recursive queries are possible in SQL using recursive common 
table expressions.  The PostgreSQL manual has a good introduction to them:

http://www.postgresql.org/docs/9.1/static/queries-with.html

And another introduction to them, in the particular area of querying 
hierarchical data using recursive CTEs:

http://explainextended.com/2009/07/17/postgresql-8-4-preserving-order-for-hierarchical-query/

Cheers,

- Chas

On Jun 26, 2012, at 8:26 AM, Niels van Klaveren wrote:

> Yeah, it's a pain to include Datomic's Datalog implementation through Maven 
> dependencies, since you need to install the jar by hand. Afaik 
> clojure.contrib.datalog didn't compile to SQL. Theoretically it should be 
> possible to do so, since Datalog is a superset of SQL. However, the extra 
> functionality in Datalog would be hard to implement in SQL (for instance, 
> recursive queries), and result in a lot of not very optimal SQL queries.
> 
> On Tuesday, June 26, 2012 11:45:15 AM UTC+2, mnicky wrote:
> Thanks! However it'd be nice if it was released as a separate library.
> 
> Also, I thought that clojure.contrib.datalog worked for SQL queries... That 
> would be even better ;)
> 
> On Monday, June 25, 2012 1:50:19 PM UTC+2, Niels van Klaveren wrote:
> You can use the Datomic datalog implementation to query Clojure collections. 
> I think this is the same use clojure.contrib.datalog had.
> 
> On Monday, June 25, 2012 12:47:29 PM UTC+2, mnicky wrote:
> 
> 
> On Saturday, June 23, 2012 1:20:30 AM UTC+2, Niels van Klaveren wrote:
>  
> I was thinking if an SQL generation DSL / library could be based on 
> core.logic ? 
>  
> Something like revival of clojure.contrib.datalog would be great.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Buggy FP behavior with Clojure 1.3

2012-06-26 Thread Armando Blancas
Just to clarify, I meant the same result as I got on OSX with 64 bits, 
namely Infinity. Both with 1.4.0. I'm not getting the exception.

On Tuesday, June 26, 2012 6:06:13 PM UTC-7, Sean Corfield wrote:
>
> Makes sense. I got the exception on my System76 Netbook which, 
> although technically 64-bit, is mostly running 32-bit software, 
> including Java. 
>
> On Tue, Jun 26, 2012 at 5:56 PM, Armando Blancas  
> wrote: 
> > Tried it on my old XP laptop and got the same result with 32 bits. 
> > 
> > 
> > On Tuesday, June 26, 2012 2:46:07 PM UTC-7, tbc++ wrote: 
> >> 
> >> > On Tue, Jun 26, 2012 at 11:25 AM, Armando Blancas <
> abm221...@gmail.com> 
> >> > wrote: 
> >> >> I don't get the exception on 1.4.0: 
> >> 
> >> 
> >> Is this a 64bit vs 32bit issue? 
> >> 
> >> Timothy 
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en