appengine-magic leiningen plugin and template

2013-03-28 Thread Gregg Reynolds
Hi, People working with appengine--magic might be interested in a template-and-plugin pair I've put together over the past week. This is my first crack at leiningen (and I'm fairly new to Clojure as well), so comments and suggests would be helpful. The basic motivation was that although

Re: Working with a huge graph - how can I make Clojure performant?

2013-03-28 Thread Balint Erdi
Yes, that's definitely a good idea. I tried a few other things (including that, I think) after I posted that but nothing really worked and it turned out that the tail-recursive version even had a bug. I couldn't find a way to really keep the amount of copying of the data structures (stack,

would FixedThreadPool-backed reducers make sense?

2013-03-28 Thread vemv
I recall from Rich's presentation on reducers (and it's intuitively true anyway) that FJ is not well suited to all workloads: uniform ones would do just fine with a fixed allocation of tasks to threads. I believe the tradeoff in that case is that one has to manage parallelism very explicitly.

Names and clojure.core

2013-03-28 Thread Mark
I'm still just a Clojure hobbyist, but I have a question for folks who are using Clojure professionally or for larger scale projects. Recently, I've been finding that it's difficult to come up with names for variables and functions that aren't already in the clojure.core namespace. For

Re: Names and clojure.core

2013-03-28 Thread Michael Klishin
2013/3/28 Mark mjt0...@gmail.com Do other people have this problem? Am I just too uncreative? Am I being too terse? Simply exclude some clojure.core functions in your namespace declaration and use them as clojure.core/... if you need them. It's perfectly fine to use names such as find,get and

Re: Names and clojure.core

2013-03-28 Thread Timothy Baldridge
Also notice that local scope overrides the global scope (unlike other languages). So something like this is perfectly legal: (defn foo [x] (let [seq (next x)] seq)) Now, if you need to use the function known as seq later on in your function, you may run into issues. But I often use

Re: Names and clojure.core

2013-03-28 Thread vemv
Yeah being able to reuse names is part of the point of namespaces :) it makes me sad when libraries use ugly names like megaref (for ref) or alter!! (for alter) instead of exploiting this fact. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: Names and clojure.core

2013-03-28 Thread Mark
I thought about that, but I wasn't sure if it was a good idea. I suppose as long as my function definitions are short enough that anyone reading them can see both the name binding and all of its usages, then there's not so much confusion. Thanks. On Thursday, March 28, 2013 9:59:39 AM UTC-4,

Re: Names and clojure.core

2013-03-28 Thread Mark
Nice. I think in a couple of places I can safely do this. Thanks! On Thursday, March 28, 2013 9:53:19 AM UTC-4, Michael Klishin wrote: 2013/3/28 Mark mjt...@gmail.com javascript: Do other people have this problem? Am I just too uncreative? Am I being too terse? Simply exclude some

Re: Working with a huge graph - how can I make Clojure performant?

2013-03-28 Thread Niels van Klaveren
Perhaps for inspiration have a look at Christophe Grand's implementation of Tarjan's algorithmhttp://clj-me.cgrand.net/2013/03/18/tarjans-strongly-connected-components-algorithm/(which is a more efficient version of Kosaraju's). On Thursday, March 28, 2013 12:06:45 PM UTC+1, Balint Erdi wrote:

Re: Working with a huge graph - how can I make Clojure performant?

2013-03-28 Thread Balint Erdi
In fact I did. At first glance it seemed like it would have the same issues as my algorithm for really large graphs. However, there is no certainty without actually trying so I might give it a go with the huge graph. Thank you for bringing it up. On Thursday, March 28, 2013 3:29:01 PM UTC+1,

Re: Working with a huge graph - how can I make Clojure performant?

2013-03-28 Thread Marko Topolnik
If you can't parallelize the work, the default persistent data structures are just an impediment. If, however, you could parallelize it, and adapt the algorithms towards a divide-and-conquer principle instead of the accumulator principle that is the best choice for single-threaded work, then

Re: Names and clojure.core

2013-03-28 Thread Cedric Greevey
If there's a still-short, non-colliding, more descriptive name, why not use that? In the example given in the original post, for instance, how about dna-seq as the variable name? That makes it clear both that it's sequential and what it's a sequence of, and shouldn't collide with any other names

