Re: Clojure Office Hours

2014-04-28 Thread Rudi Engelbrecht
Hi Ulises

Just finished our session - wow! 

I have learned a lot by watching how you approach solving the problem I 
suggested.

Looking forward to our next session and thanks a lot for sharing your knowledge.

Kind regards 

Rudi Engelbrecht



On 18/04/2014, at 7:41 PM, Ulises  wrote:

> Yikes! Got my first booking for Monday. That was quick!
> 
> one thing I forgot to mention is that I have no preferred way to do this. I 
> personally have emacs+cider set up, but I'm happy to work with your own set 
> up.
> 
> In the past I've used ScreenHero (not available for Linux unfortunately) for 
> screen sharing, as well as Google hangouts.
> 
> Once you've booked an appointment with me please email me privately to 
> arrange the pairing set up so that I can be ready for you :)
> 
> Cheers
> 
> 
> On 18 April 2014 10:35, Ulises  wrote:
> Inspired by Leif's offer, I've decided to offer Clojure office hours as well.
> 
> I'm based in the UK so I reckon the times will be more amenable to those in 
> Europe (not sure the times will be good for those in Asia unfortunately.)
> 
> Sadly the offer is limited to 1h a day, but hopefully it'll still be useful.
> 
> You can book me at https://ucb.youcanbook.me/
> 
> Cheers!
> 
> 
> On 18 April 2014 03:03, Leif  wrote:
> @Miguel: There are somewhat subtle arrows on the sides for navigation.  
> Thursday, April 24 is still open.  I will give a slot to you if you want one, 
> just email me if the 24th is full when you check again.
> 
> @all: But yes, this round of office hours is almost over.  I will be in 
> transit for at least a couple weeks in the beginning of May, but I will 
> probably book some more hours when I become stationary again.  It will 
> probably be more like 4 or 5 hours a week, though, not 8.
> 
> @all: Several poor souls from Europe are going to stay up until 2 a.m. for 
> this, and people further east are probably just silent because the time 
> difference is so large; So, I definitely think some European / African / 
> Asian / Australian clojure devs' office hours would be popular.  It's fun, 
> and you might find some people to hire, if that's your thing!
> 
> --Leif
> 
> 
> On Thursday, April 17, 2014 10:43:50 AM UTC-4, Miguel Ping wrote:
> Hey, the schedule's full! :\
> 
> On Wednesday, April 16, 2014 2:57:49 AM UTC+1, Marcus Blankenship wrote:
> Leif, thanks for the great session today.  Not only did I get a jump start on 
> my next 4Clojure problems, but I learned some emacs as well!  Very enjoyable, 
> and I look forward to next week's session.  THANK YOU!
> 
> All, if you're trying to get a jumpstart on Clojure, I highly recommend 
> Leif's office hours.
> 
> -Marcus
> 
> On Apr 15, 2014, at 6:50 PM, Leif  wrote:
> 
>> @Jakub: Thanks for your kind words.  I'm definitely no "industry hero," but 
>> I hope Clojure devs of all levels start having more pair programming fun.
>> 
>> @Tim: Clojurescript UI programming being way out of my comfort zone, I 
>> learned quite a lot from you yesterday.  So thank you.
>> 
>> @Everyone:  To clarify / reiterate:  You do not need a plan, a project, or a 
>> specific problem.  If you want to work through Project Euler, 4clojure, 
>> clojure-koans, the ClojureBridge materials, some other clojure tutorial, or 
>> just play it by ear, I am happy to try it out.
>> 
>> --Leif
>> 
>> On Tuesday, April 15, 2014 8:00:17 AM UTC-4, frye wrote:
>> I just came from an office hours session, yesterday with Leif. 
>> 
>> This is good stuff guys, and a great way to learn and meet with other 
>> developers. Highly recommended. 
>> 
>> 
>> Thanks Leif 
>> 
>> Tim Washington 
>> Interruptsoftware.com 
>> 
>> 
>> On Tue, Apr 15, 2014 at 5:12 AM, Jakub Holy  wrote:
>> Hi Leif,
>> 
>> This is a great activity, thank you for contributing to the community this 
>> way!
>> 
>> Do not be surprise and discouraged by the fact that the interest seems low. 
>> I have a similar experience - in my company we can consult with an "industry 
>> hero" yet people use the opportunity seldom, presumably because of multiple 
>> factors: they (wrongly) don't feel that they do not have something 
>> important/interesting enough to bother him, they are little scared of 
>> talking to and exposing themselves and their work to this experienced guy, 
>> and might find it difficult to explain their challenge to an outsider and 
>> get an advice within the limited time scope. On the other hand, those who 
>> dare to use the opportunity benefit from it greatly.
>> 
>> Good luck, Jakub 
>> 
>> 
>> On Friday, April 11, 2014 4:13:18 AM UTC+2, Leif wrote:
>> Hmm... less interest than I'd expected, given recent posts.  Maybe I should 
>> rename the thread to "Free Clojure Consulting / Tutoring."  Tht's not 
>> spammy.
>> 
>> FYI, all bookings are automatically confirmed, so don't fret if I don't 
>> instantly respond.
>> 
>> @Tim: Sounds good!  Of course, now I'll have to take some time this weekend 
>> and try to actually understand Om. :)  (or maybe ?o_0? )
>>

Re: Clojure Office Hours

2014-04-28 Thread Jakub Holy
I too have booked a session with Ulises and am excited about it :-)

@Ulises It would be nice if the timezone of the session was mentioned on
the booking page (your [BST] 9-10am is mine [CEST] 10-11, I believe).


2014-04-28 11:09 GMT+02:00 Rudi Engelbrecht :

