Re: [ANN] Timbre, an all-Clojure logging library

2013-03-15 Thread Peter Taoussanis
You're both very welcome, thanks for letting me know you've been enjoying 
the lib!

BTW For those coming across this post only now, please note that the 
Clojars URL has changed: https://clojars.org/com.taoensso/timbre. Anyway, 
the newest version is always listed on GitHub: 
https://github.com/ptaoussanis/timbre.

There've been a number of improvements since the top post, including the 
addition of a logging profiler and (most recently) the addition of a 
middleware facility for transforming and filtering log events.

For the curious, one way I've been doing my logging recently is by pairing 
Timbre with Carmine (https://github.com/ptaoussanis/carmine) and writing a 
little appender fn to send logs to Redis using an index and expiring keys. 
With a few lines of code, that basically gives one a high-performance 
synchronized, distributed, query-able, rotating log.

- Peter Taoussanis (taoensso.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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Is it possible to set breakpoint using nrepl-ritz?

2013-03-15 Thread Warren Lynn


> It is using the latest development code (C-c C-x C-b on the line to 
> break at).  A release should be out containing this in the next few 
> days. 
>
> Hugo 
>

I was eager to use the line debugging commands but had no success. After 
"M-x nrepl-ritz-jack-in", I loaded a clojure file (just the simple "hello 
world" generated by "lein new"), and set a breakpoint at a line with "M-x 
nrepl-ritz-line-breakpoint". Now, when I run this function in the nrepl 
buffer, it just hangs and never returns. Without setting the breakpoint 
everything works fine. Anybody has succeeded on using  the debugger? Thanks.

BTW, it seems nrepl-ritz can also hang on other comands. For example, when 
I run "M-x nrepl-ritz-apropos" and input "core", it just hangs (but with 
input "map", it works).

Thanks for the work.


-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: problem with dependencies

2013-03-15 Thread Jean Niklas L'orange
On Wednesday, March 13, 2013 3:17:49 PM UTC+1, Joachim De Beule wrote:

> This gives the following error:
>
> "ClassNotFoundException org.mortbay.log.Logger 
>  java.net.URLClassLoader$1.run (URLClassLoader.java:202)"
>
> The problem disappears when I do not include [ring.util.serve]. For some 
> reason that I do not understand. the problem also disappears when I 
> include [org.apache.mahout/mahout-integration "0.7"] as a dependency in the 
> project file. Neither of these options is a real solution though, (because 
> I need ring.util.serve and I do not need mahout.integration).
>
> Any ideas? I'm using lein 2.0 + emacs and nrepl.
>

Dependency pain. It's smart to do `lein deps :tree`, which should show 
which dependencies you've fetched. In this case it seems like 
[org.mortbay.jetty/jetty 
"6.1.22"] (and a ton of other stuff) is dragged in by mahout. 
ring.util.serve uses its logger without directly depend on it through 
ring-jetty-adapter. This would have been fine, if it weren't for the fact 
that ring-jetty-adapter changed from mortbay's jetty to eclipse's jetty in 
the recent versions, and that the most recent version of ring uses the 
latest version. And when two versions clash, the highest one is picked 
unless version ranges comes into play.

To fix, just directly depend on mortbay's jetty: the latest stable version 
is 6.1.26, so add in [org.mortbay.jetty/jetty "6.1.26"] to your deps. That 
should fix it.

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Using Leiningen 2.1.0-SNAPSHOT

2013-03-15 Thread Jean Niklas L'orange


On Saturday, March 16, 2013 1:03:27 AM UTC+1, Michael Klishin wrote:
>
> To upgrade: pull, compile. Sometimes re-bootstrapping is necessary if
> there were leiningen-core changes.
>

It's often, if not always, when leiningen-core changes its project.clj map 
(updates dependencies or changes version number). Code changes in 
leiningen-core/src won't need re-bootstrapping as far as I know.

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [ANN] Timbre, an all-Clojure logging library

2013-03-15 Thread Jeremy Heiler
On Fri, Mar 15, 2013 at 7:34 PM,  wrote:

> I'd just like to thank you for writing this. It's perfect.


I'll second that! I've been using Timbre lately and it has been really
useful.

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Using Leiningen 2.1.0-SNAPSHOT

2013-03-15 Thread Víctor M . Valenzuela
Thank you Michael.

Victor

On Sat, Mar 16, 2013 at 1:03 AM, Michael Klishin <
michael.s.klis...@gmail.com> wrote:

>
> 2013/3/16 Víctor M. Valenzuela 
>
> Then what's the correct way to update one's lein clone - just by git
>> pulling or do I need an extra step?
>
>
> clone, bootstrap, compile, symlink ./bin/lein somewhere on PATH.
>
> To upgrade: pull, compile. Sometimes re-bootstrapping is necessary if
> there were leiningen-core changes.
> --
> MK
>
> http://github.com/michaelklishin
> http://twitter.com/michaelklishin
>
> --
> --
> 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 a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/OeFJM1M925M/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Using Leiningen 2.1.0-SNAPSHOT

2013-03-15 Thread Michael Klishin
2013/3/16 Víctor M. Valenzuela 

> Then what's the correct way to update one's lein clone - just by git
> pulling or do I need an extra step?


clone, bootstrap, compile, symlink ./bin/lein somewhere on PATH.

To upgrade: pull, compile. Sometimes re-bootstrapping is necessary if
there were leiningen-core changes.
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Using Leiningen 2.1.0-SNAPSHOT

2013-03-15 Thread Víctor M . Valenzuela
Thank you!

Then what's the correct way to update one's lein clone - just by git
pulling or do I need an extra step?

On Sat, Mar 16, 2013 at 12:20 AM, Michael Klishin <
michael.s.klis...@gmail.com> wrote:

>
> 2013/3/16 vemv 
>
>> How to use the development version of Lein?
>
>
>
> https://github.com/technomancy/leiningen/blob/master/CONTRIBUTING.md#bootstrapping
>
>
> --
> MK
>
> http://github.com/michaelklishin
> http://twitter.com/michaelklishin
>
> --
> --
> 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 a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/OeFJM1M925M/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [ANN] Timbre, an all-Clojure logging library

2013-03-15 Thread adam . neilson
I'd just like to thank you for writing this. It's perfect.

On Monday, May 28, 2012 12:17:30 PM UTC+1, Peter Taoussanis wrote:
>
> Hi everyone,
>
> I recently lost it after spending 5+ hours trying to figure out why Log4j 
> had suddenly started swallowing all my messages [again]. Anyway, decided 
> it'd be infinitely saner to write something simple for my own purposes. I'm 
> posting it here in case someone else might find it useful.
>
> It's on Github (https://github.com/ptaoussanis/timbre) and Clojars (
> https://clojars.org/timbre).
>
> Features (taken from the readme):
> * Small, uncomplicated all-Clojure library.
> * Map-based config: no arcane XML or properties files.
> * Decent performance (low overhead).
> * Flexible fn-centric appender model.
> * Sensible built-in appenders including simple email appender.
> * Tunable flood control.
> * Asynchronous logging support.
>
> As always, any comments/pull-requests/whatever very welcome!
>
> Cheers!
>
> - Peter Taoussanis (@ptaoussanis)
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Using Leiningen 2.1.0-SNAPSHOT

2013-03-15 Thread Michael Klishin
2013/3/16 vemv 

> How to use the development version of Lein?


https://github.com/technomancy/leiningen/blob/master/CONTRIBUTING.md#bootstrapping


-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Using Leiningen 2.1.0-SNAPSHOT

2013-03-15 Thread vemv
A bunch of bugfixes have been introduced since 2.0.0 which I need ASAP for 
the projects I'm working on.

How to use the development version of Lein?

One cannot perform lein upgrade "2.1.0-SNAPSHOT".

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




ANN Spyglass 1.1.0-beta3 is released

2013-03-15 Thread Michael Klishin
Spyglass [1] is a very fast Clojure client for
Memcached (as well as other services that use the Memcached protocol, e.g.
Couchbase) built on top of SpyMemcached.

Release notes:
http://blog.clojurewerkz.org/blog/2013/03/15/spyglass-1-dot-1-0-beta3-is-released/

1. http://clojurememcached.info
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Leiningen survey

2013-03-15 Thread Phil Hagelberg

Hello folks.

If you use Leiningen, I'd appreciate it if you could take a few moments
to answer a few questions about your usage patterns so we can get a
better idea of where to focus development efforts in the future.

https://lein-survey-2013.herokuapp.com/

Thanks a bunch!

-Phil

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




ClassNotFoundException: clojure.tools.logging.impl.LoggerFactory

2013-03-15 Thread Michael Blume
I'm seeing this problem in my builds more or less randomly, and don't seem 
to be the only one

http://stackoverflow.com/questions/8291910/noclassdeffounderror-with-clojure-tools-logging

https://groups.google.com/forum/#!msg/datomic/6xWGFB-Dx68/_Hr2I4lv39gJ

http://clojure-log.n01se.net/date/2012-10-16.html

Second link seems to think it's a problem with datomic or maybe lein, but 
I'm using maven and not using datomic, so it *seems* like there's some race 
condition involving loading logging classes where this happens. I don't 
understand this, since LoggerFactory is defined at top-level in 
clojure.tools.logging.impl and impl is required in the ns declaration of 
clojure.tools.logging.

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[ANN] Clojure Training in Australia - May, 2013

2013-03-15 Thread Lynn Grogan
Hey All,
If you're in Australia in the month of May, YOW! Lambda 
Jam, 
in conjunction with Relevance , is offering *Intro 
to Clojure* training courses with Stuart Sierra .

More information and registration details:

   - Sydney , May 10 & 11, 2013
   - Brisbane , May 14 & 15, 
   2013
   - Melbourne , May 20 & 21, 
   2013
   

There will also be several *YOW! Nights* with Clojure talks: keep an eye on 
the LambdaJam website  for more details.

Please spread the word to any local user groups who might be interested.

Thanks! 
Lynn Grogan
Relevance, Inc. 

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[ANN] stereotypes-clj

2013-03-15 Thread Joseph Wilk
A fixture library for Clojure: http://josephwilk.github.com/stereotype-clj

Can be used with or without Korma.

Thanks,
--
Joseph Wilk
http://blog.josephwilk.net
@josephwilk

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What guarantees (if any) does Clojure make about laziness?

2013-03-15 Thread Marko Topolnik

>
> you *must* preserve laziness whenever applicable, but you *may not* take 
> advantage of it by assuming any guarantees.
>
>
> Erm - I certainly hope that this isn't true. Otherwise, I wouldn't be able 
> to write:
>
> (take 10 (repeatedly 0))
>
> Because, without *some* guarantees, it might never terminate and/or 
> consume all memory.
>

Exactly :) I have tried in vain to find any official statement on this. 
Throughout the API documentation you'll find guarantees such as "preserves 
laziness", "returns a lazy sequence", but nowhere do I find any commitment 
at all to the content of that term. 

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What guarantees (if any) does Clojure make about laziness?

2013-03-15 Thread Paul Butcher
On 15 Mar 2013, at 09:23, Marko Topolnik  wrote:

> This is not about bureaucracy --- it's about API contract,

Quite.

> you must preserve laziness whenever applicable, but you may not take 
> advantage of it by assuming any guarantees.

Erm - I certainly hope that this isn't true. Otherwise, I wouldn't be able to 
write:

(take 10 (repeatedly 0))

Because, without *some* guarantees, it might never terminate and/or consume all 
memory.

Of course, the only guarantee that this requires is the one that you mentioned 
in your earlier mail, that there will be *some* upper bound to how much of the 
sequence is realised. But it would be nice if there was an official statement 
to that end somewhere.

And if there are other guarantees that can be relied upon, it would be nice to 
know what they were...

--
paul.butcher->msgCount++

Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
MSN: p...@paulbutcher.com
AIM: paulrabutcher
Skype: paulrabutcher

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What guarantees (if any) does Clojure make about laziness?

2013-03-15 Thread Marko Topolnik
This is not about bureaucracy --- it's about API contract, and there is *no*
* *contract to speak of for lazy sequences. Even the guarantee that it 
won't try to fully realize an infinite sequence is just word of mouth, and 
more of a common-sense guarantee than anything else.

Basically, coding against lazy seqs only imposes a burden and gives no 
relief in return: you *must* preserve laziness whenever applicable, but you 
*may not* take advantage of it by assuming any guarantees.

-Marko


On Friday, March 15, 2013 10:01:13 AM UTC+1, Meikel Brandmeyer (kotarak) 
wrote:
>
> The fact that lazy-seq actually was introduced to increase laziness pretty 
> much shows the path. There is no official specification of Clojure you 
> could rely on bureaucratically.
>
> Kind regards
> Meikel
>
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What guarantees (if any) does Clojure make about laziness?

2013-03-15 Thread Meikel Brandmeyer (kotarak)
The fact that lazy-seq actually was introduced to increase laziness pretty 
much shows the path. There is no official specification of Clojure you 
could rely on bureaucratically.

Kind regards
Meikel

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What guarantees (if any) does Clojure make about laziness?

2013-03-15 Thread Paul Butcher
On 15 Mar 2013, at 08:28, Marko Topolnik  wrote:

> To the best of my knowledge the only guarantee you get is the existence of an 
> upper bound on the size of the eagerly fetched chunk, so a potentially 
> infinite lazy sequence will not result in an endless loop/OOME. The whole 
> mechanism is based on a best-effort policy.

That sounds very plausible to me. Is there an official statement to that end 
anywhere?

--
paul.butcher->msgCount++

Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
MSN: p...@paulbutcher.com
AIM: paulrabutcher
Skype: paulrabutcher

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What guarantees (if any) does Clojure make about laziness?

2013-03-15 Thread Paul Butcher
On 15 Mar 2013, at 07:04, Meikel Brandmeyer (kotarak)  wrote:

> this highly depends on the sequence function at hand. Usually they are 
> guaranteed to be as lazy as possible. But the are two aspects: a) sometimes 
> you need to look ahead to actually perform the action (eg. take-while or 
> drop-while) and b) sometimes there might be a bug in the implementation and 
> it is not as lazy as it could be. You can't do anything about a). And b) is 
> very unlikely but also happened in the past.