Re: Names and clojure.core

2013-03-28 Thread Gregg Reynolds
On Thursday, March 28, 2013 8:51:15 AM UTC-5, Mark wrote: I'm still just a Clojure hobbyist, but I have a question for folks who are using Clojure professionally or for larger scale projects. Recently, I've been finding that it's difficult to come up with names for variables and functions

Re: Names and clojure.core

2013-03-28 Thread Mark
I definitely agree that nomenclature is often one of the hardest things to handle well. I'm actually a professional software engineer in real life, but I don't get to use Clojure at work. I suppose the names I suggested were uninspired partially because I only get a few minutes at a time to

Re: Names and clojure.core

2013-03-28 Thread Mark Tomko
I definitely agree that nomenclature is often one of the hardest things to handle well. I'm actually a professional software engineer in real life, but I don't get to use Clojure at work. I suppose the names I suggested were uninspired partially because I only get a few minutes at a time to work

Re: Clojure/West 2013 videos?

2013-03-28 Thread gaz jones
I'm starting to miss Ken Wesson. On Mon, Mar 25, 2013 at 4:08 PM, Gary Trakhman gary.trakh...@gmail.comwrote: I've volunteered on the pycon AV team, in 2009, it's 1000x more work than what you described further up in the thread, a minimum wage worker holding something steady. It requires a

Re: Problem installing Pedestal libraries

2013-03-28 Thread Stuart Sierra
Pedestal is tested with Leiningen 2.0.0, final release. Try upgrading from a preview version. You can also get more direct Pedestal support at https://groups.google.com/d/forum/pedestal-users -S On Tuesday, March 26, 2013 8:54:41 PM UTC-4, Jan Herich wrote: Hello, I have little problem

Re: Clojure/West 2013 videos?

2013-03-28 Thread Cedric Greevey
On Mon, Mar 25, 2013 at 3:28 PM, Aaron Miller aa...@crate.im wrote: I have breaking news from 2008 or so for you: there are consumer video cameras that shoot high definition. Also, Youtube supports high definition. I do think it's worth pointing out that *high definition* does not a

Re: Names and clojure.core

2013-03-28 Thread Brian Marick
On Mar 28, 2013, at 8:51 AM, Mark mjt0...@gmail.com wrote: In the course of writing about 30 lines of code last night, I accidentally caused name collisions with two or three other existing functions in clojure.core. Do other people have this problem? Am I just too uncreative? Am I being

Re: Clojure/West 2013 videos?

2013-03-28 Thread Cedric Greevey
Who? On Mon, Mar 25, 2013 at 5:51 PM, gaz jones gareth.e.jo...@gmail.com wrote: I'm starting to miss Ken Wesson. On Mon, Mar 25, 2013 at 4:08 PM, Gary Trakhman gary.trakh...@gmail.comwrote: I've volunteered on the pycon AV team, in 2009, it's 1000x more work than what you described

Persistent Data Structures for Objective-C/LLVM

2013-03-28 Thread Krukow
Hi, Kind of an unusual question, but is anyone in this group aware of a c, objective-c or LLVM-based implementation of the Clojure persistent data structures? - Karl -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: Persistent Data Structures for Objective-C/LLVM

2013-03-28 Thread Omer Iqbal
Most foundation objective c data structures are immutable (NSArray, NSDictionary, NSSet etc), and are most probably more performant than clojure counterparts, though terribly less elegant. However there's the clojure-scheme project ( https://github.com/takeoutweight/clojure-scheme) which compiles

Re: ANN: print-foo - a library of print debugging macros

2013-03-28 Thread Jim - FooBar();
Nice, thanks... :) I've started writing a very similar namespace but instead of printing, I'm timing...would you be interested in including a time-foo.clj following the same pattern (append 'time-') in your little library? I've only got 'time-let' which is the one I mostly use but I can

Re: Persistent Data Structures for Objective-C/LLVM

2013-03-28 Thread Karl Krukow
On 28/03/2013, at 18.07, Omer Iqbal wrote: Most foundation objective c data structures are immutable (NSArray, NSDictionary, NSSet etc), and are most probably more performant than clojure counterparts, though terribly less elegant. However there's the clojure-scheme project

