Re: Post on Clojure Intrinsics

2014-02-19 Thread Philip Potter
Nice post! Short, punchy, and I learned something new.

I wonder if kibit or eastwood might be able to identify potential
points in code which could benefit from hinting for intrinsics?

On 19 February 2014 06:45, Gal Dolber  wrote:
> Here is my first post on clojure, I hope it's helpful!
>
> http://galdolber.tumblr.com/post/77153377251/clojure-intrinsics
>
> --
> 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: Post on Clojure Intrinsics

2014-02-19 Thread Manuel Paccagnella
Nice post! 

Il giorno mercoledì 19 febbraio 2014 07:45:01 UTC+1, Gal Dolber ha scritto:
>
> Here is my first post on clojure, I hope it's helpful!
>
> http://galdolber.tumblr.com/post/77153377251/clojure-intrinsics
>  

-- 
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: Post on Clojure Intrinsics

2014-02-19 Thread Gal Dolber
Thanks!

@Phillip: that is definitely something worth exploring, finding "almost
intrinsic" calls shouldn't be hard to do


On Wed, Feb 19, 2014 at 6:41 AM, Manuel Paccagnella <
manuel.paccagne...@gmail.com> wrote:

> Nice post!
>
> Il giorno mercoledì 19 febbraio 2014 07:45:01 UTC+1, Gal Dolber ha scritto:
>
>> Here is my first post on clojure, I hope it's helpful!
>>
>> http://galdolber.tumblr.com/post/77153377251/clojure-intrinsics
>>
>

-- 
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: Om 0.5.0-rc1

2014-02-19 Thread Andrew Keedle
On Wednesday, 19 February 2014 03:51:15 UTC, David Nolen  wrote:
> In order to stay in sync with React 0.9.0-rc1 I've cut Om 0.5.0-rc1. There 
> are a couple of small breaking changes due to React but otherwise the 
> differences between 0.4.2 and 0.5.0-rc1 are minor. One big enhancement is 
> that you can now render to a string with om.dom/render-to-str.
> 
> 
> 
> Another big enhancement that I had absolutely nothing to do with is that 
> React is now almost 2X faster for the initial render under Chrome 32 & Safari 
> 7. This means under these browser Om is nearly 10X faster than a naive 
> Backbone.js at rendering 200 items in the TodoMVC application.
> 
> 
> 
> 
> http://github.com/swannodette/om
> 
> 
> 
> Feedback welcome!
> David

Brief initial testing seems to work for me. Many thanks David.

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


Is it possible to get Clojure files in Spotlight search?

2014-02-19 Thread Matt Mower
Hi.

I recently bought a nice OSX app called Tembo which makes spotlight 
searching a more pleasant experience. In particular it has a "Source Code" 
grouping which is handy but know nothing about Clojure files.

I spoke to the author of Tembo and quote his response here

>Tembo relies on the Universal Type Identifier hierarchy to map files to 
groups.
>It hard-codes only very few exception. In the case of "source code", there 
is currently no exception.
>
>It will probably not be possible to hard-code an exception for clj/cljs
>Tembo works only with UTIs. The application owning the clj file extension 
will need to provide the mapping from file extension to UTI
>When doing so, it can also specify which high level UTI this conforms to. 
I.e. it can declare it to be source code.
>
>Googling the file extension, I found this: 
http://softnoise.wordpress.com/tag/quicklook/
>
>It is a hack to have a QuickLook plug-in declare the UTI. This should be 
good enough and should get QuickLook working.
>You probably won't have Spotlight indexing the file contents though.

I had a look at the QLColourCode plugin but it doesn't build for me in 
Xcode4 and doesn't appear to be maintained. There's also a suggestion that 
it stopped working in the 10.6->10.7 transition.

Do any Clojure users on OSX have a working solution for this problem?

Kind regards,

Matt

p.s. I realise this is a Mac specific question but I figured I had a better 
shot of finding an answer among Clojure using Mac folk.

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


Re: [ClojureScript] ANN: Om 0.5.0-rc1

2014-02-19 Thread Eduard Bondarenko
Thank you,

works fine for me, I had to remove last argument to did-update. Other
changes I made related to 0.3.x -> 0.4.x migration.

Best regards,
Eduard


On Wed, Feb 19, 2014 at 5:51 AM, David Nolen  wrote:
> In order to stay in sync with React 0.9.0-rc1 I've cut Om 0.5.0-rc1. There
> are a couple of small breaking changes due to React but otherwise the
> differences between 0.4.2 and 0.5.0-rc1 are minor. One big enhancement is
> that you can now render to a string with om.dom/render-to-str.
>
> Another big enhancement that I had absolutely nothing to do with is that
> React is now almost 2X faster for the initial render under Chrome 32 &
> Safari 7. This means under these browser Om is nearly 10X faster than a
> naive Backbone.js at rendering 200 items in the TodoMVC application.
>
> http://github.com/swannodette/om
>
> Feedback welcome!
> David
>
> --
> Note that posts from new members are moderated - please be patient with your
> first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.

-- 
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: why Clojure/Lisp is so fast

2014-02-19 Thread Andy C
On Tue, Feb 18, 2014 at 11:38 PM, Devin Walters  wrote:

> You need to use the lein plugin for no.disassemble, not the dependency.
> The README explains how.
>

Thanks - now I can see disassembled code - quit neat. I misread "do not use
this way" as a "following" as opposed to "above" (being not a native
speaker does not help). I actually tried it as a plugin but something else
came into play so it did not work :$

Best,
Andy

-- 
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: why Clojure/Lisp is so fast

2014-02-19 Thread Andy C
> The OP almost certainly intended "CLISP" to mean "Common Lisp".
>

I recall it now - it was Allegro CL which somebody demoed to me almost ten
years ago. I wish I started learning Lisp yet cannot believe that Clojure I
am learning now (and Scala I am actively using) did not exist back then.

-- 
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 Development Work - Investment Bank in London

2014-02-19 Thread Jonny Kaye
Hi All,

I have a role within a leading Investment Bank based in London, looking for 
an experienced Closure developer. If you have a knowledge or commercial 
experience with Scala or Java then that would be desirable. If you have 
worked on a Grid computing platform, this will also put you at an advantage.

The role is at AVP level, so mid- senior, and you would be situated in the 
front office, so the ideal candidate will be a very good communicator. 

If you are eligible to work in the UK without requiring sponsorship, please 
call me on 02076085820 to discuss. 

If you happen to know of anybody who is a solid Clojure developer with any 
of the other skills listed above, My company offer generous referral fees. 

Please do get in touch if interested, and send your CV to 
jonathan.k...@cititec.com.

Thank you,

Jonathan Kaye

-- 
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: Looking for advice to fine tune a simple function

2014-02-19 Thread Mark Fisher
it's more idiomatic to use *when* rather than *if* for cases where you 
won't be considering the false path.

(when (<= x y) z)

cond is used more as a multi-if with a drop out at the end (usually using 
":else" which because it's a keyword is "truthy" when evaluated).


On Wednesday, 19 February 2014 02:25:05 UTC, Laurent Droin wrote:
>
> Now that I have a better understanding of what "some" does (i didn't 
> interpret the doc properly), it does totally make sense that it would be 
> recursive, so that's great.
>
> While reducing my code with Johanna's feedback, I noticed I kept using 
> "cond" and not "if".
>
> Is there any meaningful difference between
>
> (if (<= x y) z)
>
> and
>
> (cond (<= x y) z)
>
> ?
>
> I see that if is a special form and cone is macro. I haven't reached the 
> chapter about macros yet in  the book I'm reading (programming Clojure). 
> Not sure if it's relevant.
>

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


[ANN] clojure-contracts-sugar 0.1.0

2014-02-19 Thread Ian Rumford
Hello all,

Back in late 2012 I 
blogged
 about 
my initial experiences with Fogus's clojure.core.contracts

In that post I suggested that some usage aids ("sugar") would be useful.

I've finally pulled the sugar into a library and just published  A little 
sugar with your Clojure Aspect 
Contracts
 with 
the details.

All feedback gratefully received.

 

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


Hiring Clojure developers for our distributed team at Outpace Systems

2014-02-19 Thread Paul Stadig
Hey everyone,
A couple of months ago Alexey posted a notice about Outpace hiring, and I 
got caught in his net. :) We are looking to hire more people in the next 
few months.

If you are interested in working from home on a distributed team writing 
Clojure code, then feel free to contact me. If you aren't quite sure how 
the distributed team thing works, or are concerned about your Clojure skill 
level etc, then please still feel free to contact me. Not everyone at 
Outpace has a background in Clojure. We want to work with people that are 
smart and fun and have different skills than ourselves.

Whatever the case, I'm happy to talk for 5-10 minutes, and if that doesn't 
result in hiring, then at least I made a new friend, right? :) I can do 
Skype, Google Hangouts, e-mail, IRC, whatever works for you.


Paul Stadig

p...@stadig.name
paul.sta...@outpace.com
http://github.com/pjstadig/
http://twitter.com/pjstadig/
pjstadig on freenode
pjstadig on Skype

-- 
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: Hiring Clojure developers for our distributed team at Outpace Systems

2014-02-19 Thread Michael Klishin
2014-02-19 18:41 GMT+04:00 Paul Stadig :

> If you are interested in working from home on a distributed team writing
> Clojure code, then feel free to contact me. If you aren't quite sure how
> the distributed team thing works, or are concerned about your Clojure skill
> level etc, then please still feel free to contact me. Not everyone at
> Outpace has a background in Clojure.


Paul,

I believe last time candidates from non-US timezones were not considered.
Is it still the case? I'm pretty sure plenty of potential candidates on
this list care to know.
-- 
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.


Do you recommend the book: "Web Development with Clojure"

2014-02-19 Thread Erlis Vidal
Hi all,

Have any of you read the book *Web Development with Clojure*?

http://www.amazon.com/Web-Development-Clojure-Build-Bulletproof/dp/1937785645

There's only one review on amazon, and it's a fantastic review but I'm
wondering if this is the book I should read if I wanted to start using
Clojure for web programming.

