Re: Do you like the Clojure syntax?

2013-08-13 Thread Christian Sperandio
Even if I think the current syntax is one of the best, could you say what
Clojure's capability couldn't be done with another syntax?

Other languages implement FP without lisp syntax and the macros could be
done in another way, perhaps with AST (like in groovy).

Le 13 août 2013 08:53, "Alex Baranosky"  a
écrit :

> To me you cannot separate Clojure's syntax from its capabilities, because
> a number of its capabilities are enabled by the syntax.
>
> On Mon, Aug 12, 2013 at 10:55 PM, Christian Sperandio <
> christian.speran...@gmail.com> wrote:
>
>> I think the choice of a language has always a subjective part.
>> Particularly when you learn a language by yourself for pleasure.  Because
>> it's 'for pleasure' you want to learn a fun stuff.
>>
>> At work, I believe the subjective part works against a choice.
>> Currently,  at my office, the 8 other colleagues don't want to take a look
>> at Clojure because of its LISP syntax. Their brain blocks and they don't
>> hear you when you talk about the language capabilities.
>> Le 13 août 2013 03:14, "Devin Walters"  a écrit :
>>
>> I have to echo previous sentiments. I'm not going to fill out the survey
>>> because as it currently stands, it seems like it's begging for a conclusion
>>> that satisfies the author.
>>>
>>> I'd like to see more targeted questions w/r/t syntax. But there again, I
>>> think this kind of question is highly subjective, and likely to provide a
>>> narrow view of what people *actually* care about in Clojure: writing great
>>> programs, being inspired to dig deeper, realizing creative potential, etc.
>>>
>>> '(Devin Walters)
>>>
>>> On Aug 12, 2013, at 7:21 PM, Ramesh  wrote:
>>>
>>> Great points here!
>>>
>>> I think once someone is comfortable with Clojure, Scala will be more
>>> disgusting than Java. This is because, Scala has such great adornments,
>>> ironically aspiring toward simplification.
>>>
>>> -ramesh
>>>
>>>
>>> On Mon, Aug 12, 2013 at 7:58 AM, David Pollak <
>>> feeder.of.the.be...@gmail.com> wrote:
>>>
 A couple of quick reactions...

 The survey itself is too "flat". It's like asking "do you like red or
 green?" Well... I like green on my walls, but I like red on my ties.

 Scala has macros and a much richer syntax (although doing anything like
 core.async with Scala macros might be like putting tabsco on an open cut...
 just sayin') so I don't think the syntax and the macro stuff is a
 one-to-one mapping.

 People learn to work with a variety of syntaxes and are successful with
 them. Java and C++ have viscously awful syntax, yet they are very popular
 and most users of the languages don't notice. Both C and Lisp model an
 abstract computer and have syntax that reflects the computer that they
 model and to my mind, that helps the user of each language grok the
 abstract computer they are programming.

 I'd like a two-way mapping between a Clojure and an Excel-like formula
 language. That way people could write one-liner Clojure functions in a
 syntax that non-programmers are already comfortable with. I'm noodling with
 something like that right now.

 I think Jay and Colin are saying something very, very important:
 Clojure feels uncomfortable until it feels very comfortable and then
 there's no going back. I am not yet comfortable with Clojure's syntax, but
 I totally appreciate it. But I'm doing work in Scala, Java, and Clojure all
 for pay all in the same week every week... and bouncing among all three
 makes getting comfortable with Clojure a little slow. Further, I fear
 (deeply... in my bones) that once I am comfortable with Clojure, doing
 Scala will be as disgusting as doing Java is after 7 years of Scala. :-(



 On Mon, Aug 12, 2013 at 12:52 AM, Răzvan Rotaru <
 razvan.rot...@gmail.com> wrote:

> Hi,
>
> I'm curious about the general opinion on the Clojure syntax, whether
> people actually like it or just use it because it provides macros. So I
> would like to ask you to participate in a poll. Thank You.
>
> Here's the link:
>
> https://docs.google.com/forms/d/1GSgfkeThpUYlgFVzhhNIgA1JbTilu6S9eudq_Sbxl34/viewform
>
> Răzvan
>
> --
> --
> 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...@google

Re: Do you like the Clojure syntax?

2013-08-13 Thread Alex Baranosky
IMO, macros without homoiconicity are unnecessarily complex: so in that
sense Clojure's syntax makes macros simpler.  Where macros are simply
reorganizing some data in Clojure, in a language like Groovy you've got to
jump through hoops and only get a limited slice of the power.

Homoiconicity gives other little benefits as well, because it means you can
use the same code on the code as you could use on the data, which has
unforseen benefits.  For example I can diff source code, or list outputs
using the same function (
https://github.com/AlexBaranosky/gui-diff/blob/master/src/gui/diff.clj#L30).
 Also, you can very conveniently print data to a string and spit to a file,
then slurp it back out.  These things just make life easier in Clojure, and
are directly related to its syntax.

Alex

On Tue, Aug 13, 2013 at 12:23 AM, Christian Sperandio <
christian.speran...@gmail.com> wrote:

> Even if I think the current syntax is one of the best, could you say what
> Clojure's capability couldn't be done with another syntax?
>
> Other languages implement FP without lisp syntax and the macros could be
> done in another way, perhaps with AST (like in groovy).
>
> Le 13 août 2013 08:53, "Alex Baranosky"  a
> écrit :
>
> To me you cannot separate Clojure's syntax from its capabilities, because
>> a number of its capabilities are enabled by the syntax.
>>
>> On Mon, Aug 12, 2013 at 10:55 PM, Christian Sperandio <
>> christian.speran...@gmail.com> wrote:
>>
>>> I think the choice of a language has always a subjective part.
>>> Particularly when you learn a language by yourself for pleasure.  Because
>>> it's 'for pleasure' you want to learn a fun stuff.
>>>
>>> At work, I believe the subjective part works against a choice.
>>> Currently,  at my office, the 8 other colleagues don't want to take a look
>>> at Clojure because of its LISP syntax. Their brain blocks and they don't
>>> hear you when you talk about the language capabilities.
>>> Le 13 août 2013 03:14, "Devin Walters"  a écrit :
>>>
>>> I have to echo previous sentiments. I'm not going to fill out the survey
 because as it currently stands, it seems like it's begging for a conclusion
 that satisfies the author.

 I'd like to see more targeted questions w/r/t syntax. But there again,
 I think this kind of question is highly subjective, and likely to provide a
 narrow view of what people *actually* care about in Clojure: writing great
 programs, being inspired to dig deeper, realizing creative potential, etc.

 '(Devin Walters)

 On Aug 12, 2013, at 7:21 PM, Ramesh  wrote:

 Great points here!

 I think once someone is comfortable with Clojure, Scala will be more
 disgusting than Java. This is because, Scala has such great adornments,
 ironically aspiring toward simplification.

 -ramesh


 On Mon, Aug 12, 2013 at 7:58 AM, David Pollak <
 feeder.of.the.be...@gmail.com> wrote:

> A couple of quick reactions...
>
> The survey itself is too "flat". It's like asking "do you like red or
> green?" Well... I like green on my walls, but I like red on my ties.
>
> Scala has macros and a much richer syntax (although doing anything
> like core.async with Scala macros might be like putting tabsco on an open
> cut... just sayin') so I don't think the syntax and the macro stuff is a
> one-to-one mapping.
>
> People learn to work with a variety of syntaxes and are successful
> with them. Java and C++ have viscously awful syntax, yet they are very
> popular and most users of the languages don't notice. Both C and Lisp 
> model
> an abstract computer and have syntax that reflects the computer that they
> model and to my mind, that helps the user of each language grok the
> abstract computer they are programming.
>
> I'd like a two-way mapping between a Clojure and an Excel-like formula
> language. That way people could write one-liner Clojure functions in a
> syntax that non-programmers are already comfortable with. I'm noodling 
> with
> something like that right now.
>
> I think Jay and Colin are saying something very, very important:
> Clojure feels uncomfortable until it feels very comfortable and then
> there's no going back. I am not yet comfortable with Clojure's syntax, but
> I totally appreciate it. But I'm doing work in Scala, Java, and Clojure 
> all
> for pay all in the same week every week... and bouncing among all three
> makes getting comfortable with Clojure a little slow. Further, I fear
> (deeply... in my bones) that once I am comfortable with Clojure, doing
> Scala will be as disgusting as doing Java is after 7 years of Scala. :-(
>
>
>
> On Mon, Aug 12, 2013 at 12:52 AM, Răzvan Rotaru <
> razvan.rot...@gmail.com> wrote:
>
>> Hi,
>>
>> I'm curious about the general opinion on the Clojure syntax, whether
>>

Re: Lazy group-by for sorted maps?

2013-08-13 Thread Colin Yates
Yep, sure.  Thanks.
On 13 Aug 2013 05:56, "Michael-Keith Bernard (SegFaultAX)" <
mkbernard@gmail.com> wrote:

> For the partition-by solution to work, you have to ensure that the result
> set from the query is sorted by the foreign key:
>
> (partition-by identity "aaabbbcccaaabbbcc")
> ;;=> ((\a \a \a) (\b \b \b) (\c \c \c) (\a \a \a) (\b \b \b) (\c \c))
> (partition-by identity (sort "aaabbbcccaaabbbcc"))
> ;;=> ((\a \a \a \a \a \a) (\b \b \b \b \b \b) (\c \c \c \c \c))
>
>
> On Monday, August 12, 2013 11:17:29 AM UTC-7, Colin Yates wrote:
>>
>> Great - thanks!
>>
>>
>> On 12 August 2013 19:07, Jonah Benton  wrote:
>>
>>>
>>> Sounds like a job for partition-by:
>>>
>>> http://clojuredocs.org/**clojure_core/clojure.core/**partition-by
>>>
>>>
>>>
>>> On Mon, Aug 12, 2013 at 1:55 PM, Colin Yates  wrote:
>>>
 Is there such a thing as a lazy group-by for a sequence of elements
 when the elements are sorted on the criteria used to group them?  I can
 imagine how one would look in a few lines of Clojure code but I am
 surprised there isn't one already.

 My actual criteria is that I am pulling things from a database that
 live on the "many" side of a one-many and I want to sort on the "one" FK.

 This is all based on the assumption that http://clojuredocs.org/**
 clojure_core/clojure.core/**group-by
  is
 eager!

 --
 --
 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 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 a topic in the
>>> Google Groups "Clojure" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/**
>>> topic/clojure/yGP0Ac_CUkY/**unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, 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 a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/yGP0Ac_CUkY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt

Re: Do you like the Clojure syntax?

2013-08-13 Thread Michael Klishin
2013/8/13 Christian Sperandio 

> Even if I think the current syntax is one of the best, could you say what
> Clojure's capability couldn't be done with another syntax?
>
 They could, Elixir is a good recent example. However, it's a very tricky
thing to get right, while s-expressions have
been around for over 50 years (literally) and known to work.

> Other languages implement FP without lisp syntax and the macros could be
> done in another way, perhaps with AST (like in groovy).
>
That's not "another way", that's largely the same way, just requiring a lot
of extra work from
language developers.
-- 
MK

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

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Do you like the Clojure syntax?

2013-08-13 Thread Korny Sietsma
I think it depends on what is important to you.

For me, the syntax is core to the language because it encourages a certain
mindset. The default for everything is (verb noun noun noun...) - this is
the kingdom of verbs, and functions are how you build things.

If you added an infix syntax, or some other way to get rid of the nested
nature of lisp*, you'd take away that focus on functions, and what you'd
have left wouldn't be clojure.

I'm sure you could write a fine language related to clojure, with a
human-friendly syntax and a lower learning curve**. I'm still a big fan of
the ruby syntax myself, despite a few idiosyncrasies. But I'd find it much
harder to write FP-style in ruby - it doesn't look right, and you don't
tend to focus on the verbs, you focus on the nouns.

YMMV of course; this sort of thing can be pretty subjective.

- Korny

* of course if you stay nested but "fix" the syntax using something like
indentation or other magic, then I might be happier, though none of the
ways people have done this so far particularly appealed to me.

** anecdote time - we had a junior programmer join our team, and in her
words "it takes 3 weeks to learn to appreciate clojure" - so the learning
curve isn't *that* bad!  The syntax is a bit of a barrier, but the
_simplicity_ of the syntax helps a lot, once you are over the initial
reaction.
On 13 Aug 2013 17:23, "Christian Sperandio" 
wrote:

> Even if I think the current syntax is one of the best, could you say what
> Clojure's capability couldn't be done with another syntax?
>
> Other languages implement FP without lisp syntax and the macros could be
> done in another way, perhaps with AST (like in groovy).
>
> Le 13 août 2013 08:53, "Alex Baranosky"  a
> écrit :
>
>> To me you cannot separate Clojure's syntax from its capabilities, because
>> a number of its capabilities are enabled by the syntax.
>>
>> On Mon, Aug 12, 2013 at 10:55 PM, Christian Sperandio <
>> christian.speran...@gmail.com> wrote:
>>
>>> I think the choice of a language has always a subjective part.
>>> Particularly when you learn a language by yourself for pleasure.  Because
>>> it's 'for pleasure' you want to learn a fun stuff.
>>>
>>> At work, I believe the subjective part works against a choice.
>>> Currently,  at my office, the 8 other colleagues don't want to take a look
>>> at Clojure because of its LISP syntax. Their brain blocks and they don't
>>> hear you when you talk about the language capabilities.
>>> Le 13 août 2013 03:14, "Devin Walters"  a écrit :
>>>
>>> I have to echo previous sentiments. I'm not going to fill out the survey
 because as it currently stands, it seems like it's begging for a conclusion
 that satisfies the author.

 I'd like to see more targeted questions w/r/t syntax. But there again,
 I think this kind of question is highly subjective, and likely to provide a
 narrow view of what people *actually* care about in Clojure: writing great
 programs, being inspired to dig deeper, realizing creative potential, etc.

 '(Devin Walters)

 On Aug 12, 2013, at 7:21 PM, Ramesh  wrote:

 Great points here!

 I think once someone is comfortable with Clojure, Scala will be more
 disgusting than Java. This is because, Scala has such great adornments,
 ironically aspiring toward simplification.

 -ramesh


 On Mon, Aug 12, 2013 at 7:58 AM, David Pollak <
 feeder.of.the.be...@gmail.com> wrote:

> A couple of quick reactions...
>
> The survey itself is too "flat". It's like asking "do you like red or
> green?" Well... I like green on my walls, but I like red on my ties.
>
> Scala has macros and a much richer syntax (although doing anything
> like core.async with Scala macros might be like putting tabsco on an open
> cut... just sayin') so I don't think the syntax and the macro stuff is a
> one-to-one mapping.
>
> People learn to work with a variety of syntaxes and are successful
> with them. Java and C++ have viscously awful syntax, yet they are very
> popular and most users of the languages don't notice. Both C and Lisp 
> model
> an abstract computer and have syntax that reflects the computer that they
> model and to my mind, that helps the user of each language grok the
> abstract computer they are programming.
>
> I'd like a two-way mapping between a Clojure and an Excel-like formula
> language. That way people could write one-liner Clojure functions in a
> syntax that non-programmers are already comfortable with. I'm noodling 
> with
> something like that right now.
>
> I think Jay and Colin are saying something very, very important:
> Clojure feels uncomfortable until it feels very comfortable and then
> there's no going back. I am not yet comfortable with Clojure's syntax, but
> I totally appreciate it. But I'm doing work in Scala, Java, and Clojure 
> all
> f

Re: [ANN] Clojure Cheatsheet for Emacs

2013-08-13 Thread Kris Jenkins
Hi Phil,

It looks like your package list is out of date - there's a newer version of 
the cheatsheet than that one. Try:

M-x package-refresh-contents

M-x package-install RET clojure-cheatsheet

That should get your index pointing to the latest copy.

Give me a shout if you still have trouble. :-)

Cheers,
Kris

On Monday, 12 August 2013 15:39:30 UTC+1, Philip Potter wrote:
>
> I just tried to install it from MELPA but get a 404:
>
> http://melpa.milkbox.net/packages/clojure-cheatsheet-20130808.2305.el
>
> *sadface*
>
> On 9 August 2013 22:40, Andy Fingerhut 
> > wrote:
>
>> Very nice, Kris!
>>
>> In case anyone wants to use the Clojure cheatsheet offline using a web 
>> browser, in a form similar to the on-line one that includes the tooltips, 
>> there is a git command documented at the link below to create a full local 
>> copy of it on your computer:
>>
>> http://jafingerhut.github.io
>>
>> Then just open the index.html file with your browser.  The links to the 
>> different variants of the cheatsheet all work off-line.  Some of the links 
>> later in that page require being on-line (e.g. to get the PDF version of 
>> the cheatsheet, or to the actual Github version of the repo).
>>
>> Andy
>>
>>
>> On Fri, Aug 9, 2013 at 1:59 PM, Simone Mosciatti 
>> 
>> > wrote:
>>
>>> Thank you so much...
>>>
>>> Actually was kinda funny, I typed something like "clojure cheatsheet 
>>> offline" and your github link was one of the first, and I was very 
>>> surprised... "Wow, it is possible that I didn't know of it ?" 
>>> Well now I understand why I didn't know of it yet, it is only few hours 
>>> old ;)
>>>
>>>
>>> On Friday, August 9, 2013 10:30:46 PM UTC+2, Kris Jenkins wrote:

 Hi,

 I find the Clojure Cheatsheet  really 
 useful, but since I often need at those times I don't have wifi, I've 
 packaged it up into an Emacs plugin:


 
 In the hope that someone else finds it useful too, the project's here 
 on Github , along 
 with installation instructions. Any feedback is welcomed. :-)

 Cheers,
 Kris

>>>  -- 
>>> -- 
>>> 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 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: Do you like the Clojure syntax?

2013-08-13 Thread Răzvan Rotaru


luni, 12 august 2013, 11:00:27 UTC+3, Alan Forrester a scris:
>
>
> Do you have arguments against Clojure's current syntax? 
>
> Alan


Well, there are disadvantages. And I don't mean Clojure in particular, but 
lisp in general. Flattening everything to lists and similar data structures 
sucks out some of the sugar from the grammar and it becomes harder for the 
brain to process. Yes you can always train your brain, but that's not the 
point of this thread. Clojure brings indeed some nice improvements to the 
lisp syntax by making other data structure first class as well (while lisp 
has only lists).

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




function creation, partial or #()

2013-08-13 Thread Jay Fields
Say you have a simple function: (defn do-work [f] (f))

When you want to call do-work you need a function, let's pretend we
want to use this function: (defn say-hello [n] (println "hello" n))

Which of the following solutions do you prefer?

(do-work (partial say-hello "bob"))
(do-work #(say-hello "bob"))

I'd been using partial (which I font-lock**), but a teammate recently
pointed out that partial's documentation explicitly calls out the fact
that the number of args to partial should be less than the number of
args to f. In practice it's been working 'fine', but I can't help but
wonder if I'm sacrificing something I'm not aware of (performance?)

** with a font-lock, using partial *displays* the same number of chars
as the reader macro solution, and I find it more readable when
everything is in the parenthesis. -
http://blog.jayfields.com/2013/05/emacs-lisp-font-lock-for-clojures.html

-- 
-- 
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: function creation, partial or #()

2013-08-13 Thread Jim - FooBar();

On 13/08/13 13:47, Jay Fields wrote:

Say you have a simple function: (defn do-work [f] (f))

When you want to call do-work you need a function, let's pretend we
want to use this function: (defn say-hello [n] (println "hello" n))

Which of the following solutions do you prefer?

(do-work (partial say-hello "bob"))
(do-work #(say-hello "bob"))

I'd been using partial (which I font-lock**), but a teammate recently
pointed out that partial's documentation explicitly calls out the fact
that the number of args to partial should be less than the number of
args to f. In practice it's been working 'fine', but I can't help but
wonder if I'm sacrificing something I'm not aware of (performance?)

** with a font-lock, using partial *displays* the same number of chars
as the reader macro solution, and I find it more readable when
everything is in the parenthesis. -
http://blog.jayfields.com/2013/05/emacs-lisp-font-lock-for-clojures.html



since 'partial' & 'comp' will give you back a function with varargs, it 
might be a tiny bit faster if you use #()...


Jim

--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ANN] Clojure Cheatsheet for Emacs

2013-08-13 Thread Philip Potter
Thanks Kris! I don't know what went wrong before, because I couldn't even
find it on the MELPA site, but it works great now.

Phil

On 13 August 2013 10:29, Kris Jenkins  wrote:

> Hi Phil,
>
> It looks like your package list is out of date - there's a newer version
> of the cheatsheet than that one. Try:
>
> M-x package-refresh-contents
>
> M-x package-install RET clojure-cheatsheet
>
> That should get your index pointing to the latest copy.
>
> Give me a shout if you still have trouble. :-)
>
> Cheers,
> Kris
>
> On Monday, 12 August 2013 15:39:30 UTC+1, Philip Potter wrote:
>
>> I just tried to install it from MELPA but get a 404:
>>
>> http://melpa.milkbox.net/**packages/clojure-cheatsheet-**20130808.2305.el
>>
>> *sadface*
>>
>> On 9 August 2013 22:40, Andy Fingerhut  wrote:
>>
>>> Very nice, Kris!
>>>
>>> In case anyone wants to use the Clojure cheatsheet offline using a web
>>> browser, in a form similar to the on-line one that includes the tooltips,
>>> there is a git command documented at the link below to create a full local
>>> copy of it on your computer:
>>>
>>> http://jafingerhut.github.io
>>>
>>> Then just open the index.html file with your browser.  The links to the
>>> different variants of the cheatsheet all work off-line.  Some of the links
>>> later in that page require being on-line (e.g. to get the PDF version of
>>> the cheatsheet, or to the actual Github version of the repo).
>>>
>>> Andy
>>>
>>>
>>> On Fri, Aug 9, 2013 at 1:59 PM, Simone Mosciatti wrote:
>>>
 Thank you so much...

 Actually was kinda funny, I typed something like "clojure cheatsheet
 offline" and your github link was one of the first, and I was very
 surprised... "Wow, it is possible that I didn't know of it ?"
 Well now I understand why I didn't know of it yet, it is only few hours
 old ;)


 On Friday, August 9, 2013 10:30:46 PM UTC+2, Kris Jenkins wrote:
>
> Hi,
>
> I find the Clojure Cheatsheet  really
> useful, but since I often need at those times I don't have wifi, I've
> packaged it up into an Emacs plugin:
>
>
> 
> In the hope that someone else finds it useful too, the project's here
> on Github , along
> with installation instructions. Any feedback is welcomed. :-)
>
> Cheers,
> Kris
>
  --
 --
 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 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+unsubs

Re: function creation, partial or #()

2013-08-13 Thread Max Penet
Hi, 

Partial calls apply, so it's not as performant as #(..). That can make 
quite the difference depending on where it's used. All instances of partial 
were removed recently in carmine/nippy and that resulted in quite a 
performance improvement.

On Tuesday, August 13, 2013 2:47:01 PM UTC+2, Jay Fields wrote:
>
> Say you have a simple function: (defn do-work [f] (f)) 
>
> When you want to call do-work you need a function, let's pretend we 
> want to use this function: (defn say-hello [n] (println "hello" n)) 
>
> Which of the following solutions do you prefer? 
>
> (do-work (partial say-hello "bob")) 
> (do-work #(say-hello "bob")) 
>
> I'd been using partial (which I font-lock**), but a teammate recently 
> pointed out that partial's documentation explicitly calls out the fact 
> that the number of args to partial should be less than the number of 
> args to f. In practice it's been working 'fine', but I can't help but 
> wonder if I'm sacrificing something I'm not aware of (performance?) 
>
> ** with a font-lock, using partial *displays* the same number of chars 
> as the reader macro solution, and I find it more readable when 
> everything is in the parenthesis. - 
> http://blog.jayfields.com/2013/05/emacs-lisp-font-lock-for-clojures.html 
>

-- 
-- 
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] core.typed 0.1.24

2013-08-13 Thread Ambrose Bonnaire-Sergeant
Hi,

Announcing a new release of core.typed
.

[org.clojure/core.typed "0.1.24"]


There are some breaking changes surrounding the ann-{datatype,protocol}
macros, see the changelog and their corresponding var docs for the details.

We also now support adding annotations directly to a `def`, without the
need for a separate `ann` form.

eg.

(ann ^:no-check add-datatype-ancestors [Symbol (t/Set r/TCType) -> nil])
(defn add-datatype-ancestors
  "Add a set of ancestor overrides for the datatype named sym."
  [sym tset]
  ...)

becomes


 (defn ^:no-check ^{:ann '[Symbol (t/Set r/TCType) -> nil]}
  add-datatype-ancestors
  "Add a set of ancestor overrides for the datatype named sym."
  [sym tset]
  ...)

Note the metadata must be attached during the def, not via alter-meta!.
:ann metadata must also be quoted.

Enjoy!
Ambrose

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




Libgdx (Error: Native library for macosx-x86 not found)

2013-08-13 Thread app
I'm getting "Native library for macosx-x86 not found" or "Could not 
initialize class org.robovm.llvm.binding.LLVMJNI" error while trying to 
compile one of the demo games of libgdx engine.
What could it be?

-- 
-- 
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: Do you like the Clojure syntax?

2013-08-13 Thread Steven Degutis
That isn't universally true. For me it was the opposite: this syntax made
it easier for my brain to process than any other language, even when I was
first learning it. Maybe my brain is diabetic and just can't handle
syntactic sugar. But I bet I'm not the only person like this.


On Tue, Aug 13, 2013 at 5:05 AM, Răzvan Rotaru wrote:

>
>
> luni, 12 august 2013, 11:00:27 UTC+3, Alan Forrester a scris:
>
>>
>> Do you have arguments against Clojure's current syntax?
>>
>> Alan
>
>
> Well, there are disadvantages. And I don't mean Clojure in particular, but
> lisp in general. Flattening everything to lists and similar data structures
> sucks out some of the sugar from the grammar and it becomes harder for the
> brain to process. Yes you can always train your brain, but that's not the
> point of this thread. Clojure brings indeed some nice improvements to the
> lisp syntax by making other data structure first class as well (while lisp
> has only lists).
>
> --
> --
> 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: Do you like the Clojure syntax?

2013-08-13 Thread Michal Till
Hi,

I actually think that this is a really important question and for me 
despite the fact that I *love* Clojure my answer is NO, i don't like the 
syntax.

To me it represents a significant barrier for reading. When I read an 
imperative OOP language I instinctively "see" through the code what the 
author wants to do. With LISP the first instructions of a code block are 
those that are most inside (nested) so looking at the ouside instructions I 
can't figure out why are they there because I don't know what is going into 
them as arguments. I have to follow the parens inside and then bactrack 
back.

One particular rant is that to make the code more readable I use lots of 
let bindings to make the subexpressions named. And here I hate the fact 
that let-s create another parens and indentation level. Many of my 
functions have let statements so in order to write a function I have one 
function-level indentation and one let-level indentation. I know that it 
makes sense but coming from a Ruby world I like when I have to do more 
typing to achieve some kind of a special case and less or no typing to get 
the default case, which is here not true.

I know that it is crazy and appalling but I actually like the syntax that 
Clarity "preprocessor" is doing: https://github.com/one-more-minute/clarity 
Though I agree that using it as a macro is kinda crazy and overall it is 
not worth the effort.

M.

Dne pondělí, 12. srpna 2013 9:52:53 UTC+2 Răzvan Rotaru napsal(a):
>
> Hi,
>
> I'm curious about the general opinion on the Clojure syntax, whether 
> people actually like it or just use it because it provides macros. So I 
> would like to ask you to participate in a poll. Thank You.
>
> Here's the link:
>
> https://docs.google.com/forms/d/1GSgfkeThpUYlgFVzhhNIgA1JbTilu6S9eudq_Sbxl34/viewform
>
> Răzvan
>

-- 
-- 
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: Feature toggles via Leiningen profiles

2013-08-13 Thread Michal Till
> Rather than shadowing one implementation with another, I'd recommend 
keeping both implementations in different namespaces and dispatching based 
on config, which can be read from the classpath.

Sorry for a newbie question, but how do I do "dispatching based on config" 
exactly? The point for me is to have nothing else in the files where the 
dispatching is being done than the code itself (no IFs, no multimethods 
etc.)

Btw, one really crazy solution might be have one abstract namespace 
app.repository and to use cljx with custom tags inside :-).

Thanks Karsten for your demo!

Michal

-- 
-- 
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: Do you like the Clojure syntax?

2013-08-13 Thread Lee Spector

On Aug 13, 2013, at 10:02 AM, Steven Degutis wrote:

> That isn't universally true. For me it was the opposite: this syntax made it 
> easier for my brain to process than any other language, even when I was first 
> learning it. Maybe my brain is diabetic and just can't handle syntactic 
> sugar. But I bet I'm not the only person like this.

It's not just for brains of for macros. For any system that digests and 
processes programs Lisp's syntactic uniformity and explicitness (parentheses 
everywhere) can be helpful. I'd argue that this has been important at various 
points in the history of AI, certainly including a field in which I now work -- 
genetic programming -- in which you want to support random variation and 
recombination of programs.

OTOH that doesn't mean that Lisp's syntax is optimal for these or any other 
purposes. As a substrate for evolutionary computation I now favor something 
completely different which would be abysmal as a programming language for human 
programmers*. And maybe there are other syntaxes more optimal for various human 
brains engaged in various pursuits. But Lisp does seem to occupy an interesting 
sweet spot in the space of languages, supporting lots of different kinds of 
things (often including code that manipulates code) pretty well.

 -Lee

* http://hampshire.edu/lspector/push.html

-- 
-- 
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] mod-lang-clojure 0.1.0 for Vert.x released

2013-08-13 Thread Toby Crawley
Stream and I just released the first "stable" version of the
mod-lang-clojure module, 0.1.0. This module provides support for
writing Vert.x applications in Clojure.


# What is Vert.x?

Vert.x[0] is an asynchronous polyglot application platform for the JVM
built on top of Netty.


# Current features

The module has feature parity with most of the other language
implementations, and additionally provides:

* repl support[1] - any verticle can expose an nREPL endpoint that shares
  the same runtime
* embedding[2] - the core API is published as a standalone jar, and
  can be used to embed a Vertx instance inside a standalone Clojure
  application


# TODO

We've got a bit more to do before we'll be ready to release a 1.0.0:

* support for embedding via a PlatformManager
* improve API consistency
* improve documentation


# What you can do to help

Take it for a spin! See the README[3] for usage instructions. Then
take a look at the manual[4], the API docs[5], and the growing set of
examples[6].

Let us know if you have any problems/questions/feedback by filing
issues[7], even if it's "This API sucks, it should look like..." :)


[0]: http://vertx.io/
[1]: 
https://github.com/vert-x/mod-lang-clojure/blob/0.1.0/docs/core_manual_clojure.md#using-nrepl
[2]: https://github.com/vert-x/mod-lang-clojure/tree/0.1.0/examples/embedded
[3]: https://github.com/vert-x/mod-lang-clojure#mod-lang-clojure
[4]: 
https://github.com/vert-x/mod-lang-clojure/blob/0.1.0/docs/core_manual_clojure.md
[5]: http://tcrawley.org/mod-lang-clojure/0.1.0/html-docs/
[6]: https://github.com/vert-x/mod-lang-clojure/tree/0.1.0/examples/
[7]: https://github.com/vert-x/mod-lang-clojure/issues/

-- 
Toby Crawley
http://immutant.org | http://torquebox.org

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
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: Do you like the Clojure syntax?

2013-08-13 Thread Softaddicts
Then they are very weak in terms of tooling evaluation. If people are unwilling
to look objectively at a pros/cons analysis why bother with them ?

Why scrap the syntax for this kind of people ? I am not saying that there are 
not
nice people to have a coffee with or a beer. I am just saying that they are not
questioning their practices. This is part of their job.

I met a CTO of a huge corporation last year who did not want anything to change.
He's maintaing his shop in the stone age. Live and let die then.

Acceptance based on such superficial criteria as syntax maybe ok for a hobby but
for serious and challenging work ? 
In 2009 we ended up with comments like "how will they find resources, ..." after
announcing that we were in prod with Clojure, the usual fud.

Clojure is no more an "risky" choice, there is some traction out there, the 
keyword
by itself appears now on job postings since what more than a year ago ?

If the syntax was so much debilitating, you would not see this happening.

It's not a cosmetic product marketing campaign :)

Clojure establishes itself at what seems like a slow pace but if I look
backward, there's been a lot of ground covered in five years and the momentum
is still going on.

In five years from now, I predict that we will see highly performant shops 
using Clojure as their main language to solve problems that seem today out of 
reach
or for which previous attempts failed.

Many will feel left behind. It's called evolution :)

Luc P.


> I think the choice of a language has always a subjective part. Particularly
> when you learn a language by yourself for pleasure.  Because  it's 'for
> pleasure' you want to learn a fun stuff.
> > At work, I believe the subjective part works against a choice. Currently,
> at my office, the 8 other colleagues don't want to take a look at Clojure
> because of its LISP syntax. Their brain blocks and they don't hear you when
> you talk about the language capabilities.
> Le 13 août 2013 03:14, "Devin Walters"  a écrit :
> > > I have to echo previous sentiments. I'm not going to fill out the survey
> > because as it currently stands, it seems like it's begging for a conclusion
> > that satisfies the author.
> >
> > I'd like to see more targeted questions w/r/t syntax. But there again, I
> > think this kind of question is highly subjective, and likely to provide a
> > narrow view of what people *actually* care about in Clojure: writing great
> > programs, being inspired to dig deeper, realizing creative potential, etc.
> >
> > '(Devin Walters)
> >
> > On Aug 12, 2013, at 7:21 PM, Ramesh  wrote:
> >
> > Great points here!
> >
> > I think once someone is comfortable with Clojure, Scala will be more
> > disgusting than Java. This is because, Scala has such great adornments,
> > ironically aspiring toward simplification.
> >
> > -ramesh
> >
> >
> > On Mon, Aug 12, 2013 at 7:58 AM, David Pollak <
> > feeder.of.the.be...@gmail.com> wrote:
> >
> >> A couple of quick reactions...
> >>
> >> The survey itself is too "flat". It's like asking "do you like red or
> >> green?" Well... I like green on my walls, but I like red on my ties.
> >>
> >> Scala has macros and a much richer syntax (although doing anything like
> >> core.async with Scala macros might be like putting tabsco on an open cut...
> >> just sayin') so I don't think the syntax and the macro stuff is a
> >> one-to-one mapping.
> >>
> >> People learn to work with a variety of syntaxes and are successful with
> >> them. Java and C++ have viscously awful syntax, yet they are very popular
> >> and most users of the languages don't notice. Both C and Lisp model an
> >> abstract computer and have syntax that reflects the computer that they
> >> model and to my mind, that helps the user of each language grok the
> >> abstract computer they are programming.
> >>
> >> I'd like a two-way mapping between a Clojure and an Excel-like formula
> >> language. That way people could write one-liner Clojure functions in a
> >> syntax that non-programmers are already comfortable with. I'm noodling with
> >> something like that right now.
> >>
> >> I think Jay and Colin are saying something very, very important: Clojure
> >> feels uncomfortable until it feels very comfortable and then there's no
> >> going back. I am not yet comfortable with Clojure's syntax, but I totally
> >> appreciate it. But I'm doing work in Scala, Java, and Clojure all for pay
> >> all in the same week every week... and bouncing among all three makes
> >> getting comfortable with Clojure a little slow. Further, I fear (deeply...
> >> in my bones) that once I am comfortable with Clojure, doing Scala will be
> >> as disgusting as doing Java is after 7 years of Scala. :-(
> >>
> >>
> >>
> >> On Mon, Aug 12, 2013 at 12:52 AM, Răzvan Rotaru 
> >> wrote:
> >>
> >>> Hi,
> >>>
> >>> I'm curious about the general opinion on the Clojure syntax, whether
> >>> people actually like it or just use it because it provides macros. So I
> >>> would like to ask y

ANN Introducing Route One

2013-08-13 Thread Michael Klishin
On behalf of the ClojureWerkz team, I'm happy to announce our not-so-new
project that has recently reached 1.0.0-rc1 stage: Route One [1].

Route One is a route generation library complimentary to Clout, part of
Compojure.
It takes a route definition and parameters and produces a URL/URI/path.

It can be used in any application that may need to generate URLs/URIs/paths.

1.0.0-rc1 release notes:
http://blog.clojurewerkz.org/blog/2013/08/12/route-one-1-dot-0-0-rc1-is-released/

Documentation and examples:
https://github.com/clojurewerkz/route-one#documentation--examples

1. http://github.com/clojurewerkz/route-one
-- 
MK

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

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Do you like the Clojure syntax?

2013-08-13 Thread Mikera
On Monday, 12 August 2013 15:52:53 UTC+8, Răzvan Rotaru wrote:

> Hi,
>
> I'm curious about the general opinion on the Clojure syntax, whether 
> people actually like it or just use it because it provides macros. So I 
> would like to ask you to participate in a poll. Thank You.
>
>
The importance of syntax in programming languages is vastly exaggerated. 

Syntax alone makes no difference to what you can do with a language in a 
computational sense. The value mostly comes down to familiarity (which is 
entirely personal) and practicality (for which different domains may have 
different trade-offs / requirements). There is therefore no such thing as 
"perfect" syntax - it depends who you are and what you are doing.

That being said, Clojure syntax represents a number of excellent design 
decisions:
1. It is homoiconic (which makes it much more practical for macros / code 
generation / DSLs)
2. An expression (function application) is represented as a single form. 
Arguably this is *the* fundamental building block of code.
3. Forms are consistently delimited with matched parentheses (which makes 
it very convenient for editing / quick prototyping with code blocks)
4. It is a Lisp (which gives familiarity to Lisp users at least)
5. It is very regular (which makes it convenient for code generation and 
programmatic code analysis)
6. It uses visually differentiated forms in sensible ways (e.g. [] for 
argument lists)
7. It is whitespace invariant (which IMHO makes rapid editing easier and 
avoids subtle bugs)
8. There is no ambiguity about operator precedence / evaluation order
9. It has an excellent range of data literals
10. It tends to be concise (probably more to do with the powerful standard 
functions than the syntax, but still)
11. It has a very convenient syntax for host interop

A few legitimate criticisms of Clojure syntax:
1. It is unfamiliar to people coming from the most popular paradigms (i.e. 
C/Java). Fine, but time to learn :-)
2. The lack of infix notation is unfamiliar for anyone used to conventional 
mathematical notation (i.e. most people). Again, this is just a learning 
curve.
3. The reader macros are tricky (especially when they interact with 
metadata, the environment, the compiler, type hints and literal handling in 
non-obvious ways)
4. Quoting / unquoting can be tricky (I think this is an unavoidable 
trade-off however if you want the benefits of a homoiconic Lisp)

Overall though, I think the advantages significantly outweigh the 
disadvantages. This is true *even if* you have to go through a learning 
curve after coming from a non-Lisp background. I'm not aware of any general 
purpose language designed for power users (i.e. those who appreciate the 
power of macros and similar features) that can claim an objectively better 
syntax.

To summarise: +1 for Clojure's current syntax :-)

-- 
-- 
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: Do you like the Clojure syntax?

2013-08-13 Thread Răzvan Rotaru


luni, 12 august 2013, 18:34:34 UTC+3, Phillip Lord a scris:
>
> David Pollak > writes: 
> > The survey itself is too "flat". It's like asking "do you like red or 
> > green?" Well... I like green on my walls, but I like red on my ties. 
>
> I'd agree with this. 
>
> "Do you like" is also a relative thing, I think. I mean, compared to 
> what? Java? Or common lisp. 
>
>
Liking something is subjective by definition. That's the purpose of the 
poll. If you are using Clojure I just want to know your subjective feeling 
towards the syntax.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ANN Introducing Route One

2013-08-13 Thread Baishampayan Ghose
Curious, how does it differ from Clout? ~BG

On Tue, Aug 13, 2013 at 9:38 PM, Michael Klishin
 wrote:
> On behalf of the ClojureWerkz team, I'm happy to announce our not-so-new
> project that has recently reached 1.0.0-rc1 stage: Route One [1].
>
> Route One is a route generation library complimentary to Clout, part of
> Compojure.
> It takes a route definition and parameters and produces a URL/URI/path.
>
> It can be used in any application that may need to generate URLs/URIs/paths.
>
> 1.0.0-rc1 release notes:
> http://blog.clojurewerkz.org/blog/2013/08/12/route-one-1-dot-0-0-rc1-is-released/
>
> Documentation and examples:
> https://github.com/clojurewerkz/route-one#documentation--examples
>
> 1. http://github.com/clojurewerkz/route-one
> --
> MK
>
> http://github.com/michaelklishin
> http://twitter.com/michaelklishin
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



-- 
Baishampayan Ghose
b.ghose at gmail.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.




[ANN] Leiningen 2.3.1 released

2013-08-13 Thread Phil Hagelberg

Hello folks.

With some help from Nelson Morris I've pushed out the 2.3.1 release of
Leiningen. This fixes the self-install issues as well as the issue
around AOT classes not being included in jar files. It also adds a new
flag (:monkeypatch-clojure-test false) you can use to disable
Leiningen's monkeypatch of the `clojure.test` library.

As usual, if you installed manually you can upgrade with `lein
upgrade`. If you need to back out for some reason, you can downgrade with
`lein upgrade 2.2.0`.

-Phil


pgppA_W2XNO5s.pgp
Description: PGP signature


Help with Incanter and Emacs

2013-08-13 Thread Akhil Wali
Hi All, 

A really noob question.

Why do I get "FileNotFoundException Could not locate incanter__init.class 
or  incanter.clj on classpath:   clojure.lang.RT.load (RT.java:443)" when i 
load a file that uses incanter in emacs?
Here's the file...

(ns default.core
  (:require incanter core charts stats datasets))

(defn plot []
  (view (scatter-plot :Sepal.Length :Sepal.Width
  :group-by :Species
  :data (get-dataset :iris

(plot)

This works in lein repl just fine.
I'm using Emacs 24 and nrepl.el 0.1.8.

This issue was posted on Github way long back. Seems to be solved, but by 
simply upgrading emacs. Doesn't really work in my case.
Any advise?


-- 
-- 
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: Help with Incanter and Emacs

2013-08-13 Thread Tim Visher
On Tue, Aug 13, 2013 at 1:59 PM, Akhil Wali  wrote:
> Hi All,
>
> A really noob question.
>
> Why do I get "FileNotFoundException Could not locate incanter__init.class or
> incanter.clj on classpath:   clojure.lang.RT.load (RT.java:443)" when i load
> a file that uses incanter in emacs?
> Here's the file...
>
> (ns default.core
>   (:require incanter core charts stats datasets))
>
> (defn plot []
>   (view (scatter-plot :Sepal.Length :Sepal.Width
>   :group-by :Species
>   :data (get-dataset :iris
>
> (plot)
>
> This works in lein repl just fine.
> I'm using Emacs 24 and nrepl.el 0.1.8.
>
> This issue was posted on Github way long back. Seems to be solved, but by
> simply upgrading emacs. Doesn't really work in my case.
> Any advise?

Couple things.

1. I'm assuming you've declared the proper dependencies in your
`project.clj` file since this works from `lein repl`, however it's
worth checking.

2. How are you connecting to your project? Simply loading the
namespace won't work if you haven't properly jack in. There's a number
of options here but the simplest is probably to use `M-x
nrepl-jack-in` (usually bound to `C-c M-j`) from this file. It should
Just Work™.

If that doesn't work, I'd probably post some more details about the
project somewhere. At least the `project.clj` and the whole ns would
be helpful in a gist of some sort.

--

In Christ,

Timmy V.

http://blog.twonegatives.com/
http://five.sentenc.es/ -- Spend less time on mail

-- 
-- 
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: Help with Incanter and Emacs

2013-08-13 Thread Akhil Wali
Well 
Here's my project.clj.

(defproject someproj "0.1.0-SNAPSHOT"
  :dependencies [[org.clojure/clojure "1.5.1"]
 [incanter "1.5.2"]])

Here's my .lein/profiles.clj as well.

{:user {:plugins [[lein-ritz "0.7.0"]
  [compojure-app/lein-template "0.2.7"]]
:dependencies [[ritz/ritz-nrepl-middleware "0.7.0"]]
:repl-options {:nrepl-middleware
   [ritz.nrepl.middleware.javadoc/wrap-javadoc

ritz.nrepl.middleware.simple-complete/wrap-simple-complete]}}}



On Tuesday, August 13, 2013 11:35:58 PM UTC+5:30, Tim Visher wrote:
>
> On Tue, Aug 13, 2013 at 1:59 PM, Akhil Wali 
> > 
> wrote: 
> > Hi All, 
> > 
> > A really noob question. 
> > 
> > Why do I get "FileNotFoundException Could not locate 
> incanter__init.class or 
> > incanter.clj on classpath:   clojure.lang.RT.load (RT.java:443)" when i 
> load 
> > a file that uses incanter in emacs? 
> > Here's the file... 
> > 
> > (ns default.core 
> >   (:require incanter core charts stats datasets)) 
> > 
> > (defn plot [] 
> >   (view (scatter-plot :Sepal.Length :Sepal.Width 
> >   :group-by :Species 
> >   :data (get-dataset :iris 
> > 
> > (plot) 
> > 
> > This works in lein repl just fine. 
> > I'm using Emacs 24 and nrepl.el 0.1.8. 
> > 
> > This issue was posted on Github way long back. Seems to be solved, but 
> by 
> > simply upgrading emacs. Doesn't really work in my case. 
> > Any advise? 
>
> Couple things. 
>
> 1. I'm assuming you've declared the proper dependencies in your 
> `project.clj` file since this works from `lein repl`, however it's 
> worth checking. 
>
> 2. How are you connecting to your project? Simply loading the 
> namespace won't work if you haven't properly jack in. There's a number 
> of options here but the simplest is probably to use `M-x 
> nrepl-jack-in` (usually bound to `C-c M-j`) from this file. It should 
> Just Work™. 
>
> If that doesn't work, I'd probably post some more details about the 
> project somewhere. At least the `project.clj` and the whole ns would 
> be helpful in a gist of some sort. 
>
> -- 
>
> In Christ, 
>
> Timmy V. 
>
> http://blog.twonegatives.com/ 
> http://five.sentenc.es/ -- Spend less time on mail 
>

-- 
-- 
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: function creation, partial or #()

2013-08-13 Thread Tim Visher
On Tue, Aug 13, 2013 at 8:47 AM, Jay Fields  wrote:
> Say you have a simple function: (defn do-work [f] (f))
>
> When you want to call do-work you need a function, let's pretend we
> want to use this function: (defn say-hello [n] (println "hello" n))
>
> Which of the following solutions do you prefer?
>
> (do-work (partial say-hello "bob"))
> (do-work #(say-hello "bob"))
>
> I'd been using partial (which I font-lock**), but a teammate recently
> pointed out that partial's documentation explicitly calls out the fact
> that the number of args to partial should be less than the number of
> args to f. In practice it's been working 'fine', but I can't help but
> wonder if I'm sacrificing something I'm not aware of (performance?)

It depends.

I endeavor to use `partial` whenever what I'm doing is fixing leading
arguments. I think it reads better.

Whenever I have to fall back to to the reader macro it is always
because the args were ordered poorly for my particular use. I usually
get frustrated at the library author at this point, and then quickly
realize what an idiot I'm being and move on.

I haven't had any situations yet that required deep optimization and
I'm a firm believer in premature optimization being the root of all
evil so for the entirety of my career in clojure I've only ever
optimized for readability.

I'll get to that next level soon enough, I'm sure.

--

In Christ,

Timmy V.

http://blog.twonegatives.com/
http://five.sentenc.es/ -- Spend less time on mail

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ANN Introducing Route One

2013-08-13 Thread Oleksandr Petrov
It actually doesn't do anything Clout does.
Latest modifications actually make it 100% complementary to clout, so now
you can do:

(defroute about "/about")(defroute documents "/docs/:title")


(compojure/defroutes main-routes
  (compojure/GET about-template request (handlers.root/root-page
request)) ;; will use /about as a template
  (compojure/GET documents-template request
(handlers.root/documents-page request)) ;; will use /documents as a
template
  (route/not-found "Page not found"))


Meaning that on Route One side you specify the way you generate url from
parts, and clout takes same template and makes urls parseable.

To sum it up: Clout only does route recognition (URL => route), while Route
One does only URL generation (route => URL)

Thanks!

On Tue, Aug 13, 2013 at 7:12 PM, Baishampayan Ghose wrote:

> Curious, how does it differ from Clout? ~BG
>
> On Tue, Aug 13, 2013 at 9:38 PM, Michael Klishin
>  wrote:
> > On behalf of the ClojureWerkz team, I'm happy to announce our not-so-new
> > project that has recently reached 1.0.0-rc1 stage: Route One [1].
> >
> > Route One is a route generation library complimentary to Clout, part of
> > Compojure.
> > It takes a route definition and parameters and produces a URL/URI/path.
> >
> > It can be used in any application that may need to generate
> URLs/URIs/paths.
> >
> > 1.0.0-rc1 release notes:
> >
> http://blog.clojurewerkz.org/blog/2013/08/12/route-one-1-dot-0-0-rc1-is-released/
> >
> > Documentation and examples:
> > https://github.com/clojurewerkz/route-one#documentation--examples
> >
> > 1. http://github.com/clojurewerkz/route-one
> > --
> > MK
> >
> > http://github.com/michaelklishin
> > http://twitter.com/michaelklishin
> >
> > --
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Clojure" group.
> > To post to this group, send email to clojure@googlegroups.com
> > Note that posts from new members are moderated - please be patient with
> your
> > first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "Clojure" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to clojure+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
>
>
> --
> Baishampayan Ghose
> b.ghose at gmail.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.
>
>
>


-- 
alex p

-- 
-- 
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: Help with Incanter and Emacs

2013-08-13 Thread Tim Visher
And you're connecting to the project how?

On Tue, Aug 13, 2013 at 2:11 PM, Akhil Wali  wrote:
> Well
> Here's my project.clj.
>
> (defproject someproj "0.1.0-SNAPSHOT"
>   :dependencies [[org.clojure/clojure "1.5.1"]
>  [incanter "1.5.2"]])
>
> Here's my .lein/profiles.clj as well.
>
> {:user {:plugins [[lein-ritz "0.7.0"]
>   [compojure-app/lein-template "0.2.7"]]
> :dependencies [[ritz/ritz-nrepl-middleware "0.7.0"]]
> :repl-options {:nrepl-middleware
>[ritz.nrepl.middleware.javadoc/wrap-javadoc
>
> ritz.nrepl.middleware.simple-complete/wrap-simple-complete]}}}
>
>
>
> On Tuesday, August 13, 2013 11:35:58 PM UTC+5:30, Tim Visher wrote:
>>
>> On Tue, Aug 13, 2013 at 1:59 PM, Akhil Wali  wrote:
>> > Hi All,
>> >
>> > A really noob question.
>> >
>> > Why do I get "FileNotFoundException Could not locate
>> > incanter__init.class or
>> > incanter.clj on classpath:   clojure.lang.RT.load (RT.java:443)" when i
>> > load
>> > a file that uses incanter in emacs?
>> > Here's the file...
>> >
>> > (ns default.core
>> >   (:require incanter core charts stats datasets))
>> >
>> > (defn plot []
>> >   (view (scatter-plot :Sepal.Length :Sepal.Width
>> >   :group-by :Species
>> >   :data (get-dataset :iris
>> >
>> > (plot)
>> >
>> > This works in lein repl just fine.
>> > I'm using Emacs 24 and nrepl.el 0.1.8.
>> >
>> > This issue was posted on Github way long back. Seems to be solved, but
>> > by
>> > simply upgrading emacs. Doesn't really work in my case.
>> > Any advise?
>>
>> Couple things.
>>
>> 1. I'm assuming you've declared the proper dependencies in your
>> `project.clj` file since this works from `lein repl`, however it's
>> worth checking.
>>
>> 2. How are you connecting to your project? Simply loading the
>> namespace won't work if you haven't properly jack in. There's a number
>> of options here but the simplest is probably to use `M-x
>> nrepl-jack-in` (usually bound to `C-c M-j`) from this file. It should
>> Just Work™.
>>
>> If that doesn't work, I'd probably post some more details about the
>> project somewhere. At least the `project.clj` and the whole ns would
>> be helpful in a gist of some sort.
>>
>> --
>>
>> In Christ,
>>
>> Timmy V.
>>
>> http://blog.twonegatives.com/
>> http://five.sentenc.es/ -- Spend less time on mail
>
> --
> --
> 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: Help with Incanter and Emacs

2013-08-13 Thread Akhil Wali
Yes, by nrepl-jack-in.

On Tuesday, August 13, 2013 11:54:24 PM UTC+5:30, Tim Visher wrote:
>
> And you're connecting to the project how? 
>
> On Tue, Aug 13, 2013 at 2:11 PM, Akhil Wali 
> > 
> wrote: 
> > Well 
> > Here's my project.clj. 
> > 
> > (defproject someproj "0.1.0-SNAPSHOT" 
> >   :dependencies [[org.clojure/clojure "1.5.1"] 
> >  [incanter "1.5.2"]]) 
> > 
> > Here's my .lein/profiles.clj as well. 
> > 
> > {:user {:plugins [[lein-ritz "0.7.0"] 
> >   [compojure-app/lein-template "0.2.7"]] 
> > :dependencies [[ritz/ritz-nrepl-middleware "0.7.0"]] 
> > :repl-options {:nrepl-middleware 
> >[ritz.nrepl.middleware.javadoc/wrap-javadoc 
> > 
> > ritz.nrepl.middleware.simple-complete/wrap-simple-complete]}}} 
> > 
> > 
> > 
> > On Tuesday, August 13, 2013 11:35:58 PM UTC+5:30, Tim Visher wrote: 
> >> 
> >> On Tue, Aug 13, 2013 at 1:59 PM, Akhil Wali  
> wrote: 
> >> > Hi All, 
> >> > 
> >> > A really noob question. 
> >> > 
> >> > Why do I get "FileNotFoundException Could not locate 
> >> > incanter__init.class or 
> >> > incanter.clj on classpath:   clojure.lang.RT.load (RT.java:443)" when 
> i 
> >> > load 
> >> > a file that uses incanter in emacs? 
> >> > Here's the file... 
> >> > 
> >> > (ns default.core 
> >> >   (:require incanter core charts stats datasets)) 
> >> > 
> >> > (defn plot [] 
> >> >   (view (scatter-plot :Sepal.Length :Sepal.Width 
> >> >   :group-by :Species 
> >> >   :data (get-dataset :iris 
> >> > 
> >> > (plot) 
> >> > 
> >> > This works in lein repl just fine. 
> >> > I'm using Emacs 24 and nrepl.el 0.1.8. 
> >> > 
> >> > This issue was posted on Github way long back. Seems to be solved, 
> but 
> >> > by 
> >> > simply upgrading emacs. Doesn't really work in my case. 
> >> > Any advise? 
> >> 
> >> Couple things. 
> >> 
> >> 1. I'm assuming you've declared the proper dependencies in your 
> >> `project.clj` file since this works from `lein repl`, however it's 
> >> worth checking. 
> >> 
> >> 2. How are you connecting to your project? Simply loading the 
> >> namespace won't work if you haven't properly jack in. There's a number 
> >> of options here but the simplest is probably to use `M-x 
> >> nrepl-jack-in` (usually bound to `C-c M-j`) from this file. It should 
> >> Just Work™. 
> >> 
> >> If that doesn't work, I'd probably post some more details about the 
> >> project somewhere. At least the `project.clj` and the whole ns would 
> >> be helpful in a gist of some sort. 
> >> 
> >> -- 
> >> 
> >> In Christ, 
> >> 
> >> Timmy V. 
> >> 
> >> http://blog.twonegatives.com/ 
> >> http://five.sentenc.es/ -- Spend less time on mail 
> > 
> > -- 
> > -- 
> > 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: Searching for Regular Expressions in a file

2013-08-13 Thread JvJ
I had some difficulty with the line seq because I was looking for 
multi-line patterns.  I'll try the char-seq thing.

On Monday, 12 August 2013 18:42:18 UTC-7, Joel Holdbrooks wrote:
>
> You could use *line-seq* which, if I'm not mistaken, is lazy. Then do 
> your regex search line by line lazily.
>
> On Monday, August 12, 2013 4:25:15 PM UTC-7, JvJ wrote:
>>
>> Is there a way to do a regex search over an entire file without loading 
>> the file into memory?
>>
>

-- 
-- 
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: Searching for Regular Expressions in a file

2013-08-13 Thread Christian Sperandio
Is the number of lines known and is it fixed?
If it is then you can load the file inside a window, don't you?
Le 13 août 2013 20:32, "JvJ"  a écrit :

> I had some difficulty with the line seq because I was looking for
> multi-line patterns.  I'll try the char-seq thing.
>
> On Monday, 12 August 2013 18:42:18 UTC-7, Joel Holdbrooks wrote:
>>
>> You could use *line-seq* which, if I'm not mistaken, is lazy. Then do
>> your regex search line by line lazily.
>>
>> On Monday, August 12, 2013 4:25:15 PM UTC-7, JvJ wrote:
>>>
>>> Is there a way to do a regex search over an entire file without loading
>>> the file into memory?
>>>
>>  --
> --
> 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: Help with Incanter and Emacs

2013-08-13 Thread Akhil Wali
Well this is embarrassing. 

I was having a wrong use syntax >.<.
Changed the import line to this and it works.

(ns default.core
  (:use [incanter core charts stats datasets]))

Thanks for the help though!!

On Tuesday, August 13, 2013 11:57:46 PM UTC+5:30, Akhil Wali wrote:
>
> Yes, by nrepl-jack-in.
>
> On Tuesday, August 13, 2013 11:54:24 PM UTC+5:30, Tim Visher wrote:
>>
>> And you're connecting to the project how? 
>>
>> On Tue, Aug 13, 2013 at 2:11 PM, Akhil Wali  
>> wrote: 
>> > Well 
>> > Here's my project.clj. 
>> > 
>> > (defproject someproj "0.1.0-SNAPSHOT" 
>> >   :dependencies [[org.clojure/clojure "1.5.1"] 
>> >  [incanter "1.5.2"]]) 
>> > 
>> > Here's my .lein/profiles.clj as well. 
>> > 
>> > {:user {:plugins [[lein-ritz "0.7.0"] 
>> >   [compojure-app/lein-template "0.2.7"]] 
>> > :dependencies [[ritz/ritz-nrepl-middleware "0.7.0"]] 
>> > :repl-options {:nrepl-middleware 
>> >[ritz.nrepl.middleware.javadoc/wrap-javadoc 
>> > 
>> > ritz.nrepl.middleware.simple-complete/wrap-simple-complete]}}} 
>> > 
>> > 
>> > 
>> > On Tuesday, August 13, 2013 11:35:58 PM UTC+5:30, Tim Visher wrote: 
>> >> 
>> >> On Tue, Aug 13, 2013 at 1:59 PM, Akhil Wali  
>> wrote: 
>> >> > Hi All, 
>> >> > 
>> >> > A really noob question. 
>> >> > 
>> >> > Why do I get "FileNotFoundException Could not locate 
>> >> > incanter__init.class or 
>> >> > incanter.clj on classpath:   clojure.lang.RT.load (RT.java:443)" 
>> when i 
>> >> > load 
>> >> > a file that uses incanter in emacs? 
>> >> > Here's the file... 
>> >> > 
>> >> > (ns default.core 
>> >> >   (:require incanter core charts stats datasets)) 
>> >> > 
>> >> > (defn plot [] 
>> >> >   (view (scatter-plot :Sepal.Length :Sepal.Width 
>> >> >   :group-by :Species 
>> >> >   :data (get-dataset :iris 
>> >> > 
>> >> > (plot) 
>> >> > 
>> >> > This works in lein repl just fine. 
>> >> > I'm using Emacs 24 and nrepl.el 0.1.8. 
>> >> > 
>> >> > This issue was posted on Github way long back. Seems to be solved, 
>> but 
>> >> > by 
>> >> > simply upgrading emacs. Doesn't really work in my case. 
>> >> > Any advise? 
>> >> 
>> >> Couple things. 
>> >> 
>> >> 1. I'm assuming you've declared the proper dependencies in your 
>> >> `project.clj` file since this works from `lein repl`, however it's 
>> >> worth checking. 
>> >> 
>> >> 2. How are you connecting to your project? Simply loading the 
>> >> namespace won't work if you haven't properly jack in. There's a number 
>> >> of options here but the simplest is probably to use `M-x 
>> >> nrepl-jack-in` (usually bound to `C-c M-j`) from this file. It should 
>> >> Just Work™. 
>> >> 
>> >> If that doesn't work, I'd probably post some more details about the 
>> >> project somewhere. At least the `project.clj` and the whole ns would 
>> >> be helpful in a gist of some sort. 
>> >> 
>> >> -- 
>> >> 
>> >> In Christ, 
>> >> 
>> >> Timmy V. 
>> >> 
>> >> http://blog.twonegatives.com/ 
>> >> http://five.sentenc.es/ -- Spend less time on mail 
>> > 
>> > -- 
>> > -- 
>> > 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: function creation, partial or #()

2013-08-13 Thread John D. Hume
Though in some cases the performance impact could be significant, my
concern is readability. My understanding of the concept of partial function
application is that it's about supplying some but not all of the arguments.
So when I see `partial` in code, I expect more arguments to be supplied
later, which is confusing when that's not the case. (Obviously context can
make it easy to see that there will be no more arguments, but often that
context is not present.)



On Tue, Aug 13, 2013 at 7:47 AM, Jay Fields  wrote:

> Say you have a simple function: (defn do-work [f] (f))
>
> When you want to call do-work you need a function, let's pretend we
> want to use this function: (defn say-hello [n] (println "hello" n))
>
> Which of the following solutions do you prefer?
>
> (do-work (partial say-hello "bob"))
> (do-work #(say-hello "bob"))
>
> I'd been using partial (which I font-lock**), but a teammate recently
> pointed out that partial's documentation explicitly calls out the fact
> that the number of args to partial should be less than the number of
> args to f. In practice it's been working 'fine', but I can't help but
> wonder if I'm sacrificing something I'm not aware of (performance?)
>
> ** with a font-lock, using partial *displays* the same number of chars
> as the reader macro solution, and I find it more readable when
> everything is in the parenthesis. -
> http://blog.jayfields.com/2013/05/emacs-lisp-font-lock-for-clojures.html
>
> --
> --
> 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.
>
>
>


-- 
http://elhumidor.blogspot.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: Help with Incanter and Emacs

2013-08-13 Thread Tim Visher
LOL. I just realized I'd been missing that all along.

It seems like the community is more and more leaning to something like
this, just FYI.

(ns default.core
  (:require (incanter [core  :refer :all]
[charts:refer :all]
[stats  :refer :all]
[datasets :refer :all])))

`:use` has been discussed in the interest of deprecating it many times.

I did not test the above declaration.

On Tue, Aug 13, 2013 at 2:40 PM, Akhil Wali  wrote:
> Well this is embarrassing.
>
> I was having a wrong use syntax >.<.
> Changed the import line to this and it works.
>
> (ns default.core
>   (:use [incanter core charts stats datasets]))
>
> Thanks for the help though!!
>
> On Tuesday, August 13, 2013 11:57:46 PM UTC+5:30, Akhil Wali wrote:
>>
>> Yes, by nrepl-jack-in.
>>
>> On Tuesday, August 13, 2013 11:54:24 PM UTC+5:30, Tim Visher wrote:
>>>
>>> And you're connecting to the project how?
>>>
>>> On Tue, Aug 13, 2013 at 2:11 PM, Akhil Wali 
>>> wrote:
>>> > Well
>>> > Here's my project.clj.
>>> >
>>> > (defproject someproj "0.1.0-SNAPSHOT"
>>> >   :dependencies [[org.clojure/clojure "1.5.1"]
>>> >  [incanter "1.5.2"]])
>>> >
>>> > Here's my .lein/profiles.clj as well.
>>> >
>>> > {:user {:plugins [[lein-ritz "0.7.0"]
>>> >   [compojure-app/lein-template "0.2.7"]]
>>> > :dependencies [[ritz/ritz-nrepl-middleware "0.7.0"]]
>>> > :repl-options {:nrepl-middleware
>>> >[ritz.nrepl.middleware.javadoc/wrap-javadoc
>>> >
>>> > ritz.nrepl.middleware.simple-complete/wrap-simple-complete]}}}
>>> >
>>> >
>>> >
>>> > On Tuesday, August 13, 2013 11:35:58 PM UTC+5:30, Tim Visher wrote:
>>> >>
>>> >> On Tue, Aug 13, 2013 at 1:59 PM, Akhil Wali 
>>> >> wrote:
>>> >> > Hi All,
>>> >> >
>>> >> > A really noob question.
>>> >> >
>>> >> > Why do I get "FileNotFoundException Could not locate
>>> >> > incanter__init.class or
>>> >> > incanter.clj on classpath:   clojure.lang.RT.load (RT.java:443)"
>>> >> > when i
>>> >> > load
>>> >> > a file that uses incanter in emacs?
>>> >> > Here's the file...
>>> >> >
>>> >> > (ns default.core
>>> >> >   (:require incanter core charts stats datasets))
>>> >> >
>>> >> > (defn plot []
>>> >> >   (view (scatter-plot :Sepal.Length :Sepal.Width
>>> >> >   :group-by :Species
>>> >> >   :data (get-dataset :iris
>>> >> >
>>> >> > (plot)
>>> >> >
>>> >> > This works in lein repl just fine.
>>> >> > I'm using Emacs 24 and nrepl.el 0.1.8.
>>> >> >
>>> >> > This issue was posted on Github way long back. Seems to be solved,
>>> >> > but
>>> >> > by
>>> >> > simply upgrading emacs. Doesn't really work in my case.
>>> >> > Any advise?
>>> >>
>>> >> Couple things.
>>> >>
>>> >> 1. I'm assuming you've declared the proper dependencies in your
>>> >> `project.clj` file since this works from `lein repl`, however it's
>>> >> worth checking.
>>> >>
>>> >> 2. How are you connecting to your project? Simply loading the
>>> >> namespace won't work if you haven't properly jack in. There's a number
>>> >> of options here but the simplest is probably to use `M-x
>>> >> nrepl-jack-in` (usually bound to `C-c M-j`) from this file. It should
>>> >> Just Work™.
>>> >>
>>> >> If that doesn't work, I'd probably post some more details about the
>>> >> project somewhere. At least the `project.clj` and the whole ns would
>>> >> be helpful in a gist of some sort.
>>> >>
>>> >> --
>>> >>
>>> >> In Christ,
>>> >>
>>> >> Timmy V.
>>> >>
>>> >> http://blog.twonegatives.com/
>>> >> http://five.sentenc.es/ -- Spend less time on mail
>>> >
>>> > --
>>> > --
>>> > 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" g

Re: ANN Introducing Route One

2013-08-13 Thread Baishampayan Ghose
That's clearer, thanks! ~BG

On Tue, Aug 13, 2013 at 11:51 PM, Oleksandr Petrov
 wrote:
> It actually doesn't do anything Clout does.
> Latest modifications actually make it 100% complementary to clout, so now
> you can do:
>
> (defroute about "/about")
> (defroute documents "/docs/:title")
>
>
> (compojure/defroutes main-routes
>   (compojure/GET about-template request (handlers.root/root-page request))
> ;; will use /about as a template
>   (compojure/GET documents-template request (handlers.root/documents-page
> request)) ;; will use /documents as a template
>   (route/not-found "Page not found"))
>
>
> Meaning that on Route One side you specify the way you generate url from
> parts, and clout takes same template and makes urls parseable.
>
> To sum it up: Clout only does route recognition (URL => route), while Route
> One does only URL generation (route => URL)
>
> Thanks!
>
>
> On Tue, Aug 13, 2013 at 7:12 PM, Baishampayan Ghose 
> wrote:
>>
>> Curious, how does it differ from Clout? ~BG
>>
>> On Tue, Aug 13, 2013 at 9:38 PM, Michael Klishin
>>  wrote:
>> > On behalf of the ClojureWerkz team, I'm happy to announce our not-so-new
>> > project that has recently reached 1.0.0-rc1 stage: Route One [1].
>> >
>> > Route One is a route generation library complimentary to Clout, part of
>> > Compojure.
>> > It takes a route definition and parameters and produces a URL/URI/path.
>> >
>> > It can be used in any application that may need to generate
>> > URLs/URIs/paths.
>> >
>> > 1.0.0-rc1 release notes:
>> >
>> > http://blog.clojurewerkz.org/blog/2013/08/12/route-one-1-dot-0-0-rc1-is-released/
>> >
>> > Documentation and examples:
>> > https://github.com/clojurewerkz/route-one#documentation--examples
>> >
>> > 1. http://github.com/clojurewerkz/route-one
>> > --
>> > MK
>> >
>> > http://github.com/michaelklishin
>> > http://twitter.com/michaelklishin
>> >
>> > --
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Clojure" group.
>> > To post to this group, send email to clojure@googlegroups.com
>> > Note that posts from new members are moderated - please be patient with
>> > your
>> > first post.
>> > To unsubscribe from this group, send email to
>> > clojure+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/clojure?hl=en
>> > ---
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Clojure" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to clojure+unsubscr...@googlegroups.com.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> >
>>
>>
>>
>> --
>> Baishampayan Ghose
>> b.ghose at gmail.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.
>>
>>
>
>
>
> --
> alex p
>
> --
> --
> 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.



-- 
Baishampayan Ghose
b.ghose at gmail.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/

Re: Help with Incanter and Emacs

2013-08-13 Thread Akhil Wali
Ah I see. :use is deprecated since 1.4. And your ns declaration works fine!
Kudos!
On Aug 14, 2013 12:40 AM, "Tim Visher"  wrote:

> LOL. I just realized I'd been missing that all along.
>
> It seems like the community is more and more leaning to something like
> this, just FYI.
>
> (ns default.core
>   (:require (incanter [core  :refer :all]
> [charts:refer :all]
> [stats  :refer :all]
> [datasets :refer :all])))
>
> `:use` has been discussed in the interest of deprecating it many times.
>
> I did not test the above declaration.
>
> On Tue, Aug 13, 2013 at 2:40 PM, Akhil Wali 
> wrote:
> > Well this is embarrassing.
> >
> > I was having a wrong use syntax >.<.
> > Changed the import line to this and it works.
> >
> > (ns default.core
> >   (:use [incanter core charts stats datasets]))
> >
> > Thanks for the help though!!
> >
> > On Tuesday, August 13, 2013 11:57:46 PM UTC+5:30, Akhil Wali wrote:
> >>
> >> Yes, by nrepl-jack-in.
> >>
> >> On Tuesday, August 13, 2013 11:54:24 PM UTC+5:30, Tim Visher wrote:
> >>>
> >>> And you're connecting to the project how?
> >>>
> >>> On Tue, Aug 13, 2013 at 2:11 PM, Akhil Wali 
> >>> wrote:
> >>> > Well
> >>> > Here's my project.clj.
> >>> >
> >>> > (defproject someproj "0.1.0-SNAPSHOT"
> >>> >   :dependencies [[org.clojure/clojure "1.5.1"]
> >>> >  [incanter "1.5.2"]])
> >>> >
> >>> > Here's my .lein/profiles.clj as well.
> >>> >
> >>> > {:user {:plugins [[lein-ritz "0.7.0"]
> >>> >   [compojure-app/lein-template "0.2.7"]]
> >>> > :dependencies [[ritz/ritz-nrepl-middleware "0.7.0"]]
> >>> > :repl-options {:nrepl-middleware
> >>> >[ritz.nrepl.middleware.javadoc/wrap-javadoc
> >>> >
> >>> > ritz.nrepl.middleware.simple-complete/wrap-simple-complete]}}}
> >>> >
> >>> >
> >>> >
> >>> > On Tuesday, August 13, 2013 11:35:58 PM UTC+5:30, Tim Visher wrote:
> >>> >>
> >>> >> On Tue, Aug 13, 2013 at 1:59 PM, Akhil Wali 
> >>> >> wrote:
> >>> >> > Hi All,
> >>> >> >
> >>> >> > A really noob question.
> >>> >> >
> >>> >> > Why do I get "FileNotFoundException Could not locate
> >>> >> > incanter__init.class or
> >>> >> > incanter.clj on classpath:   clojure.lang.RT.load (RT.java:443)"
> >>> >> > when i
> >>> >> > load
> >>> >> > a file that uses incanter in emacs?
> >>> >> > Here's the file...
> >>> >> >
> >>> >> > (ns default.core
> >>> >> >   (:require incanter core charts stats datasets))
> >>> >> >
> >>> >> > (defn plot []
> >>> >> >   (view (scatter-plot :Sepal.Length :Sepal.Width
> >>> >> >   :group-by :Species
> >>> >> >   :data (get-dataset :iris
> >>> >> >
> >>> >> > (plot)
> >>> >> >
> >>> >> > This works in lein repl just fine.
> >>> >> > I'm using Emacs 24 and nrepl.el 0.1.8.
> >>> >> >
> >>> >> > This issue was posted on Github way long back. Seems to be solved,
> >>> >> > but
> >>> >> > by
> >>> >> > simply upgrading emacs. Doesn't really work in my case.
> >>> >> > Any advise?
> >>> >>
> >>> >> Couple things.
> >>> >>
> >>> >> 1. I'm assuming you've declared the proper dependencies in your
> >>> >> `project.clj` file since this works from `lein repl`, however it's
> >>> >> worth checking.
> >>> >>
> >>> >> 2. How are you connecting to your project? Simply loading the
> >>> >> namespace won't work if you haven't properly jack in. There's a
> number
> >>> >> of options here but the simplest is probably to use `M-x
> >>> >> nrepl-jack-in` (usually bound to `C-c M-j`) from this file. It
> should
> >>> >> Just Work™.
> >>> >>
> >>> >> If that doesn't work, I'd probably post some more details about the
> >>> >> project somewhere. At least the `project.clj` and the whole ns would
> >>> >> be helpful in a gist of some sort.
> >>> >>
> >>> >> --
> >>> >>
> >>> >> In Christ,
> >>> >>
> >>> >> Timmy V.
> >>> >>
> >>> >> http://blog.twonegatives.com/
> >>> >> http://five.sentenc.es/ -- Spend less time on mail
> >>> >
> >>> > --
> >>> > --
> >>> > 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 pos

Re: core.logic - getting good at writing non-terminating programs

2013-08-13 Thread Norman Richards
On Mon, Aug 12, 2013 at 4:03 PM, Mark  wrote:

>
> At run level 6, I get all the permutations of [1 2 3], just as expected.
> However, at 7, the program does not terminate and I'd like to understand
> why.  I feel like I need to constrain the relation between o-h and o better
> but I'm not sure what else to say about it.
>

Looking at this, it's clear that this will never terminate.  Your recursion
is unbounded on the rembero.  When you get to rembero, your l and o-h are
both always fresh.  (rembero :anyting (lvar) (lvar)) will produce an
infinite set of results.

After you've generated all your 6 results, remberallo will of course fail
on everything rembero produces, but you've got nothing that stops rembero.

Now, consider putting the remberallo BEFORE the rembero:

(defne remberallo [s l o]
  ([() l l])
  ([[h . r] _ _]
 (fresh [o-h]
(remberallo r o-h o)
(rembero h l o-h

Now, imagine you are on a final remberallo call where h is some number and
r is the empty list.  The recursive remberallo will will only produce one
answer, unifying o-h and o.  Now o-h is no longer fresh and your rembero
will have enough information to terminate.

-- 
-- 
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: Do you like the Clojure syntax?

2013-08-13 Thread Russell Whitaker
Speaking of "the purpose of the poll," what is it? What purpose does an off-list
poll serve that an on-list answer doesn't? I'm curious: is this for a
school assignment
or for an employer or...?

R

On Tue, Aug 13, 2013 at 10:05 AM, Răzvan Rotaru  wrote:
[SNIP]
>
> Liking something is subjective by definition. That's the purpose of the
> poll. If you are using Clojure I just want to know your subjective feeling
> towards the syntax.
>

-- 
Russell Whitaker
http://twitter.com/OrthoNormalRuss
http://www.linkedin.com/pub/russell-whitaker/0/b86/329

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


Clojure community office hours - Friday Aug 16

2013-08-13 Thread Alex Miller
Hello all,

Recently I've been doing various Clojure community related things. In the
interest of opening another avenue for interaction, I've scheduled some
office hours for questions or conversations about Clojure or its
surrounding processes.

In scope:
- Newbie questions about Clojure
- Clojure Confluence (http://dev.clojure.org)
- Clojure JIRA tickets and patches (http://dev.clojure.org/jira)
- Clojure web site (http://clojure.org)
- Clojure conference (Clojure/conj, Clojure/West, or others)
- Clojure user groups
- Things that bug you about Clojure, or Relevance, or any of the things
above

You can of course also email me as well or ask here or (as appropriate) on
clojure-dev.

There are several 20 minute slots available - see: http://ohr.me/1d4m9Uj to
schedule. Will adjust in future based on how things go.

Alex Miller
Relevance, Inc.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [leiningen] [ANN] Leiningen 2.3.1 released

2013-08-13 Thread Phil Hagelberg

Phil Hagelberg writes:

> With some help from Nelson Morris I've pushed out the 2.3.1 release of
> Leiningen. This fixes the self-install issues as well as the issue
> around AOT classes not being included in jar files. It also adds a new
> flag (:monkeypatch-clojure-test false) you can use to disable
> Leiningen's monkeypatch of the `clojure.test` library.

It looks like there's still one issue[1] remaining. If your project relies
needs AOT but does not set `:aot` in project.clj, relying on the
implicit AOT from `:main` instead, you will have to add in an explicit
`:aot` entry. I strongly recommend being explicit about `:aot` anyway.

Even better, you can scope the AOT to only being active during the
uberjar task, which I also highly recommend:

:profiles {:uberjar {:aot :all}}

That way you won't have stray class files interfering with reloading
during development.

We'll probably cut a 2.3.2 release soon addressing this since it was an
unintentional breaking change--I meant to wait for 3.0 to fix the
implicit :aot problem.

-Phil

[1] https://github.com/technomancy/leiningen/issues/1289[1]


pgpvmzhwqkopA.pgp
Description: PGP signature


calling java static member using string?

2013-08-13 Thread Daniel Meneses Báez
Hi :)

I really want to know if there is a way to do this:

(ns ...
   (:import [java.util Calendar]))

(defsomething ;; if it is possible using a macro I'm ok with that
   calendar-member
   [member]
(symbol (str "Calendar/" member)))

what I want to know if an instance of Calendar "isMonday", "isFriday"
"isSunday" etc...

so I was thinking to write something like

(defn- isss [day instant]
(= (.get instant Calendar/DATE) (calendar-member day)))

and then use it like (def is-friday (partial isss 'FRIDAY)) ;;

am I being to crazy?

btw I'm really loving the language.



-- 
Daniel Meneses Báez

-- 
-- 
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: calling java static member using string?

2013-08-13 Thread Daniel Meneses Báez
ok I'm trying

CompilerException java.lang.NoSuchFieldException: s,
compiling:(NO_SOURCE_PATH:1:1)

user> (defmacro is [s instant]
`(= (.get ~instant Calendar/DAY_OF_WEEK)
(. Calendar ~s)))
#'user/is
user> (is 'TUESDAY (Calendar/getInstance))
CompilerException java.lang.RuntimeException: Unable to resolve symbol:
TUESDAY in this context, compiling:(NO_SOURCE_PATH:1:1)

user>
user>
user> (defmacro is [s instant]
`(= (.get ~instant Calendar/DAY_OF_WEEK)
(. Calendar ~s)))
#'user/is
user> (defmacro is [s instant]
`(= (.get ~instant Calendar/DAY_OF_WEEK)
(. Calendar (symbol ~s
#'user/is
user> (is "TUESDAY" (Calendar/getInstance))
CompilerException java.lang.IllegalArgumentException: No matching method:
symbol, compiling:(NO_SOURCE_PATH:1:1)

user>


isn't working :[



On Tue, Aug 13, 2013 at 6:14 PM, Daniel Meneses Báez wrote:

> Hi :)
>
> I really want to know if there is a way to do this:
>
> (ns ...
>(:import [java.util Calendar]))
>
> (defsomething ;; if it is possible using a macro I'm ok with that
>calendar-member
>[member]
> (symbol (str "Calendar/" member)))
>
> what I want to know if an instance of Calendar "isMonday", "isFriday"
> "isSunday" etc...
>
> so I was thinking to write something like
>
> (defn- isss [day instant]
> (= (.get instant Calendar/DATE) (calendar-member day)))
>
> and then use it like (def is-friday (partial isss 'FRIDAY)) ;;
>
> am I being to crazy?
>
> btw I'm really loving the language.
>
>
>
> --
> Daniel Meneses Báez
>



-- 
Daniel Meneses Báez

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ANN] Leiningen 2.3.1 released

2013-08-13 Thread Sean Corfield
Thank you!

I've upgraded our team to 2.3.1, as well as our QA system. So far, no problems.

Sean

On Tue, Aug 13, 2013 at 10:37 AM, Phil Hagelberg  wrote:
>
> Hello folks.
>
> With some help from Nelson Morris I've pushed out the 2.3.1 release of
> Leiningen. This fixes the self-install issues as well as the issue
> around AOT classes not being included in jar files. It also adds a new
> flag (:monkeypatch-clojure-test false) you can use to disable
> Leiningen's monkeypatch of the `clojure.test` library.
>
> As usual, if you installed manually you can upgrade with `lein
> upgrade`. If you need to back out for some reason, you can downgrade with
> `lein upgrade 2.2.0`.
>
> -Phil



-- 
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: calling java static member using string?

2013-08-13 Thread Sean Corfield
Perhaps clj-time might help you?

https://github.com/clj-time/clj-time

(ns time.core
  (:require [clj-time.core :as time]
[clj-time.local :as local]
[clj-time.predicates :as p]))

(p/monday? (time/now)) ;; false
(p/tuesday? (time/now)) ;; false
(p/wednesday? (time/now)) ;; true (for me in California since (time/now) is UTC)

(p/monday? (local/local-now)) ;; false
(p/tuesday? (local/local-now)) ;; true (for me)
(p/wednesday? (local/local-now)) ;; false (not yet in California)

Sean

On Tue, Aug 13, 2013 at 3:14 PM, Daniel Meneses Báez  wrote:
> Hi :)
>
> I really want to know if there is a way to do this:
>
> (ns ...
>(:import [java.util Calendar]))
>
> (defsomething ;; if it is possible using a macro I'm ok with that
>calendar-member
>[member]
> (symbol (str "Calendar/" member)))
>
> what I want to know if an instance of Calendar "isMonday", "isFriday"
> "isSunday" etc...
>
> so I was thinking to write something like
>
> (defn- isss [day instant]
> (= (.get instant Calendar/DATE) (calendar-member day)))
>
> and then use it like (def is-friday (partial isss 'FRIDAY)) ;;
>
> am I being to crazy?
>
> btw I'm really loving the language.
>
>
>
> --
> Daniel Meneses Báez
>
> --
> --
> 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.
>
>



-- 
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.async channel GUID

2013-08-13 Thread David Pollak
That's what I went with. Thanks!


On Wed, Aug 7, 2013 at 4:47 PM, Brandon Bloom wrote:

> You can emulate this relatively easily with a pair of
> serialize/deserialize functions which read/write to a global atom
> containing a map.
>
>
> On Wednesday, August 7, 2013 7:15:55 PM UTC-4, David Pollak wrote:
>>
>> Howdy,
>>
>> I'm working on bridging between core.async channels in the browser and on
>> the server. It would be very useful to have a GUID associated with the
>> channel so that when I serialize a message that contains a channel, I can
>> send the GUID instead and on the other side, create a proxy channel so that
>> the client or server and send a reply message to the channel and it will be
>> sent over the wire.
>>
>> Would it be possible to add a GUID to the channel?
>>
>> Thanks,
>>
>> David
>>
>> --
>> Telegram, Simply Beautiful CMS https://telegr.am
>> Lift, the simply functional web framework http://liftweb.net
>> Follow me: http://twitter.com/dpp
>> Blog: http://goodstuff.im
>>
>>   --
> --
> 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.
>
>
>



-- 
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im

-- 
-- 
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: (reduce conj ["A"]) verification from source code...

2013-08-13 Thread Matching Socks
reduce's docstring says, "If coll has only 1 item, it is returned and f is 
not called."

-- 
-- 
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.async channel GUID

2013-08-13 Thread David Pollak
And here's a blog post about it:
http://blog.goodstuff.im/clojure_http_channels


On Wed, Aug 7, 2013 at 4:47 PM, Brandon Bloom wrote:

> You can emulate this relatively easily with a pair of
> serialize/deserialize functions which read/write to a global atom
> containing a map.
>
>
> On Wednesday, August 7, 2013 7:15:55 PM UTC-4, David Pollak wrote:
>>
>> Howdy,
>>
>> I'm working on bridging between core.async channels in the browser and on
>> the server. It would be very useful to have a GUID associated with the
>> channel so that when I serialize a message that contains a channel, I can
>> send the GUID instead and on the other side, create a proxy channel so that
>> the client or server and send a reply message to the channel and it will be
>> sent over the wire.
>>
>> Would it be possible to add a GUID to the channel?
>>
>> Thanks,
>>
>> David
>>
>> --
>> Telegram, Simply Beautiful CMS https://telegr.am
>> Lift, the simply functional web framework http://liftweb.net
>> Follow me: http://twitter.com/dpp
>> Blog: http://goodstuff.im
>>
>>   --
> --
> 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.
>
>
>



-- 
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ANN Introducing Route One

2013-08-13 Thread Michael Klishin
2013/8/13 Baishampayan Ghose 

> Curious, how does it differ from Clout?


Clout is a route recognition library (URL/path => route). Route One is a
route
generation library (route => URL/path).


-- 
MK

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

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.