Re: Persistent Data Structures for Objective-C/LLVM

2013-03-28 Thread David Nolen
As far as I know the immutable Objective-C collections are not efficient to update and likely perform terrible in this respect to Clojure collections. On Thu, Mar 28, 2013 at 1:07 PM, Omer Iqbal momeriqb...@gmail.com wrote: Most foundation objective c data structures are immutable (NSArray,

Re: ANN: print-foo - a library of print debugging macros

2013-03-28 Thread Cedric Greevey
Why not generalize further then? Have a macro def-foo-let (actual name) that takes a name and an operator (function or macro), so that (defn print-out [x] (println x) x) (def-foo-let print-let print-out) will generate a print-let that prints each thing as it's computed, and (def-foo-let

Re: ANN: print-foo - a library of print debugging macros

2013-03-28 Thread adrians
Looks useful, but I'm getting this: user= (use 'print-foo) FileNotFoundException Could not locate print_foo__init.class or print_foo.clj on classpath: clojure.lang.RT.load (RT.java:443) using lein 2.1.1 Cheers On Thursday, March 28, 2013 1:42:42 AM UTC-4, Alex Baranosky wrote: print-foo

Re: ANN: print-foo - a library of print debugging macros

2013-03-28 Thread Alex Baranosky
Let me fix the README, the library should be required like this (:require [print.foo :refer :all]) On Thu, Mar 28, 2013 at 11:22 AM, adrians nman...@gmail.com wrote: Looks useful, but I'm getting this: user= (use 'print-foo) FileNotFoundException Could not locate print_foo__init.class or

Re: Working with a huge graph - how can I make Clojure performant?

2013-03-28 Thread Alan Malloy
Have you looked at https://github.com/jordanlewis/data.union-find ? Personally, I'd prefer it to Christophe's implementation, since his blog post seems to start with I dislike this algorithm; I also helped out a bit in writing this version. On Monday, March 11, 2013 10:37:39 AM UTC-7, Balint

Re: ANN: print-foo - a library of print debugging macros

2013-03-28 Thread Alex Baranosky
Jim, I'm interested in that idea definitely, but perhaps we should just create another open source project for time.foo? On Thu, Mar 28, 2013 at 11:35 AM, Alex Baranosky alexander.barano...@gmail.com wrote: Let me fix the README, the library should be required like this (:require [print.foo

core.logic : In one list but not in another

2013-03-28 Thread JvJ
In core.logic, how do the following: Give me everything that is a member of list A and not a member of list B? -- -- 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

Re: ANN: print-foo - a library of print debugging macros

2013-03-28 Thread Jim - FooBar();
On 28/03/13 18:39, Alex Baranosky wrote: Jim, I'm interested in that idea definitely, but perhaps we should just create another open source project for time.foo? Ok cool, I'll do that over the weekend and poke you sometime next week to have a look...also, have you deliberately left out

Re: core.logic : In one list but not in another

2013-03-28 Thread Jim - FooBar();
clojure.set/difference 'membero' combined with its negated form? Jim On 28/03/13 18:47, JvJ wrote: In core.logic, how do the following: Give me everything that is a member of list A and not a member of list B? -- -- You received this message because you are subscribed to the Google Groups

clojurescript memory management

2013-03-28 Thread Tyler Gillies
It seems like cljsbuild is ignoring my Xmx setting in my project.clj, anyone have experience with controlling memory with cljsbuild? I know the setting is correct because my normal clj repl is minding limit -- -- You received this message because you are subscribed to the Google Groups

Re: core.logic : In one list but not in another

2013-03-28 Thread JvJ
Thanks, but there's another aspect to this. Let's say I had two relations A and B, and I wanted all q such that (A q) (not (B q)) How would that work? On Thursday, 28 March 2013 14:50:33 UTC-4, Jim foo.bar wrote: clojure.set/difference 'membero' combined with its negated form? Jim On

Re: core.logic: simple question

2013-03-28 Thread Moritz Ulrich
I haven't played around with the new additions to core.logic, but it seems to me that != only works for values, not for lvars. On Thu, Mar 28, 2013 at 1:11 AM, JvJ kfjwhee...@gmail.com wrote: The function i wrote below isn't working. (is-drink q) returns all drinks (I tested it), but

