Source code reloading with leiningen checkouts

2014-02-24 Thread Sven Richter
Hi, I already posted this on SO, but as I got no answer there yet I will try here too. I have two clojure projects, one a luminus project (main) with http-kit and a second (sub) plain clojure project with a single dependency to datomic. Now I added the checkouts folder to main and inside made

why not apply-macro

2014-02-24 Thread 刘家财
I have one problem using Clojure we all know there is a apply for a fn to prepend intervening arguments to args. such as (apply + [2 3]) will equals to (+ 2 3) this is really handy, BUT,this is no apply-macro fn to use,I find a contrib(

Re: why not apply-macro

2014-02-24 Thread Jozef Wagner
Well the evil thing is that apply-macro evaluates arguments at compile time. Example where this won't work follows (defn foo [numbers] (apply-macro + numbers)) JW On Mon, Feb 24, 2014 at 10:27 AM, 刘家财 jiacai2...@gmail.com wrote: I have one problem using Clojure we all know there is a

Email delivery libs not working

2014-02-24 Thread The Dude (Abides)
Hi, I'm new to clojure and have got a productive handle on CRUD, sessions, routing, writing functions. Last couple things are email delivery, image processing (resizing). So I looked on the clojure-toolbox site for email delivery libs with smtp authentication for a Mandrill acct fo

Re: Email delivery libs not working

2014-02-24 Thread Jim - FooBar();
How about the JavaMail API? here is an example : (defn- map-properties Converts a MapString, String to a java.util.Properties object. [^java.util.Map property-value-map] {:pre [(every? #(every? string? %) property-value-map)]} (doto (java.util.Properties.) (.putAll property-value-map)))

Re: Email delivery libs not working

2014-02-24 Thread The Dude (Abides)
Hi Jim, am not opposed to using java and put the code in a diff namespace to reuse. Am going to try out a lib for delivery svc, one for Mandrill and the other for Postmark. If any glitches there, will use java as you suggested. Thanks for the working example. Pardeep. -- You received this

Re: Email delivery libs not working

2014-02-24 Thread Dave Della Costa
I'm sending authenticated emails via Mandrill with Postal and not having any trouble, and setting it up was pretty much a smooth workable out-of-the-gate solution. If you describe the errors or issues you're experiencing someone may be able to help, but it's absolutely not the case that these

Re: Email delivery libs not working

2014-02-24 Thread László Török
same here, we are using Postal with Mailgun, no issues so far On Mon, Feb 24, 2014 at 1:42 PM, Dave Della Costa ddellaco...@gmail.comwrote: I'm sending authenticated emails via Mandrill with Postal and not having any trouble, and setting it up was pretty much a smooth workable

Enhanced Node.js support in ClojureScript master

2014-02-24 Thread David Nolen
At long last the ClojureScript compiler can now target Node.js under optimizations :whitespace or :none as of this commit: http://github.com/clojure/clojurescript/commit/0c7b31ada01237de33cef77b817ccef3f2b3576d Some basic notes here:

[ANN] Yesql 0.4.0 - Clojure SQL Rethought.

2014-02-24 Thread Kris Jenkins
Yesql is a simple library for blending SQL Clojure together, cleanly. Here's how it works https://github.com/krisajenkins/yesql#rationale, and how to use it https://github.com/krisajenkins/yesql#example-usage. New since v0.3.x: - Support for Insert/Update/Delete/etc. Hat tip to Yannick

Question about map destrustures

2014-02-24 Thread bob
Hi, There is a function a (defn a [ {:as m}] (println m)) it accepts pair of params , for example (a :k 1 :j 2), however now I have a map {:k 1 :j 2}, the question is how to convert the map to be accepted by a? Thanks -- You received this message because you are subscribed to the

Re: Question about map destrustures

2014-02-24 Thread Kris Jenkins
Isn't it just: (defn a [m] (println m)) If you want access to the keys: (defn a [{:keys [k j] :as m}] (println k)) Kris On Monday, 24 February 2014 14:34:13 UTC, bob wrote: Hi, There is a function a (defn a [ {:as m}] (println m)) it accepts pair of params , for

Re: Question about map destrustures

2014-02-24 Thread Ambrose Bonnaire-Sergeant
Hi, There's no core function for this (would probably be called mapply). Try calling (apply concat m) on your map, then passing with (apply a (apply concat m)). Thanks, Ambrose On Mon, Feb 24, 2014 at 10:34 PM, bob wee@gmail.com wrote: Hi, There is a function a (defn a [ {:as

Re: Macro writing macro fails with CLJS

2014-02-24 Thread David Nolen
If I recall you are allowed to splice in references to Java objects so this works out in Clojure. On Sunday, February 23, 2014, Karsten Schmidt i...@toxi.co.uk wrote: Oh man, I really do have to spend some more quality time with macroexpand-1 to fully grok those ~'~ forms, and - thank you -

Re: Question about map destrustures

2014-02-24 Thread bob
Works, Thanks. On Monday, February 24, 2014 10:39:12 PM UTC+8, Ambrose Bonnaire-Sergeant wrote: Hi, There's no core function for this (would probably be called mapply). Try calling (apply concat m) on your map, then passing with (apply a (apply concat m)). Thanks, Ambrose On Mon,

[ANN] Nightcode 0.3.0

2014-02-24 Thread Zach Oakes
This is a new release of Nightcode http://nightcode.info/, an IDE for Clojure and Java. Here are some of the changes since 0.2.0 was released two months ago: -Works much better on OS X, thanks to the fact that I finally have a Mac to test on (my sister sold me her 7 year old Macbook...).

Re: Email delivery libs not working

2014-02-24 Thread Sam Ritchie
If you want to use Mandrill, here's a gist with my core.async mandrill API code I wrote for PaddleGuru: https://gist.github.com/sritchie/9191297 You can figure out the requires from the namespace declaration, I think. I use the conf namespace to get my API key (toggled for prod and dev), and

Re: Want a game? let's refactor in the functional way

2014-02-24 Thread Frank Licea
Hi Bob, you might get a better response if you had a more specific question. Do you have a certain code snippet that you'd like to get feedback on? On Friday, February 21, 2014 7:32:00 AM UTC-6, bob wrote: I make a

Shutting down core.async executors threadpool

2014-02-24 Thread Jan Herich
Hi Folks, I developed an pedestal application which uses core.async for real-time server push. Everything works fine, except little problem when i run the application as the Servlet in Tomcat (7.0.52). The problem is, that if i shutdown the tomcat instance with shutdown script (default

Re: Shutting down core.async executors threadpool

2014-02-24 Thread Jozef Wagner
All threads in default core.async threadpool should be daemon, so they should not block when JVM is about to exit. Maybe it is a tomcat issue. On Mon, Feb 24, 2014 at 7:06 PM, Jan Herich jan.her...@gmail.com wrote: Hi Folks, I developed an pedestal application which uses core.async for

Clojure / polyglot position at OpinionLab in Chicago

2014-02-24 Thread John Jacobsen
Hi everyone, Two weeks ago I joined OpinionLab in Chicago as a Clojure developer. We are seeking more developers who have both a broad skill set and a passion for Clojure. http://www.opinionlab.com/functional-software-developer/ OpinionLab is using Rails on the front-end and Clojure / Storm

[GSoC]: We made it! Clojure is a Google Summer of Code 2014 menoring organisation

2014-02-24 Thread Daniel Solano Gómez
Hello, all, I am happy to report that Clojure has been accepted as a Google Summer of Code 2014 mentoring organisation. I'd like to thank everyone who gave us ideas for our Project Ideas [1] page, and a special thanks to Ambrose Bonnaire-Sargeant and Alex Miller for volunteering to help

Re: Clojure / polyglot position at OpinionLab in Chicago

2014-02-24 Thread Michael Klishin
2014-02-24 22:47 GMT+04:00 John Jacobsen eigenhom...@gmail.com: Though I'm fairly new here I'm happy to answer questions or forward them to the appropriate place. Lots of people on this list are not based in Chicago or US. Will remote candidates be considered? -- MK

Need help to store a SVM Model

2014-02-24 Thread Goldritter
Hi, I wanted to use the Java library of the libsvm (http://www.csie.ntu.edu.tw/~cjlin/libsvm/) jlibsvm (http://dev.davidsoergel.com/trac/jlibsvm/) to learn a Support Vector Machine and then store the learned model into a MongoDB (used kernel, support vectors, alphas, label(s), rho, ...). A

Re: Need help to store a SVM Model

2014-02-24 Thread r0man
In my svm-clj library I read and write the LibSVM model in a text format that LibSVM's C library also understands. That's a sparse text file you could also store in Mongo. Use or take a look at: https://github.com/r0man/svm-clj/blob/master/src/svm/core.clj#L125 Roman On Monday, February 24,

Re: Need help to store a SVM Model

2014-02-24 Thread Marcus Lindner
Thanks, that helps a lot. :) Am 24.02.2014 20:57, schrieb r0man: In my svm-clj library I read and write the LibSVM model in a text format that LibSVM's C library also understands. That's a sparse text file you could also store in Mongo. Use or take a look at:

Re: Shutting down core.async executors threadpool

2014-02-24 Thread Jan Herich
Thank you much for the hint Jozef, you pointed mi in the right direction. As you wrote, all core.async thread are daemon threads, but i was using another clojure library (pedestal) which uses executors threadpool for SSE heartbeat functionality, and this was indeed the problem. I already

object identity

2014-02-24 Thread Brian Craft
This is vaguely related to David's posts about om/react, where he talks about optimizing state change tracking by checking object identity on immutable objects: deep compares can be avoided if same identity implies no changes. My first thought was that there are many algorithms that will give

Re: object identity

2014-02-24 Thread t x
I finally have a chance to give back. :-) I hacked up a newb's half-React. It does tree diffing + dom updating, but not the virtual event handling system. I ran into this exact problem, and solved it as follows: ## problem definition: render: data - dom tree-diff: dom * dom - list of

A Clojure Foundation?

2014-02-24 Thread Daniel Solano Gómez
Hello, all, Since Clojure has been selected as GSoC organisation, that got me thinking once again about how to deal with payments from Google, and the broader question supporting Clojure open source projects and the Clojure community. In past years, there have numerous successful fundraisers to

Re: Email delivery libs not working

2014-02-24 Thread The Dude (Abides)
I'm not inferring it doesn't work at all as obviously over the years some of these libs have worked for someone. However these libs are not working for me with Mandrill which has worked seamlessly for email delivery in other langs. I checked the API logs on Mandrill and it appears in the last

Re: Email delivery libs not working

2014-02-24 Thread The Dude (Abides)
I'm not inferring it doesn't work at all as obviously over the years some of these libs have worked for someone. However these libs are not working for me with Mandrill which has worked seamlessly for email delivery in other langs. I checked the API logs on Mandrill and it appears in the last

Re: Email delivery libs not working

2014-02-24 Thread The Dude (Abides)
I'm not inferring it doesn't work at all as obviously over the years some of these libs have worked for someone. However these libs are not working for me with Mandrill which has worked seamlessly for email delivery in other langs. I checked the API logs on Mandrill and it appears in the last

Re: Clojure / polyglot position at OpinionLab in Chicago

2014-02-24 Thread John Jacobsen
Lots of people on this list are not based in Chicago or US. Will remote candidates be considered? I checked; apparently not, sorry to say. On Monday, February 24, 2014 1:28:10 PM UTC-6, Michael Klishin wrote: 2014-02-24 22:47 GMT+04:00 John Jacobsen eigen...@gmail.com javascript: :

Re: [GSoC]: We made it! Clojure is a Google Summer of Code 2014 menoring organisation

2014-02-24 Thread Mikera
Congratulations! Well done to everyone who helped make this happen. On Tuesday, 25 February 2014 03:06:24 UTC+8, Daniel Solano Gómez wrote: Hello, all, I am happy to report that Clojure has been accepted as a Google Summer of Code 2014 mentoring organisation. I'd like to thank everyone

Re: object identity

2014-02-24 Thread Brian Craft
You're solving a similar problem, but I'm asking specifically about using object identity, not equality, for tracking changes in a nested structure. On Monday, February 24, 2014 1:42:03 PM UTC-8, t x wrote: I finally have a chance to give back. :-) I hacked up a newb's half-React. It does

Re: object identity

2014-02-24 Thread t x
Perhaps I mis-interpreted your question. I thought the question asked was: GIven: * pure function func * some object obj * (def a (func obj)) * (def b (func obj)) Example: * obj = [1 2 3] * (defn func [lst] (map #(* 2 %) lst)) Then: * is there a O(1) way to check if (= a b) ?

Re: Clojure / polyglot position at OpinionLab in Chicago

2014-02-24 Thread Devin Walters
It seems like this comes up with many of the job posts. Perhaps we should have some guidelines around what details should be provided in the average job post to cut down on some of the noise that follows. Do we have anything like that for the list already? In any event, I am really encouraged

Re: [GSoC]: We made it! Clojure is a Google Summer of Code 2014 menoring organisation

2014-02-24 Thread Devin Walters
If past years are evidence at all, thank you to the people who made this happen. On that note, I'm interested in helping mentor. I worry a bit about availability, but would happy to be a backup or pair on mentorship if that's a possibility. In short, let us all know what we can do to help.

Multiple sort keys

2014-02-24 Thread Matching Socks
It's straightforward to sort a bunch of maps by a single key: (sort-by :foo x) But how best to sort by primary, secondary(, ...) sort keys? An elegant idiom can be found on briancarper.net*, where it was refined for Clojure 1.1 by Malcolm Sparks: (sort-by (juxt :foo :bar) x) In a very

Re: [GSoC]: We made it! Clojure is a Google Summer of Code 2014 menoring organisation

2014-02-24 Thread Karan Poddar
Hi, Congratulations! :) I want to participate in GSoC. How can I help to be a part of this success and celebration? On Tuesday, 25 February 2014 00:36:24 UTC+5:30, Daniel Solano Gómez wrote: Hello, all, I am happy to report that Clojure has been accepted as a Google Summer of Code 2014

Re: [GSoC]: We made it! Clojure is a Google Summer of Code 2014 menoring organisation

2014-02-24 Thread haosdent
Congratulations! I wish I could take part in it. On Tue, Feb 25, 2014 at 9:02 AM, Mikera mike.r.anderson...@gmail.comwrote: Congratulations! Well done to everyone who helped make this happen. On Tuesday, 25 February 2014 03:06:24 UTC+8, Daniel Solano Gómez wrote: Hello, all, I am

Re: [GSoC]: We made it! Clojure is a Google Summer of Code 2014 menoring organisation

2014-02-24 Thread David Nolen
Awesome! On Mon, Feb 24, 2014 at 2:06 PM, Daniel Solano Gómez cloj...@sattvik.comwrote: Hello, all, I am happy to report that Clojure has been accepted as a Google Summer of Code 2014 mentoring organisation. I'd like to thank everyone who gave us ideas for our Project Ideas [1] page, and

I'm trying to make proper urls, but I seem to be failing at it.

2014-02-24 Thread David Toomey
I'm building a site and I would like to allow users to create and account, and I would like them to have an option to use whitespaces in their handle. Apparently I am doing something way wrong here, so it is possible that I messed up something somewhere else. When I create a user, for example