So the word I'm interested in in that sentence is "guaranteed". I can see, from 
reading the source, what's "guaranteed" by a particular lazy structure and/or 
function. But that's just a statement about the current implementation, which 
might change in a future version of the language/library. Are these guarantees 
stated anywhere, or is my only recourse reading the source and/or experimenting 
with examples?

--
paul.butcher->msgCount++

Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
MSN: p...@paulbutcher.com
AIM: paulrabutcher
Skype: paulrabutcher

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What guarantees (if any) does Clojure make about laziness?

2013-03-15 Thread Marko Topolnik
To the best of my knowledge the only guarantee you get is the *existence* of 
an upper bound on the size of the eagerly fetched chunk, so a potentially 
infinite lazy sequence will not result in an endless loop/OOME. The whole 
mechanism is based on a best-effort policy.

On Friday, March 15, 2013 2:08:58 AM UTC+1, Paul Butcher wrote:
>
> Clojure's sequences are lazy - but is there anything that guarantees *how* 
> lazy they are?
>
> To give a concrete example - given an infinite lazy sequence of promises:
>
> (def promises (repeatedly promise))
>
> If, in one thread I do:
>
> (doseq [p (map deref promises)] (println p))
>
> And in another thread, I call deliver on various elements of promises, 
> will promises always be printed as soon as they're available? Or can things 
> block for longer than they theoretically might because a later 
> (undelivered) promise in the sequence is being realized?
>
> I've been doing some experiments, and in practice the above works just 
> fine - promises are printed as soon as they theoretically might be. If, 
> however, I put a "flatten" in place of the map then I seem to have to 
> deliver one more promise before the first is printed.
>
> What I'm interested in here aren't practicalities. I'm interested in what 
> Clojure and its libraries guarantee (if anything) about laziness. Is there 
> an upper bound on how much of a sequence will be realized?
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: clojurescript browser repl not working.