Re: core.logic: simple question

2013-03-28 Thread Moritz Ulrich
Expansion: Sorry, I seem to be wrong: = (doc !=) clojure.core.logic/!= ([u v]) Disequality constraint. Ensures that u and v will never unify. u and v can be complex terms. On Thu, Mar 28, 2013 at 7:55 PM, Moritz Ulrich mor...@tarn-vedra.de wrote: I haven't played around with the new

Re: core.logic : In one list but not in another

2013-03-28 Thread JvJ
Actually, I found this post: https://groups.google.com/forum/?fromgroups=#!topic/clojure/hz63yeQfiQE But the not operator has to be used first to ensure that the term is ground. It was a little confusing. On Thursday, 28 March 2013 14:54:31 UTC-4, JvJ wrote: Thanks, but there's another

Re: ANN: print-foo - a library of print debugging macros

2013-03-28 Thread adrians
Alex, print-foo *is* the correct artifact name, no? It seemed to be pulled down fine by pomegranate. On Thursday, March 28, 2013 2:35:31 PM UTC-4, Alex Baranosky wrote: Let me fix the README, the library should be required like this (:require [print.foo :refer :all]) -- -- You received

Re: core.logic: simple question

2013-03-28 Thread Moritz Ulrich
Can you please show your implementation of the other functions? On Thu, Mar 28, 2013 at 1:11 AM, JvJ kfjwhee...@gmail.com wrote: The function i wrote below isn't working. (is-drink q) returns all drinks (I tested it), but hates-drink, which should return all drinks that aren't liked, doesn't

Re: core.logic : In one list but not in another

2013-03-28 Thread David Nolen
You can express not member of list B with disequality. I could show you how to do this, but you'd probably learn more by giving it a try yourself ;) On Thu, Mar 28, 2013 at 2:47 PM, JvJ kfjwhee...@gmail.com wrote: In core.logic, how do the following: Give me everything that is a member of

Re: ANN: print-foo - a library of print debugging macros

2013-03-28 Thread Alex Baranosky
adrians, https://clojars.org/print-foo I've got to deploy it with proper signing. On Thu, Mar 28, 2013 at 11:59 AM, adrians nman...@gmail.com wrote: Alex, print-foo *is* the correct artifact name, no? It seemed to be pulled down fine by pomegranate. On Thursday, March 28, 2013 2:35:31 PM

Re: ANN: print-foo - a library of print debugging macros

2013-03-28 Thread Alex Baranosky
Jim, No reason I left out loop/recur. I just didn't get around to it. Pull requests accepted. On Thu, Mar 28, 2013 at 12:07 PM, Alex Baranosky alexander.barano...@gmail.com wrote: adrians, https://clojars.org/print-foo I've got to deploy it with proper signing. On Thu, Mar 28, 2013

Re: core.logic : In one list but not in another

2013-03-28 Thread David Nolen
negation is hard. This has come up several times. It may be possible to a better form of negation as failure via delays, but this not high on my current priority list. Patches to make it work are of course most welcome. On Thu, Mar 28, 2013 at 2:54 PM, JvJ kfjwhee...@gmail.com wrote: Thanks,

Re: core.logic : In one list but not in another

2013-03-28 Thread JvJ
Here's what I'm trying... (facts a [[1] [2] [3] [4]]) nil (facts b [[3] [4] [5] [6]]) (run* [q] (a q) (fresh [x] (b x) (!= q x))) (1 1 2 1 1 2 2 2 3 4 3 3 4 4) So what the heck is this all about? On Thursday, 28 March 2013 15:17:24 UTC-4, David

Re: core.logic : In one list but not in another

2013-03-28 Thread David Nolen
This won't work. Rewrite this example w/o using facts and try to understand why it won't work. David On Thu, Mar 28, 2013 at 3:37 PM, JvJ kfjwhee...@gmail.com wrote: Here's what I'm trying... (facts a [[1] [2] [3] [4]]) nil (facts b [[3] [4] [5] [6]])

Re: core.logic : In one list but not in another