Any advice will be greatly appreciated.

Thanks,
Erlis

-- 
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 recommend the book: "Web Development with Clojure"

2014-02-19 Thread Laurent Droin
For what it worth... I bought this book because I thought it would be a 
great way for me to learn Clojure. I am familiar with web frameworks such 
as Rails and Play, but didn't know much about Clojure.
Unfortunately, it proved too difficult for me to follow because Clojure is 
way different from imperative languages. This is not the book's fault.
So in order to really be able to read this book, I had to take a step back 
and focus on learning Clojure first, which is what I'm doing now. Once I 
have a better understanding, I will get back to the book.

So the bottom line (for me) is that
- I am not able to tell whether this book is good or not (although I'm 
pretty confident it is). I am actually impatient to be able to reopen it :-)
- Because I didn't know Clojure, I was not ready for this book. Of course, 
your mileage may vary. I think the author says that you don't need to be an 
expert at Clojure, but I think you still need to have played with and "get" 
functional programming, which makes total sense.

On a side note, the first few chapters of this book introduced me to Light 
Table, and after having had a rough start with it, I now very much like it.
Also, the author appears to be responsive on the book web page over at 
pragpub.

Laurent.

On Wednesday, February 19, 2014 7:54:25 AM UTC-8, Erlis Vidal wrote:
>
> Hi all, 
>
> Have any of you read the book *Web Development with Clojure*?
>
>
> http://www.amazon.com/Web-Development-Clojure-Build-Bulletproof/dp/1937785645
>
> There's only one review on amazon, and it's a fantastic review but I'm 
> wondering if this is the book I should read if I wanted to start using 
> Clojure for web programming. 
>
> Any advice will be greatly appreciated. 
>
> Thanks, 
> Erlis 
>
>

-- 
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 recommend the book: "Web Development with Clojure"

2014-02-19 Thread tao
It’s a great book, but require you to play with the code when you read the book.

--  
tao
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Thursday, February 20, 2014 at 12:14 AM, Laurent Droin wrote:

> For what it worth... I bought this book because I thought it would be a great 
> way for me to learn Clojure. I am familiar with web frameworks such as Rails 
> and Play, but didn't know much about Clojure.
> Unfortunately, it proved too difficult for me to follow because Clojure is 
> way different from imperative languages. This is not the book's fault.
> So in order to really be able to read this book, I had to take a step back 
> and focus on learning Clojure first, which is what I'm doing now. Once I have 
> a better understanding, I will get back to the book.
>  
> So the bottom line (for me) is that
> - I am not able to tell whether this book is good or not (although I'm pretty 
> confident it is). I am actually impatient to be able to reopen it :-)
> - Because I didn't know Clojure, I was not ready for this book. Of course, 
> your mileage may vary. I think the author says that you don't need to be an 
> expert at Clojure, but I think you still need to have played with and "get" 
> functional programming, which makes total sense.
>  
> On a side note, the first few chapters of this book introduced me to Light 
> Table, and after having had a rough start with it, I now very much like it.
> Also, the author appears to be responsive on the book web page over at 
> pragpub.
>  
> Laurent.
>  
> On Wednesday, February 19, 2014 7:54:25 AM UTC-8, Erlis Vidal wrote:
> > Hi all,  
> >  
> > Have any of you read the book Web Development with Clojure?
> >  
> > http://www.amazon.com/Web-Development-Clojure-Build-Bulletproof/dp/1937785645
> >  
> > There's only one review on amazon, and it's a fantastic review but I'm 
> > wondering if this is the book I should read if I wanted to start using 
> > Clojure for web programming.  
> >  
> > Any advice will be greatly appreciated.  
> >  
> > Thanks,  
> > Erlis  
> >  
> --  
> 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 
> (mailto: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 
> (mailto: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 
> (mailto: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 recommend the book: "Web Development with Clojure"

2014-02-19 Thread Manuel Paccagnella
My perspective: I'm reading that book and seems good so far but I'm not a 
complete newbie and I've already used Clojure for writing some (small) web 
applications. If you want a more beginner-friendly introduction before 
delving into web programming, I've found very good these books:

* [Clojure Programming](http://www.clojurebook.com/) by Cemerick, Grand and 
Carper. This generally considered the best introductory book on Clojure: 
it's fairly big but covers basics, functional programming and a bunch of 
practical considerations (testing, database access and, yes, web 
programming).
* [Programming Clojure, 2nd 
edition](http://pragprog.com/book/shcloj2/programming-clojure) by Stuart 
Halloway and Aaron Bedra. This is much shorter and I found it very good.

Alternatively, there are a lot of good and free resources for learning it. 
On the top of my mind:

* [Clojure For The Brave And True](http://www.braveclojure.com/)
* [Hitchhiker's Guide to Clojure](http://hitchhikersclojure.com/)
* [Clojure From The Ground 
Up](http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome)
* 
http://www.creativeapplications.net/tutorials/introduction-to-clojure-part-1/

Hope it helps,

Manuel

Il giorno mercoledì 19 febbraio 2014 16:54:25 UTC+1, Erlis Vidal ha scritto:
>
> Hi all, 
>
> Have any of you read the book *Web Development with Clojure*?
>
>
> http://www.amazon.com/Web-Development-Clojure-Build-Bulletproof/dp/1937785645
>
> There's only one review on amazon, and it's a fantastic review but I'm 
> wondering if this is the book I should read if I wanted to start using 
> Clojure for web programming. 
>
> Any advice will be greatly appreciated. 
>
> Thanks, 
> Erlis 
>
>

-- 
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 that "weaves" two collections together - looking for feedback

2014-02-19 Thread Steve Miner
On Feb 19, 2014, at 12:28 AM, Laurent Droin  wrote:

> Ah, thank you. "interleave" is what I was looking for. I looked for "weave", 
> "zip", "map", "concat", and all the "see also" but did not find "interleave".
> Interleave will of course not handle the last value in the categories 
> collection so my first instinct will be to call (into [] ) on the map 
> returned by interleave, and to add (using conj) the (last categories) to the 
> vector. Not sure whether there is a better way.

Here's an interleave-all function that's like interleave but uses all the 
elements of all the collections.  Be careful if any of your collections might 
be infinite.  In that case, you need to wrap something like `take` around the 
call.

(defn interleave-all
  "Returns a lazy seq of the first item in each collection, then the second, 
etc.  If one 
collection ends, continues to interleave the others.  Naturally, you should 
take care with
infinite sequences."
  ([] (lazy-seq nil))
  ([c] (lazy-seq c))

  ([c1 c2]
 (lazy-seq
  (cond (not (seq c1)) c2
(not (seq c2)) c1
:else (conj (interleave-all (rest c1) (rest c2)) (first c2) (first 
c1)

  ([c1 c2 & colls] 
 (lazy-seq 
  (let [ss (keep seq (conj colls c2 c1))]
(concat (map first ss) (apply interleave-all (map rest ss)))



-- 
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: Hiring Clojure developers for our distributed team at Outpace Systems

2014-02-19 Thread Josh Kamau
Yes... we care to know. I am in Nairobi, Kenya

Josh


On Wed, Feb 19, 2014 at 6:50 PM, Michael Klishin <
michael.s.klis...@gmail.com> wrote:

>
> 2014-02-19 18:41 GMT+04:00 Paul Stadig :
>
> If you are interested in working from home on a distributed team writing
>> Clojure code, then feel free to contact me. If you aren't quite sure how
>> the distributed team thing works, or are concerned about your Clojure skill
>> level etc, then please still feel free to contact me. Not everyone at
>> Outpace has a background in Clojure.
>
>
> Paul,
>
> I believe last time candidates from non-US timezones were not considered.
> Is it still the case? I'm pretty sure plenty of potential candidates on
> this list care to know.
> --
> 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.
>

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


core.async as a rate-limiter

2014-02-19 Thread Kris Jenkins
Hey folks,

Can someone sanity check this for me, please?

I want to write some code that processes messages on a core.async channel, 
at a rate of *at most* 1 message per second. I'm using this code:

(go
  (while true
(let [t (timeout 1000)]
  (log "Message is: " (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 as a rate-limiter

2014-02-19 Thread Timothy Baldridge
Yes, this pattern is pretty common. Create the timeout first, then do some
work, then take from the timeout to wait for the remaining time. Looks good
to me.

Timothy


On Wed, Feb 19, 2014 at 10:27 AM, Kris Jenkins wrote:

> Hey folks,
>
> Can someone sanity check this for me, please?
>
> I want to write some code that processes messages on a core.async channel,
> at a rate of *at most* 1 message per second. I'm using this code:
>
> (go
>   (while true
> (let [t (timeout 1000)]
>   (log "Message is: " (   (
> I'm expecting the timeout channel to start ticking down at the top. We
> process one message, and then iff that took less than 1s, the timeout
> channel will parse for the remaining milliseconds.
>
> It seems right to me, but I'd appreciate a second look, if someone can
> spare the time. :-)
>
> Cheers,
> Kris
>
> --
> 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.
>



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

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


'Reduced' and logic functions

2014-02-19 Thread Niels van Klaveren
Currently, *and* and *or *are implemented as macro's, and cannot be used in 
*apply 
*or as function parameters. Related functions like *every?* and *some* are 
implemented either on the basis of *or* or recursion over lazy sequences. 
These choices were made because they all need to be able to short-circuit, 
which could be hard in previous clojure versions.

>From 1.5 we have the *reduced* function though, which enables 
short-circuiting *reduce *functions. Since I couldn't find much examples of 
*reduced*, I started experimenting a bit to find out it's usages. One of 
the things I found was that it was pretty easy to create reduced based 
functions for the above, so they could be used with *apply *and as function 
parameters. I came up with the following:

(defn alt-or
  ([] nil)
  ([& args] (reduce (fn [_ s] (if s s (reduced s))) nil args)))

(defn alt-and
  ([] nil)
  ([& args] (reduce (fn [_ s] (if s (reduced s) s)) nil args)))

(defn alt-every?
  [pred coll]
  (reduce (fn [_ s] (let [t (boolean (pred s))] (if t t (reduced t true 
coll))

(defn alt-some
  [pred coll]
  (reduce (fn [_ s] (let [t (pred s)] (if t (reduced t) t))) nil coll))


Some quick further testing also showed they were pretty quick, with the 
alternate *every?* and *some *being twice as fast as current versions. Of 
course usually these are held back by the complexity of their predicates, 
but every bit counts. Testing the *or *and *and *functions on large 
collections proved a bit harder, since you can't *apply* the default ones, 
and evalling large lists prepended with *or *and *and* blew the permgen 
pretty quickly. *Anyone have an idea how to compare such scenario's?* With 
repeating a lot of small evaluations both were on par.

Another idea was that this way I could also make core.reducers based 
versions. Of course this would mean that sometimes you would evaluate too 
much tests, but since this would happen in parallel, in general the result 
would return faster. 
*Am I right in presuming that, or am I overlooking some very basic argument 
against them (I'm pretty good at that) ?*




-- 
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 as a rate-limiter

2014-02-19 Thread Kris Jenkins
Thanks very much. :-D

On Wednesday, 19 February 2014 17:43:16 UTC, tbc++ wrote:
>
> Yes, this pattern is pretty common. Create the timeout first, then do some 
> work, then take from the timeout to wait for the remaining time. Looks good 
> to me. 
>
> Timothy
>
>
> On Wed, Feb 19, 2014 at 10:27 AM, Kris Jenkins 
> 
> > wrote:
>
>> Hey folks,
>>
>> Can someone sanity check this for me, please?
>>
>> I want to write some code that processes messages on a core.async 
>> channel, at a rate of *at most* 1 message per second. I'm using this 
>> code:
>>
>> (go
>>   (while true
>> (let [t (timeout 1000)]
>>   (log "Message is: " (>   (>
>> I'm expecting the timeout channel to start ticking down at the top. We 
>> process one message, and then iff that took less than 1s, the timeout 
>> channel will parse for the remaining milliseconds.
>>
>> It seems right to me, but I'd appreciate a second look, if someone can 
>> spare the time. :-)
>>
>> 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.
>>
>
>
>
> -- 
> “One of the main causes of the fall of the Roman Empire was that–lacking 
> zero–they had no way to indicate successful termination of their C 
> programs.”
> (Robert Firth) 
>

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


Re: Is it possible to get Clojure files in Spotlight search?

2014-02-19 Thread Stephen Gilardi
I'm aware of one Mac application that declares to OS X that it handles Clojure 
source files: Light Table .

In its info.plist, Light Table declares ".clj" ".cljs" and ".edn" to map to 
"Document Type Name" "Clojure Source" and marks itself as the default Editor 
for them.

However, in contrast to its Document Type entry for Javascript Source file, it 
does not declare any "Document Content Type UTIs" values for them.

Wikipedia has a good article on the UTI system 
(https://en.wikipedia.org/wiki/Uniform_Type_Identifier). It's possible that 
Light Table could be changed to associate the file extensions above with the 
UTI "public.source-code". That might give the effect you're after.

--Steve

On Feb 19, 2014, at 4:10 AM, Matt Mower  wrote:

> Hi.
> 
> I recently bought a nice OSX app called Tembo which makes spotlight searching 
> a more pleasant experience. In particular it has a "Source Code" grouping 
> which is handy but know nothing about Clojure files.
> 
> I spoke to the author of Tembo and quote his response here
> 
> >Tembo relies on the Universal Type Identifier hierarchy to map files to 
> >groups.
> >It hard-codes only very few exception. In the case of "source code", there 
> >is currently no exception.
> >
> >It will probably not be possible to hard-code an exception for clj/cljs
> >Tembo works only with UTIs. The application owning the clj file extension 
> >will need to provide the mapping from file extension to UTI
> >When doing so, it can also specify which high level UTI this conforms to. 
> >I.e. it can declare it to be source code.
> >
> >Googling the file extension, I found this: 
> >http://softnoise.wordpress.com/tag/quicklook/
> >
> >It is a hack to have a QuickLook plug-in declare the UTI. This should be 
> >good enough and should get QuickLook working.
> >You probably won't have Spotlight indexing the file contents though.
> 
> I had a look at the QLColourCode plugin but it doesn't build for me in Xcode4 
> and doesn't appear to be maintained. There's also a suggestion that it 
> stopped working in the 10.6->10.7 transition.
> 
> Do any Clojure users on OSX have a working solution for this problem?
> 
> Kind regards,
> 
> Matt
> 
> p.s. I realise this is a Mac specific question but I figured I had a better 
> shot of finding an answer among Clojure using Mac folk.
> 
> 
> -- 
> 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: 'Reduced' and logic functions

2014-02-19 Thread Ben Wolfson
On Wed, Feb 19, 2014 at 10:02 AM, Niels van Klaveren <
niels.vanklave...@gmail.com> wrote:

> Currently, *and* and *or *are implemented as macro's, and cannot be used
> in *apply *or as function parameters. Related functions like *every?* and
> *some* are implemented either on the basis of *or* or recursion over lazy
> sequences. These choices were made because they all need to be able to
> short-circuit, which could be hard in previous clojure versions.
>
> From 1.5 we have the *reduced* function though, which enables
> short-circuiting *reduce *functions. Since I couldn't find much examples
> of *reduced*, I started experimenting a bit to find out it's usages. One
> of the things I found was that it was pretty easy to create reduced based
> functions for the above, so they could be used with *apply *and as
> function parameters. I came up with the following:
>
> (defn alt-or
>   ([] nil)
>   ([& args] (reduce (fn [_ s] (if s s (reduced s))) nil args)))
>
> (defn alt-and
>   ([] nil)
>   ([& args] (reduce (fn [_ s] (if s (reduced s) s)) nil args)))
>
> (defn alt-every?
>   [pred coll]
>   (reduce (fn [_ s] (let [t (boolean (pred s))] (if t t (reduced t true 
> coll))
>
> (defn alt-some
>   [pred coll]
>   (reduce (fn [_ s] (let [t (pred s)] (if t (reduced t) t))) nil coll))
>
>
>
The definitions of alt-or and alt-and are swapped:

(alt-or false true) and (alt-or true false) both return false, (but (and)
is true, and both (alt-and) and (alt-or) are false).

(alt-and true false) and (alt-and false true) both return true.


>
> Another idea was that this way I could also make core.reducers based
> versions. Of course this would mean that sometimes you would evaluate too
> much tests, but since this would happen in parallel, in general the result
> would return faster. *Am I right in presuming that, or am I overlooking
> some very basic argument against them (I'm pretty good at that) ?*
>

The result wouldn't return faster if the input is an infinite list.

-- 
Ben Wolfson
"Human kind has used its intelligence to vary the flavour of drinks, which
may be sweet, aromatic, fermented or spirit-based. ... Family and social
life also offer numerous other occasions to consume drinks for pleasure."
[Larousse, "Drink" entry]

-- 
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: Hiring Clojure developers for our distributed team at Outpace Systems

2014-02-19 Thread Paul Stadig
On Wednesday, February 19, 2014 10:50:54 AM UTC-5, Michael Klishin wrote:
>
>
> Paul,
>
> I believe last time candidates from non-US timezones were not considered.
> Is it still the case? I'm pretty sure plenty of potential candidates on 
> this list care to know.
>

We like to be able to pair (this is especially helpful on a distributed 
team for preventing isolation as much as anything else). So the short 
answer is if someone is willing to work US hours (pick a timezone), then it 
could work. We may be interested in hiring in other timezones at some 
point, but that's the story for now.


Paul

-- 
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: Hiring Clojure developers for our distributed team at Outpace Systems

2014-02-19 Thread ethan
Hi Paul-

I am very interested. Right now I work in IT mainly for financial firms.
For the last two + years I have been in professional services setting up
monitoring for trading systems and infrastructure.  This involves light
programming and scripting. I have been learning Clojure on my own. You can
see some of my Clojure work on github (github.com/ECAllen). I also have
private repositories with more Clojure work.

If you are interested my skype name is ethan_allen_

Thanks
Ethan
On Feb 19, 2014 9:41 AM, "Paul Stadig"  wrote:

> Hey everyone,
> A couple of months ago Alexey posted a notice about Outpace hiring, and I
> got caught in his net. :) We are looking to hire more people in the next
> few months.
>
> If you are interested in working from home on a distributed team writing
> Clojure code, then feel free to contact me. If you aren't quite sure how
> the distributed team thing works, or are concerned about your Clojure skill
> level etc, then please still feel free to contact me. Not everyone at
> Outpace has a background in Clojure. We want to work with people that are
> smart and fun and have different skills than ourselves.
>
> Whatever the case, I'm happy to talk for 5-10 minutes, and if that doesn't
> result in hiring, then at least I made a new friend, right? :) I can do
> Skype, Google Hangouts, e-mail, IRC, whatever works for you.
>
>
> Paul Stadig
>
> p...@stadig.name
> paul.sta...@outpace.com
> http://github.com/pjstadig/
> http://twitter.com/pjstadig/
> pjstadig on freenode
> pjstadig on Skype
>
>  --
> 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.


Namespace Problems org-mode/org-babel

2014-02-19 Thread Volker Strobel
Hi,

I'm trying to use org-mode with clojure. However, my problem is, that all 
functions are evaluated in the 'user' namespace. Basically, I have 
something like this:

#+BEGIN_SRC clojure
 (ns environment.my-test
  (:gen-class)
  (:require [clojure.java.io :refer :all]))
#+END_SRC

#+RESULTS:
: nil

#+BEGIN_SRC clojure
(defn my-reader
  "Read clojure structure"
  [filename]
  (with-open [r (java.io.PushbackReader. (reader filename))]
  (binding [*read-eval* true]
(read r
#+END_SRC

NO RESULT HERE AS 'reader' is undefined!
Workaround: use clojure.java.io/reader

#+BEGIN_SRC clojure
(defn add [x y] (+ x y))
#+END_SRC

#+RESULTS:
: #'user/add

--> namespace 'user' instead of environment.

How can I modify my org-file, so that the correct namespace is used? I've 
tried the :session keyword and the tips on this page:
http://nakkaya.com/2013/04/06/using-clojure-with-org-babel-and-nrepl/
but neither of them worked.
Can I use the :session keyword in order to use different namespaces in my 
.org file?

Thank!

Regards, Volker





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


Defining test cases at runtime

2014-02-19 Thread John Wiseman
I think I'd like to be able to define test cases at run-time.

For example, I have some data files that define the tests I want to run
(tuples of [program input, class name, program output]).  I've looked at
clojure.test and midje but they only seem to have macro interfaces to their
testing engines, not functional interfaces, so I can do something like this:

(deftest functional-tests
  (testing "Test cases"
(doseq [[input class expected-output] (read-test-cases)]
  (is (= (with-out-str
   (with-in-str input
 (run-main class)))
 expected-output)

But ideally I would do something like this:

(deftest functional-tests
  (doseq [[input class expected-output] (read-test-cases)]
(testing* (str class)
  #(is (= (with-out-str
(with-in-str input
  (run-main class)))
  expected-output)

Or the equivalent using midje instead of clojure.test

I realize the difference between the two seems small, but conceptually the
latter does more closely match what I'm doing and generates slightly more
useful output (failure names, test counts), and is only not possible
because the designers of the testing libraries didn't consider this
use-case (unless I've missed something).

Any tips?

(And wouldn't it be neat if functional versions of macros could be
automatically or almost automatically generated, so either you didn't have
to rely on library authors to consider the functional use-case, or they
were encouraged by the design of the macro system to consider it?)


Thanks,
John

-- 
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 recommend the book: "Web Development with Clojure"

2014-02-19 Thread Erlis Vidal
Thanks for the suggestions. Ton of good information in a couple of emails.


On Wed, Feb 19, 2014 at 11:35 AM, Manuel Paccagnella <
manuel.paccagne...@gmail.com> wrote:

> My perspective: I'm reading that book and seems good so far but I'm not a
> complete newbie and I've already used Clojure for writing some (small) web
> applications. If you want a more beginner-friendly introduction before
> delving into web programming, I've found very good these books:
>
> * [Clojure Programming](http://www.clojurebook.com/) by Cemerick, Grand
> and Carper. This generally considered the best introductory book on
> Clojure: it's fairly big but covers basics, functional programming and a
> bunch of practical considerations (testing, database access and, yes, web
> programming).
> * [Programming Clojure, 2nd edition](
> http://pragprog.com/book/shcloj2/programming-clojure) by Stuart Halloway
> and Aaron Bedra. This is much shorter and I found it very good.
>
> Alternatively, there are a lot of good and free resources for learning it.
> On the top of my mind:
>
> * [Clojure For The Brave And True](http://www.braveclojure.com/)
> * [Hitchhiker's Guide to Clojure](http://hitchhikersclojure.com/)
> * [Clojure From The Ground Up](
> http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome)
> *
> http://www.creativeapplications.net/tutorials/introduction-to-clojure-part-1/
>
> Hope it helps,
>
> Manuel
>
> Il giorno mercoledì 19 febbraio 2014 16:54:25 UTC+1, Erlis Vidal ha
> scritto:
>
>> Hi all,
>>
>> Have any of you read the book *Web Development with Clojure*?
>>
>> http://www.amazon.com/Web-Development-Clojure-Build-
>> Bulletproof/dp/1937785645
>>
>> There's only one review on amazon, and it's a fantastic review but I'm
>> wondering if this is the book I should read if I wanted to start using
>> Clojure for web programming.
>>
>> Any advice will be greatly appreciated.
>>
>> Thanks,
>> Erlis
>>
>>  --
> 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: Is it possible to get Clojure files in Spotlight search?

2014-02-19 Thread John Wiseman
I've written a Spotlight plugin that indexes Common Lisp code and lets you
search by function, variable, class, etc.:
https://web.archive.org/web/20101125184356/http://lemonodor.com/archives/001232.html

The source code for the plugin is in the .dmg file linked from that blog
post, and it might be a starting point for indexing clojure code.




On Wed, Feb 19, 2014 at 10:16 AM, Stephen Gilardi  wrote:

> I’m aware of one Mac application that declares to OS X that it handles
> Clojure source files: Light Table .
>
> In its info.plist, Light Table declares “.clj” “.cljs” and “.edn” to map
> to "Document Type Name" “Clojure Source” and marks itself as the default
> Editor for them.
>
> However, in contrast to its Document Type entry for Javascript Source
> file, it does not declare any "Document Content Type UTIs” values for them.
>
> Wikipedia has a good article on the UTI system (
> https://en.wikipedia.org/wiki/Uniform_Type_Identifier). It’s possible
> that Light Table could be changed to associate the file extensions above
> with the UTI "public.source-code”. That might give the effect you’re after.
>
> —Steve
>
>
> On Feb 19, 2014, at 4:10 AM, Matt Mower  wrote:
>
> Hi.
>
> I recently bought a nice OSX app called Tembo which makes spotlight
> searching a more pleasant experience. In particular it has a "Source Code"
> grouping which is handy but know nothing about Clojure files.
>
> I spoke to the author of Tembo and quote his response here
>
> >Tembo relies on the Universal Type Identifier hierarchy to map files to
> groups.
> >It hard-codes only very few exception. In the case of "source code",
> there is currently no exception.
> >
> >It will probably not be possible to hard-code an exception for clj/cljs
> >Tembo works only with UTIs. The application owning the clj file extension
> will need to provide the mapping from file extension to UTI
> >When doing so, it can also specify which high level UTI this conforms to.
> I.e. it can declare it to be source code.
> >
> >Googling the file extension, I found this: http://softnoise.wordpress.
> com/tag/quicklook/
> >
> >It is a hack to have a QuickLook plug-in declare the UTI. This should be
> good enough and should get QuickLook working.
> >You probably won't have Spotlight indexing the file contents though.
>
> I had a look at the QLColourCode plugin but it doesn't build for me in
> Xcode4 and doesn't appear to be maintained. There's also a suggestion that
> it stopped working in the 10.6->10.7 transition.
>
> Do any Clojure users on OSX have a working solution for this problem?
>
> Kind regards,
>
> Matt
>
> p.s. I realise this is a Mac specific question but I figured I had a
> better shot of finding an answer among Clojure using Mac folk.
>
>
> --
> 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.
>

-- 
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] webnf -- a clojure web non-framework [v0.0.various]

2014-02-19 Thread Herwig Hochleitner
I finally managed to OpenSource the various pieces of code that I carry
around from project to project.

I have split it into several leiningen projects, you can find them at
https://github.com/webnf/webnf
The main premise of this thing is that it's a'la carte and that webnf is a
good name for an umbrella akin to ring, but with much extended focus.

Apart from all the useful bits and pieces that are in there, the highlights:

- a straight ClojureScript port of enlive (the selector and tranformation
engine)
- a vhosting webserver for servlet and fcgi, based on jetty
- an AsyncServlet, that allows access to the async capabilities of Servlet
3.0
- curated dependecies of meaningful sets of popular libraries

An important part that's still missing, is the classloader handling code to
load multiple webapps in their own clojure runtime. I wrote that, but that
is still pretty gnarly. Coming soon.

The different projects have enjoyed various amounts of finish, but the
grander vision is a curated set of dependencies, focussing only on the gaps
left by other libraries. The plan is to deprecate functionality, that
becomes available in dependencies. I want webnf to be a lean tool from the
devops trenches.

Happy to respond to question, comments and suggestions.

kind regards

-- 
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] Gorilla REPL initial release (0.1.2)

2014-02-19 Thread Jony Hudson
Hi All,

 I'm pleased to announce the first release of Gorilla REPL, a rich REPL in 
the notebook style:

https://github.com/JonyEpsilon/gorilla-repl

>From the README:

"You can think of it like a pretty REPL that can plot graphs, or you can 
think of it as an editor for rich documents that can contain interactive 
Clojure code, graphs, table, notes, LaTeX formulae. Whatever works for you! 
One of the main aims is to make it lightweight enough that you can use it 
day-to-day instead of the command-line REPL, but also offer the power to 
perform and document complex data analysis and modelling tasks. Above all 
else, Gorilla tries not to dictate your workflow, but rather to fit in to 
the way you like to work, hopefully putting a bit more power to your elbow."

You might like to take a look at a video introduction that shows what it 
does better than my poor prose describes it:

https://vimeo.com/87118206

I hope you like it and find it useful. In particular I really hope it fits 
in to your workflow, and if not it would be great to know why. Bear in mind 
it is very new and hasn't had a lot of testing, so caveat evaluator. In 
particular:

* I've done very limited testing other than on Safari on Mac. I've checked 
that it works in most of the major browsers on Windows and Mac, but that's 
about it!

* At the moment you can only open one window otherwise it breaks 
(silently!). I'd love some help on the bug that's blocking this from 
someone who understands nREPL better than me. 
https://github.com/JonyEpsilon/gorilla-repl/issues/10

* It relies on an internet connection at the moment, at least until it 
caches various fonts. Need to get in touch with someone at clojars about 
size limitations.


I think there's a lot still to be done, and there are some areas that would 
really benefit from feedback from clojure developers more experienced than 
me. Directions I'd love to see explored:

* More work on plotting. Still very green, and much could be improved.

* Incanter integration. If I've understood correctly, Incanter can generate 
SVG, so shouldn't be too difficult.

* Content-types. Currently values are tagged to indicate they should be 
rendered specially by the front-end. Is this the right way to do it? What 
about tagged literals?

* UI as a value. There's a lot that could be done with custom rendering of 
values. Mathematica is particularly impressive in this regard, and it would 
be interesting to think where this could go with clojure. I know Kovas 
Boguta has thought about this a lot.

* Clojurescript! I think this is a _really_ interesting one. I'd love to 
see a pure-client-version that uses a clojurescript REPL server in a 
web-worker or similar. I came to write Gorilla through thinking about this 
angle originally, having previously messed around with javascript based 
data analysis in the browser (see http://monkeycruncher.org - cute idea, 
but no-one wants to use js to analyse their data!). In my opinion there's 
some really important work to be done on opening up analysis - I'd love to 
publish scientific papers not with a snapshot of my analysis, but with my 
real, living, breathing analysis in them. And I love to do it on an open, 
ubiquitous platform :-)

Anyway, let me know what you think. Comments, issues and pull requests all 
very, very welcome ;-)


Jony

-- 
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: Defining test cases at runtime

2014-02-19 Thread Stuart Sierra
On Wednesday, February 19, 2014 2:14:52 PM UTC-5, John Wiseman wrote:
> I think I'd like to be able to define test cases at run-time.
>
> For example, I have some data files that define the tests
> I want to run (tuples of [program input, class name,
> program output]). I've looked at clojure.test and midje
> but they only seem to have macro interfaces to their
> testing engines, not functional interfaces,


clojure.test really doesn't do much. deftests are just
functions, so they can run any arbitrary code you want.

The implementation of `clojure.test/testing` is just

`(binding [*testing-contexts* (conj *testing-contexts* ~string)]
   ~@body))

You can trivially rebind *testing-contexts* in your code.

The `is` macro is just a fancy version of `assert` that
calls `do-report` with the result.

 (if result#
   (do-report {:type :pass, :message ~msg, :expected '~form, :actual 
...})
   (do-report {:type :fail, :message ~msg, :expected '~form, :actual 
...}))

So you can generate your own test expressions at runtime.

-S

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


Job - clojure development at commodities hedge fund

2014-02-19 Thread Patrik Sundberg
Hi,

We're a commodities hedge fund with most of our infrastructure being 
developed in-house using a clojure stack. Think clojure, datomic, immutant, 
pallet, looking at some UI ideas using LightTable and/or Om. If that sounds 
like your kind of thing and you want to join a small hard working team get 
in touch. We'd obviously love some finance and/or commodities background 
but that's not a hard requirement - we're happy to teach you that side of 
the business if you got the dev skills sorted. Physically we're located in 
Zug, Switzerland so the Zurich area and full-time employment is the ideal 
solution, but we're open to other arrangements for the right person (e.g. I 
am personally in London).

Get in touch by sending an email to: patrik.sundb...@tuloscapital.com and 
hoss.hauks...@tuloscapital.com

Thanks,
Patrik

-- 
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 recommend the book: "Web Development with Clojure"

2014-02-19 Thread dcwhatthe

I've accepted that no book will help me, to learn a new language.  There 
are always show-stoppers (unexpected errors) with the tools that a book 
recommends, including Lighttable or the Intellij La Clojure plugin or just 
about all the others, except for Clooj (so far).  If I (using myself as the 
example, because perhaps not everyone has these same experiences), count on 
everything in a book working exactly the way the author says, then a lot of 
time is wasted, sometimes weeks or months, just getting a tool to work.

So, I use multiple books at one time.  Start with the first chapter or few 
pages from book #1, then do the same with book #2, and the next book. 
 Also, run through several 'getting started' tutorials.  If one avenue 
doesn't work, just jump right to another book or tutorial, and go back to 
the offending book later.  Seems confusing at first, but eventually things 
just become clearer naturally; and the fingers start learning, while the 
brain does the same.

Short answer - using Web Development with Clojure, along with the Early 
release versions of Clojure Cookbook, Clojure in Action MEAP, and other 
materials.

Good luck, Erlis.  We do seem to be getting on board, at a great time. 
 Clojure seems to be picking up steam.



On Wednesday, February 19, 2014 10:54:25 AM UTC-5, Erlis Vidal wrote:
>
> Hi all, 
>
> Have any of you read the book *Web Development with Clojure*?
>
>
> http://www.amazon.com/Web-Development-Clojure-Build-Bulletproof/dp/1937785645
>
> There's only one review on amazon, and it's a fantastic review but I'm 
> wondering if this is the book I should read if I wanted to start using 
> Clojure for web programming. 
>
> Any advice will be greatly appreciated. 
>
> Thanks, 
> Erlis 
>
>

-- 
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] Gorilla REPL initial release (0.1.2)

2014-02-19 Thread Patrik Sundberg
This is awesome. In my head I've been planing something similar to this for 
a while now. In my head it's the ideal kind of UI for a power-user not 
scared of writing small scripts to get their work done while not losing 
visual output and feedback. More recently I was thinking of it as a 
LightTable plugin. LT to get a free decent editor to build on (giving up 
par-edit etc is a drag so rather not if I don't have to), and some of the 
nrepl etc piping "for free". When I get to this project I'll definitely 
check out gorilla more closely.


On Wednesday, February 19, 2014 9:23:02 PM UTC, Jony Hudson wrote:
>
> Hi All,
>
>  I'm pleased to announce the first release of Gorilla REPL, a rich REPL in 
> the notebook style:
>
> https://github.com/JonyEpsilon/gorilla-repl
>
> From the README:
>
> "You can think of it like a pretty REPL that can plot graphs, or you can 
> think of it as an editor for rich documents that can contain interactive 
> Clojure code, graphs, table, notes, LaTeX formulae. Whatever works for you! 
> One of the main aims is to make it lightweight enough that you can use it 
> day-to-day instead of the command-line REPL, but also offer the power to 
> perform and document complex data analysis and modelling tasks. Above all 
> else, Gorilla tries not to dictate your workflow, but rather to fit in to 
> the way you like to work, hopefully putting a bit more power to your elbow."
>
> You might like to take a look at a video introduction that shows what it 
> does better than my poor prose describes it:
>
> https://vimeo.com/87118206
>
> I hope you like it and find it useful. In particular I really hope it fits 
> in to your workflow, and if not it would be great to know why. Bear in mind 
> it is very new and hasn't had a lot of testing, so caveat evaluator. In 
> particular:
>
> * I've done very limited testing other than on Safari on Mac. I've checked 
> that it works in most of the major browsers on Windows and Mac, but that's 
> about it!
>
> * At the moment you can only open one window otherwise it breaks 
> (silently!). I'd love some help on the bug that's blocking this from 
> someone who understands nREPL better than me. 
> https://github.com/JonyEpsilon/gorilla-repl/issues/10
>
> * It relies on an internet connection at the moment, at least until it 
> caches various fonts. Need to get in touch with someone at clojars about 
> size limitations.
>
>
> I think there's a lot still to be done, and there are some areas that 
> would really benefit from feedback from clojure developers more experienced 
> than me. Directions I'd love to see explored:
>
> * More work on plotting. Still very green, and much could be improved.
>
> * Incanter integration. If I've understood correctly, Incanter can 
> generate SVG, so shouldn't be too difficult.
>
> * Content-types. Currently values are tagged to indicate they should be 
> rendered specially by the front-end. Is this the right way to do it? What 
> about tagged literals?
>
> * UI as a value. There's a lot that could be done with custom rendering of 
> values. Mathematica is particularly impressive in this regard, and it would 
> be interesting to think where this could go with clojure. I know Kovas 
> Boguta has thought about this a lot.
>
> * Clojurescript! I think this is a _really_ interesting one. I'd love to 
> see a pure-client-version that uses a clojurescript REPL server in a 
> web-worker or similar. I came to write Gorilla through thinking about this 
> angle originally, having previously messed around with javascript based 
> data analysis in the browser (see http://monkeycruncher.org - cute idea, 
> but no-one wants to use js to analyse their data!). In my opinion there's 
> some really important work to be done on opening up analysis - I'd love to 
> publish scientific papers not with a snapshot of my analysis, but with my 
> real, living, breathing analysis in them. And I love to do it on an open, 
> ubiquitous platform :-)
>
> Anyway, let me know what you think. Comments, issues and pull requests all 
> very, very welcome ;-)
>
>
> Jony
>

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


Re: Is it possible to get Clojure files in Spotlight search?

2014-02-19 Thread John Wiseman
For easier access, I put the source code of my indexer at
https://github.com/wiseman/lisp-spotlight-indexer

I'd happily accept pull requests updating it and adding Clojure indexing,
or maybe someone will just find the code to be a useful starting point for
something new.



On Wed, Feb 19, 2014 at 11:25 AM, John Wiseman  wrote:

> I've written a Spotlight plugin that indexes Common Lisp code and lets you
> search by function, variable, class, etc.:
> https://web.archive.org/web/20101125184356/http://lemonodor.com/archives/001232.html
>
> The source code for the plugin is in the .dmg file linked from that blog
> post, and it might be a starting point for indexing clojure code.
>
>
>
>
> On Wed, Feb 19, 2014 at 10:16 AM, Stephen Gilardi wrote:
>
>> I’m aware of one Mac application that declares to OS X that it handles
>> Clojure source files: Light Table .
>>
>> In its info.plist, Light Table declares “.clj” “.cljs” and “.edn” to map
>> to "Document Type Name" “Clojure Source” and marks itself as the default
>> Editor for them.
>>
>> However, in contrast to its Document Type entry for Javascript Source
>> file, it does not declare any "Document Content Type UTIs” values for them.
>>
>> Wikipedia has a good article on the UTI system (
>> https://en.wikipedia.org/wiki/Uniform_Type_Identifier). It’s possible
>> that Light Table could be changed to associate the file extensions above
>> with the UTI "public.source-code”. That might give the effect you’re after.
>>
>> —Steve
>>
>>
>> On Feb 19, 2014, at 4:10 AM, Matt Mower  wrote:
>>
>> Hi.
>>
>> I recently bought a nice OSX app called Tembo which makes spotlight
>> searching a more pleasant experience. In particular it has a "Source Code"
>> grouping which is handy but know nothing about Clojure files.
>>
>> I spoke to the author of Tembo and quote his response here
>>
>> >Tembo relies on the Universal Type Identifier hierarchy to map files to
>> groups.
>> >It hard-codes only very few exception. In the case of "source code",
>> there is currently no exception.
>> >
>> >It will probably not be possible to hard-code an exception for clj/cljs
>> >Tembo works only with UTIs. The application owning the clj file
>> extension will need to provide the mapping from file extension to UTI
>> >When doing so, it can also specify which high level UTI this conforms
>> to. I.e. it can declare it to be source code.
>> >
>> >Googling the file extension, I found this: http://softnoise.wordpress.
>> com/tag/quicklook/
>> >
>> >It is a hack to have a QuickLook plug-in declare the UTI. This should be
>> good enough and should get QuickLook working.
>> >You probably won't have Spotlight indexing the file contents though.
>>
>> I had a look at the QLColourCode plugin but it doesn't build for me in
>> Xcode4 and doesn't appear to be maintained. There's also a suggestion that
>> it stopped working in the 10.6->10.7 transition.
>>
>> Do any Clojure users on OSX have a working solution for this problem?
>>
>> Kind regards,
>>
>> Matt
>>
>> p.s. I realise this is a Mac specific question but I figured I had a
>> better shot of finding an answer among Clojure using Mac folk.
>>
>>
>> --
>> 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.
>>
>
>

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

Re: Namespace Problems org-mode/org-babel

2014-02-19 Thread Volker Strobel

>
> I should mention, that I use cider and followd the instructions on this 
> page for the 
> setup: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.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: [ANN] Gorilla REPL initial release (0.1.2)

2014-02-19 Thread Devin Walters
I've spent a bit of time with Julia lately and I found the Julia notebook via 
ipython to be really nice.

I really appreciate all the work you've put into this and am looking forward to 
trying it out!

Great announcement, btw. It's nice to have clear action items to go along with 
the announcement. You made a screencast too! Rally!

Cheers,
'(Devin Walters)

> On Feb 19, 2014, at 15:23, Jony Hudson  wrote:
> 
> Hi All,
> 
>  I'm pleased to announce the first release of Gorilla REPL, a rich REPL in 
> the notebook style:
> 
> https://github.com/JonyEpsilon/gorilla-repl
> 
> From the README:
> 
> "You can think of it like a pretty REPL that can plot graphs, or you can 
> think of it as an editor for rich documents that can contain interactive 
> Clojure code, graphs, table, notes, LaTeX formulae. Whatever works for you! 
> One of the main aims is to make it lightweight enough that you can use it 
> day-to-day instead of the command-line REPL, but also offer the power to 
> perform and document complex data analysis and modelling tasks. Above all 
> else, Gorilla tries not to dictate your workflow, but rather to fit in to the 
> way you like to work, hopefully putting a bit more power to your elbow."
> 
> You might like to take a look at a video introduction that shows what it does 
> better than my poor prose describes it:
> 
> https://vimeo.com/87118206
> 
> I hope you like it and find it useful. In particular I really hope it fits in 
> to your workflow, and if not it would be great to know why. Bear in mind it 
> is very new and hasn't had a lot of testing, so caveat evaluator. In 
> particular:
> 
> * I've done very limited testing other than on Safari on Mac. I've checked 
> that it works in most of the major browsers on Windows and Mac, but that's 
> about it!
> 
> * At the moment you can only open one window otherwise it breaks (silently!). 
> I'd love some help on the bug that's blocking this from someone who 
> understands nREPL better than me. 
> https://github.com/JonyEpsilon/gorilla-repl/issues/10
> 
> * It relies on an internet connection at the moment, at least until it caches 
> various fonts. Need to get in touch with someone at clojars about size 
> limitations.
> 
> 
> I think there's a lot still to be done, and there are some areas that would 
> really benefit from feedback from clojure developers more experienced than 
> me. Directions I'd love to see explored:
> 
> * More work on plotting. Still very green, and much could be improved.
> 
> * Incanter integration. If I've understood correctly, Incanter can generate 
> SVG, so shouldn't be too difficult.
> 
> * Content-types. Currently values are tagged to indicate they should be 
> rendered specially by the front-end. Is this the right way to do it? What 
> about tagged literals?
> 
> * UI as a value. There's a lot that could be done with custom rendering of 
> values. Mathematica is particularly impressive in this regard, and it would 
> be interesting to think where this could go with clojure. I know Kovas Boguta 
> has thought about this a lot.
> 
> * Clojurescript! I think this is a _really_ interesting one. I'd love to see 
> a pure-client-version that uses a clojurescript REPL server in a web-worker 
> or similar. I came to write Gorilla through thinking about this angle 
> originally, having previously messed around with javascript based data 
> analysis in the browser (see http://monkeycruncher.org - cute idea, but 
> no-one wants to use js to analyse their data!). In my opinion there's some 
> really important work to be done on opening up analysis - I'd love to publish 
> scientific papers not with a snapshot of my analysis, but with my real, 
> living, breathing analysis in them. And I love to do it on an open, 
> ubiquitous platform :-)
> 
> Anyway, let me know what you think. Comments, issues and pull requests all 
> very, very welcome ;-)
> 
> 
> Jony
> -- 
> 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 gr

Closing open files when with-open was not used, possibly useful gist.

2014-02-19 Thread Dave Tenny
I'm posting this on the off chance it's useful to those of you writing REPL 
shell tools or I/O abstractions (e.g. java's NIO.2 DirectoryStream 
wrappers) that might benefit from a close-when-GC'd backstop.

For example, clj-nio2 has a nice little lazy directory sequence function:

(defn- lazy-dir-stream-seq [^DirectoryStream dir-stream]
  (let [it (.iterator dir-stream)
iter (fn thisfn []
   (if (.hasNext it)
 (cons (.next it)
   (lazy-seq (thisfn)))
 (.close dir-stream)))]
(lazy-seq (iter


However that will result in the stream being closed only if we reach the 
end of the directory stream.  
So I wrote the code in the referenced gist to address that problem, though 
I haven't hooked it up into my own or one of the existing NIO wrappers yet.

So FWIW.  And suggestions welcome.
I hate the bit of reflection I used but was having difficulty doing it any 
other way with PhantomReference instances.

https://gist.github.com/dtenny/9104215

Basically any open Closeable reference can be called in an (ensure-close 
) fashion to make sure it gets closed eventually,
as my exhaustive (NOT!) test case at the end shows (file content gets 
flushed).

It's very side effect-y, I feel so dirty...  Bad java followed by worse 
clojure.   Tips welcome.  It was just a clojure learning thing for me.

-- 
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: Defining test cases at runtime

2014-02-19 Thread Brian Marick

On Feb 19, 2014, at 1:14 PM, John Wiseman  wrote:
> Or the equivalent using midje instead of clojure.test
> I realize the difference between the two seems small, but conceptually the 
> latter does more closely match what I'm doing and generates slightly more 
> useful output (failure names, test counts), and is only not possible because 
> the designers of the testing libraries didn't consider this use-case (unless 
> I've missed something).

Interestingly enough, early versions of Midje compiled down to a functional 
interface. It turned out no one used it, and the intermediate step got to be 
annoying, so I removed it. There's still a lowest level interface that talks in 
terms of maps. You could use that, but you'd be the second client (after Midje 
itself), with all the gotchas that implies.


Latest book: /Functional Programming for the Object-Oriented Programmer/
https://leanpub.com/fp-oo

-- 
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] Gorilla REPL initial release (0.1.2)

2014-02-19 Thread Jeff Rose
Hey, this looks really great, and if it could be made easily extensible I 
think it could gain a lot of traction.  From a quick glance I have a couple 
thoughts:

* Clojurescript!!!  Why do all this work in Javascript?  This is a project 
made for clojurescript, core.async, and maybe Om.
  - To make this transition feasible the existing javascript could be used 
like a library from a clojurescript shell that can then grow.

* Being able to render values of different types is important, and I think 
it deserves a lot of attention in both the design and documentation.  There 
are some values that will need server side rendering, others client side, 
and some both. If you can define a set of protocols for each side of this 
channel then people would ideally be able to quickly add support for 
whatever data is relevant to their project with a couple extensions.
  - This could be extended for values inside comments, like your latex 
support, by have a special comment reader that people could define reader 
macros for.  

*  Also there will be some types of interaction with values that will 
require setting up server side state in order to work correctly.  For 
example, it would be great to be able to define a synthesizer in Overtone 
and then get a button in the browser that you can click to trigger its 
execution on the server, pause, play, stop, and tweak parameters.  Or for 
longer running processes, like training a neural network, it would be great 
to be able to setup communication between the model training on the server 
and a live chart in the browser.  (e.g. You could 'fork' off named channels 
from the primary communication channel between client and server to 
transmit data between handlers on each side.)

* When saving to a file it would be great to have a mode that only saved 
the code and the markdown in clean comments, without all the cruft.

Very cool, and I look forward to experimenting and helping out.

Thanks!

-Jeff

On Thursday, February 20, 2014 5:23:02 AM UTC+8, Jony Hudson wrote:
>
> Hi All,
>
>  I'm pleased to announce the first release of Gorilla REPL, a rich REPL in 
> the notebook style:
>
> https://github.com/JonyEpsilon/gorilla-repl
>
> From the README:
>
> "You can think of it like a pretty REPL that can plot graphs, or you can 
> think of it as an editor for rich documents that can contain interactive 
> Clojure code, graphs, table, notes, LaTeX formulae. Whatever works for you! 
> One of the main aims is to make it lightweight enough that you can use it 
> day-to-day instead of the command-line REPL, but also offer the power to 
> perform and document complex data analysis and modelling tasks. Above all 
> else, Gorilla tries not to dictate your workflow, but rather to fit in to 
> the way you like to work, hopefully putting a bit more power to your elbow."
>
> You might like to take a look at a video introduction that shows what it 
> does better than my poor prose describes it:
>
> https://vimeo.com/87118206
>
> I hope you like it and find it useful. In particular I really hope it fits 
> in to your workflow, and if not it would be great to know why. Bear in mind 
> it is very new and hasn't had a lot of testing, so caveat evaluator. In 
> particular:
>
> * I've done very limited testing other than on Safari on Mac. I've checked 
> that it works in most of the major browsers on Windows and Mac, but that's 
> about it!
>
> * At the moment you can only open one window otherwise it breaks 
> (silently!). I'd love some help on the bug that's blocking this from 
> someone who understands nREPL better than me. 
> https://github.com/JonyEpsilon/gorilla-repl/issues/10
>
> * It relies on an internet connection at the moment, at least until it 
> caches various fonts. Need to get in touch with someone at clojars about 
> size limitations.
>
>
> I think there's a lot still to be done, and there are some areas that 
> would really benefit from feedback from clojure developers more experienced 
> than me. Directions I'd love to see explored:
>
> * More work on plotting. Still very green, and much could be improved.
>
> * Incanter integration. If I've understood correctly, Incanter can 
> generate SVG, so shouldn't be too difficult.
>
> * Content-types. Currently values are tagged to indicate they should be 
> rendered specially by the front-end. Is this the right way to do it? What 
> about tagged literals?
>
> * UI as a value. There's a lot that could be done with custom rendering of 
> values. Mathematica is particularly impressive in this regard, and it would 
> be interesting to think where this could go with clojure. I know Kovas 
> Boguta has thought about this a lot.
>
> * Clojurescript! I think this is a _really_ interesting one. I'd love to 
> see a pure-client-version that uses a clojurescript REPL server in a 
> web-worker or similar. I came to write Gorilla through thinking about this 
> angle originally, having previously messed around with javascript based 
> data analysis in

Re: pretty-exception middleware for ring

2014-02-19 Thread Joel Holdbrooks
This is another fantastic idea. I'd definitely love to expand on this 
technique.

Great work!

On Thursday, February 13, 2014 8:39:58 AM UTC-8, bob wrote:
>
> Hey,
>
> a simple exception middle-ware for ring, maybe useful for some,maybe none. 
> it catch exceptions and print, meanwhile the source code produced the 
> exception will be print as well.
>
> - The demo will stay here (click me)
>  . 
> - The source code is 
> here
>  .
>

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


cdoc, lein, profiles.clj, strange behavior

2014-02-19 Thread Dave Tenny
I'm trying to figure out some strange behavior ensuring that 'cdoc' is 
always available in my user namespace.

I have in my ~/.lein/profiles.clj this block:

{:user {:dependencies [[jdt "0.1.0-SNAPSHOT"] ;jdt.*
   [org.clojure/tools.trace "0.7.6"]
   [org.thnetos/cd-client "0.3.6"] ;cd-client.core
   [org.clojure/tools.logging "0.2.6"]
   ;;[spyscope "0.1.4"]
   ]
:injections [(use '[jdt core cl shell java])
 (use 'clojure.tools.trace)
 (use '[clojure.tools.logging :exclude [trace]])
 (require 'clojure.inspector)
 (require 'cd-client.core) ; cdoc, sometimes already 
'use'd
 (if-not (defined? 'cdoc)
   (use 'cd-client.core))
 ;;(require 'spyscope.core)
 (println "~/.lein/profiles.clj")
 (println "  using jdt.*, 
clojure.tools.{trace,logging}, cd-client.core")
 ]}}

If I run 'cider' from emacs, I get no problems.

If I do 'lein repl' however I get this:

$ lein repl
~/.lein/profiles.clj
  using jdt.*, clojure.tools.{trace,logging}, cd-client.core
nREPL server started on port 56072 on host 127.0.0.1
REPL-y 0.3.0
Clojure 1.5.1
IllegalStateException cdoc already refers to: #'cd-client.core/cdoc in 
namespace: user  clojure.lang.Namespace.warnOrFailOnReplace 
(Namespace.java:88)
#
Error loading namespace; falling back to user
nil
user=> 

for Leiningen 2.3.4 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit Server VM

It appears that something is executed *after* the injections that is trying 
to add cdoc to the user namespace.  

This thing has been on-again off again depending on where I'm running 
clojure.  If I unconditionally attempt to use cdoc, it fails in some 
situations.  If I conditionally use it, it fails in some situations.

Ideas?

-- 
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 recommend the book: "Web Development with Clojure"

2014-02-19 Thread Mark Engelberg
It's certainly not comprehensive, but it's a nice little overview of ring
and luminus development.

-- 
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 recommend the book: "Web Development with Clojure"

2014-02-19 Thread Earl Jenkins
Like others have said it's not a beginners book, you definitely need to 
have learned clojure through another resource or maybe at the same time if 
your brain will allow.
I will say it's worth the buy, currently there aren't many web development 
books for clojure which cover topics for someone new to web development, 
and this one has a low enough entry fee to help the newcomer. My only 
complaint is in some of the examples the flow of what's being covered gets 
lost and I couldn't tell if it was because of my reading or me being new to 
web development, so I plan to go through the examples again to get a better 
grasp on the flow of the book. Overall it's worth the buy.

Most tasks needed to create as standard MVC app are in the book.

some topics but not all
Account Registration
Login-Logout
Uploading Data
Displaying Data
Deleting Data
Account Deletion


On Wednesday, February 19, 2014 7:54:25 AM UTC-8, Erlis Vidal wrote:
>
> Hi all, 
>
> Have any of you read the book *Web Development with Clojure*?
>
>
> http://www.amazon.com/Web-Development-Clojure-Build-Bulletproof/dp/1937785645
>
> There's only one review on amazon, and it's a fantastic review but I'm 
> wondering if this is the book I should read if I wanted to start using 
> Clojure for web programming. 
>
> Any advice will be greatly appreciated. 
>
> Thanks, 
> Erlis 
>
>

-- 
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: om-sync

2014-02-19 Thread Dave Della Costa
> It's not clear to me that the server side should be tied to Om
> specifically. It seems like the requirement is more to have a server
> component that can pass messages / state changes in a generic way to
> clients (probably using core.async channels, with the ability to use
> websockets etc. as the underlying transport). This server component
> would be useful for all kinds of clients (not just Om, not just
> Clojurescript, maybe even other server systems).
>
> I've hacked some stuff together that does this kind of thing for
> specific projects, but it would be nice to get a solid standard
> library in the ecosystem for this.

We have a concrete need for a system like this and in fact already have
a prototype in production (which uses browserchannel as opposed to
websockets, but these should be interchangeable) with ampq messaging and
http wrapped in core.async and Om on the front-end, but we are working
through some issues relating to scaling while providing eventual
consistency across a number of web front-ends.  The end goal is
essentially materialized views in the client.

We would also be very interested in working with other folks to provide
something with general applicability to the whole community.  Please let
us know if you'd want to contribute!

DD

(2014/02/16 10:43), Mikera wrote:
> 
> 
> On Sunday, 16 February 2014 09:26:18 UTC+8, Conrad wrote:
> 
> On Thursday, February 13, 2014 8:55:00 PM UTC-6, David Nolen wrote:
> > I've been banging the drum about Om & modularity for a while now
> and I've come up with the very beginning of a simple reusable
> component that I think demonstrates the power of Om's emphasis on
> modularity and application wide state management:
> >
> >
> >
> > http://github.com/swannodette/om-sync
> 
> >
> >
> >
> > The whole point of Om is to create a universe of shareable
> components. I hope this gets people thinking about the possibilities.
> >
> >
> >
> > Feedback welcome!
> >
> >
> > David
> 
> I agree that creating an ecosystem of components is where the future
> is... I'm surprised that there isn't a "ReactjsUI" library yet.
> 
> Stop me if this is obvious, but it seems like the natural conclusion
> of Om is to have an Om-server library as well to build html
> server-side, and then have an Om-bridge component or something that
> automagically bridges between client and server. Then, when a
> client-side component updates any state that originates in the
> server part, the existing Om interfaces probably are already
> comprehensive enough that the Om-bridge component could just
> transparently use AJAX to push those updates into the state of the
> Om components residing on the server.
> 
> 
> It's not clear to me that the server side should be tied to Om
> specifically. It seems like the requirement is more to have a server
> component that can pass messages / state changes in a generic way to
> clients (probably using core.async channels, with the ability to use
> websockets etc. as the underlying transport). This server component
> would be useful for all kinds of clients (not just Om, not just
> Clojurescript, maybe even other server systems).
> 
> I've hacked some stuff together that does this kind of thing for
> specific projects, but it would be nice to get a solid standard library
> in the ecosystem for this.
> 
>  
> 
> -- 
> 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: ANN: om-sync

2014-02-19 Thread Mikera


On Thursday, 20 February 2014 13:56:29 UTC+8, David Della Costa wrote:
>
> > It's not clear to me that the server side should be tied to Om 
> > specifically. It seems like the requirement is more to have a server 
> > component that can pass messages / state changes in a generic way to 
> > clients (probably using core.async channels, with the ability to use 
> > websockets etc. as the underlying transport). This server component 
> > would be useful for all kinds of clients (not just Om, not just 
> > Clojurescript, maybe even other server systems). 
> > 
> > I've hacked some stuff together that does this kind of thing for 
> > specific projects, but it would be nice to get a solid standard 
> > library in the ecosystem for this. 
>
> We have a concrete need for a system like this and in fact already have 
> a prototype in production (which uses browserchannel as opposed to 
> websockets, but these should be interchangeable) with ampq messaging and 
> http wrapped in core.async and Om on the front-end, but we are working 
> through some issues relating to scaling while providing eventual 
> consistency across a number of web front-ends.  The end goal is 
> essentially materialized views in the client. 
>
> We would also be very interested in working with other folks to provide 
> something with general applicability to the whole community.  Please let 
> us know if you'd want to contribute! 
>

I'd be happy to contribute to a library that met the following requirements:
- A sensible open source license (LGPL or EPL are fine) 
- As simple as possible (minimal dependencies and API surface area)
- Designed for plug+play with the related libraries in the ecosystem 
(core.async, http-kit, ring etc.)
- Reasonable community consensus that it is a good design

BTW chord looks pretty promising as a foundation / model for some of this 
kind of work
https://github.com/james-henderson/chord

-- 
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] Gorilla REPL initial release (0.1.2)

2014-02-19 Thread Mikera
This looks great - congrats!

I think it would be very useful to integrate core.matrix array types. This 
gives a number of advantages:
- Multi-dimensional array data for plotting / analysis
- Lots of array programming operations handy for data manipulation and 
analysis
- Incanter integration comes for free (to some extent), since the Clatrix 
matrices are themselves a core.matrix implementation

I filed a GitHub issue here. 
https://github.com/JonyEpsilon/gorilla-repl/issues/47

Happy to help out with any core.matrix specifics!

On Thursday, 20 February 2014 05:23:02 UTC+8, Jony Hudson wrote:
>
> Hi All,
>
>  I'm pleased to announce the first release of Gorilla REPL, a rich REPL in 
> the notebook style:
>
> https://github.com/JonyEpsilon/gorilla-repl
>
> From the README:
>
> "You can think of it like a pretty REPL that can plot graphs, or you can 
> think of it as an editor for rich documents that can contain interactive 
> Clojure code, graphs, table, notes, LaTeX formulae. Whatever works for you! 
> One of the main aims is to make it lightweight enough that you can use it 
> day-to-day instead of the command-line REPL, but also offer the power to 
> perform and document complex data analysis and modelling tasks. Above all 
> else, Gorilla tries not to dictate your workflow, but rather to fit in to 
> the way you like to work, hopefully putting a bit more power to your elbow."
>
> You might like to take a look at a video introduction that shows what it 
> does better than my poor prose describes it:
>
> https://vimeo.com/87118206
>
> I hope you like it and find it useful. In particular I really hope it fits 
> in to your workflow, and if not it would be great to know why. Bear in mind 
> it is very new and hasn't had a lot of testing, so caveat evaluator. In 
> particular:
>
> * I've done very limited testing other than on Safari on Mac. I've checked 
> that it works in most of the major browsers on Windows and Mac, but that's 
> about it!
>
> * At the moment you can only open one window otherwise it breaks 
> (silently!). I'd love some help on the bug that's blocking this from 
> someone who understands nREPL better than me. 
> https://github.com/JonyEpsilon/gorilla-repl/issues/10
>
> * It relies on an internet connection at the moment, at least until it 
> caches various fonts. Need to get in touch with someone at clojars about 
> size limitations.
>
>
> I think there's a lot still to be done, and there are some areas that 
> would really benefit from feedback from clojure developers more experienced 
> than me. Directions I'd love to see explored:
>
> * More work on plotting. Still very green, and much could be improved.
>
> * Incanter integration. If I've understood correctly, Incanter can 
> generate SVG, so shouldn't be too difficult.
>
> * Content-types. Currently values are tagged to indicate they should be 
> rendered specially by the front-end. Is this the right way to do it? What 
> about tagged literals?
>
> * UI as a value. There's a lot that could be done with custom rendering of 
> values. Mathematica is particularly impressive in this regard, and it would 
> be interesting to think where this could go with clojure. I know Kovas 
> Boguta has thought about this a lot.
>
> * Clojurescript! I think this is a _really_ interesting one. I'd love to 
> see a pure-client-version that uses a clojurescript REPL server in a 
> web-worker or similar. I came to write Gorilla through thinking about this 
> angle originally, having previously messed around with javascript based 
> data analysis in the browser (see http://monkeycruncher.org - cute idea, 
> but no-one wants to use js to analyse their data!). In my opinion there's 
> some really important work to be done on opening up analysis - I'd love to 
> publish scientific papers not with a snapshot of my analysis, but with my 
> real, living, breathing analysis in them. And I love to do it on an open, 
> ubiquitous platform :-)
>
> Anyway, let me know what you think. Comments, issues and pull requests all 
> very, very welcome ;-)
>
>
> Jony
>

-- 
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] Gorilla REPL initial release (0.1.2)

2014-02-19 Thread Alan Thompson
Hey - tried to play the video with Chrome/Fedora, and no go!  Got any other
formats available?
Alan


On Wed, Feb 19, 2014 at 1:23 PM, Jony Hudson  wrote:

> Hi All,
>
>  I'm pleased to announce the first release of Gorilla REPL, a rich REPL in
> the notebook style:
>
> https://github.com/JonyEpsilon/gorilla-repl
>
> From the README:
>
> "You can think of it like a pretty REPL that can plot graphs, or you can
> think of it as an editor for rich documents that can contain interactive
> Clojure code, graphs, table, notes, LaTeX formulae. Whatever works for you!
> One of the main aims is to make it lightweight enough that you can use it
> day-to-day instead of the command-line REPL, but also offer the power to
> perform and document complex data analysis and modelling tasks. Above all
> else, Gorilla tries not to dictate your workflow, but rather to fit in to
> the way you like to work, hopefully putting a bit more power to your elbow."
>
> You might like to take a look at a video introduction that shows what it
> does better than my poor prose describes it:
>
> https://vimeo.com/87118206
>
> I hope you like it and find it useful. In particular I really hope it fits
> in to your workflow, and if not it would be great to know why. Bear in mind
> it is very new and hasn't had a lot of testing, so caveat evaluator. In
> particular:
>
> * I've done very limited testing other than on Safari on Mac. I've checked
> that it works in most of the major browsers on Windows and Mac, but that's
> about it!
>
> * At the moment you can only open one window otherwise it breaks
> (silently!). I'd love some help on the bug that's blocking this from
> someone who understands nREPL better than me.
> https://github.com/JonyEpsilon/gorilla-repl/issues/10
>
> * It relies on an internet connection at the moment, at least until it
> caches various fonts. Need to get in touch with someone at clojars about
> size limitations.
>
>
> I think there's a lot still to be done, and there are some areas that
> would really benefit from feedback from clojure developers more experienced
> than me. Directions I'd love to see explored:
>
> * More work on plotting. Still very green, and much could be improved.
>
> * Incanter integration. If I've understood correctly, Incanter can
> generate SVG, so shouldn't be too difficult.
>
> * Content-types. Currently values are tagged to indicate they should be
> rendered specially by the front-end. Is this the right way to do it? What
> about tagged literals?
>
> * UI as a value. There's a lot that could be done with custom rendering of
> values. Mathematica is particularly impressive in this regard, and it would
> be interesting to think where this could go with clojure. I know Kovas
> Boguta has thought about this a lot.
>
> * Clojurescript! I think this is a _really_ interesting one. I'd love to
> see a pure-client-version that uses a clojurescript REPL server in a
> web-worker or similar. I came to write Gorilla through thinking about this
> angle originally, having previously messed around with javascript based
> data analysis in the browser (see http://monkeycruncher.org - cute idea,
> but no-one wants to use js to analyse their data!). In my opinion there's
> some really important work to be done on opening up analysis - I'd love to
> publish scientific papers not with a snapshot of my analysis, but with my
> real, living, breathing analysis in them. And I love to do it on an open,
> ubiquitous platform :-)
>
> Anyway, let me know what you think. Comments, issues and pull requests all
> very, very welcome ;-)
>
>
> Jony
>
> --
> 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.

Re: [ANN] Gorilla REPL initial release (0.1.2)

2014-02-19 Thread Fabian Page
Very nice project!

I can save but not load a worksheet on my machine. (OS X, Chrome) If somebody 
else has the same problem i can open an issue on github.

Fabian

Am 19.02.2014 um 22:23 schrieb Jony Hudson :

> Hi All,
> 
>  I'm pleased to announce the first release of Gorilla REPL, a rich REPL in 
> the notebook style:
> 
> https://github.com/JonyEpsilon/gorilla-repl
> 
> From the README:
> 
> "You can think of it like a pretty REPL that can plot graphs, or you can 
> think of it as an editor for rich documents that can contain interactive 
> Clojure code, graphs, table, notes, LaTeX formulae. Whatever works for you! 
> One of the main aims is to make it lightweight enough that you can use it 
> day-to-day instead of the command-line REPL, but also offer the power to 
> perform and document complex data analysis and modelling tasks. Above all 
> else, Gorilla tries not to dictate your workflow, but rather to fit in to the 
> way you like to work, hopefully putting a bit more power to your elbow."
> 
> You might like to take a look at a video introduction that shows what it does 
> better than my poor prose describes it:
> 
> https://vimeo.com/87118206
> 
> I hope you like it and find it useful. In particular I really hope it fits in 
> to your workflow, and if not it would be great to know why. Bear in mind it 
> is very new and hasn't had a lot of testing, so caveat evaluator. In 
> particular:
> 
> * I've done very limited testing other than on Safari on Mac. I've checked 
> that it works in most of the major browsers on Windows and Mac, but that's 
> about it!
> 
> * At the moment you can only open one window otherwise it breaks (silently!). 
> I'd love some help on the bug that's blocking this from someone who 
> understands nREPL better than me. 
> https://github.com/JonyEpsilon/gorilla-repl/issues/10
> 
> * It relies on an internet connection at the moment, at least until it caches 
> various fonts. Need to get in touch with someone at clojars about size 
> limitations.
> 
> 
> I think there's a lot still to be done, and there are some areas that would 
> really benefit from feedback from clojure developers more experienced than 
> me. Directions I'd love to see explored:
> 
> * More work on plotting. Still very green, and much could be improved.
> 
> * Incanter integration. If I've understood correctly, Incanter can generate 
> SVG, so shouldn't be too difficult.
> 
> * Content-types. Currently values are tagged to indicate they should be 
> rendered specially by the front-end. Is this the right way to do it? What 
> about tagged literals?
> 
> * UI as a value. There's a lot that could be done with custom rendering of 
> values. Mathematica is particularly impressive in this regard, and it would 
> be interesting to think where this could go with clojure. I know Kovas Boguta 
> has thought about this a lot.
> 
> * Clojurescript! I think this is a _really_ interesting one. I'd love to see 
> a pure-client-version that uses a clojurescript REPL server in a web-worker 
> or similar. I came to write Gorilla through thinking about this angle 
> originally, having previously messed around with javascript based data 
> analysis in the browser (see http://monkeycruncher.org - cute idea, but 
> no-one wants to use js to analyse their data!). In my opinion there's some 
> really important work to be done on opening up analysis - I'd love to publish 
> scientific papers not with a snapshot of my analysis, but with my real, 
> living, breathing analysis in them. And I love to do it on an open, 
> ubiquitous platform :-)
> 
> Anyway, let me know what you think. Comments, issues and pull requests all 
> very, very welcome ;-)
> 
> 
> Jony
> 
> -- 
> 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 em