2013-03-15 Thread Mimmo Cosenza

On Mar 14, 2013, at 10:21 PM, Rohan Nicholls  wrote:

> 
> And a huge thank-you to mimmo for looking into this so quickly.
> 

Thanks Rohan, I appreciate. Programming is the only thing that give me a sense 
of having done something useful in the day.  I'm the founder of my little sw 
factory (we're 15) and I can't find enough time to make my day by programming. 
In the last month I did not have the time to write a single line of code 
(damn!).   

Being responsive when something I've done does not work in the expected way is 
just a kantian sense of duty.  It follows from  having received so much from 
the clojurean community.

My best

Mimmo





-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What guarantees (if any) does Clojure make about laziness?

2013-03-15 Thread Meikel Brandmeyer (kotarak)
Hi,

this highly depends on the sequence function at hand. Usually they are 
guaranteed to be as lazy as possible. But the are two aspects: a) sometimes 
you need to look ahead to actually perform the action (eg. take-while or 
drop-while) and b) sometimes there might be a bug in the implementation and 
it is not as lazy as it could be. You can't do anything about a). And b) is 
very unlikely but also happened in the past.

A bigger problem might be ChunkedSequences. Assume you have your promises 
in a vector. Then a (map deref ...) will deref ahead of the actually 
requested elements and you have to deliver on up to 32 promises to unblock 
the realisation of the map sequence. So the flatten is probably more about 
the datastructures introducing such a ChunkedSeq than about the flatten 
itself.

Kind regards
Meikel

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.