2013-03-28 Thread JvJ
Alright, I'm starting to get it but not quite there (run* [q] (fresh [x] (conde ( (== q 1) ) ( (== q 2) ) ( (== q 3) ) ( (== q 4) )) (conde ( (== x 3) ) ( (== x 4) ) ( (== x 5) ) ( (== x 6) )) (!= q x))) (1 1 1 2 1 2 2 2 3 4 3 3 4 4) On Thursday, 28

Re: core.logic : In one list but not in another

2013-03-28 Thread JvJ
Any other hints? I'd love to spend time on this brain tickler, but I have other things to do. On Thursday, 28 March 2013 16:05:00 UTC-4, JvJ wrote: Alright, I'm starting to get it but not quite there (run* [q] (fresh [x] (conde ( (== q 1) ) ( (== q 2) ) ( (== q 3) )

Re: core.logic : In one list but not in another

2013-03-28 Thread JvJ
Btw if I sounded sarcastic I wasn't. I actually would love to spend time thinking about it. On Thursday, 28 March 2013 16:12:06 UTC-4, JvJ wrote: Any other hints? I'd love to spend time on this brain tickler, but I have other things to do. On Thursday, 28 March 2013 16:05:00 UTC-4, JvJ

Reader bug?

2013-03-28 Thread Mark Engelberg
According to the Java docs, Java strings support eight escape characters. http://docs.oracle.com/javase/tutorial/java/data/characters.html One of the valid escape characters is \' Clojure strings are supposed to be the same as Java strings, but when I type the following string into the Clojure

Re: core.logic : In one list but not in another

2013-03-28 Thread David Nolen
My point here isn't to tickle your brain but point out that there's a bit of misunderstanding about how core.logic works and what facilities you should use to handle your problem. It should be clear soon enough that it will be very difficult to formulate your problem in terms of facts or conde.

Re: Reader bug?

2013-03-28 Thread David Powell
Internally they might be the same thing, but lexically they aren't; eg, Clojure string literals can wrap over multiple lines, and Java strings can't. On Thu, Mar 28, 2013 at 8:19 PM, Mark Engelberg mark.engelb...@gmail.comwrote: According to the Java docs, Java strings support eight escape

Re: core.logic : In one list but not in another

2013-03-28 Thread JvJ
HOORAY! I did it all by myself! (with your help) (defn not-membero [x l] (fresh [head tail] (conde ( (== l ()) ) ( (conso head tail l) (!= x head) (not-membero x tail) On Thursday, 28 March 2013 16:21:41 UTC-4, David Nolen wrote: My point here isn't to tickle your brain but

Re: core.logic : In one list but not in another

2013-03-28 Thread David Nolen
Excellent! :) On Thu, Mar 28, 2013 at 4:46 PM, JvJ kfjwhee...@gmail.com wrote: HOORAY! I did it all by myself! (with your help) (defn not-membero [x l] (fresh [head tail] (conde ( (== l ()) ) ( (conso head tail l) (!= x head) (not-membero x tail) On Thursday, 28

Re: core.logic : In one list but not in another

2013-03-28 Thread JvJ
Also, on a side note, the following doesn't seem to make sense: (defn hates-drink [d] On Thursday, 28 March 2013 16:53:09 UTC-4, David Nolen wrote: Excellent! :) On Thu, Mar 28, 2013 at 4:46 PM, JvJ kfjwh...@gmail.com javascript:wrote: HOORAY! I did it all by myself! (with your

Re: core.logic : In one list but not in another

2013-03-28 Thread JvJ
Also, on a side note, what's the deal with this: (run* [q] (is-drink q) (not-likes-drink q)) (:dialogic2.bobbysally/Vodka :dialogic2.bobbysally/Daiquiri :dialogic2.bobbysally/Beer) (defn hates-drink [d] (is-drink d) (not-likes-drink d)) (run* [q] (hates-drink q)) (_.0) Why

Re: core.logic : In one list but not in another

2013-03-28 Thread David Nolen
On Thu, Mar 28, 2013 at 5:01 PM, JvJ kfjwhee...@gmail.com wrote: (defn hates-drink [d] (is-drink d) (not-likes-drink d)) This is a common mistake. But consider that the following hardly makes any sense in Clojure either: (defn foo [a b] (+ a b) (- a b)) Clearly the addition

Re: core.logic : In one list but not in another

2013-03-28 Thread JvJ
Right Right. That makes sense. Thanks. On Thursday, 28 March 2013 17:05:58 UTC-4, David Nolen wrote: On Thu, Mar 28, 2013 at 5:01 PM, JvJ kfjwh...@gmail.com javascript:wrote: (defn hates-drink [d] (is-drink d) (not-likes-drink d)) This is a common mistake. But consider that

Re: What is the status of Clojure on LLVM or C?

2013-03-28 Thread John Szakmeister
On Wed, Mar 27, 2013 at 5:21 PM, Timothy Baldridge tbaldri...@gmail.com wrote: What use-case do you have for such an implementation? Is there something that Clojure on LLVM will give you that Clojure on the JVM or on V8 won't allow you to do? Clojure on C would likely allow me to use Clojure

hash-map initialization issue

2013-03-28 Thread Ryan
Hello! I am having a small issue with a hash-map initialization and I am failing to understand why. I have the following situation: (def a-list '({:BAR_KEY bar-value}, {:BAR_KEY another-value})) (defn my-function [foo-id a-keyword a-list] (map #({:foo_id foo-id (keyword a-keyword)

Re: hash-map initialization issue

2013-03-28 Thread Jonathan Fischer Friberg
It's because the #() syntax always calls the content as a function. So #(...) is the same as (fn [] (...)). In your case, #({:foo_id foo-id (keyword a-keyword) (:BAR_KEY %)}) is the same as: (fn [%] ({:foo_id foo-id (keyword a-keyword) (:BAR_KEY %)})) Note the extra () around {}. In other words,

Re: What is the status of Clojure on LLVM or C?

2013-03-28 Thread Marko Topolnik
Or you may have just a trivial requirement for a program that both starts * and* executes quickly. -marko On Thursday, March 28, 2013 10:15:34 PM UTC+1, John Szakmeister wrote: On Wed, Mar 27, 2013 at 5:21 PM, Timothy Baldridge tbald...@gmail.comjavascript: wrote: What use-case do you

Re: What is the status of Clojure on LLVM or C?

2013-03-28 Thread Laurent PETIT
2013/3/28 Marko Topolnik marko.topol...@gmail.com: Or you may have just a trivial requirement for a program that both starts and executes quickly. To what extent would an LLVM / C version of a Clojure program not incur startup penalty as the JVM does. As far as I understand it, the startup

Re: hash-map initialization issue

2013-03-28 Thread Ryan
Thanks for your explanation Jonathan. I am still a bit confused however what is the proper solution here. Should i use an anonymous function instead to do what I want or can it be done with the #() syntax? Hyphens is my preferred way as well, but, those keys represent sql columns which they

Re: hash-map initialization issue

2013-03-28 Thread Jonathan Fischer Friberg
It can still be done with the #(), with for example the hash-map function. It's basically the same as the {} but as a function, like this: (hash-map :a 3 :b 4) = {:a 3, :b 4} So you should be able to write the function as: #(hash-map :foo_id foo-id (keyword a-keyword) (:BAR_KEY %)) I think you

Re: Working with a huge graph - how can I make Clojure performant?

2013-03-28 Thread Niels van Klaveren
That's quoting far out of context Alan. All Christophe says in his blog is he dislikes the statefulness of most implementations of Tarjan, and shows how this isn't needed, and can be done in a functional way. You could have stated the arguments why you think your version is superior, and it

Re: hash-map initialization issue

2013-03-28 Thread Ryan
Thanks for all your help Jonathan :) I went with the standard fn syntax, its a two-liner anyway so not a big of deal :) The important part here was that I learned that #() executes the content as a function, very helpful! Ryan On Friday, March 29, 2013 12:08:04 AM UTC+2, Jonathan Fischer

Re: hash-map initialization issue

2013-03-28 Thread Jonathan Fischer Friberg
No problem, glad to be of help. :) Jonathan On Thu, Mar 28, 2013 at 11:19 PM, Ryan arekand...@gmail.com wrote: Thanks for all your help Jonathan :) I went with the standard fn syntax, its a two-liner anyway so not a big of deal :) The important part here was that I learned that #()

[ANN] emoji 0.1.0 (initial release) - a library to emojify a ring app or pedestal service

2013-03-28 Thread Gabriel Horner
emoji is a library that provides ring middleware and pedestal interceptorware to replace a response containing emoji names with bundled emoji images. To use as an interceptor for a pedestal service: (require '[io.pedestal.service.interceptor :refer [defon-response]]) (require '[emoji.core

[ANN] Leiningen 2.1.2 released

2013-03-28 Thread Phil Hagelberg
Hello folks. I just released version 2.1.2 of Leiningen, fixing a number of bugs: ## 2.1.2 / 2013-02-28 * Allow TieredCompilation to be disabled for old JVMs. (Phil Hagelberg) * Fix a bug merging keywords in profiles. (Jean Niklas L'orange) * Fix a bug where tests wouldn't run under

Re: ClassNotFoundException when using fetch RPC from cljs

2013-03-28 Thread Steve Buikhuizen
Sadly, this was not the end of the story. I discovered that my fix posted above did not work properly so I decided to bite the bullet and move to shoreleave. This held the promise of using an edn reader. A couple of things were tricky in making this migration, I'll list them here for any

Quirk with printing regexps

2013-03-28 Thread Mark Engelberg
I'm in reader hell right now, trying to puzzle out how escape sequences and printing work for strings and regular expressions. I notice that: (re-pattern a\nb) (re-pattern a\\nb) (re-pattern a\\\nb) all produce semantically equivalent regular expressions that match a\nb The middle one prints

Clojure libraries on remote machines

2013-03-28 Thread Ramesh
Hi, I have a few machines without internet connection. We have a ubuntu repository mirror, so I can install clojure using apt-get. But, how do I install clojure libraries with all dependencies for projects on these machines? Even maven is not an option here. ramesh -- -- You received this

Re: Quirk with printing regexps

2013-03-28 Thread Mark Engelberg
On Thu, Mar 28, 2013 at 5:08 PM, Mark Engelberg mark.engelb...@gmail.comwrote: However, the first and last example print as: #a b Follow up question: Is there any way to make (re-pattern a\nb) print as #a\nb? I've tried pr, print-dup, and various combinations of printing the outputs of

Re: Quirk with printing regexps

2013-03-28 Thread Andy Fingerhut
Look in the Clojure source, file LispReader.java, classes RegexReader and StringReader for the code that reads strings and regular expressions. Basically the difference for regular expressions is that since things like \d to match a single decimal digit, or \s to match a single whitespace

Re: Quirk with printing regexps

2013-03-28 Thread Andy Fingerhut
On Thu, Mar 28, 2013 at 5:15 PM, Mark Engelberg mark.engelb...@gmail.comwrote: On Thu, Mar 28, 2013 at 5:08 PM, Mark Engelberg mark.engelb...@gmail.comwrote: However, the first and last example print as: #a b Follow up question: Is there any way to make (re-pattern a\nb) print as

Re: Quirk with printing regexps

2013-03-28 Thread Mark Engelberg
I'm on 1.5.1 and I get that too, but even though: (pr #a\nb) prints in a sane, readable way (pr (re-pattern a\nb)) does not. The latter is what I need to print in a nice way. On Thu, Mar 28, 2013 at 5:42 PM, Andy Fingerhut andy.finger...@gmail.comwrote: On Thu, Mar 28, 2013 at 5:15 PM, Mark

Re: Quirk with printing regexps

2013-03-28 Thread Alan Malloy
On Thursday, March 28, 2013 5:36:45 PM UTC-7, Andy Fingerhut wrote: I don't understand why (re-pattern a\\\nb) would match the same thing. I would have guessed that it wouldn't, but it does indeed do so. For all I know that could be bug or weird dark corner case in the Java regex

Re: Quirk with printing regexps

2013-03-28 Thread Andy Fingerhut
On Thu, Mar 28, 2013 at 5:49 PM, Mark Engelberg mark.engelb...@gmail.comwrote: I'm on 1.5.1 and I get that too, but even though: (pr #a\nb) prints in a sane, readable way (pr (re-pattern a\nb)) does not. The latter is what I need to print in a nice way. Sorry, I missed that fine point.

Re: Quirk with printing regexps

2013-03-28 Thread Mark Engelberg
On Thu, Mar 28, 2013 at 6:16 PM, Andy Fingerhut andy.finger...@gmail.comwrote: When you say a sane, readable way, do you mean human-readable, or readable via clojure.core/read or clojure.core/read-string? I meant human readable (defn print-regex-my-way [re] (print #regex \ (str re) \))

Re: What is the status of Clojure on LLVM or C?

2013-03-28 Thread Mikera
On Friday, 29 March 2013 05:45:53 UTC+8, Laurent PETIT wrote: 2013/3/28 Marko Topolnik marko.t...@gmail.com javascript:: Or you may have just a trivial requirement for a program that both starts and executes quickly. To what extent would an LLVM / C version of a Clojure program not

Re: Quirk with printing regexps

2013-03-28 Thread Mikhail Kryshen
(re-pattern a\nb) returns regexp pattern that contains the newline char literally. (re-patter a\\\nb) returns pattern that contains '\n' (two-char sequence). These are not the same. '\n' always matches newline, while literal newline will be ignored if ?x flag is present. = (re-matches

Re: Quirk with printing regexps

2013-03-28 Thread Andy Fingerhut
On Thu, Mar 28, 2013 at 6:23 PM, Mark Engelberg mark.engelb...@gmail.comwrote: On Thu, Mar 28, 2013 at 6:16 PM, Andy Fingerhut andy.finger...@gmail.comwrote: When you say a sane, readable way, do you mean human-readable, or readable via clojure.core/read or clojure.core/read-string? I

Re: Quirk with printing regexps

2013-03-28 Thread Mikhail Kryshen
On Fri, 29 Mar 2013 05:32:52 +0400 Mikhail Kryshen mikh...@kryshen.net wrote: (re-pattern a\nb) returns regexp pattern that contains the newline char literally. (re-patter a\\\nb) returns pattern that contains '\n' (two-char sequence). ^ should be (re-pattern a\\nb). And (re-pattern

Re: Clojure libraries on remote machines

2013-03-28 Thread Phil Hagelberg
You would need to run a mirror for Maven Central and Clojars. Once the mirror is set up you can look at lein help sample under :mirrors to see how to configure Leiningen to use it. Phil -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to

Re: Quirk with printing regexps

2013-03-28 Thread Mikhail Kryshen
On Thu, 28 Mar 2013 17:08:46 -0700 Mark Engelberg mark.engelb...@gmail.com wrote: Bug or feature? Certainly a feature for complex patterns with whitespace and embedded comments. For example, the following regexp parses line in Combined Log Format used by Apache httpd and other web servers:

Re: What is the status of Clojure on LLVM or C?

2013-03-28 Thread Timothy Baldridge
This is something I've thought/talked about for some time now. In reality this is one of the reasons I started Mjolnir. I would like to see an implementation of Clojure on LLVM. Mjolnir is several months away from being able to handle a project like this, but I took the time tonight to type up my

GSoC application: time's almost up

2013-03-28 Thread Daniel Solano Gómez
Hello, all, As I write this, there are less than 15 hours for us to finish our application for Google Summer of Code 2013. Thanks a lot to all of you who have taken the time to prepare project ideas. In these last few hours, there are two things we need to do: 1. Review the answers for our

Re: [ANN] Javelin, spreadsheet-like FRP for ClojureScript

2013-03-28 Thread Alan Dipert
Hank, I did my best to answer your questions and respond to your thoughts as I understand them, below. Thanks in advance for interpreting my suppositions and word choices liberally, as the words and ideas in this area of computing are notoriously overloaded. I'm looking forward to viewing

Re: [ANN] Amazonica: Clojure client for the entire AWS api

2013-03-28 Thread Michael Cohen
I ran a quick and dirty benchmark comparing Amazonica with James' rotary library, which uses no explicit reflection. This was run from an EC2 instance in East, hitting a Dynamo table in the East region. tl;dr Amazonica averaged 9ms for gets, rotary averaged 6ms, both averaged 13ms for puts.