[ANN] ring-rewrite 0.1.0 ;ring-rewrite let's you define rewrite/redirect rules

2013-04-05 Thread Erik Bakstad
Ring middleware for defining and applying rewrite/redirect rules. In many cases you can get away with ring-rewrite instead of writing Apache mod_rewrite rules. Based on rack-rewrite, but with a Clojure flavor. https://github.com/ebaxt/ring-rewrite (def redirect-handler (fn [req] (wrap-rew

Re: Clojure/West 2013 videos?

2013-04-05 Thread Devin Walters
Responding to this thread only because it seems like the annual "roll-call" thread where we all band together to fight the evils of our world/mailing list/internet. I would like to share with you all a story that was passed down to me by my great grandfather. *pulls out his lute and begins to s

Re: Signing libraries on clojars

2013-04-05 Thread Nelson Morris
Yep. There is an issue for making it work over scp, which the lein-clojars plugin uses, at https://github.com/ato/clojars-web/issues/118. Unfortunately the commits mentioning they "fix" it are incorrect. At the moment, `lein deploy clojars` is the way to send signatures. This command is built in

Re: Signing libraries on clojars

2013-04-05 Thread Phil Hagelberg
I'm not sure Clojars supports sending signatures over scp yet. You might need to do an HTTP deploy with `lein deploy`. The docs around this are a bit scarce; sorry about that. Phil -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this g

Re: Clojure/West 2013 videos?

