[ANN] bouncer 0.2.3-beta1

2013-03-14 Thread Leonardo Borges
bouncer is a validation DSL for Clojure apps

Github: https://github.com/leonardoborges/bouncer
Clojars: https://clojars.org/bouncer

New in version 0.2.3-beta1:

- Validator sets can now be used at the top level call to validate and
valid?
- Added tests and a doc section around validation pipelining. It was an
undocumented assumption.
- Initial support for inter-field validation via validator pre-conditions
(alpha)

Please have a look at the
CHANGELOG
for
details.

As always, feedback is welcome.

Cheers,
Leonardo Borges
www.leonardoborges.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: clojurescript browser repl not working.

2013-03-14 Thread Evan Mezeske
Oops, there's an open case to bring lein-cljsbuild's default compiler 
version up to r1586: https://github.com/emezeske/lein-cljsbuild/issues/186. 
 I will try to get to that soon.

In the meantime, you should be able to add [org.clojure/clojurescript 
"0.0-1586"] to your :deps to get the latest version.

On Thursday, March 14, 2013 2:25:49 PM UTC-7, David Nolen wrote:
>
> I'm not sure if lein-cljsbuild uses the latest release of ClojureScript - 
> Evan would know. In general I think it's probably best to just specify the 
> version of ClojureScript you want to use yourself to avoid any issues.
>
>
> On Thu, Mar 14, 2013 at 5:21 PM, Rohan Nicholls 
> 
> > wrote:
>
>> I have been in touch with the writer of the modern-cljs tutorial, and he 
>> thinks that 
>> a library include is missing that used to be a problem, but was fixed.  
>> It looks like
>> the problem is back. 
>>
>> You can follow the issue and discussion here:
>>
>> https://github.com/magomimmo/modern-cljs/issues/38
>>
>> And a huge thank-you to mimmo for looking into this so quickly.
>>
>>
>> On Wednesday, 13 March 2013 13:39:51 UTC+1, Rohan Nicholls wrote:
>>>
>>> Hey all, 
>>>
>>> I have been experimenting with clojurescript and following the modern 
>>> tutorial. 
>>>
>>> However I am now stuck while trying to get the browser repl (brepl) 
>>> working. 
>>>
>>> I looked on the clojurescript jira tracker and there was no mention of 
>>> this problem.  There was no way to add an issue, so I thought I would 
>>> post here as this is what is mentioned on the clojurescript page. 
>>>
>>> This issue means no brepl, which pretty much brings any further 
>>> investigation of clojurescript to a halt. 
>>>
>>> Thanks in advance for any help. 
>>>
>>> Rohan 
>>>
>>> The details: 
>>>
>>> I was following this tutorial: 
>>> https://github.com/magomimmo/**modern-cljs/blob/master/doc/**
>>> tutorial-02.md
>>>  
>>>
>>> I have a static web server running, I get a repl by executing: 
>>>
>>> lein trampoline cljsbuild repl-listen 
>>>
>>> And then I go to the simple.html page being served up by my server: 
>>>
>>> http://localhost:/simple.**html  
>>>
>>> At this point according to the tutorial I should be good to go, and 
>>> the repl from the cljsbuild command given in the terminal earlier 
>>> should work. 
>>>
>>> However, it hangs, and so I opened the console and saw these errors. 
>>>
>>> Uncaught TypeError: Cannot call method 'call' of undefined  on line 
>>> 989 of repl 
>>>
>>> Which is actually caused by: 
>>>
>>> Uncaught TypeError: Cannot read property 'client' of undefined on line 
>>> 1021 of repl 
>>>
>>> The source comes from this url: 
>>> http://localhost:9000/repl?**xpc=%7B%22cn%22%3A%**
>>> 22ScD89D6Sbo%22%2C%22tp%22%**3Anull%2C%22osh%22%3Anull%2C%**
>>> 22ppu%22%3A%22http%3A%2F%**2Flocalhost%3A3000%2Frobots.**
>>> txt%22%2C%22lpu%22%3A%22http%**3A%2F%2Flocalhost%3A9000%**
>>> 2Frobots.txt%22%7D
>>>  
>>>
>>> which after some grepping is coming from: 
>>> /repl/client.js 
>>>
>>> And sure enough if I go to the offending line I see this: 
>>>
>>>  
>>>   clojure.browser.repl.client.**start("http://localhost:9000";)**; 
>>>
>>> Uncaught TypeError: Cannot read property 'client' of undefined 
>>>
>>>
>>> evaluating the clojure object indeed gives us clojure.browser.repl but 
>>> the repl object has no client. 
>>>
>>> I started looking into this in more depth and found that indeed the 
>>> code that defines a client and the start function which is found one 
>>> line up: 
>>>
>>> clojure.browser.repl.client={}**; 
>>> clojure.browser.repl.client.**start=function(a){ 
>>>   return goog.events.listen(window,"**load",function(){ 
>>> return clojure.browser.repl.start_**evaluator.call(null,a) 
>>>   }) 
>>> }; 
>>>
>>> The ...repl.start_evaluator exists, and looks like this: 
>>>
>>> clojure.browser.repl.start_**evaluator=function(a){ 
>>> var b=clojure.browser.net.xpc_**connection.call(null); 
>>> if(cljs.core.truth_(b)**){ 
>>> var c=clojure.browser.net.xhr_**connection.call(null); 
>>> clojure.**browser.event.listen.call(**
>>> null,c,"\ufdd0'success",**function(a){ 
>>> return clojure.browser.net.transmit.**
>>> call(null,b,"\ufdd0'evaluate-**javascript",a.currentTarget.**
>>> getResponseText(cljs.core.**List.EMPTY)) 
>>> }); 
>>> clojure.**browser.net.register_service.**
>>> call(null,b,"\ufdd0'send-**result",function(b){ 
>>> return clojure.browser.repl.send_**
>>> result.call(null,c,a,clojure.**browser.

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

2013-03-14 Thread Paul Butcher
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?

--
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.




[ANN] congomongo 0.4.1 released

2013-03-14 Thread Sean Corfield
http://corfield.org/blog/post.cfm/congomongo-0-4-1-released

* read preference supported (per-connection, per-collection,
per-fetch) - Niclas Meier
* add-index! supports :background true/false - dwwoelfel
* namespaced keyword keys in maps are roundtripped correctly - Adam Clements

(the blog post links to both the Github repo and Clojars)
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
-- 
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] clj-time 0.4.5 released

2013-03-14 Thread Sean Corfield
http://corfield.org/blog/post.cfm/clj-time-0-4-5-released

* Add testing predicates for days (e.g., tuesday?) and months (e.g.,
july?) -Devin Walters
* Change base Clojure version from 1.3.0 to 1.4.0 (we're testing
against 1.3.0 and 1.5.1 now)
* format-local-time now returns nil on a bad format string (instead of
silently returning the current time!) - mw10013
* date-midnight is now supported across all the coercions - Nick
Barnwell, with a fix from Tom McNulty
* Correct parse-local behavior when no format is given - Ben Poweski
* Added MIT-LICENSE.txt - thank you David Powell for the nudge!
* Add support for Joda's YearMonth - Ragnard Dahlén
* Add instant->map producing readable Clojure-format date/time,
interval and period values - Thiago Nunes

I'd also like to give a special shout out to Michael Klishin for
attention to the documentation and for review and input on some of
these features!

(the blog post links to both the Github repo and Clojars)
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
-- 
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: core.logic: Dividing the knowledge base

2013-03-14 Thread David Nolen
On Thu, Mar 14, 2013 at 7:18 PM, Norman Richards wrote:

> PLDB was written against the current core.logic release.  I have not yet
> started testing with the 0.8 pre releases, but judging from the recent
> core.logic announcement, now is probably a good time to start. :)


Please do. I'll probably just go ahead release 0.8.0 over the weekend. If
you find issues please file tickets and we'll get things cleaned up for
0.8.1 shortly.

Thanks,
David

-- 
-- 
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: core.logic: Dividing the knowledge base

2013-03-14 Thread Norman Richards


On Mar 14, 2013, at 4:15 PM, JvJ  wrote:

> I'm not sure how else to go about contacting you about this, but I've found 
> some problems in pldb.  The system just doesn't seem to work at all with the 
> core.logic 0.8.0 builds.  I'm not too familiar with the guts of pldb or 
> core.logic, but I'm wondering if maybe some implementation changes lead to 
> this?

PLDB was written against the current core.logic release.  I have not yet 
started testing with the 0.8 pre releases, but judging from the recent 
core.logic announcement, now is probably a good time to start. :)

You can report issues on the github project page. Also, feel free to grab me on 
the clojure IRC channel at any time.  

-- 
-- 
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: core.logic: Dividing the knowledge base

2013-03-14 Thread Craig Brozefsky
JvJ  writes:

>I'm not sure how else to go about contacting you about this, but I've
>found some problems in pldb.  The system just doesn't seem to work at
>all with the core.logic 0.8.0 builds.  I'm not too familiar with the
>guts of pldb or core.logic, but I'm wondering if maybe some
>implementation changes lead to this?

You could use the Issues system in github for reporting this to pldb's
maintainers.  Details of what "not works at all" looks like would help
them too.

-- 
Craig Brozefsky 
Premature reification is the root of all evil

-- 
-- 
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-14 Thread David Nolen
I'm not sure if lein-cljsbuild uses the latest release of ClojureScript -
Evan would know. In general I think it's probably best to just specify the
version of ClojureScript you want to use yourself to avoid any issues.


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

> I have been in touch with the writer of the modern-cljs tutorial, and he
> thinks that
> a library include is missing that used to be a problem, but was fixed.  It
> looks like
> the problem is back.
>
> You can follow the issue and discussion here:
>
> https://github.com/magomimmo/modern-cljs/issues/38
>
> And a huge thank-you to mimmo for looking into this so quickly.
>
>
> On Wednesday, 13 March 2013 13:39:51 UTC+1, Rohan Nicholls wrote:
>>
>> Hey all,
>>
>> I have been experimenting with clojurescript and following the modern
>> tutorial.
>>
>> However I am now stuck while trying to get the browser repl (brepl)
>> working.
>>
>> I looked on the clojurescript jira tracker and there was no mention of
>> this problem.  There was no way to add an issue, so I thought I would
>> post here as this is what is mentioned on the clojurescript page.
>>
>> This issue means no brepl, which pretty much brings any further
>> investigation of clojurescript to a halt.
>>
>> Thanks in advance for any help.
>>
>> Rohan
>>
>> The details:
>>
>> I was following this tutorial:
>> https://github.com/magomimmo/**modern-cljs/blob/master/doc/**
>> tutorial-02.md
>>
>> I have a static web server running, I get a repl by executing:
>>
>> lein trampoline cljsbuild repl-listen
>>
>> And then I go to the simple.html page being served up by my server:
>>
>> http://localhost:/simple.**html 
>>
>> At this point according to the tutorial I should be good to go, and
>> the repl from the cljsbuild command given in the terminal earlier
>> should work.
>>
>> However, it hangs, and so I opened the console and saw these errors.
>>
>> Uncaught TypeError: Cannot call method 'call' of undefined  on line
>> 989 of repl
>>
>> Which is actually caused by:
>>
>> Uncaught TypeError: Cannot read property 'client' of undefined on line
>> 1021 of repl
>>
>> The source comes from this url:
>> http://localhost:9000/repl?**xpc=%7B%22cn%22%3A%**
>> 22ScD89D6Sbo%22%2C%22tp%22%**3Anull%2C%22osh%22%3Anull%2C%**
>> 22ppu%22%3A%22http%3A%2F%**2Flocalhost%3A3000%2Frobots.**
>> txt%22%2C%22lpu%22%3A%22http%**3A%2F%2Flocalhost%3A9000%**
>> 2Frobots.txt%22%7D
>>
>> which after some grepping is coming from:
>> /repl/client.js
>>
>> And sure enough if I go to the offending line I see this:
>>
>> 
>>   clojure.browser.repl.client.**start("http://localhost:9000";)**;
>>
>> Uncaught TypeError: Cannot read property 'client' of undefined
>>   
>>
>> evaluating the clojure object indeed gives us clojure.browser.repl but
>> the repl object has no client.
>>
>> I started looking into this in more depth and found that indeed the
>> code that defines a client and the start function which is found one
>> line up:
>>
>> clojure.browser.repl.client={}**;
>> clojure.browser.repl.client.**start=function(a){
>>   return goog.events.listen(window,"**load",function(){
>> return clojure.browser.repl.start_**evaluator.call(null,a)
>>   })
>> };
>>
>> The ...repl.start_evaluator exists, and looks like this:
>>
>> clojure.browser.repl.start_**evaluator=function(a){
>> var b=clojure.browser.net.xpc_**connection.call(null);
>> if(cljs.core.truth_(b)**){
>> var c=clojure.browser.net.xhr_**connection.call(null);
>> clojure.**browser.event.listen.call(**
>> null,c,"\ufdd0'success",**function(a){
>> return clojure.browser.net.transmit.**
>> call(null,b,"\ufdd0'evaluate-**javascript",a.currentTarget.**
>> getResponseText(cljs.core.**List.EMPTY))
>> });
>> clojure.**browser.net.register_service.**
>> call(null,b,"\ufdd0'send-**result",function(b){
>> return clojure.browser.repl.send_**
>> result.call(null,c,a,clojure.**browser.repl.wrap_message.**call(null,"\ufdd0'result",b))
>>
>> });
>> clojure.**browser.net.register_service.**
>> call(null,b,"\ufdd0'print",**function(b){
>> return clojure.browser.repl.send_**
>> print.call(null,a,clojure.**browser.repl.wrap_message.**call(null,"\ufdd0'print",b))
>>
>> });
>> clojure.**browser.net.connect.call(null,**
>> b,cljs.core.constantly.call(**null,null));
>> return setTimeout(function(){
>> return clojure.browser.repl.send_

Re: core.logic: Dividing the knowledge base

2013-03-14 Thread David Nolen
That's likely though pldb is so small I don't really think it would require
much in the way of changes.


On Thu, Mar 14, 2013 at 5:15 PM, JvJ  wrote:

> I'm not sure how else to go about contacting you about this, but I've
> found some problems in pldb.  The system just doesn't seem to work at all
> with the core.logic 0.8.0 builds.  I'm not too familiar with the guts of
> pldb or core.logic, but I'm wondering if maybe some implementation changes
> lead to this?
>
>
> On Monday, 4 March 2013 10:51:48 UTC-5, Norman Richards wrote:
>
>>
>>
>> On Wed, Feb 27, 2013 at 4:03 PM, JvJ  wrote:
>>
>>> It states that retractions aren't yet implemented.  Is there any way to
>>> delete facts?
>>
>>
>> Retractions are now supported.  DB merging and cross-DB logic queries are
>> still coming.  Feel free to comment on the github issues if you have
>> specific use cases in mind you would like to see this support.  I have some
>> specific ideas for things we want to do with this at Threatgrid, but that's
>> only one use case.
>>
>  --
> --
> 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.
>
>
>

-- 
-- 
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-14 Thread Rohan Nicholls
I have been in touch with the writer of the modern-cljs tutorial, and he 
thinks that 
a library include is missing that used to be a problem, but was fixed.  It 
looks like
the problem is back. 

You can follow the issue and discussion here:

https://github.com/magomimmo/modern-cljs/issues/38

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

On Wednesday, 13 March 2013 13:39:51 UTC+1, Rohan Nicholls wrote:
>
> Hey all, 
>
> I have been experimenting with clojurescript and following the modern 
> tutorial. 
>
> However I am now stuck while trying to get the browser repl (brepl) 
> working. 
>
> I looked on the clojurescript jira tracker and there was no mention of 
> this problem.  There was no way to add an issue, so I thought I would 
> post here as this is what is mentioned on the clojurescript page. 
>
> This issue means no brepl, which pretty much brings any further 
> investigation of clojurescript to a halt. 
>
> Thanks in advance for any help. 
>
> Rohan 
>
> The details: 
>
> I was following this tutorial: 
> https://github.com/magomimmo/modern-cljs/blob/master/doc/tutorial-02.md 
>
> I have a static web server running, I get a repl by executing: 
>
> lein trampoline cljsbuild repl-listen 
>
> And then I go to the simple.html page being served up by my server: 
>
> http://localhost:/simple.html 
>
> At this point according to the tutorial I should be good to go, and 
> the repl from the cljsbuild command given in the terminal earlier 
> should work. 
>
> However, it hangs, and so I opened the console and saw these errors. 
>
> Uncaught TypeError: Cannot call method 'call' of undefined  on line 
> 989 of repl 
>
> Which is actually caused by: 
>
> Uncaught TypeError: Cannot read property 'client' of undefined on line 
> 1021 of repl 
>
> The source comes from this url: 
>
> http://localhost:9000/repl?xpc=%7B%22cn%22%3A%22ScD89D6Sbo%22%2C%22tp%22%3Anull%2C%22osh%22%3Anull%2C%22ppu%22%3A%22http%3A%2F%2Flocalhost%3A3000%2Frobots.txt%22%2C%22lpu%22%3A%22http%3A%2F%2Flocalhost%3A9000%2Frobots.txt%22%7D
>  
>
> which after some grepping is coming from: 
> /repl/client.js 
>
> And sure enough if I go to the offending line I see this: 
>
>  
>   clojure.browser.repl.client.start("http://localhost:9000";); 
> Uncaught TypeError: Cannot read property 'client' of undefined 
>
>
> evaluating the clojure object indeed gives us clojure.browser.repl but 
> the repl object has no client. 
>
> I started looking into this in more depth and found that indeed the 
> code that defines a client and the start function which is found one 
> line up: 
>
> clojure.browser.repl.client={}; 
> clojure.browser.repl.client.start=function(a){ 
>   return goog.events.listen(window,"load",function(){ 
> return clojure.browser.repl.start_evaluator.call(null,a) 
>   }) 
> }; 
>
> The ...repl.start_evaluator exists, and looks like this: 
>
> clojure.browser.repl.start_evaluator=function(a){ 
> var b=clojure.browser.net.xpc_connection.call(null); 
> if(cljs.core.truth_(b)){ 
> var c=clojure.browser.net.xhr_connection.call(null); 
> 
> clojure.browser.event.listen.call(null,c,"\ufdd0'success",function(a){ 
>
> return 
> clojure.browser.net.transmit.call(null,b,"\ufdd0'evaluate-javascript",a.currentTarget.getResponseText(cljs.core.List.EMPTY))
>  
>
> }); 
> 
> clojure.browser.net.register_service.call(null,b,"\ufdd0'send-result",function(b){
>  
>
> return 
> clojure.browser.repl.send_result.call(null,c,a,clojure.browser.repl.wrap_message.call(null,"\ufdd0'result",b))
>  
>
> }); 
> 
> clojure.browser.net.register_service.call(null,b,"\ufdd0'print",function(b){ 
>
> return 
> clojure.browser.repl.send_print.call(null,a,clojure.browser.repl.wrap_message.call(null,"\ufdd0'print",b))
>  
>
> }); 
> 
> clojure.browser.net.connect.call(null,b,cljs.core.constantly.call(null,null));
>  
>
> return setTimeout(function(){ 
> return 
> clojure.browser.repl.send_result.call(null,c,a,clojure.browser.repl.wrap_message.call(null,"\ufdd0'ready","ready"))
>  
>
> },50) 
> } 
> return alert("No 'xpc' param provided to child iframe.") 
> } 
>
>
>
> There is no obvious place where this goes wrong within the 
> start_evaluator, as all the methods that are called, exist.  So here 
> is the function (prettyfied) where the error occurs. 
>
> Uncaught TypeError: Cannot call method 'call' of undefined  on line 
> 989 of repl 
>
> clojure.browser.net.connect=function(){ 
> var a=null, 
> b=function(a){ 
> var b; 
> b=a?a.clojure$browser$net$IConnection$connect$arity$1:a; 
> if(b) 
> return 
> a.clo

Re: core.logic: Dividing the knowledge base

2013-03-14 Thread JvJ
I'm not sure how else to go about contacting you about this, but I've found 
some problems in pldb.  The system just doesn't seem to work at all with 
the core.logic 0.8.0 builds.  I'm not too familiar with the guts of pldb or 
core.logic, but I'm wondering if maybe some implementation changes lead to 
this?

On Monday, 4 March 2013 10:51:48 UTC-5, Norman Richards wrote:
>
>
>
> On Wed, Feb 27, 2013 at 4:03 PM, JvJ >wrote:
>
>> It states that retractions aren't yet implemented.  Is there any way to 
>> delete facts?
>
>
> Retractions are now supported.  DB merging and cross-DB logic queries are 
> still coming.  Feel free to comment on the github issues if you have 
> specific use cases in mind you would like to see this support.  I have some 
> specific ideas for things we want to do with this at Threatgrid, but that's 
> only one use case.
>  

-- 
-- 
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: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Daniel Higginbotham
Thank you! I implemented your suggestion of breaking up the Java code.

On Thursday, March 14, 2013 10:42:55 AM UTC-4, Chris Ford wrote:
>
> You could also consider visually breaking up Java code that is across 
> multiple files. You've got "// Contents of:" comments, but a break in the 
> grey background would also be helpful.
>
> Nice post. The world needs more people willing to explain basic concepts 
> in a clear, un-patronising way.
>
> Cheers,
>
> Chris
>
> On 14 March 2013 16:06, Daniel Higginbotham 
> > wrote:
>
>> Thanks! Updated!
>>
>>
>> On Thursday, March 14, 2013 8:28:47 AM UTC-4, Marko Topolnik wrote:
>>>
>>> One point crosses my mind: JAR is a regular ZIP file. First time I 
>>> learned that, I felt a great relief: it goes a long way towards 
>>> demystifying the practical concerns of living with Java.
>>>
>>> On Thursday, March 14, 2013 1:03:17 PM UTC+1, Daniel Higginbotham wrote:

 Thanks for the feedback, guys! It's good to know I'm on the right 
 track. I've also cleaned up the formatting - thank you for pointing that 
 out :)

 It seems like the clojure style guide goes some way toward showing how 
 to wrap Java, though it doesn't really go into detail about handling all 
 the decision points that you encounter when wrapping Java

 On Thursday, March 14, 2013 5:08:31 AM UTC-4, Marko Topolnik wrote:
>
> I like the content of the article, but shouldn't you fix the 
> formatting? Source code is badly mangled and some bulleted lists are 
> flowed 
> into a single paragraph.
>
> On Thursday, March 14, 2013 3:58:58 AM UTC+1, Daniel Higginbotham 
> wrote:
>>
>> I've been feeling like my lack of Java knowledge has been holding me 
>> back with Clojure, so I've started to learn it and have written an 
>> article 
>> on how you compile and run a Java program: http://www.**
>> flyingmachinestudios.com/**programming/how-clojure-**
>> babies-are-made-the-java-**cycle/.
>>  Is the information in the article accurate? I'm not 100% sure and would 
>> love any feedback. Also, are there any other resources for this kind of 
>> info?
>>
>> Please forgive me if I shouldn't be sending a link to my blog to the 
>> mailing list - I don't know whether this is proper etiquette or not.
>>
>> Thanks!
>>
>  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@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+u...@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: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Daniel Higginbotham
This is exactly the kind of content I was looking for. Thank you!

On Thursday, March 14, 2013 3:05:16 PM UTC-4, Jeremy Heiler wrote:
>
> On Thu, Mar 14, 2013 at 12:41 AM, Jason Lewis 
> 
> > wrote:
>
>> What I'd love to see is a tutorial on abstracting Java classes and 
>> interfaces in pure Clojure, [...]
>>
>
> Zach Tellman did a great talk about this called "Distilling Java 
> Libraries" at Clojure/West 2012. Check it out!
>
> http://www.infoq.com/presentations/Distilling-Java-Libraries 
>  

-- 
-- 
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: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Jeremy Heiler
On Thu, Mar 14, 2013 at 12:41 AM, Jason Lewis wrote:

> What I'd love to see is a tutorial on abstracting Java classes and
> interfaces in pure Clojure, [...]
>

Zach Tellman did a great talk about this called "Distilling Java Libraries"
at Clojure/West 2012. Check it out!

http://www.infoq.com/presentations/Distilling-Java-Libraries

-- 
-- 
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: ":peer/timeout Transaction timed out", and excessive logging

2013-03-14 Thread Brian Craft
Damn, wrong group. Sorry

On Thursday, March 14, 2013 10:37:30 AM UTC-7, Brian Craft wrote:
>
> I just tried loading a real data file (30M tsv) for the first time (I 
> mean, instead of just unit tests on my loading program with tiny files), 
> which resulted in this output:
>
> Exception in thread "main" clojure.lang.ExceptionInfo: :peer/timeout 
> Transaction timed out. {:db/error :peer/timeout}
> at clojure.core$ex_info.invoke(core.clj:4227)
> at datomic.error$raise.invoke(error.clj:24)
>  (blah blah blah)
>
> Mar 14, 2013 10:11:39 AM org.hornetq.core.logging.impl.JULLogDelegate warn
> WARNING: Connection failure has been detected: Did not receive data from 
> server for 
> org.hornetq.core.remoting.impl.netty.NettyConnection@76e222eb[local= /
> 127.0.0.1:59944, remote=localhost/127.0.0.1:4334] [code=3]
>
>
>
> More remarkable, the transactor output nearly a million lines of 
> traceback. Tail shown here, with line numbers
>
> 928765 at 
> datomic.common$interruptible$fn__289.doInvoke(common.clj:383) 
> [datomic-free-transactor-0.8.3767.jar:na]
> 928766 at clojure.lang.RestFn.applyTo(RestFn.java:137) 
> [clojure-1.4.0.jar:na]
> 928767 at clojure.core$apply.invoke(core.clj:603) 
> [clojure-1.4.0.jar:na]
> 928768 at 
> datomic.common$background$proc__294$fn__295.invoke(common.clj:402) 
> [datomic-free-transactor-0.8.3767.jar:na]
> 928769 at 
> datomic.common$background$proc__294.invoke(common.clj:401) 
> [datomic-free-transactor-0.8.3767.jar:na]
> 928770 at clojure.lang.AFn.run(AFn.java:24) [clojure-1.4.0.jar:na]
> 928771 at java.lang.Thread.run(Thread.java:619) [na:1.6.0_11]
>
>
> It also exited with this
>
> Critical failure, cannot continue: Agent failed
> java.lang.OutOfMemoryError: Java heap space
>
> So, my first thought is perhaps I'm going about this the wrong way. I'm 
> doing a bulk load by calling d/transact on a lazy sequence of data 
> structures representing all the facts in the 30M file. Should I be doing 
> this differently?
>
> My second thought is perhaps datomic should throttle its logging, since a 
> million lines of traceback is a bit excessive. It's the same traceback 
> (about 16 lines) repeated, only the timestamp changes.
>

-- 
-- 
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.




":peer/timeout Transaction timed out", and excessive logging

2013-03-14 Thread Brian Craft
I just tried loading a real data file (30M tsv) for the first time (I mean, 
instead of just unit tests on my loading program with tiny files), which 
resulted in this output:

Exception in thread "main" clojure.lang.ExceptionInfo: :peer/timeout 
Transaction timed out. {:db/error :peer/timeout}
at clojure.core$ex_info.invoke(core.clj:4227)
at datomic.error$raise.invoke(error.clj:24)
 (blah blah blah)

Mar 14, 2013 10:11:39 AM org.hornetq.core.logging.impl.JULLogDelegate warn
WARNING: Connection failure has been detected: Did not receive data from 
server for 
org.hornetq.core.remoting.impl.netty.NettyConnection@76e222eb[local= 
/127.0.0.1:59944, remote=localhost/127.0.0.1:4334] [code=3]



More remarkable, the transactor output nearly a million lines of traceback. 
Tail shown here, with line numbers

928765 at 
datomic.common$interruptible$fn__289.doInvoke(common.clj:383) 
[datomic-free-transactor-0.8.3767.jar:na]
928766 at clojure.lang.RestFn.applyTo(RestFn.java:137) 
[clojure-1.4.0.jar:na]
928767 at clojure.core$apply.invoke(core.clj:603) 
[clojure-1.4.0.jar:na]
928768 at 
datomic.common$background$proc__294$fn__295.invoke(common.clj:402) 
[datomic-free-transactor-0.8.3767.jar:na]
928769 at 
datomic.common$background$proc__294.invoke(common.clj:401) 
[datomic-free-transactor-0.8.3767.jar:na]
928770 at clojure.lang.AFn.run(AFn.java:24) [clojure-1.4.0.jar:na]
928771 at java.lang.Thread.run(Thread.java:619) [na:1.6.0_11]


It also exited with this

Critical failure, cannot continue: Agent failed
java.lang.OutOfMemoryError: Java heap space

So, my first thought is perhaps I'm going about this the wrong way. I'm 
doing a bulk load by calling d/transact on a lazy sequence of data 
structures representing all the facts in the 30M file. Should I be doing 
this differently?

My second thought is perhaps datomic should throttle its logging, since a 
million lines of traceback is a bit excessive. It's the same traceback 
(about 16 lines) repeated, only the timestamp changes.

-- 
-- 
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: let [{:keys [root watcher auth-conf], :or {auth-conf "auth-conf", root "root", watcher "watcher"}} {:auth-conf "aaaaa", :watcher "bbbbbbb"}]

2013-03-14 Thread Baishampayan Ghose
This the syntax for map destructuring. Works on function argument vector
and let bindings.

You'll find multiple online resources that explain this clearly.

Sent from phone. Please excuse brevity.
On 14 Mar 2013 21:07,  wrote:

> *excuse me, when I read the storm src,I catch some code as follows*
> *
> *
> *(let [{:keys [root watcher auth-conf], :or {auth-conf "auth-conf", root
> "root", watcher "watcher"}} {:auth-conf "a", :watcher "bbb"}]*
> *(println auth-conf)(println root)(println watcher)*
> *)*
> *
> *
> *I  don't know what's it means like *
> *
> *
> *(let [{:keys [root watcher auth-conf], :or {auth-conf "auth-conf", root
> "root", watcher "watcher"}} {:auth-conf "a", :watcher "bbb"}])*
> *
> *
> *codes*
> *
> *
> *can some one help me, thanks*
>
> --
> --
> 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.
>
>
>

-- 
-- 
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.




let [{:keys [root watcher auth-conf], :or {auth-conf "auth-conf", root "root", watcher "watcher"}} {:auth-conf "aaaaa", :watcher "bbbbbbb"}]

2013-03-14 Thread zlj844230
*excuse me, when I read the storm src,I catch some code as follows*
*
*
*(let [{:keys [root watcher auth-conf], :or {auth-conf "auth-conf", root 
"root", watcher "watcher"}} {:auth-conf "a", :watcher "bbb"}]*
*(println auth-conf)(println root)(println watcher)*
*)*
*
*
*I  don't know what's it means like *
*
*
*(let [{:keys [root watcher auth-conf], :or {auth-conf "auth-conf", root 
"root", watcher "watcher"}} {:auth-conf "a", :watcher "bbb"}])*
*
*
*codes*
*
*
*can some one help me, thanks*

-- 
-- 
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: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Chris Ford
You could also consider visually breaking up Java code that is across
multiple files. You've got "// Contents of:" comments, but a break in the
grey background would also be helpful.

Nice post. The world needs more people willing to explain basic concepts in
a clear, un-patronising way.

Cheers,

Chris

On 14 March 2013 16:06, Daniel Higginbotham  wrote:

> Thanks! Updated!
>
>
> On Thursday, March 14, 2013 8:28:47 AM UTC-4, Marko Topolnik wrote:
>>
>> One point crosses my mind: JAR is a regular ZIP file. First time I
>> learned that, I felt a great relief: it goes a long way towards
>> demystifying the practical concerns of living with Java.
>>
>> On Thursday, March 14, 2013 1:03:17 PM UTC+1, Daniel Higginbotham wrote:
>>>
>>> Thanks for the feedback, guys! It's good to know I'm on the right track.
>>> I've also cleaned up the formatting - thank you for pointing that out :)
>>>
>>> It seems like the clojure style guide goes some way toward showing how
>>> to wrap Java, though it doesn't really go into detail about handling all
>>> the decision points that you encounter when wrapping Java
>>>
>>> On Thursday, March 14, 2013 5:08:31 AM UTC-4, Marko Topolnik wrote:

 I like the content of the article, but shouldn't you fix the
 formatting? Source code is badly mangled and some bulleted lists are flowed
 into a single paragraph.

 On Thursday, March 14, 2013 3:58:58 AM UTC+1, Daniel Higginbotham wrote:
>
> I've been feeling like my lack of Java knowledge has been holding me
> back with Clojure, so I've started to learn it and have written an article
> on how you compile and run a Java program: http://www.**
> flyingmachinestudios.com/**programming/how-clojure-**
> babies-are-made-the-java-**cycle/.
>  Is the information in the article accurate? I'm not 100% sure and would
> love any feedback. Also, are there any other resources for this kind of
> info?
>
> Please forgive me if I shouldn't be sending a link to my blog to the
> mailing list - I don't know whether this is proper etiquette or not.
>
> Thanks!
>
  --
> --
> 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.
>
>
>

-- 
-- 
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: Apparent interaction of libraries with lein

2013-03-14 Thread Jim foo.bar
Could it be that you're using lein1 instead of lein2? Is lein1 still 
actively maintained? In any case I suggest you upgrade to lein2...


Jim


On 14/03/13 12:48, Nico Swart wrote:

The Leiningen project file I use include these dependancies:

(defproject fb20try "1.0.0-SNAPSHOT"
  :description "FIXME: write description"
  :dependencies [[org.clojure/clojure "1.4.0"]
 [org.clojure/clojure-contrib "1.2.0"]
 [dds/ndds "1.0"]
 [quil "1.6.0"]]
  :dev-dependencies [[swank-clojure "1.4.2"]])

[dds/ndds "1.0"] is a third part library that I installed in my local 
maven repository with the command


mvn install:install-file -Dfile=nddsjava.jar -DgroupId=dds 
-DartifactId=ndds -Dversion=1.0 -Dpackaging=jar
Everything works well if  [quil "1.6.0"] is not included. If it is 
included, I get this error when the project is loaded:


C:\Clojure\lein\fb20try>lein repl
REPL started; server listening on localhost port 24467
user=> (use 'dyndata.model.ddsdata)
The library nddsjava.dll could not be loaded by Windows.
Make sure that the library is in your Path environment variable.
UnsatisfiedLinkError no nddsjava in java.library.path 
 java.lang.ClassLoader.loadLibrary (ClassLoader.java:1738)


Can anyone explain why a dll is referenced at all ?

Thanks
Nico
--
--
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.




--
--
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: Apparent interaction of libraries with lein

2013-03-14 Thread Akhil Wali
The error looks like its coming from java rather than leinengen.

And the error might be due to quil loading  some dll in the jre which is
missing. Try reinstalling java is all I can say at this point.

On Mar 14, 2013 6:18 PM, "Nico Swart"  wrote:

> The Leiningen project file I use include these dependancies:
>
> (defproject fb20try "1.0.0-SNAPSHOT"
>   :description "FIXME: write description"
>   :dependencies [[org.clojure/clojure "1.4.0"]
>  [org.clojure/clojure-contrib "1.2.0"]
>  [dds/ndds "1.0"]
>  [quil "1.6.0"]]
>   :dev-dependencies [[swank-clojure "1.4.2"]])
>
> [dds/ndds "1.0"] is a third part library that I installed in my local
> maven repository with the command
>
> mvn install:install-file -Dfile=nddsjava.jar -DgroupId=dds
> -DartifactId=ndds -Dversion=1.0 -Dpackaging=jar
>
> Everything works well if  [quil "1.6.0"] is not included. If it is
> included, I get this error when the project is loaded:
>
> C:\Clojure\lein\fb20try>lein repl
> REPL started; server listening on localhost port 24467
> user=> (use 'dyndata.model.ddsdata)
> The library nddsjava.dll could not be loaded by Windows.
> Make sure that the library is in your Path environment variable.
> UnsatisfiedLinkError no nddsjava in java.library.path
>  java.lang.ClassLoader.loadLibrary (ClassLoader.java:1738)
>
> Can anyone explain why a dll is referenced at all ?
>
> Thanks
> Nico
>
> --
> --
> 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.
>
>
>

-- 
-- 
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's the point of -> ?

2013-03-14 Thread Gary Verhaegen
These are sequence functions, not collections functions.

On 14 March 2013 10:31, dmirylenka  wrote:
> For me ->> is a bread and butter of working with collections, like here:
>
> (->> some-collection
>(concat other-collection)
>distinct
>(filter some-predicate)
>(sort-by some-sort-fn)
>(take 10))
>
> On Monday, March 11, 2013 11:58:29 AM UTC+1, edw...@kenworthy.info wrote:
>>
>> So I understand that:
>>
>> (-> foo bar wibble)
>>
>> is equivalent to
>>
>> (wibble (bar (foo)))
>>
>> With the advantage that the latter version is better, in the sense that
>> it's clearer what the final result is (the result of the call to wobble).
>>
>> What I don't understand is the need for -> the only thing it seems to do
>> is make something Lispy appear to be imperative.
>>
>> Is that 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.
>
>

-- 
-- 
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 transients within fold

2013-03-14 Thread Paul Butcher
On 14 Mar 2013, at 13:13, David Powell  wrote:

> As a temporary hack, perhaps you could implement a deftype ReduceToTransient 
> wrapper that implements CollReduce by calling reduce on the parameter, and 
> then calling persistent! on the return value of reduce.  You'd also need to 
> implement CollFold so that the partitioning function produces wrapped results.
> 
> Would that work?


Hmm. Possibly. I'll have a think about it...

--
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: Using transients within fold

2013-03-14 Thread David Powell
As a temporary hack, perhaps you could implement a deftype
ReduceToTransient wrapper that implements CollReduce by calling reduce on
the parameter, and then calling persistent! on the return value of reduce.
 You'd also need to implement CollFold so that the partitioning function
produces wrapped results.

Would that work?

-- 
Dave



On Thu, Mar 14, 2013 at 1:02 PM, Meikel Brandmeyer (kotarak) 
wrote:

> You could use the proposed change (second link) and use a patched clojure
> in your application.
>
> 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.
>
>
>

-- 
-- 
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: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Daniel Higginbotham
Thanks! Updated!

On Thursday, March 14, 2013 8:28:47 AM UTC-4, Marko Topolnik wrote:
>
> One point crosses my mind: JAR is a regular ZIP file. First time I learned 
> that, I felt a great relief: it goes a long way towards demystifying the 
> practical concerns of living with Java.
>
> On Thursday, March 14, 2013 1:03:17 PM UTC+1, Daniel Higginbotham wrote:
>>
>> Thanks for the feedback, guys! It's good to know I'm on the right track. 
>> I've also cleaned up the formatting - thank you for pointing that out :)
>>
>> It seems like the clojure style guide goes some way toward showing how to 
>> wrap Java, though it doesn't really go into detail about handling all the 
>> decision points that you encounter when wrapping Java
>>
>> On Thursday, March 14, 2013 5:08:31 AM UTC-4, Marko Topolnik wrote:
>>>
>>> I like the content of the article, but shouldn't you fix the formatting? 
>>> Source code is badly mangled and some bulleted lists are flowed into a 
>>> single paragraph.
>>>
>>> On Thursday, March 14, 2013 3:58:58 AM UTC+1, Daniel Higginbotham wrote:

 I've been feeling like my lack of Java knowledge has been holding me 
 back with Clojure, so I've started to learn it and have written an article 
 on how you compile and run a Java program: 
 http://www.flyingmachinestudios.com/programming/how-clojure-babies-are-made-the-java-cycle/.
  Is the information in the article accurate? I'm not 100% sure and would 
 love any feedback. Also, are there any other resources for this kind of 
 info?

 Please forgive me if I shouldn't be sending a link to my blog to the 
 mailing list - I don't know whether this is proper etiquette or not.

 Thanks!

>>>

-- 
-- 
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 transients within fold

2013-03-14 Thread Meikel Brandmeyer (kotarak)
You could use the proposed change (second link) and use a patched clojure 
in your application.

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: Using transients within fold

2013-03-14 Thread Paul Butcher
On 14 Mar 2013, at 11:49, Meikel Brandmeyer (kotarak)  wrote:

> that's not really possible at the moment. cf. 
> https://groups.google.com/d/topic/clojure-dev/UbJlMO9XYjo/discussion and 
> https://github.com/cgrand/clojure/commit/65e1acef03362a76f7043ebf3fe2fa277c581912

Dang. At least other people have the same problem, so perhaps there's a chance 
it'll be addressed :-)

--
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.




Apparent interaction of libraries with lein

2013-03-14 Thread Nico Swart
The Leiningen project file I use include these dependancies:

(defproject fb20try "1.0.0-SNAPSHOT"
  :description "FIXME: write description"
  :dependencies [[org.clojure/clojure "1.4.0"]
 [org.clojure/clojure-contrib "1.2.0"]
 [dds/ndds "1.0"]
 [quil "1.6.0"]]
  :dev-dependencies [[swank-clojure "1.4.2"]])

[dds/ndds "1.0"] is a third part library that I installed in my local maven
repository with the command

mvn install:install-file -Dfile=nddsjava.jar -DgroupId=dds
-DartifactId=ndds -Dversion=1.0 -Dpackaging=jar

Everything works well if  [quil "1.6.0"] is not included. If it is
included, I get this error when the project is loaded:

C:\Clojure\lein\fb20try>lein repl
REPL started; server listening on localhost port 24467
user=> (use 'dyndata.model.ddsdata)
The library nddsjava.dll could not be loaded by Windows.
Make sure that the library is in your Path environment variable.
UnsatisfiedLinkError no nddsjava in java.library.path
 java.lang.ClassLoader.loadLibrary (ClassLoader.java:1738)

Can anyone explain why a dll is referenced at all ?

Thanks
Nico

-- 
-- 
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: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Marko Topolnik
One point crosses my mind: JAR is a regular ZIP file. First time I learned 
that, I felt a great relief: it goes a long way towards demystifying the 
practical concerns of living with Java.

On Thursday, March 14, 2013 1:03:17 PM UTC+1, Daniel Higginbotham wrote:
>
> Thanks for the feedback, guys! It's good to know I'm on the right track. 
> I've also cleaned up the formatting - thank you for pointing that out :)
>
> It seems like the clojure style guide goes some way toward showing how to 
> wrap Java, though it doesn't really go into detail about handling all the 
> decision points that you encounter when wrapping Java
>
> On Thursday, March 14, 2013 5:08:31 AM UTC-4, Marko Topolnik wrote:
>>
>> I like the content of the article, but shouldn't you fix the formatting? 
>> Source code is badly mangled and some bulleted lists are flowed into a 
>> single paragraph.
>>
>> On Thursday, March 14, 2013 3:58:58 AM UTC+1, Daniel Higginbotham wrote:
>>>
>>> I've been feeling like my lack of Java knowledge has been holding me 
>>> back with Clojure, so I've started to learn it and have written an article 
>>> on how you compile and run a Java program: 
>>> http://www.flyingmachinestudios.com/programming/how-clojure-babies-are-made-the-java-cycle/.
>>>  Is the information in the article accurate? I'm not 100% sure and would 
>>> love any feedback. Also, are there any other resources for this kind of 
>>> info?
>>>
>>> Please forgive me if I shouldn't be sending a link to my blog to the 
>>> mailing list - I don't know whether this is proper etiquette or not.
>>>
>>> Thanks!
>>>
>>

-- 
-- 
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: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Daniel Higginbotham
Thanks for the feedback, guys! It's good to know I'm on the right track. 
I've also cleaned up the formatting - thank you for pointing that out :)

It seems like the clojure style guide goes some way toward showing how to 
wrap Java, though it doesn't really go into detail about handling all the 
decision points that you encounter when wrapping Java

On Thursday, March 14, 2013 5:08:31 AM UTC-4, Marko Topolnik wrote:
>
> I like the content of the article, but shouldn't you fix the formatting? 
> Source code is badly mangled and some bulleted lists are flowed into a 
> single paragraph.
>
> On Thursday, March 14, 2013 3:58:58 AM UTC+1, Daniel Higginbotham wrote:
>>
>> I've been feeling like my lack of Java knowledge has been holding me back 
>> with Clojure, so I've started to learn it and have written an article on 
>> how you compile and run a Java program: 
>> http://www.flyingmachinestudios.com/programming/how-clojure-babies-are-made-the-java-cycle/.
>>  Is the information in the article accurate? I'm not 100% sure and would 
>> love any feedback. Also, are there any other resources for this kind of 
>> info?
>>
>> Please forgive me if I shouldn't be sending a link to my blog to the 
>> mailing list - I don't know whether this is proper etiquette or not.
>>
>> Thanks!
>>
>

-- 
-- 
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 transients within fold

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

that's not really possible at the moment. 
cf. https://groups.google.com/d/topic/clojure-dev/UbJlMO9XYjo/discussion 
and 
https://github.com/cgrand/clojure/commit/65e1acef03362a76f7043ebf3fe2fa277c581912

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's the point of -> ?

2013-03-14 Thread Marko Topolnik

On Thursday, March 14, 2013 1:44:59 AM UTC+1, Mike Norman wrote:
>
> It decomplects order and application for the sake of, at least, 
> readability.


It doesn't decomplect anything, in fact. It just uses a *different* rule 
for the application order, which happens to be the same as the order of 
forms, unlike the standard order, which is more like a depth-first syntax 
tree traversal. 

-- 
-- 
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 transients within fold

2013-03-14 Thread Paul Butcher
I've been experimenting with reducers using a small example that counts the 
words in Wikipedia pages by parsing the Wikipedia XML dump. The basic structure 
of the code is:

(frequencies (flatten (map get-words (get-pages

where get-pages returns a lazy sequence of pages from the XML dump and 
get-words takes a page and returns a sequence of the words on that page. The 
above code takes ~40s to count the words on the first 1 pages.

If I convert that code to use reducers, it runs in ~22s (yay!).

If I convert it to use fold and therefore run in parallel, it runs in ~13s on 
my 4-core MacBook Pro. So it's faster (yay!) but nowhere near 4x faster (boo).

The primary reason for this is that, in order to be able to use fold, I've had 
to write my own version of frequencies:

(defn frequencies-parallel [words]
  (r/fold (partial merge-with +)
  (fn [counts x] (assoc counts x (inc (get counts x 0
  words))

And, unlike the version in core, this doesn't use transients. If I replace the 
fold with reduce (i.e. make it run sequentially) it runs in ~43s.

So, I *am* getting close to a 4x speedup from parallelising the code, but 
unfortunately I'm also seeing a 2x slowdown because I can't use transients.

Can anyone think of any way that it would be possible to modify this code to 
use transients? Or any way to modify reducers to allow transients to be used?

--
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's the point of -> ?

2013-03-14 Thread Marko Topolnik
It is fair to say that, if applied uncritically, for example by beginners 
who haven't yet gotten the hang of it, thrushes really can create a mess. 
For example:

(->> x (/ 2) (if done? "stop"))

This really does break the "application chaining" mental shortcut and 
forces you to mentally unapply the thrush.

On Thursday, March 14, 2013 1:44:59 AM UTC+1, Mike Norman wrote:
>
> This is absolutely the wrong understanding of the benefits of Clojure's 
> syntax. Its main benefit is not minimalism. Its main benefit is simplicity, 
> which is less akin to ordinality than it is to orthogonality. In this case, 
> there is a tool that just does chaining, which allows you to compose calls 
> in a more readable way, but by using existing pieces. It decomplects order 
> and application for the sake of, at least, readability.

-- 
-- 
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's the point of -> ?

2013-03-14 Thread dmirylenka
For me ->> is a bread and butter of working with collections, like here:

(->> some-collection
   (concat other-collection)
   distinct
   (filter some-predicate)
   (sort-by some-sort-fn)
   (take 10))

On Monday, March 11, 2013 11:58:29 AM UTC+1, edw...@kenworthy.info wrote:
>
> So I understand that:
>
> (-> foo bar wibble)
>
> is equivalent to
>
> (wibble (bar (foo)))
>
> With the advantage that the latter version is better, in the sense that 
> it's clearer what the final result is (the result of the call to wobble).
>
> What I don't understand is the need for -> the only thing it seems to do 
> is make something Lispy appear to be imperative.
>
> Is that 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: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Marko Topolnik
I like the content of the article, but shouldn't you fix the formatting? 
Source code is badly mangled and some bulleted lists are flowed into a 
single paragraph.

On Thursday, March 14, 2013 3:58:58 AM UTC+1, Daniel Higginbotham wrote:
>
> I've been feeling like my lack of Java knowledge has been holding me back 
> with Clojure, so I've started to learn it and have written an article on 
> how you compile and run a Java program: 
> http://www.flyingmachinestudios.com/programming/how-clojure-babies-are-made-the-java-cycle/.
>  Is the information in the article accurate? I'm not 100% sure and would 
> love any feedback. Also, are there any other resources for this kind of 
> info?
>
> Please forgive me if I shouldn't be sending a link to my blog to the 
> mailing list - I don't know whether this is proper etiquette or not.
>
> Thanks!
>

-- 
-- 
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.