Re: [ANN] clojure-echonest-api

2012-05-25 Thread Ulises
I am unsure about the atom of api-key, in theory i won't need to change my api-key, but idk... You can get a lot of api-key gratis which are a little limited or just one payed api-key that can do everything... My point was that once you've declared api-key {:dynamic true} (which by the way is

Lambda: A lniux distro for clojurists

2012-05-25 Thread banseljaj
Hello Guys, I am quite new to clojure, and I am a fan. It's a great thing. One thing that seems missing, however, is a single unified way of setting up the clojure environment. Which seemed pretty daunting to me at first. So I have decided to create a Linux Distro specifically for Clojure

Java Interop Interfaces

2012-05-25 Thread Jason S
Hello , I am trying to make a clojure wrapper for the adwords java api but I am having trouble with some of the code. Creating simple objects is fairly straightforward but when it comes to interfaces quite frankly Clojure is not very intuitive. I could not find very good examples for how to create

Re: Parallel doseq?

2012-05-25 Thread Carlo Zancanaro
You're doing all your computation in the generation of the lazy sequence (which is in order). Then you're mapping identity in parallel, but that doesn't do anything. If you're willing to lose the for style bindings, try something more like this: (defmacro pdoseq Run over a sequence in parallel

Re: Lambda: A lniux distro for clojurists

2012-05-25 Thread Thorsten Wilms
On 05/24/2012 10:11 PM, banseljaj wrote: So I have decided to create a Linux Distro specifically for Clojure development. My own problem with specialist distros is that I'm interested in too many areas (and don't like to reboot). Just Clojure seems to be a *very* narrow focus. Is there

Re: Lambda: A lniux distro for clojurists

2012-05-25 Thread Roberto Mannai
You could consider the SuseStudio online environment [1]. It allows simple fine-graned package selections and different output formats (live CD, ISOs, VMware / VirtualBox / KVM image, Amazon EC2 image). [1] http://susestudio.com/ Examples: http://susestudio.com/browse On Thu, May 24, 2012 at

Re: Java Interop Interfaces

2012-05-25 Thread Softaddicts
Jason, Try this AdwordsService.V201109/ADGROUP_SERVICE V looks like an internal class in AdwordsService, the slash is a delimiter announcing that you want to access the static content of a class, it cannot be used before unroling the class hierarchy up to the one containing what you want

Re: Java Interop Interfaces

2012-05-25 Thread Jay Fields
This should help: http://blog.jayfields.com/2011/01/clojure-using-java-inner-classes.html Sorry for the short response - I'm on my phone, so I can't really put together a more detailed email. Sent from my iPhone On May 24, 2012, at 9:21 AM, Jason S jsonse...@gmail.com wrote: Hello , I am

Re: Java Interop Interfaces

2012-05-25 Thread Jay Fields
I'm assuming it's AdwordsService$V201109/ADGROUP_SERVICE Be sure to also import AdwordsService$V201109 Sent from my iPad On May 25, 2012, at 7:20 AM, Softaddicts lprefonta...@softaddicts.ca wrote: Jason, Try this AdwordsService.V201109/ADGROUP_SERVICE V looks like an internal

Re: Java Interop Interfaces

2012-05-25 Thread Jason S
I will try this! Thanks a lot all. On May 25, 2:23 pm, Jay Fields j...@jayfields.com wrote: I'm assuming it's AdwordsService$V201109/ADGROUP_SERVICE Be sure to also import AdwordsService$V201109 Sent from my iPad On May 25, 2012, at 7:20 AM, Softaddicts lprefonta...@softaddicts.ca wrote:

Re: clojure jython interop

2012-05-25 Thread Brent Millare
Ok well installing is easy java -jar jython_installer-2.5.2.jar # to get python repl java -jar jython # to run script java -jar jython ./python.py I haven't looked into calling python functions (running in jython) from clojure though because unfortunately, I wasn't able to get jython to work

Re: clojure jython interop

2012-05-25 Thread Ben Mabey
On 5/25/12 9:08 AM, Brent Millare wrote: Ok well installing is easy java -jar jython_installer-2.5.2.jar # to get python repl java -jar jython # to run script java -jar jython ./python.py I haven't looked into calling python functions (running in jython) from clojure though because

Re: Lambda: A lniux distro for clojurists

2012-05-25 Thread Tom Maynard
On Thursday, May 24, 2012 3:11:21 PM UTC-5, banseljaj wrote: Looking forward to all input. I suggest bundling Dave Ray's VimClojure-Easy (http://blog.darevay.com/2011/10/vimclojure-easy/). It's a fully functional, bare-bones Vim + VimClojure, REPL-in-editor setup that's completely

Re: Lambda: A lniux distro for clojurists

2012-05-25 Thread banseljaj
I don't like to reboot eithere, but you can run this into a VM. Also, I have already tried SUSE Studio. It has too much bloat to be considered viable, plus SUSE is slowly dying. On Friday, May 25, 2012 3:31:43 PM UTC+5, thorwil wrote: On 05/24/2012 10:11 PM, banseljaj wrote: So I have

core.match - matching missing map values

2012-05-25 Thread David McNeil
I expected this to match, but it did not. (clojure.core.match/match [{}] [{:x (x :when nil?)}] [match x]) ;;= nil Instead, I was able to make this work: (clojure.core.match/match [{}] [{:x (x :when #(=

Re: core.match - matching missing map values

2012-05-25 Thread David Nolen
There's a ticket for this. Patches welcome. I've been busy with ClojureScript related things so I haven't given core.match much attention recently. core.match is very alpha status - importantly it does not work with AOT. I would not rely on it for anything critical until I or someone else gets to

ClojureScript Optimization

2012-05-25 Thread Aaron
I've noticed that the size of my compiled .js file is well over 100k even with advanced optimizations turned on. I noticed I was using an older revision of the clojurescript compiler so I just updated to the latest master commit thinking that maybe that would help. Now my generated

Re: ClojureScript Optimization

2012-05-25 Thread David Nolen
On Fri, May 25, 2012 at 2:16 PM, Aaron aaroncrael...@gmail.com wrote: I've noticed that the size of my compiled .js file is well over 100k even with advanced optimizations turned on. I noticed I was using an older revision of the clojurescript compiler so I just updated to the latest master

Re: clojure jython interop

2012-05-25 Thread Brent Millare
Until C-in-C works for all the features in Clojure (as long as it makes sense), clojure-py will have to wait since vanilla clojure already provides that. 0MQ seems interesting. The big advantage I see to this approach is it takes care of marking when a send is completed while the program is

Re: [ANN] clojure-echonest-api

2012-05-25 Thread Simone Mosciatti
Yes, you right. Definitely both atom and dynamic is too much, the idea is to set once for the whole section at the very start, given anyway the possibility to change it by bindig when it is necessary... I guess that i should use only dynamic... but i got some problem changing the var... I

Clojure Pretty Printing with Blogger

2012-05-25 Thread Jake Johnson
Hi, guys. Has anyone had any luck with using google-code-prettifyhttp://code.google.com/p/google-code-prettify/and http://google-code-prettify.googlecode.com/svn/trunk/src/lang-clj.jstogether on blogger? I followed

Re: Lambda: A lniux distro for clojurists

2012-05-25 Thread Jake Johnson
I like this idea a lot. My suggestions would be to base it on something like Lubuntu. I have Ubuntu installed as dual-boot, but I tend to do most of my work in Win7, so having a performance-oriented, small linux distro installed inside VirtualBox helps if I don't want to reboot. I imagine there

Re: Lambda: A lniux distro for clojurists

2012-05-25 Thread Matti Oinas
It could be possible to do all this by using package manager's like apt or pacman. Create a package that depends on the software that is allready available from the debian repository and provides all the missing software. I think pacman in Arch linux could handle the same by using package groups.

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Sean Allen
I've never done this w/ clojure but in my last job when we were using Gemstone Smalltalk, I made live code changes on a fairly regular basis. Get the quick fix out. Do the complete release cycle later. It was only a difference of 25 minutes, but often worth it. Not for the faint of heart. I felt

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Karl Krukow
Sorry to ask what may be an obvious question to you. But what is a good way of embedding a swank server inside a production app? I'm kind of an emacs beginning and in development I just do lein swank and slime-connect from Emacs- that works fine. If I'm embedding swank clojure server in

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Phil Hagelberg
On Fri, May 25, 2012 at 1:41 PM, Karl Krukow karl.kru...@gmail.com wrote: If I'm embedding swank clojure server in non-development, the code would need to start up swank - how would I do that? Just add swank as a non-dev dependency. The swank-clojure readme actually covers how to do embedding.

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Karl Krukow
Sorry, and thanks for the info. /Karl On 25/05/2012, at 22.46, Phil Hagelberg wrote: On Fri, May 25, 2012 at 1:41 PM, Karl Krukow karl.kru...@gmail.com wrote: If I'm embedding swank clojure server in non-development, the code would need to start up swank - how would I do that? Just add

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Sean Corfield
On Fri, May 25, 2012 at 1:46 PM, Phil Hagelberg p...@hagelb.org wrote: On Fri, May 25, 2012 at 1:41 PM, Karl Krukow karl.kru...@gmail.com wrote: If I'm embedding swank clojure server in non-development, the code would need to start up swank - how would I do that? Just add swank as a non-dev

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Karl Krukow
Thanks Sean for the detailed information. This will be really useful to me. /Karl On 25/05/2012, at 23.30, Sean Corfield wrote: On Fri, May 25, 2012 at 1:46 PM, Phil Hagelberg p...@hagelb.org wrote: On Fri, May 25, 2012 at 1:41 PM, Karl Krukow karl.kru...@gmail.com wrote: If I'm embedding

Clojure on Android

2012-05-25 Thread HelmutKian
I've recently been on board a project that will targeting Android, and I've been given pretty much free reign chose my tools. I'm an experienced Common Lisper and a fairly new Clojure user, but I'd like to know about the feasibility of writing real-world Android applications in Clojure. --

Re: Lambda: A lniux distro for clojurists

2012-05-25 Thread Curtis Gagliardi
I'll have to check this out when I get home, it sounds like exactly what I was looking for. Thanks. On May 25, 11:01 am, Tom Maynard tom.w...@gmail.com wrote: On Thursday, May 24, 2012 3:11:21 PM UTC-5, banseljaj wrote: Looking forward to all input. I suggest bundling Dave Ray's

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Alan Malloy
On May 25, 2:30 pm, Sean Corfield seancorfi...@gmail.com wrote: The :host specifies the IP (or hostname) to listen on so if you want external access you'll need to listen on an IP that is externally accessible. If you listen on 0.0.0.0 then it'll listen on any IP address so you can REPL in

Re: Java Interop Interfaces

2012-05-25 Thread Softaddicts
Right, I forgot about the $ stuff to refer to internal classes. Luc P. I'm assuming it's AdwordsService$V201109/ADGROUP_SERVICE Be sure to also import AdwordsService$V201109 Sent from my iPad On May 25, 2012, at 7:20 AM, Softaddicts lprefonta...@softaddicts.ca wrote: Jason,

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Sean Corfield
On Fri, May 25, 2012 at 2:56 PM, Alan Malloy a...@malloys.org wrote: This may be good advice in some cases (eg when all network access to your server is trusted), but on a lot of production servers it strikes me as very dangerous to apply this suggestion carelessly. I was assuming that network

Re: Lambda: A lniux distro for clojurists

2012-05-25 Thread abaitam
Great idea. But this be implemented as a pallet or vagrant script instead of a ready-made VM? On Thursday, May 24, 2012 4:11:21 PM UTC-4, banseljaj wrote: Hello Guys, I am quite new to clojure, and I am a fan. It's a great thing. One thing that seems missing, however, is a single unified

core.logic and aggregates: am i doing it wrong?

2012-05-25 Thread Mark
I confess that the last time I cracked open a Prolog book was lo these many years ago in college and that I need to re-read The Art but I'm hoping that someone can point out how I'm thinking about this problem wrongly: I'd like to write a goal that succeeds when given a set of required items

Re: maths, functions and solvers

2012-05-25 Thread Brent Millare
I originally assumed core.logic would be the key to symbolic math, but now I feel that's not really the case. You still need to implement all the algebra manipulation algorithms as usual. One can define the numbers in a different way as Ambrose did in his talk, but I imagine we would need to

Re: core.logic and aggregates: am i doing it wrong?

2012-05-25 Thread Mark
Two scotches later, I came up with (defn satisfes-requirements-o [required given] (fresh [e r s] (membero e given) (conso e r s) (== s required))) and it seems to do the trick. I'm not sure about leaving r unbound but my tests pass. I'd love some

Re: maths, functions and solvers

2012-05-25 Thread jlk
On Friday, May 25, 2012 9:30:12 AM UTC+10, Stephen Compall wrote: On May 24, 2012 8:42 AM, jlk JLK wrote: However the only way I can think of converting the argument list and the function into a function of one argument is with an intermediate function. Apply is the standard way to listify

Re: maths, functions and solvers

2012-05-25 Thread jlk
Hi Zack I don't really know enough about core.logic to comment on this. Brent mentions symbolic math and it sounds neat but I'm more interested in numerical solutions at the moment. Cheers On Saturday, May 26, 2012 10:45:09 AM UTC+10, Brent Millare wrote: I originally assumed core.logic

Re: Clojure on Android

2012-05-25 Thread blcooley
On Friday, May 25, 2012 4:45:03 PM UTC-5, HelmutKian wrote: I've recently been on board a project that will targeting Android, and I've been given pretty much free reign chose my tools. I'm an experienced Common Lisper and a fairly new Clojure user, but I'd like to know about the

Selecting subsets of maps

2012-05-25 Thread Baishampayan Ghose
Hi, I have a problem wherein I need to select subsets of a given map; think about select-keys, but with arbitrary nesting. For example, consider this map - (def my-map {:name John Doe :email j...@doe.com :address {:house 42 :street Moon St.

Re: core.logic and aggregates: am i doing it wrong?

2012-05-25 Thread Mark
I'm embarrassed to say how many more scotches it took to come up with: (defn satisfes-requirements-o [required given] (fresh [e] (appendo required e given))) On Friday, May 25, 2012 6:35:09 PM UTC-7, Mark wrote: Two scotches later, I came up with (defn