Re: lein-daemon 0.3

2012-06-26 Thread Murtaza Husain

Hi,

This is a very useful tool, and I will be giving it a spin.

I would like to specify a file where it should log all the command line 
output, can I do that? 

Thanks,
Murtaza

On Tuesday, June 26, 2012 8:31:45 AM UTC+5:30, Joao_Salcedo wrote:



 On Thursday, May 12, 2011 2:18:57 PM UTC+10, Allen Rohner wrote:

 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 


 On Thursday, May 12, 2011 2:18:57 PM UTC+10, Allen Rohner wrote:

 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 


 On Thursday, May 12, 2011 2:18:57 PM UTC+10, Allen Rohner wrote:

 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 


 On Thursday, May 12, 2011 2:18:57 PM UTC+10, Allen Rohner wrote:

 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 


 Hi All I am using lein-daemon so it is a really great tool.
 I have a question it might be silly , but when I run  lein daemon start 
 :project-name it is great but how can I get the propmt back
 it is running compojure and the last line is 
 2012-06-26 12:51:16.234:INFO:oejs.AbstractConnector:Started 
 SelectChannelConnector@0.0.0.0:3000
 but I need the prompt back to start other scripts.
 Any ideas about how can I achieve this.

 Cheers,

 JS 


-- 
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 Cedric Greevey
On Tue, Jun 26, 2012 at 1:30 AM, dennis zhuang killme2...@gmail.com wrote:
 Added a postfix M to make the number as BigDecimal or N as a BigInteger:

That doesn't work here. It's not double literals that are the problem,
but computed values that are coming out as doubles. Furthermore, I'd
like the code to use BigDecimals when it must, but use doubles when it
can, so coercing everything with bigdec is not ideal.

With int/BigInt it would be easy enough, as one BigInt would spread to
everything it touched. But for some reason doubles and BigDecimals
don't behave the same way. Perhaps because they figured any double
clobbers any reliability to the extra precision in a BigDecimal
calculation. But that didn't consider that someone might be doing
calculations where they don't need a wider mantissa but do need
exponents bigger than 10^308. In that situation, BigDecimal contagion
is desirable. So I'd like to know of some way to switch it on for a
particular chunk of code, or operators analogous to the primed
operators that favor BigDecimal over double. (It's worse than just the
lack of /', by the way. +' and friends favor double over BigDecimal
the same as + and friends. Arrrgh!)

-- 
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
On Mon, Jun 25, 2012 at 10:30 PM, dennis zhuang killme2...@gmail.com 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


How does one make BigDecimals contagious over doubles, instead of the other way around, in a particular computation?

2012-06-26 Thread Cedric Greevey
How does one make BigDecimals contagious over doubles, instead of the
other way around, in a particular computation? I can see the reasoning
for making doubles preferred by default: once an operation combines a
double with a BigDecimal, the additional BigDecimal precision is
consumed by the magnitude of the possible error.

However, in some instances one does not need a wide mantissa but does
need more than 10 bits of exponent magnitude, and so needs
BigDecimals, and needs them to win when mixed with doubles. So, how
is this done? I've already checked that +' and friends aren't the
solution, and I'd prefer not to force everything to BigDecimals even
when doubles will do fine by slapping Ms and bigdecs everywhere...

-- 
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 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 https://gist.github.com/2645453. 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 unfinished ...

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 https://gist.github.com/2645453. 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 killme2...@gmail.com 
 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 amdx6...@gmail.com 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))
#CompilerException java.lang.ClassNotFoundException: 
vtk.vtkCompositeDataSet$Attr, compiling:(REPL:13)

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

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 abm221...@gmail.com 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 killme2...@gmail.com
 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: 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 stuart.hallo...@gmail.com wrote: 
   On Dec 31, 1:16 pm, Jeff Heon jfh...@gmail.com 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 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

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 abm221...@gmail.com 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


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 abm221...@gmail.com 
 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 killme2...@gmail.com 
  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 abm221...@gmail.com 
 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 killme2...@gmail.com 
  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 abm221...@gmail.com 
 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