2013-04-05 Thread Mark
Geraldo, Did you read this thread - including the one from Rich, and also the one below it about patience and little kids? On Friday, April 5, 2013 6:04:59 PM UTC-5, Geraldo Lopes de Souza wrote: > > 14 days from your post and no infoq clojurewest content :( > > On Thursday, March 21, 2013 1:29:

Signing libraries on clojars

2013-04-05 Thread Mark Engelberg
I'm having trouble figuring out how to sign a library when deploying it to clojars. I'm using lein 2.1.2 and the clojars plugin (0.9.1). I pasted my ssh key into clojars profile. I successfully created a pgp pair with gpg, and as per directions, pasted the entire public key into my clojars profi

Re: Clojure/West 2013 videos?

2013-04-05 Thread Geraldo Lopes de Souza
14 days from your post and no infoq clojurewest content :( On Thursday, March 21, 2013 1:29:04 PM UTC-3, Ben Mabey wrote: > > On 3/21/13 10:08 AM, John Gabriele wrote: > > Are there any videos available of the talks recently given at > Clojure/West? > > > > Is there a central location where th

ANN: Cliopatra 1.1.0 - Define and dispatch to multiple command line utilities

2013-04-05 Thread Alex Baranosky
Cliopatra is a small library for defining and dispatching to multiple command line utilities. It provides a `defcommand` macro as a layer of abstraction on top of clojure.tools.cli. We now use it at Runa on all of our projects to make organizing and adding to our command-line utilities easier to

Re: core.logic: partial resolution

2013-04-05 Thread David Nolen
Your macro just produces more answers, it doesn't actually address the problem of divergence. I don't think it could be made to work nor any other approach. On Fri, Apr 5, 2013 at 4:24 PM, JvJ wrote: > Is there a way in core.logic to get something like the "best possible > substitution" for a g

core.logic: partial resolution

2013-04-05 Thread JvJ
Is there a way in core.logic to get something like the "best possible substitution" for a goal that doesn't complete? I wrote a macro: 1. (defn- condf-fn 2. "Allows each line to incrementally succeed." 3. [& [g & gs :as goals]] 4. (if (empty? goals) 5. () 6. `((co

ANN: Clojure For Developers - Dublin, CA - Apr 13-14

2013-04-05 Thread Asim Jalis
*How To Become Productive in Clojure* You have wanted to learn Clojure for some time. You have been meaning to use Clojure to get into Lisp and functional programming. So you find some Clojure tutorials and decide to write a short program. You get your coffee, fire up your machine, and are ready to

Re: core.logic: Database context monad

2013-04-05 Thread Cedric Greevey
On Fri, Apr 5, 2013 at 1:37 PM, Ben Wolfson wrote: > On Fri, Apr 5, 2013 at 10:14 AM, Cedric Greevey wrote: > >> On Fri, Apr 5, 2013 at 10:15 AM, Mayank Jain wrote: >> >>> @DNolen >>> The link to the pdf looks broken. Any other link? >>> >> >> Point on language use: "looks broken"? If you actuall

ANN: Eisen, a language and API for programmable apps

2013-04-05 Thread Armando Blancas
The goal of this project is to help you write programs that users can change and extend. Besides its practical advantages, there's something really powerful about modifying a deployed program, especially when it's done interactively. As to what language users should write in, I've come to beli

Re: core.logic: Database context monad

2013-04-05 Thread David Nolen
I should clarify that only Chapter 3 is really relevant. The other chapters explain how tabling, disequality, and nominal logic work - but they are not essential. Also the version of miniKanren found in the dissertation is available here and I recommend running it in your favorite Scheme: http://g

Re: core.logic: Database context monad

2013-04-05 Thread JvJ
Regardless of the existential issues concerning perception vs. reality on the brokenness of links, thanks for providing the reading material. On Friday, 5 April 2013 10:28:43 UTC-4, Bost wrote: > > I found this http://gradworks.umi.com/3380156.pdf on > http://www.cs.indiana.edu/~webyrd/ > --

Re: core.logic: Database context monad

2013-04-05 Thread Ben Wolfson
On Fri, Apr 5, 2013 at 10:14 AM, Cedric Greevey wrote: > On Fri, Apr 5, 2013 at 10:15 AM, Mayank Jain wrote: > >> @DNolen >> The link to the pdf looks broken. Any other link? >> > > Point on language use: "looks broken"? If you actually tried it and it > didn't work then it *is* broken, pretty m

Re: core.logic: Database context monad

2013-04-05 Thread Cedric Greevey
On Fri, Apr 5, 2013 at 10:15 AM, Mayank Jain wrote: > @DNolen > The link to the pdf looks broken. Any other link? > Point on language use: "looks broken"? If you actually tried it and it didn't work then it *is* broken, pretty much by definition, and "looks" is an unnecessary hedge. OTOH, if you

Re: Using update-in to produce vectors from nothing

2013-04-05 Thread Cedric Greevey
There is of course a short and pithy way to do it with anonymous functions, too: #(conj (or %1 []) %2)) On Fri, Apr 5, 2013 at 8:03 AM, Simon Katz wrote: > Thanks Laurent and Jim — yes, fnil is what I was looking for. > > > On Friday, 5 April 2013 12:25:17 UTC+1, Simon Katz wrote: >> >> Hi. >>

Re: java.lang.OutOfMemoryError when slurping lots of files?

2013-04-05 Thread Adrian Muresan
Alex Nixon managed to figure it out (further down) offtopic: I live in the same city as you and I'm also interested in clojure, email me if you want to have a coffee Adrian On Friday, April 5, 2013 5:08:04 PM UTC+2, Laurent PETIT wrote: > > You should show us the calling code, I guess ... > >

Re: core.logic: Database context monad

2013-04-05 Thread Mayank Jain
Thanks for the link. On Fri, Apr 5, 2013 at 8:08 PM, David Nolen wrote: > Oops, thanks for the proper link! > > > On Fri, Apr 5, 2013 at 10:28 AM, Rostislav Svoboda < > rostislav.svob...@gmail.com> wrote: > >> I found this http://gradworks.umi.com/3380156.pdf on >> http://www.cs.indiana.edu/~we

Re: java.lang.OutOfMemoryError when slurping lots of files?

2013-04-05 Thread Alex Nixon
Java substrings prevent the original string from being garbage collected; perhaps this also happens with regex matches? You can test the theory by surrounding the values in your map with (String. ) and seeing if the problem goes away. On 5 April 2013 15:57, Adrian Muresan wrote: > Hello everyo

Re: java.lang.OutOfMemoryError when slurping lots of files?

2013-04-05 Thread Alex Robbins
Slurp reads the entire file into memory. Maybe it is a combination of a) the program taking up more of the heap in other parts as it runs and then b) a particularly large file? Is there a reason you can't process the files as a line-seq so you don't have to load the entire thing into memory all at

Re: java.lang.OutOfMemoryError when slurping lots of files?