> Hi Ulises
>
> Just finished our session - wow!
>
> I have learned a lot by watching how you approach solving the problem I
> suggested.
>
> Looking forward to our next session and thanks a lot for sharing your
> knowledge.
>
> Kind regards
>
> Rudi Engelbrecht
>
>
>
> On 18/04/2014, at 7:41 PM, Ulises  wrote:
>
> Yikes! Got my first booking for Monday. That was quick!
>
> one thing I forgot to mention is that I have no preferred way to do this.
> I personally have emacs+cider set up, but I'm happy to work with your own
> set up.
>
> In the past I've used ScreenHero (not available for Linux unfortunately)
> for screen sharing, as well as Google hangouts.
>
> Once you've booked an appointment with me please email me privately to
> arrange the pairing set up so that I can be ready for you :)
>
> Cheers
>
>
> On 18 April 2014 10:35, Ulises  wrote:
>
>> Inspired by Leif's offer, I've decided to offer Clojure office hours as
>> well.
>>
>> I'm based in the UK so I reckon the times will be more amenable to those
>> in Europe (not sure the times will be good for those in Asia unfortunately.)
>>
>> Sadly the offer is limited to 1h a day, but hopefully it'll still be
>> useful.
>>
>> You can book me at https://ucb.youcanbook.me/
>>
>> Cheers!
>>
>>
>> On 18 April 2014 03:03, Leif  wrote:
>>
>>> @Miguel: There are somewhat subtle arrows on the sides for navigation.
>>> Thursday, April 24 is still open.  I will give a slot to you if you want
>>> one, just email me if the 24th is full when you check again.
>>>
>>> @all: But yes, this round of office hours is almost over.  I will be in
>>> transit for at least a couple weeks in the beginning of May, but I will
>>> probably book some more hours when I become stationary again.  It will
>>> probably be more like 4 or 5 hours a week, though, not 8.
>>>
>>> @all: Several poor souls from Europe are going to stay up until 2 a.m.
>>> for this, and people further east are probably just silent because the time
>>> difference is so large; So, I definitely think some European / African /
>>> Asian / Australian clojure devs' office hours would be popular.  It's fun,
>>> and you might find some people to hire, if that's your thing!
>>>
>>> --Leif
>>>
>>>
>>> On Thursday, April 17, 2014 10:43:50 AM UTC-4, Miguel Ping wrote:

 Hey, the schedule's full! :\

 On Wednesday, April 16, 2014 2:57:49 AM UTC+1, Marcus Blankenship wrote:
>
> Leif, thanks for the great session today.  Not only did I get a jump
> start on my next 4Clojure problems, but I learned some emacs as well!  
> Very
> enjoyable, and I look forward to next week’s session.  THANK YOU!
>
> All, if you’re trying to get a jumpstart on Clojure, I highly
> recommend Leif’s office hours.
>
> -Marcus
>
> On Apr 15, 2014, at 6:50 PM, Leif  wrote:
>
> @Jakub: Thanks for your kind words.  I'm definitely no "industry
> hero," but I hope Clojure devs of all levels start having more pair
> programming fun.
>
> @Tim: Clojurescript UI programming being *way* out of my comfort
> zone, I learned quite a lot from you yesterday.  So thank *you*.
>
> @Everyone:  To clarify / reiterate:  You do *not* need a plan, a
> project, or a specific problem.  If you want to work through Project 
> Euler,
> 4clojure, clojure-koans, the ClojureBridge materials, some other clojure
> tutorial, or just play it by ear, I am happy to try it out.
>
> --Leif
>
> On Tuesday, April 15, 2014 8:00:17 AM UTC-4, frye wrote:
>>
>> I just came from an office hours session, yesterday with Leif.
>>
>> This is good stuff guys, and a great way to learn and meet with other
>> developers. Highly recommended.
>>
>>
>> Thanks Leif
>>
>> Tim Washington
>> Interruptsoftware.com 
>>
>>
>> On Tue, Apr 15, 2014 at 5:12 AM, Jakub Holy wrote:
>>
>>> Hi Leif,
>>>
>>> This is a great activity, thank you for contributing to the
>>> community this way!
>>>
>>> Do not be surprise and discouraged by the fact that the interest
>>> seems low. I have a similar experience - in my company we can consult 
>>> with
>>> an "industry hero" yet people use the opportunity seldom, presumably
>>> because of multiple factors: they (wrongly) don't feel that they do not
>>> have something important/interesting enough to bother him, they are 
>>> little
>>> scared of talking to and exposing themselves and their work to this
>>> experienced guy, and might find it difficult to explain their challenge 
>>> to
>>> an outsider and get an advice within the limited time scope

Re: Clojure Office Hours

2014-04-28 Thread Ulises
Thanks for the pointer Jakob. I've updated the form accordingly.

Cheers,


On 28 April 2014 10:56, Jakub Holy  wrote:

> I too have booked a session with Ulises and am excited about it :-)
>
> @Ulises It would be nice if the timezone of the session was mentioned on
> the booking page (your [BST] 9-10am is mine [CEST] 10-11, I believe).
>
>
> 2014-04-28 11:09 GMT+02:00 Rudi Engelbrecht :
>
>> Hi Ulises
>>
>> Just finished our session - wow!
>>
>> I have learned a lot by watching how you approach solving the problem I
>> suggested.
>>
>> Looking forward to our next session and thanks a lot for sharing your
>> knowledge.
>>
>> Kind regards
>>
>> Rudi Engelbrecht
>>
>>
>>
>> On 18/04/2014, at 7:41 PM, Ulises  wrote:
>>
>> Yikes! Got my first booking for Monday. That was quick!
>>
>> one thing I forgot to mention is that I have no preferred way to do this.
>> I personally have emacs+cider set up, but I'm happy to work with your own
>> set up.
>>
>> In the past I've used ScreenHero (not available for Linux unfortunately)
>> for screen sharing, as well as Google hangouts.
>>
>> Once you've booked an appointment with me please email me privately to
>> arrange the pairing set up so that I can be ready for you :)
>>
>> Cheers
>>
>>
>> On 18 April 2014 10:35, Ulises  wrote:
>>
>>> Inspired by Leif's offer, I've decided to offer Clojure office hours as
>>> well.
>>>
>>> I'm based in the UK so I reckon the times will be more amenable to those
>>> in Europe (not sure the times will be good for those in Asia unfortunately.)
>>>
>>> Sadly the offer is limited to 1h a day, but hopefully it'll still be
>>> useful.
>>>
>>> You can book me at https://ucb.youcanbook.me/
>>>
>>> Cheers!
>>>
>>>
>>> On 18 April 2014 03:03, Leif  wrote:
>>>
 @Miguel: There are somewhat subtle arrows on the sides for navigation.
 Thursday, April 24 is still open.  I will give a slot to you if you want
 one, just email me if the 24th is full when you check again.

 @all: But yes, this round of office hours is almost over.  I will be in
 transit for at least a couple weeks in the beginning of May, but I will
 probably book some more hours when I become stationary again.  It will
 probably be more like 4 or 5 hours a week, though, not 8.

 @all: Several poor souls from Europe are going to stay up until 2 a.m.
 for this, and people further east are probably just silent because the time
 difference is so large; So, I definitely think some European / African /
 Asian / Australian clojure devs' office hours would be popular.  It's fun,
 and you might find some people to hire, if that's your thing!

 --Leif


 On Thursday, April 17, 2014 10:43:50 AM UTC-4, Miguel Ping wrote:
>
> Hey, the schedule's full! :\
>
> On Wednesday, April 16, 2014 2:57:49 AM UTC+1, Marcus Blankenship
> wrote:
>>
>> Leif, thanks for the great session today.  Not only did I get a jump
>> start on my next 4Clojure problems, but I learned some emacs as well!  
>> Very
>> enjoyable, and I look forward to next week’s session.  THANK YOU!
>>
>> All, if you’re trying to get a jumpstart on Clojure, I highly
>> recommend Leif’s office hours.
>>
>> -Marcus
>>
>> On Apr 15, 2014, at 6:50 PM, Leif  wrote:
>>
>> @Jakub: Thanks for your kind words.  I'm definitely no "industry
>> hero," but I hope Clojure devs of all levels start having more pair
>> programming fun.
>>
>> @Tim: Clojurescript UI programming being *way* out of my comfort
>> zone, I learned quite a lot from you yesterday.  So thank *you*.
>>
>> @Everyone:  To clarify / reiterate:  You do *not* need a plan, a
>> project, or a specific problem.  If you want to work through Project 
>> Euler,
>> 4clojure, clojure-koans, the ClojureBridge materials, some other clojure
>> tutorial, or just play it by ear, I am happy to try it out.
>>
>> --Leif
>>
>> On Tuesday, April 15, 2014 8:00:17 AM UTC-4, frye wrote:
>>>
>>> I just came from an office hours session, yesterday with Leif.
>>>
>>> This is good stuff guys, and a great way to learn and meet with
>>> other developers. Highly recommended.
>>>
>>>
>>> Thanks Leif
>>>
>>> Tim Washington
>>> Interruptsoftware.com 
>>>
>>>
>>> On Tue, Apr 15, 2014 at 5:12 AM, Jakub Holy wrote:
>>>
 Hi Leif,

 This is a great activity, thank you for contributing to the
 community this way!

 Do not be surprise and discouraged by the fact that the interest
 seems low. I have a similar experience - in my company we can consult 
 with
 an "industry hero" yet people use the opportunity seldom, presumably
 because of multiple factors: they (wrongly) don't feel that they do not
 have something important/interesting enough to bothe

Re: Proposing a new Clojure documentation system (in Clojure)

2014-04-28 Thread Phillip Lord

I struggled with Clojure's documentation system while writing 
https://github.com/phillord/tawny-owl. The problem here is that I am
using an underlying Java library; in the ideal world, I would like
documentation on vars to come from the Object held in the var. But there
is no way to achieve this in Clojure because it's a :doc string in the
metadata.

Now, with tawny-owl, the documentation is still not very good; I would
like to improve it, but many parts of the documentation are not specific
to Clojure, but need to relate to the problem domain for the libary. And
I would like to be able to publish that part of the documentation
independently from Clojure -- so being able to transclude external files
would be very useful indeed.

Even on a simple level, I get frustrated that, in clojure, there is no
typographical way to distinguish a parameter, a function and a normal
word.

One simple way to allow this would be to let :doc take a one-arg closure
(taking the var).

Phil

Val Waeselynck  writes:

> Hello to all,
>
> *Short version :* I think Clojure needs a documentation system in Clojure, 
> I would like to know if some efforts exist in that direction, and I am 
> willing to create it / contribute to it.
>
> *Long version :*
>
> I've been thinking for a while that the Clojure community could benefit a 
> lot from a more sophisticated and ergonomic documentation system. 
>
> I have seen some existing plugins like lein-sphinx, but I think it would be 
> really good to have documentation that would be written in Clojure, for the 
> following reasons :
>
>- we're all very fond of Clojure data structures and their syntax. (I 
>don't know about you, but I find that even HTML looks better in
> Clojurethan in HTML). Plus, Clojure
> programmers already know how to edit them.
>- (better reason) The facts that Vars are first-class citizens and that 
>symbols can be referred explicitly with hardly any ceremony (macros) are a 
>exceptional opportunity to make smart and highly-structured documentation 
>very easily.
>- if it's in Clojure, Clojure programmers can seamlessly build *ad
> hoc*documentation functionality on top of it to suit their own particular
> needs.
>
> I haven't found anything of the like yet, and if it exists, I would be 
> grateful if someone would redirect me to it.
>
> Here are *my thoughts on this :*
>
>1. Clojure doc-strings, although they are quite handy as reminders and 
>for doc-indexation, are *too raw a content*. Even when they are done 
>right, they tend to be cumbersome, and it's too bad to have such concise 
>code drown in the middle of so much documentation. What's more, I believe 
>that when programmers program a function (or anything), they tend to think 
>more about the implementation than the (uninformed) usage, so they have 
>little incentive to make it right.
>2. Building on 1. having a system where documentation and programs live 
>in separate files, in the same way as tests, would enforce a healthy 
>separation of concerns. Importantly, it would make life much easier on the 
>Version Control perspective.
>3. Documentation should probably be made differently than what people 
>have got accustomed to by classical languages. Because you seldom find 
>types, and because IMHO Clojure programs are formed more by factoring out 
>recurring mechanisms in code than from implementing intellectual 
>abstractions, the relevant concepts tend not to be obvious in the code. 
>Since in Clojure we program with verbs, not
> nouns,
>I think *documentation is best made by example*.
>4. Documentation of a Var should not be a formal description of what it 
>is and what it does with some cryptically-named variables. *Every bit of 
>documentation should be a micro-tutorial*. Emphasis should be put on 
>usage, examples, tips, pitfalls, howtos.
>5. There should be structure in the documentation, and it shouldn't be 
>just :see-also links - *there should be semantics* in it.  For example, 
>some functions/macros are really meant to be nothing but shorthands for 
>calling other functions : that kind of relationship should be explicitly 
>documented.
>6. Documentation should not be just information about each separate Var 
>in a namespace. There should be a hierarchy to make the most useful 
>elements of an API more obvious. Also, adding cross-vars documentation 
>elements such as tags and topics could make it easier to navigate and 
>understand.
>7. *Documentation in the REPL is great*, it was one of the very good 
>surprises when I started learning Clojure. However, a rich and 
> good-looking 
>presentation like in Javadocs would be welcome too.
>
> Of course, all of the above are just vague principles. Here is *some 
> funct

Re: Clojure lib for blocking io ?

2014-04-28 Thread Alex Miller
Java NIO has support for this and is accessible via interop.

-- 
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/d/optout.


core.logic with functions

2014-04-28 Thread Phillip Lord


I can do this with core.logic (yes, I know that match-list isn't doing
anything much here)

(defn match-list [member list]
  (membero member list))


(run* [q]
  (match-list 10 [1 10 100])
  (== q "worked"))

For q to come back with any values then 10 has to be part of the list [1
10 100].

I want to do the same thing where the second argument is a list of
lists. So something like:

(defn match-lists [member lists]
  (map
   (fn [l] (membero member l))
   lists))

(run* [q]
  (match-lists 10
   [[1 10 100]
[1 10 100]])
  (== q "worked"))

which should also return "worked". The point is that I don't know how
many "membero" forms I need at compile time, only at runtime. My initial
attempt above fails.

java.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to 
clojure.lang.IFn
 at clojure.core.logic.Substitutions.bind (logic.clj:410)
logic_expts.what_i_want$eval7021$fn__7022$fn__7023$_inc__7024.invoke 
(form-init238773086654203315.clj:2)
clojure.core.logic$eval5780$fn__5781$fn__5782.invoke
(logic.clj:1109)


Is there a way to do this with functions -- or do I need to macro it?

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/d/optout.


Re: Ring + Compojure new route recognition

2014-04-28 Thread Jarrod Swart
Thank you.

The compojure-app template does something similar, and I was using that 
from LightTable, evaling a (start-server) var.  

This was good info and reminded me what I was doing and how to apply it to 
the new environment.

-- 
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/d/optout.


Re: Unity 3d and Clojure

2014-04-28 Thread Tims Gardner
Hi Jacob, thanks for your interest! As Max said, this project is definitely
still in the "mostly functional hack" phase, but it should be emerging from
that in the next few weeks, and we'll keep the list posted as things
develop.

- Tims Gardner

On Sun, Apr 27, 2014 at 6:15 PM, Max Kreminski wrote:

> It looks like it's still in the "mostly functional hack" phase, and
> there's not yet any documentation on how to set it up or what exactly can
> be done with it, but there's a public GitHub 
> repoyou can look at if you're 
> feeling adventurous.
>
> --
> 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/d/optout.
>

-- 
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/d/optout.