2013-04-05 Thread Laurent PETIT
You should show us the calling code, I guess ... 2013/4/5 Adrian Muresan : > Hello everyone, > > I'm trying to parse a large number of small reports for some data and I'm > doing this by repeatedly calling the following function (with a for) on each > of the files: > > (defn get-rep [file] > (

java.lang.OutOfMemoryError when slurping lots of files?

2013-04-05 Thread Adrian Muresan
Hello everyone, I'm trying to parse a large number of small reports for some data and I'm doing this by repeatedly calling the following function (with a for) on each of the files: (defn get-rep [file] (let [report (with-open [rdr (io/reader file)](*slurp rdr*)) reg #";\s+(\d+\.\d

Re: Analog to Scheme's partition in Clojure?

2013-04-05 Thread Tassilo Horn
Ben Wolfson writes: Hi Ben, >> However, the what's bad with the juxt approach above is that the >> collection is iterated twice. If somebody comes up with a version >> that returns a vector of two lazy seqs and which iterates the input >> collection only once, she'd get my warmest thank you, an

Re: core.logic: Database context monad

2013-04-05 Thread David Nolen
Oops, thanks for the proper link! On Fri, Apr 5, 2013 at 10:28 AM, Rostislav Svoboda < rostislav.svob...@gmail.com> wrote: > I found this http://gradworks.umi.com/3380156.pdf on > http://www.cs.indiana.edu/~webyrd/ > > -- > -- > You received this message because you are subscribed to the Google

Re: core.logic: Database context monad

2013-04-05 Thread Rostislav Svoboda
I found this http://gradworks.umi.com/3380156.pdf on http://www.cs.indiana.edu/~webyrd/ -- -- 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 -

Re: core.logic: Database context monad

2013-04-05 Thread Mayank Jain
@DNolen The link to the pdf looks broken. Any other link? On Fri, Apr 5, 2013 at 6:30 PM, David Nolen wrote: > I would read Will's dissertation > http://scholarworks.iu.edu/dspace/bitstream/handle/2022/8777/Byrd_indiana_0093A_10344.pdf. > This will give you an idea how the basics work. I recomm

Re: core.logic: Database context monad

2013-04-05 Thread David Nolen
I would read Will's dissertation http://scholarworks.iu.edu/dspace/bitstream/handle/2022/8777/Byrd_indiana_0093A_10344.pdf. This will give you an idea how the basics work. I recommend getting on the miniKanren mailing list if you would like to ask specific questions about core.logic's implementatio

Re: Some docs on comparators, including mistakes to avoid, & Clojure "extended doc strings"

2013-04-05 Thread John D. Hume
This seems like a good fit for http://clojure-doc.org/ -- -- 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 firs

Clojure on Windows Phone 8

2013-04-05 Thread Nils Blum-Oeste
Hi, I wonder if Windows Phone 8 apps could be built with Clojure. Windows Phone 8 seems to have .NET framework available: http://blogs.msdn.com/b/dotnet/archive/2012/10/30/announcing-the-release-of-the-net-framework-for-windows-phone-8.aspx Previous Windows Phone versions relied on .NET *Compact*

Re: Using update-in to produce vectors from nothing

2013-04-05 Thread Simon Katz
Thanks Laurent and Jim — yes, fnil is what I was looking for. On Friday, 5 April 2013 12:25:17 UTC+1, Simon Katz wrote: > > Hi. > > Is there an idiomatic way to have update-in create a vector when the > supplied keys do not already exist? (Or maybe I should use something other > than update-in?

Re: Using update-in to produce vectors from nothing

2013-04-05 Thread Jim foo.bar
aaa Laurent beat me to it! :) it seems we both understood the same thing so fnil is indeed your friend... Jim On 05/04/13 12:29, Jim foo.bar wrote: if I understood correctly you're looking for 'fnil' : =>(update-in {} [:foo :bar] (fnil conj []) :a :b :c) {:foo {:bar [:a :b :c]}} Jim On 05

Re: Using update-in to produce vectors from nothing

2013-04-05 Thread Jim foo.bar
if I understood correctly you're looking for 'fnil' : =>(update-in {} [:foo :bar] (fnil conj []) :a :b :c) {:foo {:bar [:a :b :c]}} Jim On 05/04/13 12:25, Simon Katz wrote: Hi. Is there an idiomatic way to have update-in create a vector when the supplied keys do not already exist? (Or maybe

Re: Using update-in to produce vectors from nothing

2013-04-05 Thread Laurent PETIT
Hi, 2013/4/5 Simon Katz : > Hi. > > Is there an idiomatic way to have update-in create a vector when the > supplied keys do not already exist? (Or maybe I should use something other > than update-in?) > > For example... > > This gives me a sequence of things in the reverse of the order I want: > >

Using update-in to produce vectors from nothing

2013-04-05 Thread Simon Katz
Hi. Is there an idiomatic way to have update-in create a vector when the supplied keys do not already exist? (Or maybe I should use something other than update-in?) For example... This gives me a sequence of things in the reverse of the order I want: (update-in {} [:foo :bar] conj :a) ;; => {

Re: Getting the right Clojure version with dependencies

2013-04-05 Thread Laurent PETIT
Hello Mark, Please note that there are interesting enhancements in the Lein support for Counterclockwise, in the beta version ( available via http://ccw.cgrand.net/updatesite-betas software update site) : - The keyboard shortcut "Alt+L L" pops up a generic "leininigen prompt" for you project - "R