Re: (eval `(def ~(symbol varname) lineseq)

2014-04-28 Thread Peter B. West
Thanks Mark, I'll keep that in mind. At this stage I'm just exploring.

Peter

On 28 Apr 2014, at 1:03 pm, Marc Limotte  wrote:

> I don't know the details of your particular use, but for a general solution 
> to the resource management problem, maybe Stuart Sierra's component system 
> would work for you.
> 
> marc

-- 
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/d/optout.


Re: (eval `(def ~(symbol varname) lineseq)

2014-04-28 Thread Peter B. West
On 28 Apr 2014, at 10:57 am, Carlo Zancanaro  wrote:

> ...

> There are other ways to manage resource scope, though. For instance, you
> could have your "lazy-lines" function return a lazy-sequence which will
> close the file on completely reading the stream:
> 
>  (defn lazy-lines [resource]
>(let [r ^java.io.Reader (vcf-res-reader resource)
>  close #(.close r)]
>  (concat (line-seq r)
>  (lazy-seq (close)
> 

This is the technique used in the old contrib/io.clj read-lines function, isn't 
it?  That's handy to know.

Still, Stuart is skeptical about it.

https://groups.google.com/forum/#!topic/clojure/MkHB3SHrGZY


> Or one which provides you a function to close the stream when you want
> to:
> 
>  (defn lazy-lines [resource]
>(let [r ^java.io.Reader (vcf-res-reader resource)
>  close #(.close r)]
>  (with-meta (line-seq r)
>{:close close})))
> 

That's cute.

> Or one which does both:
> 
>  (defn lazy-lines [resource]
>(let [r ^java.io.Reader (vcf-res-reader resource)
>  close #(.close r)]
>  (with-meta (concat (line-seq r)
> (lazy-seq (close))) ;; close if we're done
>{:close close}))) ;; also provide the close function externally
> 
> None of these options mutate any global, shared memory. They all return
> a sequence directly to the caller, and none of them require any sort of
> coordination with other threads.

And they don't use with-open. So I guess with-open is a bit of problem, and 
you're back to managing file closing by yourself, which is what with-open was 
trying to circumvent, wasn't it?

Peter




signature.asc
Description: Message signed with OpenPGP using GPGMail


core.async and Joy of Clojure

2014-04-28 Thread gamma235

Hey guys,

I have studied the sample code snippets on the github page, read through 
several tutorials and watched many talks on core.async, but am still unable 
to effectively implement this library in my programs. I am trying to level 
up here with this subject, but feel like the existing documentation is kind 
of lacking in the middle. Are there any good resources out there that can 
bridge the gap between code snippets and show how the concepts of this 
library pertain to system design? I heard that Joy of Clojure would be 
adding a lot in the 2nd edition, including a section on core.logic; is 
core.async also on that list? 

J

-- 
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/d/optout.


Re: Must a page refresh fire an init event?

2014-04-28 Thread Greg Knapp
Sorry to revive and old thread but when searching for "clojurescript atom 
page refresh" this is one of the top results.

Thought it was worth mentioning that Alan Dipert has written a storage atom 
library  that conveniently 
wraps around your application state atom and persists it in the browser's 
local storage (instead of using cookies). The usual warning about the type 
of information you should/shouldn't store in the client applies.

Regards, Greg

On Sunday, 22 January 2012 15:06:24 UTC, Folcon wrote:
>
> Hi Alex,
>
> No nothing like that, more like keeping track of where the user was so a 
> page refresh doesn't kill their state.
>
> I'm still working out how "one" does things, it took me a little while to 
> get how to add new template pages as I can't really use the browser repl. 
> (I'm waiting for lein integration). It will be a lot easier to understand 
> how things work when I can use my emacs repl :)...
>
> Regards,
> Folcon
>

-- 
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/d/optout.


Re: core.async and Joy of Clojure

2014-04-28 Thread Alex Ott
The "Seven Concurrency Models in Seven Weeks: When Threads Unravel" (
http://pragprog.com/book/pb7con/seven-concurrency-models-in-seven-weeks)
has the description of the core.async in the CSP chapter...


On Mon, Apr 28, 2014 at 4:42 PM, gamma235  wrote:

>
> Hey guys,
>
> I have studied the sample code snippets on the github page, read through
> several tutorials and watched many talks on core.async, but am still unable
> to effectively implement this library in my programs. I am trying to level
> up here with this subject, but feel like the existing documentation is kind
> of lacking in the middle. Are there any good resources out there that can
> bridge the gap between code snippets and show how the concepts of this
> library pertain to system design? I heard that Joy of Clojure would be
> adding a lot in the 2nd edition, including a section on core.logic; is
> core.async also on that list?
>
> J
>
> --
> 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/d/optout.
>



-- 
With best wishes,Alex Ott
http://alexott.net/
Twitter: alexott_en (English), alexott (Russian)
Skype: alex.ott

-- 
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/d/optout.


Re: core.async and Joy of Clojure

2014-04-28 Thread Timothy Baldridge
I'm not sure if you have watched it yet, but my Clojure/Conj talk includes
quite a few examples: https://www.youtube.com/watch?v=enwIIGzhahw

The code from all the examples is available here:
https://github.com/halgari/clojure-conj-2013-core.async-examples

Timothy


On Mon, Apr 28, 2014 at 8:42 AM, gamma235  wrote:

>
> Hey guys,
>
> I have studied the sample code snippets on the github page, read through
> several tutorials and watched many talks on core.async, but am still unable
> to effectively implement this library in my programs. I am trying to level
> up here with this subject, but feel like the existing documentation is kind
> of lacking in the middle. Are there any good resources out there that can
> bridge the gap between code snippets and show how the concepts of this
> library pertain to system design? I heard that Joy of Clojure would be
> adding a lot in the 2nd edition, including a section on core.logic; is
> core.async also on that list?
>
> J
>
> --
> 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/d/optout.
>



-- 
“One of the main causes of the fall of the Roman Empire was that–lacking
zero–they had no way to indicate successful termination of their C
programs.”
(Robert Firth)

-- 
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/d/optout.


Re: Clojure Office Hours - Experience Report and Future Plans

2014-04-28 Thread Bridget
Hi Leif.

I think this is a great idea. I volunteer to do some office hours for 
beginners. It would be great if some folks who have put on ClojureBridge 
could help pitch in an hour or two of office hours. ClojureBridge workshop 
attendees would be a great audience for this.

Bridget

On Thursday, April 24, 2014 11:44:08 PM UTC-4, Leif wrote:
>
> This message is aimed at people that want to *hold* office hours 
> primarily, but of course others can chime in with
> opinions, suggestions, cheerleading, etc.
>
> I recently held "office hours" where I chatted / pair programmed with 
> "less experienced" clojure programmers (some
> were in fact more experienced).
>
> Lessons learned:
>
> 1. It's fun!  Do it!  Online like me, or convince your local clojure user 
> group to do it.
> 2. As I expected, I was more help to less experienced people, but learned 
> a lot *from* the others, and hopefully
>I was at least useful as a sounding board.
> 3. An hour is less time than it sounds.
> 4. If possible, test your pair programming setup beforehand (see point 3 
> above)
>a) corollary: if someone is asking about a library that takes some 
> setup, it's probably best if *they* do the
>   setup and host the pairing session.
> 5. Any remote sharing software (tmux, teamviewer, etc) will mangle *some* 
> input.  Be prepared to work around that.
> 6. Educate people how to cancel, and to cancel ASAP, since some will 
> inevitably need to.
> 7. For beginners (at clojure, but not programming), pick a specific 
> problem and work through it, or have a
>solution and explain it step-by-step; that seemed to work best.  Code 
> review of some OSS project they are
>interested in might also work, I didn't try it (but again, see point 3)
> 8. Unfortunately, no one completely new to programming booked with me, so 
> others will have to give advice here.
> 9. Many people outside of the western hemisphere were interested, so it 
> would be nice to have coverage across the
>globe.
>
> Future plans:
>
> Small plug: I used youcanbook.me to manage the office hours, with no 
> problems.  I encourage you to use their
> service, say nice things about them, and possibly give them money, 
> *because*:
>
> These fine folks allow non-profits to use their advanced features for 
> free, or at a reduced price.  So, I requested
> that the Clojure community's office hours get this status.  They said yes, 
> so my account (for now, for testing, we
> can move it later) can have unlimited "team members" and "services".  So, 
> I'd like to ask if there is interest in
> setting up a community clearinghouse for giving/receiving more office 
> hours, possibly of more types.  Some ideas
> (chime in with your own):
>
> 1. General Office Hours
>Basically what I did, except with more people offering office hours, so 
> that:
>a. Any one person will only have to offer a small number of hours a 
> week (1, even).
>b. Hopefully more coverage across time zones.
>c. People can tag what kinds of programming / projects they have 
> expertise in, so that "beginners" picking up
>  clojure for a specific reason or library can have a more productive 
> session.  E.g. some descriptions could read:
>
>Leif Poorman
>Location: Eastern USA
>Languages: en
>Tags: beginners, absolute beginners, web, data analysis, machine 
> learning
>
>Rich Hickey (obviously this is just an example)
>Location: USA
>Languages: en, Bynar
>Tags: distributed systems, functional databases, Datomic, concurrency, 
> alien technology, everything else
>
> 2. Office Hours for Beginners
>Specifically geared toward beginners in FP, absolute beginners in 
> programming, etc.  This could be covered by
>the description tags as above.  Or this could be more of a hangout, 
> where a set number of beginners get led
>through the ClojureBridge curriculum, or similar.
> 3. Project Specific Hours
>a) Someone with knowledge of an open source project gives a demo of its 
> capabilities/weaknesses to prospective
>   users (kind of a technical sales pitch, but for OSS)
>b) The maintainer of a fairly complex open source project walks some 
> people that want to contribute through the
>   codebase, to kickstart their contributions (I've seen this 
> done/proposed for Midje and Cascalog, at least).
>
> Alternatively, we could just start with 1-on-1, or 1-on-1 and small group, 
> and see where it goes from there.
>
> Comments?  Questions?  Suggestions?
>
> Cheers,
> Leif
>
> P.S. If you are interested in holding a few office hours, email me, and we 
> can start testing out the more advanced youcanbook.me features.
>
>

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

Re: Unity 3d and Clojure

2014-04-28 Thread Mark Mandel
That's awesome. I'll be keeping an eye this project for sure.

Sent from my mobile doohickey
On 28/04/2014 4:51 PM, "Tims Gardner"  wrote:

> Hi Jacob, thanks for your interest! As Max said, this project is
> definitely still in the "mostly functional hack" phase, but it should be
> emerging from that in the next few weeks, and we'll keep the list posted as
> things develop.
>
> - Tims Gardner
>
> On Sun, Apr 27, 2014 at 6:15 PM, Max Kreminski wrote:
>
>> It looks like it's still in the "mostly functional hack" phase, and
>> there's not yet any documentation on how to set it up or what exactly can
>> be done with it, but there's a public GitHub 
>> repoyou can look at if you're 
>> feeling adventurous.
>>
>> --
>> 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/d/optout.
>>
>
>  --
> 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/d/optout.
>

-- 
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/d/optout.


Re: Clojure Office Hours - Experience Report and Future Plans

2014-04-28 Thread Gustavo Matias
Hi Leif,

First I just wanted to mention that I absolutely loved our session last 
week.

I'm very glad to see the Clojure community taking this very important 
action. Unfortunately now I'm on the beginner side, but I will definitely 
give some of my hours to people so I can help them understand Clojure 
better.

Thanks again for everyone contributing to this.

On Thursday, April 24, 2014 11:44:08 PM UTC-4, Leif wrote:
>
> This message is aimed at people that want to *hold* office hours 
> primarily, but of course others can chime in with
> opinions, suggestions, cheerleading, etc.
>
> I recently held "office hours" where I chatted / pair programmed with 
> "less experienced" clojure programmers (some
> were in fact more experienced).
>
> Lessons learned:
>
> 1. It's fun!  Do it!  Online like me, or convince your local clojure user 
> group to do it.
> 2. As I expected, I was more help to less experienced people, but learned 
> a lot *from* the others, and hopefully
>I was at least useful as a sounding board.
> 3. An hour is less time than it sounds.
> 4. If possible, test your pair programming setup beforehand (see point 3 
> above)
>a) corollary: if someone is asking about a library that takes some 
> setup, it's probably best if *they* do the
>   setup and host the pairing session.
> 5. Any remote sharing software (tmux, teamviewer, etc) will mangle *some* 
> input.  Be prepared to work around that.
> 6. Educate people how to cancel, and to cancel ASAP, since some will 
> inevitably need to.
> 7. For beginners (at clojure, but not programming), pick a specific 
> problem and work through it, or have a
>solution and explain it step-by-step; that seemed to work best.  Code 
> review of some OSS project they are
>interested in might also work, I didn't try it (but again, see point 3)
> 8. Unfortunately, no one completely new to programming booked with me, so 
> others will have to give advice here.
> 9. Many people outside of the western hemisphere were interested, so it 
> would be nice to have coverage across the
>globe.
>
> Future plans:
>
> Small plug: I used youcanbook.me to manage the office hours, with no 
> problems.  I encourage you to use their
> service, say nice things about them, and possibly give them money, 
> *because*:
>
> These fine folks allow non-profits to use their advanced features for 
> free, or at a reduced price.  So, I requested
> that the Clojure community's office hours get this status.  They said yes, 
> so my account (for now, for testing, we
> can move it later) can have unlimited "team members" and "services".  So, 
> I'd like to ask if there is interest in
> setting up a community clearinghouse for giving/receiving more office 
> hours, possibly of more types.  Some ideas
> (chime in with your own):
>
> 1. General Office Hours
>Basically what I did, except with more people offering office hours, so 
> that:
>a. Any one person will only have to offer a small number of hours a 
> week (1, even).
>b. Hopefully more coverage across time zones.
>c. People can tag what kinds of programming / projects they have 
> expertise in, so that "beginners" picking up
>  clojure for a specific reason or library can have a more productive 
> session.  E.g. some descriptions could read:
>
>Leif Poorman
>Location: Eastern USA
>Languages: en
>Tags: beginners, absolute beginners, web, data analysis, machine 
> learning
>
>Rich Hickey (obviously this is just an example)
>Location: USA
>Languages: en, Bynar
>Tags: distributed systems, functional databases, Datomic, concurrency, 
> alien technology, everything else
>
> 2. Office Hours for Beginners
>Specifically geared toward beginners in FP, absolute beginners in 
> programming, etc.  This could be covered by
>the description tags as above.  Or this could be more of a hangout, 
> where a set number of beginners get led
>through the ClojureBridge curriculum, or similar.
> 3. Project Specific Hours
>a) Someone with knowledge of an open source project gives a demo of its 
> capabilities/weaknesses to prospective
>   users (kind of a technical sales pitch, but for OSS)
>b) The maintainer of a fairly complex open source project walks some 
> people that want to contribute through the
>   codebase, to kickstart their contributions (I've seen this 
> done/proposed for Midje and Cascalog, at least).
>
> Alternatively, we could just start with 1-on-1, or 1-on-1 and small group, 
> and see where it goes from there.
>
> Comments?  Questions?  Suggestions?
>
> Cheers,
> Leif
>
> P.S. If you are interested in holding a few office hours, email me, and we 
> can start testing out the more advanced youcanbook.me features.
>
>

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

eclipse REPL problem (no prompt)

2014-04-28 Thread Roelof Wobben
Hello, 

I try now the eclipse with CounterClockwise plugin.
It looks to work fine except one thing.

When I open a repl I do not see a sort of prompt.

Does anyone know how to solve this ?

Roelof

-- 
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/d/optout.


java6 vs java7

2014-04-28 Thread Chris Price
Recently a few co-workers and I have been discussing options related to
compiling a few tiny Java libraries that some of our Clojure libraries
depend on.  We realized that we should be explicitly setting the Java
source/target version for jars that we publish to clojars/maven central.
 Now we're trying to decide which version of Java to target.  We'd like to
target Java 7, but don't want to preclude people from using our OSS
libraries if there are large numbers of folks still on Java 6...

So, I'm curious... does anyone have any rough idea what the breakdown is
between production Clojure apps running on Java 7 vs. Java 6?  It *feels*
like Clojure is being used most frequently for SaaS-type applications, and
in those kinds of environments the developers/administrators can be pretty
prescriptive about JRE version, so maybe many/most folks are on Java 7
already?

-- 
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/d/optout.


Re: java6 vs java7

2014-04-28 Thread Alex Miller
The State of Clojure survey last year saw 75% using Java 7 and 19% on Java 
6.

http://cemerick.com/2013/11/18/results-of-the-2013-state-of-clojure-clojurescript-survey/


On Monday, April 28, 2014 12:56:51 PM UTC-5, Chris Price wrote:
>
> Recently a few co-workers and I have been discussing options related to 
> compiling a few tiny Java libraries that some of our Clojure libraries 
> depend on.  We realized that we should be explicitly setting the Java 
> source/target version for jars that we publish to clojars/maven central. 
>  Now we're trying to decide which version of Java to target.  We'd like to 
> target Java 7, but don't want to preclude people from using our OSS 
> libraries if there are large numbers of folks still on Java 6... 
>
> So, I'm curious... does anyone have any rough idea what the breakdown is 
> between production Clojure apps running on Java 7 vs. Java 6?  It *feels* 
> like Clojure is being used most frequently for SaaS-type applications, and 
> in those kinds of environments the developers/administrators can be pretty 
> prescriptive about JRE version, so maybe many/most folks are on Java 7 
> already?
>  

-- 
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/d/optout.


Re: eclipse REPL problem (no prompt)

2014-04-28 Thread Ivan L
I recommend the counter clockwise users group at:
https://groups.google.com/forum/#!forum/clojuredev-users

On Monday, April 28, 2014 1:18:23 PM UTC-4, Roelof Wobben wrote:
>
> Hello, 
>
> I try now the eclipse with CounterClockwise plugin.
> It looks to work fine except one thing.
>
> When I open a repl I do not see a sort of prompt.
>
> Does anyone know how to solve this ?
>
> Roelof
>
>

-- 
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/d/optout.


Re: java6 vs java7

2014-04-28 Thread Chris Price
Thanks!  I hadn't seen that survey, and it's tremendously helpful.

On Monday, April 28, 2014 11:48:17 AM UTC-7, Alex Miller wrote:
>
> The State of Clojure survey last year saw 75% using Java 7 and 19% on Java 
> 6.
>
>
> http://cemerick.com/2013/11/18/results-of-the-2013-state-of-clojure-clojurescript-survey/
>
>
> On Monday, April 28, 2014 12:56:51 PM UTC-5, Chris Price wrote:
>>
>> Recently a few co-workers and I have been discussing options related to 
>> compiling a few tiny Java libraries that some of our Clojure libraries 
>> depend on.  We realized that we should be explicitly setting the Java 
>> source/target version for jars that we publish to clojars/maven central. 
>>  Now we're trying to decide which version of Java to target.  We'd like to 
>> target Java 7, but don't want to preclude people from using our OSS 
>> libraries if there are large numbers of folks still on Java 6... 
>>
>> So, I'm curious... does anyone have any rough idea what the breakdown is 
>> between production Clojure apps running on Java 7 vs. Java 6?  It *feels* 
>> like Clojure is being used most frequently for SaaS-type applications, and 
>> in those kinds of environments the developers/administrators can be pretty 
>> prescriptive about JRE version, so maybe many/most folks are on Java 7 
>> already?
>>  
>

-- 
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/d/optout.


ANN Meltdown 1.0.0-beta12

2014-04-28 Thread Michael Klishin
Meltdown [1] is a Clojure interface to Reactor.

Release notes:
http://blog.clojurewerkz.org/blog/2014/04/28/meltdown-1-dot-0-0-beta12-is-released/

1. http://github.com/clojurewerkz/meltdown
-- 
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/d/optout.


ANN Balagan, a new ClojureWerkz project

2014-04-28 Thread Michael Klishin
On behalf of the ClojureWerkz team, I'm happy to announce
a new project (brain child of Alex Petrov): Balagan [1].

Release notes:
http://blog.clojurewerkz.org/blog/2014/04/28/balagan-1-dot-0-0-is-released/

1. https://github.com/clojurewerkz/balagan
-- 
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/d/optout.


ANN Welle 2.0 is released

2014-04-28 Thread Michael Klishin
Welle [1] is a small, expressive Clojure client for Riak.

2.0 is a major release that has one major public API change.
Release notes:
http://blog.clojurewerkz.org/blog/2014/04/28/welle-2-dot-0-0-is-released/

Note that there is one more major public API change coming soon in
3.0:
http://blog.clojurewerkz.org/blog/2014/04/26/major-breaking-public-api-changes-coming-in-our-projects/

1. http://clojureriak.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/d/optout.


Update

2014-04-28 Thread Divyansh Prakash
---IDEA---
I was wondering if we could have a bytecode DSL that would map directly to 
JVM assembler, using either Jasmin  or 
Krakatau .
Then we could define primitives using these bytecode instructions.
For eg:

(defroutine + [a b]
(push! a)
(push! b)
add!
pop!)

that could be used to call:

(+ 2 3) ;=> 5

--
We could define the lambda calculus primitives in the same way.
This would be awesome because bottlenecks could be optimized by embedding 
assembly inside Lisp itself.
We could do efficient bit-manipulation, write shader routines, and what not.

--
Thoughts?

-- 
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/d/optout.


Re: Update

2014-04-28 Thread Divyansh Prakash
Jasmin would be a much better choice, btw, because it could be used as a 
dependency in Clojure.

-- 
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/d/optout.


Re: Update

2014-04-28 Thread Gary Trakhman
Seen: https://github.com/clojure/tools.emitter.jvm ?
Here's the actual ASM emit:
https://github.com/clojure/tools.emitter.jvm/blob/master/src/main/clojure/clojure/tools/emitter/jvm/transform.clj


On Mon, Apr 28, 2014 at 5:43 PM, Divyansh Prakash <
divyanshprakas...@gmail.com> wrote:

> ---IDEA---
> I was wondering if we could have a bytecode DSL that would map directly to
> JVM assembler, using either Jasmin  or
> Krakatau .
> Then we could define primitives using these bytecode instructions.
> For eg:
>
> (defroutine + [a b]
> (push! a)
> (push! b)
> add!
> pop!)
>
> that could be used to call:
>
> (+ 2 3) ;=> 5
>
> --
> We could define the lambda calculus primitives in the same way.
> This would be awesome because bottlenecks could be optimized by embedding
> assembly inside Lisp itself.
> We could do efficient bit-manipulation, write shader routines, and what
> not.
>
> --
> Thoughts?
>
> --
> 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/d/optout.
>

-- 
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/d/optout.


Re: Update

2014-04-28 Thread Divyansh Prakash

>
> Thanks!
>
 Exactly what I was looking for.

-- 
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/d/optout.


Re: (eval `(def ~(symbol varname) lineseq)

2014-04-28 Thread Carlo Zancanaro
On Mon, Apr 28, 2014 at 06:06:32PM +1000, Peter B. West wrote:
> This is the technique used in the old contrib/io.clj read-lines
> function, isn't it?  That's handy to know.

Correct.

> Still, Stuart is skeptical about it.

I don't think it's a good general solution to the problem, so Stuart's
skepticism is fair. For specific cases where you know how the sequence
will be used, though, it can be acceptable.

> And they don't use with-open. So I guess with-open is a bit of
> problem, and you're back to managing file closing by yourself, which
> is what with-open was trying to circumvent, wasn't it?

with-open is only good for cases where your resource's scope is easily
contained within a form's evaluation. It's not designed for cases where
the resource "escapes" from the form, which is what you're trying to do.
In cases like that you can either try to force with-open to do what you
want (by tying up a thread and waiting on a signal, as you've attempted
to do), or you can handle closing the resource yourself (tying up no
threads and explicitly performing the close).

Essentially: with-open is designed for one specific use case but what
you're trying to do doesn't fit into that, so you need to use a
different solution. If you can't contain the entire resource's lifetime
in a single scope (ie. have the with-open enclose the entire time when
the resource is used), then you need to open/close it yourself some
other way.


signature.asc
Description: Digital signature


Re: core.logic with functions

2014-04-28 Thread Jean Niklas L'orange
Hey Phillip,

If you want to say "the goal g(x) shall succeed, for all x in this list", 
then use `everyg` from clojure.core.logic instead of map. I think it is 
exactly what you're looking for.

On Monday, April 28, 2014 3:36:10 PM UTC+2, Phillip Lord wrote:
>
>
>
> I can do this with core.logic (yes, I know that match-list isn't doing 
> anything much here) 
>
> (defn match-list [member list] 
>   (membero member list)) 
>
>
> (run* [q] 
>   (match-list 10 [1 10 100]) 
>   (== q "worked")) 
>
> For q to come back with any values then 10 has to be part of the list [1 
> 10 100]. 
>
> I want to do the same thing where the second argument is a list of 
> lists. So something like: 
>
> (defn match-lists [member lists] 
>   (map 
>(fn [l] (membero member l)) 
>lists)) 
>
> (run* [q] 
>   (match-lists 10 
>[[1 10 100] 
> [1 10 100]]) 
>   (== q "worked")) 
>
> which should also return "worked". The point is that I don't know how 
> many "membero" forms I need at compile time, only at runtime. My initial 
> attempt above fails. 
>
> java.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to 
> clojure.lang.IFn 
>  at clojure.core.logic.Substitutions.bind (logic.clj:410) 
> logic_expts.what_i_want$eval7021$fn__7022$fn__7023$_inc__7024.invoke 
> (form-init238773086654203315.clj:2) 
> clojure.core.logic$eval5780$fn__5781$fn__5782.invoke 
> (logic.clj:1109) 
>
>
> Is there a way to do this with functions -- or do I need to macro it? 
>
> 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/d/optout.


Re: core.logic with functions

2014-04-28 Thread Norman Richards
On Mon, Apr 28, 2014 at 8:36 AM, Phillip Lord
wrote:

> I want to do the same thing where the second argument is a list of
> lists. So something like: [...]
>
>
> Is there a way to do this with functions -- or do I need to macro it?


As was already mentioned, everyg is probably the best way to approach this
problem (everyg (partial match-list member) lists), but if it helps, this
would be my first thought at an implementation without everyg:

(defne match-lists [member lists]
  ([_ []])
  ([_ [h . t]]
 (match-list member h)
 (match-lists member t)))

-- 
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/d/optout.