ANN Elastisch 2.0.0-beta4 is released

2014-04-18 Thread Michael Klishin
Elastisch [1] is a small, feature complete Clojure client for ElasticSearch.

Release notes:
http://blog.clojurewerkz.org/blog/2014/04/11/elastisch-2-dot-0-0-beta4-is-released/

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

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

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


ANN Meltdown 1.0.0-beta10 is released

2014-04-18 Thread Michael Klishin
Meltdown [1] is a Clojure interface to Reactor, an asynchronous programming
toolkit for the JVM.

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

1. http://github.com/clojurewerkz/meltdown
-- 
MK

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

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


Re: Emacs - error with `nrepl-jack-in'

2014-04-18 Thread Thorsten Jolitz
Erlis Vidal  writes:

> Also clojure for the brave and true will guide you through the
> configuration process really straight forward. 
>
> http://www.braveclojure.com/using-emacs-with-clojure/

Hi Greg and Erlis,

just learned about the cool CIDER, thanks for your tips!

> On Fri, Apr 18, 2014 at 9:37 AM, greg r 
> wrote:
>
> You should consider going to CIDER:
> 
> https://github.com/clojure-emacs/cider
> 
> The command is 'cider-jack-in'.
> 
> Here's a page with a lot of install info:
> 
> http://clojure-doc.org/articles/tutorials/emacs.html
> 
> There are many web pages out there with obsolete information on
> Clojure and emacs.
> The above page is one of the most up-to-date.
> 
> Regards,
> Greg
> 
> 
> 
> On Thursday, April 17, 2014 9:45:13 PM UTC-4, Thorsten Jolitz
> wrote:
>
> 
> Hi List, 
> 
> just installed lein2 and can start 'lein2 repl' successfully
> on the 
> command-line. 'lein repl' works too, since I defined an alias
> in my 
> .bashrc. 
> 
> After installing packages clojure-mode and nrepl in Emacs, I
> get this 
> error when trying `nrepl-jack-in': 
> 
> ,--
> --- 
> | error in process sentinel: Could not start nREPL server:
> /bin/bash: Line 
> | 1: lein: Command not found. 
> `--
> --- 
> 
> I'm on Archlinx with 
> 
> #+begin_src emacs-lisp 
> (emacs-version) 
> #+end_src 
> 
> #+results: 
> : GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version
> 3.10.7) 
> : of 2014-01-28 on var-lib-archbuild-extra-x86_64-juergen 
> 
> I googled some related sites and it seems it might be an Emacs
> (exec-) path 
> problem, but a reboot did not help. 
> 
> -- 
> cheers, 
> Thorsten 
> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient
> with your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
cheers,
Thorsten

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


Re: Code snippets to attract new users

2014-04-18 Thread Thorsten Jolitz
kurofune  writes:

> Pico-Lisp looks pretty cool, and that massive book of yours is nuts.
> It seems like there is an example for everything in there! About the
> poor reception in spite of Rosetta-Code success, I can only say that
> predicting human behavior on the assumption that their decisions are
> rational, is unlikely to ever succeed. We are socially minded, always
> looking for what's popular :) 

PicoLisp is really cool (except when it comes to jobs, projects, money
and stuff like that). Clojure is cool too and hopefully more promising
for that kind of stuff ... ;-)

Those software hypes and desillusions are a fascinating topic by itself,
its kind of hard to explain why some languages that appear like a
chaotic free jazz improvisation with only temporal value have a huge
success while others that appear like a perfectly structured bach fugues
written for eternity are simply ignored by the masses. 

-- 
cheers,
Thorsten

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


Re: regex

2014-04-18 Thread Thumbnail
Of course! Thank you. 

On Friday, 18 April 2014 15:33:39 UTC+1, A. Webb wrote:
>
>
>
> On Friday, April 18, 2014 8:28:03 AM UTC-5, Thumbnail wrote:
>>
>>
>> ... I decided that the terminal state would always be at index 0 ... 
>>>
>>
>> Shouldn't a DFA allow for *any* *set* of states to be terminal? For 
>> instance, the minimal DFA for (ab)*(1 + a) has two states, both terminal. 
>>
>
> ...
>
> As to your question, there is a straightforward translation from multiple 
> terminal states to a single one. Add a special terminal input symbol to 
> your alphabet and consider any input strings to be terminated by that 
> symbol. For each of the terminal states add a transition to a single 
> terminal state for the terminal symbol.
>

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


Re: Hosting Providers

2014-04-18 Thread Adrian Mowat
Hi Mike,

That would be really helpful. Thanks!

We're much earlier in the process than you at the moment but I would be
delighted to share anything that comes up

Cheers

Adrian


On Fri, Apr 18, 2014 at 4:11 PM, Mike Haney  wrote:

> I know they also have Mongo and Neo4j available on Heroku, but neither of
> those are supported as a Datomic back end.  Postgres will work with Datomic
> just fine, though.  The only hitch with Heroku is that I'm not sure how to
> go about deploying a transactor.  Maybe someone has done it and blogged
> about it (i haven't looked), otherwise you'll have to figure it out on your
> own.
>
> If you go the AWS route, there is good documentation for configuring
> Dynamo and deploying a transactor on the Datomic site.  Then you could
> deploy your peer through Beanstalk and you're good to go.
>
> That's the route I'm planning to take, but I'm still weeks away from
> setting up a staging environment.  When I do get to that point, I can share
> my experience and any "gotchas" I encounter.  If you get there first, or
> especially if you figure out how to do it on Heroku, maybe you could do the
> same?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/rdV-idmmGh0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Hosting Providers

2014-04-18 Thread Mike Haney
I know they also have Mongo and Neo4j available on Heroku, but neither of those 
are supported as a Datomic back end.  Postgres will work with Datomic just 
fine, though.  The only hitch with Heroku is that I'm not sure how to go about 
deploying a transactor.  Maybe someone has done it and blogged about it (i 
haven't looked), otherwise you'll have to figure it out on your own.

If you go the AWS route, there is good documentation for configuring Dynamo and 
deploying a transactor on the Datomic site.  Then you could deploy your peer 
through Beanstalk and you're good to go.

That's the route I'm planning to take, but I'm still weeks away from setting up 
a staging environment.  When I do get to that point, I can share my experience 
and any "gotchas" I encounter.  If you get there first, or especially if you 
figure out how to do it on Heroku, maybe you could do the same?

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


Re: project docs

2014-04-18 Thread Gregg Reynolds
On Thu, Apr 17, 2014 at 1:18 PM, Brian Craft  wrote:

> Is there a standard workflow, lein plugin, or such, for building/serving a
> project's README.md, doc/*.md, etc.? During development, I mean, to preview
> the docs while working on them.
>

There is a google chrome browser extension for this that works reasonably
well; unfortunately I don't recall the name of it and I don't have it
installed at work.

-Gregg

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


Re: what's the elegant way to write this code in clojure?

2014-04-18 Thread Ray Miller
On 18 April 2014 15:05, sd song  wrote:
> i use clojure and korma libs.
> now i need to add some search conditions to users-sql at
> "need_do_something_here",i can describe it in imperative style:
>
> if ( nick_name != nil)
> users-sql = (where users-sql (like :nick_name nick_name)
>
> if (max_age != nil)
> users-sql = (where uses-sql (> :birthday blabla))
>
> if (min_age != nil)
> users-sql = (where uses-sql (< :birthday blabla))
>
> how to do this in an elegant way with functional style?

You should be able to do something with the cond-> threading macro:

(cond-> users-sql
  nick_name  (where (like :nick_name nick_name))
  max_age (where (> :birthday ...)
  min_age  (where (< :birthday ...))

> another question is: i think code like: (if (nil? page) lmt page) is ugly.
> is there some functions in clojure like (get_default_value_3_if_a_is_null a
> 3) ?

(or page 3)

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


Re: what's the elegant way to write this code in clojure?

2014-04-18 Thread Michael Gardner
On Apr 18, 2014, at 09:05 , sd song  wrote:

> another question is: i think code like: (if (nil? page) lmt page) is ugly. is 
> there some functions in clojure like (get_default_value_3_if_a_is_null a 3) ?

If you're OK with false being treated the same as nil, you can do (or page lmt).

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


Re: regex

2014-04-18 Thread A. Webb


On Friday, April 18, 2014 8:28:03 AM UTC-5, Thumbnail wrote:
>
>
> I had a couple of insights.  First, to allow the dfa to be generated 
>> programmatically, I changed it from a map to a vector.  This means 
>> that the next state can just be an integer.  Second, I decided that 
>> the terminal state would always be at index 0 ... 
>>
>
> Shouldn't a DFA allow for *any* *set* of states to be terminal? For 
> instance, the minimal DFA for (ab)*(1 + a) has two states, both terminal. 
>

I haven't read through the above, but will have to later as I am familiar 
with the excellent linked article, so thanks for bumping this back to the 
top.

As to your question, there is a straightforward translation from multiple 
terminal states to a single one. Add a special terminal input symbol to 
your alphabet and consider any input strings to be terminated by that 
symbol. For each of the terminal states add a transition to a single 
terminal state for the terminal symbol.

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


what's the elegant way to write this code in clojure?

2014-04-18 Thread sd song


i use clojure and korma libs.

defn db-search-users
  [& {:keys [nick_name max_age min_age page page_size lmt oft]
  :or {lmt 10  page_size 10 oft 0 }
  :as conditons}]
  (let [users-sql  (-> (select* users)
   (fields :user_name :id :nick_name)
   (limit (if (nil? page) lmt page_size))
   (offset (if (nil? page) oft (* page page_size]
(do
   (exec (-> users-sql
need_do_something_here
 )
   )

  )

now i need to add some search conditions to users-sql at 
"need_do_something_here",i can describe it in imperative style:

if ( nick_name != nil)
users-sql = (where users-sql (like :nick_name nick_name)
if (max_age != nil)
users-sql = (where uses-sql (> :birthday blabla))
if (min_age != nil)
users-sql = (where uses-sql (< :birthday blabla))

how to do this in an elegant way with functional style?

another question is: i think code like: (if (nil? page) lmt page) is ugly. 
is there some functions in clojure like (get_default_value_3_if_a_is_null a 
3) ?

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


Pattern matching and web security

2014-04-18 Thread kurofune
After watching Aaron Bedra's Clojure web security talk, I began to think 
about whether Scala, being another popular JVM language, had some of the 
same issues with vulnerability as Clojure. I went to the Lift framework 
overview page (http://liftweb.net/lift_overview) and was surprised to find 
that half of their pitch was on the basis of security and they attributed a 
lot of their success in that area to pattern matching:

Using Scala's built-in pattern matching, we match an incoming request, 
> extract the third part of the path and get the User that corresponds to 
> that value, and even apply access control checks (does the current session 
> or request have permissions to access the given User record). So, by the 
> time the User instance hits the application logic, it's vetted.
> ... Lift has a tremendous advantage in terms of security. 


This got me curious: can Clojure accomplish the same thing using 
destructuring or possibly core.match? Also, is security always a matter of 
individual developer responsibility or can we blame a lack of support in 
the technologies, themselves, that do not allow novice app makers (like 
myself), to somehow default to secure?

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


Re: Emacs - error with `nrepl-jack-in'

2014-04-18 Thread Erlis Vidal
Also *clojure for the brave and true *will guide you through the
configuration process really straight forward.

http://www.braveclojure.com/using-emacs-with-clojure/


On Fri, Apr 18, 2014 at 9:37 AM, greg r  wrote:

> You should consider going to CIDER:
>
> https://github.com/clojure-emacs/cider
>
> The command is 'cider-jack-in'.
>
> Here's a page with a lot of install info:
>
> http://clojure-doc.org/articles/tutorials/emacs.html
>
> There are many web pages out there with obsolete information on Clojure
> and emacs.
> The above page is one of the most up-to-date.
>
> Regards,
> Greg
>
>
> On Thursday, April 17, 2014 9:45:13 PM UTC-4, Thorsten Jolitz wrote:
>>
>>
>> Hi List,
>>
>> just installed lein2 and can start 'lein2 repl' successfully on the
>> command-line. 'lein repl' works too, since I defined an alias in my
>> .bashrc.
>>
>> After installing packages clojure-mode and nrepl in Emacs, I get this
>> error when trying `nrepl-jack-in':
>>
>> ,-
>>
>> | error in process sentinel: Could not start nREPL server: /bin/bash:
>> Line
>> | 1: lein: Command not found.
>> `-
>>
>>
>> I'm on Archlinx with
>>
>> #+begin_src emacs-lisp
>>  (emacs-version)
>> #+end_src
>>
>> #+results:
>> : GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.7)
>> :  of 2014-01-28 on var-lib-archbuild-extra-x86_64-juergen
>>
>> I googled some related sites and it seems it might be an Emacs (exec-)
>> path
>> problem, but a reboot did not help.
>>
>> --
>> cheers,
>> Thorsten
>>
>>  --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Code snippets to attract new users

2014-04-18 Thread kurofune
Pico-Lisp looks pretty cool, and that massive book of yours is nuts. It 
seems like there is an example for everything in there! About the poor 
reception in spite of Rosetta-Code success, I can only say that predicting 
human behavior on the assumption that their decisions are rational, is 
unlikely to ever succeed. We are socially minded, always looking for what's 
popular :) 

Jesse

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


Re: Emacs - error with `nrepl-jack-in'

2014-04-18 Thread greg r
You should consider going to CIDER:

https://github.com/clojure-emacs/cider

The command is 'cider-jack-in'.

Here's a page with a lot of install info:

http://clojure-doc.org/articles/tutorials/emacs.html

There are many web pages out there with obsolete information on Clojure and 
emacs.
The above page is one of the most up-to-date.

Regards,
Greg

On Thursday, April 17, 2014 9:45:13 PM UTC-4, Thorsten Jolitz wrote:
>
>
> Hi List, 
>
> just installed lein2 and can start 'lein2 repl' successfully on the 
> command-line. 'lein repl' works too, since I defined an alias in my 
> .bashrc. 
>
> After installing packages clojure-mode and nrepl in Emacs, I get this 
> error when trying `nrepl-jack-in': 
>
> ,- 
> | error in process sentinel: Could not start nREPL server: /bin/bash: Line 
> | 1: lein: Command not found. 
> `- 
>
> I'm on Archlinx with 
>
> #+begin_src emacs-lisp 
>  (emacs-version) 
> #+end_src 
>
> #+results: 
> : GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.7) 
> :  of 2014-01-28 on var-lib-archbuild-extra-x86_64-juergen 
>
> I googled some related sites and it seems it might be an Emacs (exec-) 
> path 
> problem, but a reboot did not help. 
>
> -- 
> cheers, 
> Thorsten 
>
>

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


Re: Code snippets to attract new users

2014-04-18 Thread Gary Trakhman
I think doing some XML manipulation with clojure.data.xml, tree-seq and
basic data structures shows a lot of the benefits in a little bit of code,
and is pretty persuasive in my experience.

This thing correlates paths from openstreetmap via unique node-ids to give
you a way to find intersecting roads.

Takes a massive XML file as input, showing off lazy-seqs.

https://github.com/gtrak/xml-example/blob/master/src/xml_example/core.clj


On Fri, Apr 18, 2014 at 9:27 AM, kurofune  wrote:

> Hi Martin,
>
> > IMHO small code-snippets like that you sent can not persuade someone to
> change language except some small/toy projects.
>
> I completely agree with the above, if it is professional programmers you
> are trying to convince. I should mention that while my friend was talking
> about "industry", I disagree with what he was saying in that regard.
>
> I did observe however, for better or worse, the effect that this
> particular article has had on hobby programmers who are not industry
> veterans and wondered what type of thing might be out there to drum up
> enthusiasm for newcomers.
>
> I'll check out the functional programming patterns book about Scala and
> Clojure. I wondered if it was worth picking up, but am now motivated to do
> so.
>
> Jesse
>
>
> On Friday, April 18, 2014 7:10:19 PM UTC+9, martin madera wrote:
>>
>> Hello,
>>
>> I think that the book Functional patterns in Scala and Clojure has a lot
>> of snippets, which can attract many programmers.
>>
>> http://www.amazon.com/Functional-Programming-Patterns-Scala-Clojure/dp/
>> 1937785475/ref=sr_1_1?ie=UTF8&qid=1397814912&sr=8-1&keywords=functional+
>> programming+patterns
>>
>> That book is written in similar style like GoF Design Patterns which is a
>> bit different than mini-cookbook you sent. But I think that the snippets in
>> the mini-cookbook you sent should not be put to public like "this is the
>> way how to do it". They should be put to some library rather than
>> copy-pasting to the every other program.
>>
>> I have only 5 years of commercial experience in programming, but IMHO
>> small code-snippets like that you sent can not persuade someone to change
>> language except some small/toy projects.
>>
>> Martin Maděra
>>
>> On Friday, 18 April 2014 10:03:29 UTC+2, kurofune wrote:
>>>
>>> Hello everyone!
>>>
>>> A Java programmer recently mentioned to me that if the Clojure community
>>> wants to appeal to industry programmers that they would need to provide
>>> example code comparisons, which clearly show why it is good to choose
>>> Clojure over another language. The same person gave me the following link
>>> with Java snippets that have proved useful for learners, something like a
>>> mini-cookbook: http://viralpatel.net/blogs/20-
>>> useful-java-code-snippets-for-java-developers/
>>>
>>> When I google "Java Clojure code comparisons", nothing simple or
>>> straightforward like this comes up, so I want to translate these
>>> snippets into their Clojure equivalents and place them side by side with
>>> the Java, for comparison. I hope it will also provide a resource for
>>> Clojure programmers who want to get a better feel for Java and gain a more
>>> intuitive grasp of what goes on during interop. I'd like to cloud the
>>> task out to anyone interested in picking one snippet and posting it here.
>>> I'll then collect them, clean them up, post them and provide a link to
>>> either a blog post or github gists page.
>>>
>>> Does this appeal to anyone? If not, what succinct piece of media would
>>> you suggest for wowing the pants off a Clojure skeptic?
>>>
>>> Jesse
>>>
>>  --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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

Re: regex

2014-04-18 Thread Thumbnail


> I had a couple of insights.  First, to allow the dfa to be generated 
> programmatically, I changed it from a map to a vector.  This means 
> that the next state can just be an integer.  Second, I decided that 
> the terminal state would always be at index 0 ... 
>

Shouldn't a DFA allow for *any* *set* of states to be terminal? For 
instance, the minimal DFA for (ab)*(1 + a) has two states, both terminal. 

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


Re: Code snippets to attract new users

2014-04-18 Thread kurofune
Hi Martin, 
 
> IMHO small code-snippets like that you sent can not persuade someone to 
change language except some small/toy projects.

I completely agree with the above, if it is professional programmers you 
are trying to convince. I should mention that while my friend was talking 
about "industry", I disagree with what he was saying in that regard. 

I did observe however, for better or worse, the effect that this particular 
article has had on hobby programmers who are not industry veterans and 
wondered what type of thing might be out there to drum up enthusiasm for 
newcomers. 

I'll check out the functional programming patterns book about Scala and 
Clojure. I wondered if it was worth picking up, but am now motivated to do 
so.

Jesse


On Friday, April 18, 2014 7:10:19 PM UTC+9, martin madera wrote:
>
> Hello,
>
> I think that the book Functional patterns in Scala and Clojure has a lot 
> of snippets, which can attract many programmers.
>
>
> http://www.amazon.com/Functional-Programming-Patterns-Scala-Clojure/dp/1937785475/ref=sr_1_1?ie=UTF8&qid=1397814912&sr=8-1&keywords=functional+programming+patterns
>
> That book is written in similar style like GoF Design Patterns which is a 
> bit different than mini-cookbook you sent. But I think that the snippets in 
> the mini-cookbook you sent should not be put to public like "this is the 
> way how to do it". They should be put to some library rather than 
> copy-pasting to the every other program.
>
> I have only 5 years of commercial experience in programming, but IMHO 
> small code-snippets like that you sent can not persuade someone to change 
> language except some small/toy projects.
>
> Martin Maděra
>
> On Friday, 18 April 2014 10:03:29 UTC+2, kurofune wrote:
>>
>> Hello everyone!
>>
>> A Java programmer recently mentioned to me that if the Clojure community 
>> wants to appeal to industry programmers that they would need to provide 
>> example code comparisons, which clearly show why it is good to choose 
>> Clojure over another language. The same person gave me the following link 
>> with Java snippets that have proved useful for learners, something like a 
>> mini-cookbook: 
>> http://viralpatel.net/blogs/20-useful-java-code-snippets-for-java-developers/
>>
>> When I google "Java Clojure code comparisons", nothing simple or 
>> straightforward like this comes up, so I want to translate these 
>> snippets into their Clojure equivalents and place them side by side with 
>> the Java, for comparison. I hope it will also provide a resource for 
>> Clojure programmers who want to get a better feel for Java and gain a more 
>> intuitive grasp of what goes on during interop. I'd like to cloud the 
>> task out to anyone interested in picking one snippet and posting it here. 
>> I'll then collect them, clean them up, post them and provide a link to 
>> either a blog post or github gists page. 
>>
>> Does this appeal to anyone? If not, what succinct piece of media would 
>> you suggest for wowing the pants off a Clojure skeptic?
>>
>> Jesse
>>
>

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


Re: Hosting Providers

2014-04-18 Thread Adrian Mowat
Hi,

Thanks for the advice.  I should have mentioned that are are going to use
Datomic but I'm not sure of the tradeoffs around different storage
platforms.  Have I understood correctly that Heroku only offers Postgres as
a storage option?

Many Thanks

Adrian



On Fri, Apr 18, 2014 at 1:43 PM, Mike Haney  wrote:

> In addition to heroku, there is Amazon Elastic Beanstalk, which lets you
> deploy a WAR file on EC2 without having to setup the infrastructure
> yourself.  Both are great ways to go.
>
> I lean towards using Heroku for it's simplicity, but Amazon makes sense
> when you need to use other Amazon services like Dynamo DB (which looks like
> a great option for a Datomic backing store).
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/rdV-idmmGh0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Potential Intro clojure projects - libraries and ideas with wow factor

2014-04-18 Thread Dmitry Groshev
In theory, yes. In practice, it will not scale well.

Here is why: optimal planning is, in general, a problem with at least 
exponential complexity. When you have complexity like this, you can choose 
between two approaches:
1) explore the whole search space, trying very hard to prune and discard as 
much of it as you can as early as you can. This way you will have an 
optimal (in a sense that you will need to define) solution when (if) the 
search will complete. This is called "exhaustive search".
2) find ANY solution (it's generally much easier than to find an optimal 
one) and try to improve it changing bits of it. Repeat a lot of times, just 
in case it wasn't the best solution that can be. This is called "local 
search".
Second approach in general finds worse solutions, but scales better. 
Optaplanner is built around it. On the contrary, in core.logic you will 
need to perform an exhaustive search to find an optimal solution.

However, for a large and complex planning problems you may need to find 
*any* plan that satisfies all constrains, not necessarily an optimal one. 
In this setting, core.logic can be useful to implement planning algorithm 
such as Graphplan. 

On Wednesday, April 16, 2014 12:49:43 PM UTC+4, Josh Kamau wrote:
>
> Can core.logic be used to implement something like 
> http://www.optaplanner.org
>   
> ? 
>
> Josh
>
>
> On Wed, Apr 16, 2014 at 9:36 AM, utel >wrote:
>
>> Thanks Mikera and Andrew for the ideas. Some interesting suggestions 
>> there. I'll discuss these with my fellow devs. Much appreciated.
>>
>>
>> On Tuesday, April 15, 2014 1:14:11 AM UTC+1, Andrew Chambers wrote:
>>>
>>> Clojure logic programming with core.logic (something akin to a sudoku 
>>> solver https://gist.github.com/swannodette/3217582 is a good example) 
>>> or using datomic to have a database with a time machine and datalog for 
>>> queries might be cool (perhaps visualizing the data in the database at 
>>> arbitrary times in the past). Both don't really have equivalents in other 
>>> languages. Other things that are hard to achieve in other languages would 
>>> involve the immutable data structures, concurrency, and macros.
>>>
>>>
>>> On Monday, April 14, 2014 9:15:31 AM UTC+12, utel wrote:

 A handful of developers at the organisation I work at, want to 
 encourage interest in Clojure with the aim of using it in production 
 amongst the organisation's wider developer community (hundreds of 
 developers). We ourselves are Clojure hobbyists.

 We wanted to do this through a basic project (with few moving parts), 
 so I wanted to get feedback on a couple of aspects:
 1. Examples of basic project ideas that would be compelling to fellow 
 developers not familiar with Clojure (e.g. something useful that you can 
 do 
 easily with Clojure that's harder to do in more established languages such 
 as Java)
 2. Particular libraries that again had a wow factor towards an 
 objective not easily achievable in more established languages (perhaps 
 related to data analysis, visualisation, or taking advantage of the 
 benefit 
 of lazy evaluation in a novel way as examples).

 I realise these questions are somewhat open-ended, but just wanted to 
 spark off some ideas for us through bouncing these questions off the 
 google 
 group's members.

 Thanks for any leads!

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

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


Hosting Providers

2014-04-18 Thread Mike Haney
In addition to heroku, there is Amazon Elastic Beanstalk, which lets you deploy 
a WAR file on EC2 without having to setup the infrastructure yourself.  Both 
are great ways to go.  

I lean towards using Heroku for it's simplicity, but Amazon makes sense when 
you need to use other Amazon services like Dynamo DB (which looks like a great 
option for a Datomic backing store).

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


Hosting Providers

2014-04-18 Thread Jason Stewart
Hi Adrian,

The only hosting provider that comes to my mind, thinking of your requirements 
is heroku. Applying patches is usually as simple as making an empty commit and 
pushing to heroku. Not every application will fit into the "heroku" way of 
doing things, but in my experience the ones that do are easy to manage without 
having to worry too much about devops.

Cheers,
Jason

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


Re: Emacs - error with `nrepl-jack-in'

2014-04-18 Thread Thorsten Jolitz
Erlis Vidal  writes:

> Do not add an alias for lein, rename lein2 to just lein. 

Ok, done, thx.

-- 
cheers,
Thorsten

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


Re: Emacs - error with `nrepl-jack-in'

2014-04-18 Thread Thorsten Jolitz
Thorsten Jolitz  writes:

> Hi List, 
>
> just installed lein2 and can start 'lein2 repl' successfully on the
> command-line. 'lein repl' works too, since I defined an alias in my
> .bashrc. 
>
> After installing packages clojure-mode and nrepl in Emacs, I get this
> error when trying `nrepl-jack-in':
>
> ,-
> | error in process sentinel: Could not start nREPL server: /bin/bash: Line
> | 1: lein: Command not found.
> `-
>
> I'm on Archlinx with
>
> #+begin_src emacs-lisp
>  (emacs-version)
> #+end_src
>
> #+results:
> : GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.7)
> :  of 2014-01-28 on var-lib-archbuild-extra-x86_64-juergen
>
> I googled some related sites and it seems it might be an Emacs (exec-) path
> problem, but a reboot did not help.

I just learned that CIDER is the current Emacs IDE for clojure and that
my setup described above is outdated, so this problem can be considered
as solved. 

-- 
cheers,
Thorsten

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


Re: Emacs - error with `nrepl-jack-in'

2014-04-18 Thread Erlis Vidal
Do not add an alias for lein,  rename lein2 to just lein.
On Apr 17, 2014 9:45 PM, "Thorsten Jolitz"  wrote:

>
> Hi List,
>
> just installed lein2 and can start 'lein2 repl' successfully on the
> command-line. 'lein repl' works too, since I defined an alias in my
> .bashrc.
>
> After installing packages clojure-mode and nrepl in Emacs, I get this
> error when trying `nrepl-jack-in':
>
> ,-
> | error in process sentinel: Could not start nREPL server: /bin/bash: Line
> | 1: lein: Command not found.
> `-
>
> I'm on Archlinx with
>
> #+begin_src emacs-lisp
>  (emacs-version)
> #+end_src
>
> #+results:
> : GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.7)
> :  of 2014-01-28 on var-lib-archbuild-extra-x86_64-juergen
>
> I googled some related sites and it seems it might be an Emacs (exec-) path
> problem, but a reboot did not help.
>
> --
> cheers,
> Thorsten
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Code snippets to attract new users

2014-04-18 Thread martin madera
Hello,

I think that the book Functional patterns in Scala and Clojure has a lot of 
snippets, which can attract many programmers.

http://www.amazon.com/Functional-Programming-Patterns-Scala-Clojure/dp/1937785475/ref=sr_1_1?ie=UTF8&qid=1397814912&sr=8-1&keywords=functional+programming+patterns

That book is written in similar style like GoF Design Patterns which is a 
bit different than mini-cookbook you sent. But I think that the snippets in 
the mini-cookbook you sent should not be put to public like "this is the 
way how to do it". They should be put to some library rather than 
copy-pasting to the every other program.

I have only 5 years of commercial experience in programming, but IMHO small 
code-snippets like that you sent can not persuade someone to change 
language except some small/toy projects.

Martin Maděra

On Friday, 18 April 2014 10:03:29 UTC+2, kurofune wrote:
>
> Hello everyone!
>
> A Java programmer recently mentioned to me that if the Clojure community 
> wants to appeal to industry programmers that they would need to provide 
> example code comparisons, which clearly show why it is good to choose 
> Clojure over another language. The same person gave me the following link 
> with Java snippets that have proved useful for learners, something like a 
> mini-cookbook: 
> http://viralpatel.net/blogs/20-useful-java-code-snippets-for-java-developers/
>
> When I google "Java Clojure code comparisons", nothing simple or 
> straightforward like this comes up, so I want to translate these snippets 
> into their Clojure equivalents and place them side by side with the Java, 
> for comparison. I hope it will also provide a resource for Clojure 
> programmers who want to get a better feel for Java and gain a more 
> intuitive grasp of what goes on during interop. I'd like to cloud the 
> task out to anyone interested in picking one snippet and posting it here. 
> I'll then collect them, clean them up, post them and provide a link to 
> either a blog post or github gists page. 
>
> Does this appeal to anyone? If not, what succinct piece of media would you 
> suggest for wowing the pants off a Clojure skeptic?
>
> Jesse
>

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


Re: Code snippets to attract new users

2014-04-18 Thread Marek Srank


This is related just to some degree, but IMHO part of the problem is also a 
landing page of a programming language and a concept of a minimum viable 
code snippet, how Fogus named it in his blogpost: 
http://blog.fogus.me/2012/08/23/minimum-viable-snippet/

I think that it was already discussed here (just couldn't find the topic), 
but if you compare http://clojure.org to something like http://python.org , 
there's still a long way before Clojure ;) I know this is just kind of a 
marketing stuff, but anyway :)

Marek

On Friday, April 18, 2014 10:03:29 AM UTC+2, kurofune wrote:
>
> Hello everyone!
>
> A Java programmer recently mentioned to me that if the Clojure community 
> wants to appeal to industry programmers that they would need to provide 
> example code comparisons, which clearly show why it is good to choose 
> Clojure over another language. The same person gave me the following link 
> with Java snippets that have proved useful for learners, something like a 
> mini-cookbook: 
> http://viralpatel.net/blogs/20-useful-java-code-snippets-for-java-developers/
>
> When I google "Java Clojure code comparisons", nothing simple or 
> straightforward like this comes up, so I want to translate these snippets 
> into their Clojure equivalents and place them side by side with the Java, 
> for comparison. I hope it will also provide a resource for Clojure 
> programmers who want to get a better feel for Java and gain a more 
> intuitive grasp of what goes on during interop. I'd like to cloud the 
> task out to anyone interested in picking one snippet and posting it here. 
> I'll then collect them, clean them up, post them and provide a link to 
> either a blog post or github gists page. 
>
> Does this appeal to anyone? If not, what succinct piece of media would you 
> suggest for wowing the pants off a Clojure skeptic?
>
> Jesse
>

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


Re: Code snippets to attract new users

2014-04-18 Thread Thorsten Jolitz
kurofune  writes:

> Hello everyone!
>
> A Java programmer recently mentioned to me that if the Clojure
> community wants to appeal to industry programmers that they would need
> to provide example code comparisons, which clearly show why it is good
> to choose Clojure over another language. The same person gave me the
> following link with Java snippets that have proved useful for
> learners, something like a mini-cookbook:
> http://viralpatel.net/blogs/20-useful-java-code-snippets-for-java-developers/
>
> When I google "Java Clojure code comparisons", nothing simple or
> straightforward like this comes up, so I want to translate these
> snippets into their Clojure equivalents and place them side by side
> with the Java, for comparison. I hope it will also provide a resource
> for Clojure programmers who want to get a better feel for Java and
> gain a more intuitive grasp of what goes on during interop. I'd like
> to cloud the task out to anyone interested in picking one snippet and
> posting it here. I'll then collect them, clean them up, post them and
> provide a link to either a blog post or github gists page. 
>
> Does this appeal to anyone? If not, what succinct piece of media would
> you suggest for wowing the pants off a Clojure skeptic?

I think you should have a look at 

,-
| http://rosettacode.org/wiki/Rosetta_Code
`-

there are solutions from hundreds of programming languages for hundreds
of problems to be compared - and to be reused as useful snippets. 

I actually created a massive book out of this huge knowlegde base for my
favorite lisp of all, PicoLisp (http://picolisp.com/wiki/?home):

,
| http://www.scribd.com/doc/103733857/PicoLisp-by-Example
`

its and open source project, so you could very well take my LaTeX
sources and create a similar 'by-example' book for Clojure
(https://github.com/tj64/picolisp-by-example). 

But you would need to consider two important questions:

1. Copyright & Quality

I was in the unique situation that more than 600 Rosettacode solutions
had been written by one single person - PicoLisp creator Alexander
Burger himself. So I could be sure they are canonical high quality
solutions, and I could (almost) solve the copyright issue by making
Alexander Burger the principle author of the book with me as co-author.
 
'Almost', because not only the solutions have copyrights, but the
problems too. I had to do quite a lot of extra work to make the authors
of the Rosettacode problems happy. So be very careful (!!), this
copyright issue isn't really fun at all, even when you produce a free
open source book.

2. Does it help the language?

I created two free books about PicoLisp, the aforementioned 'PicoLisp by
Example' and 'PicoLisp Works'

,-
| (http://www.scribd.com/doc/103732688/PicoLisp-Works)
`-

a compilation of almost all docs ever written about the language. I find
them very useful myself as language reference, and it seems they are
quite popular with people who like to discover this unknown but
fascinating pure and powerful lisp dialect.

But OTOH - everybody can see now how short and succint PicoLisp programs
are, that libraries are often not needed because PicoLisp core functions
are so powerful, how complete the PicoLisp application framework is for
database and web-development - besides its extremely small
footprint. And they could see how easy it is to install PicoLisp and how
very fast it runs (the fasted interpreter of all?) when they actually
try out the examples.

So one would expect a kind of PicoLisp hype triggered by the language's
suberb "performance" in the "Rosettacode competition", but that did not
happen (yet) - unfortunately. 

-- 
cheers,
Thorsten

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


Hosting Providers

2014-04-18 Thread Adrian Mowat
Hi Everyone,

I am currently looking at hosting providers for Clojure for my company.  We 
are using Engine Yard for our Ruby applications and we looking for 
something comparable in terms of providing an easy path to getting started 
and easy ongoing maintenance (they allow you to apply OS patches with zero 
downtime by simply clicking a button for example).  We also need 24/7 
support for server issues.

I was wondering if anyone here could share any experiences and/or 
recommendations?

Many Thanks

Adrian

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


Re: Clojure Office Hours

2014-04-18 Thread Ulises
Yikes! Got my first booking for Monday. That was quick!

one thing I forgot to mention is that I have no preferred way to do this. I
personally have emacs+cider set up, but I'm happy to work with your own set
up.

In the past I've used ScreenHero (not available for Linux unfortunately)
for screen sharing, as well as Google hangouts.

Once you've booked an appointment with me please email me privately to
arrange the pairing set up so that I can be ready for you :)

Cheers


On 18 April 2014 10:35, Ulises  wrote:

> Inspired by Leif's offer, I've decided to offer Clojure office hours as
> well.
>
> I'm based in the UK so I reckon the times will be more amenable to those
> in Europe (not sure the times will be good for those in Asia unfortunately.)
>
> Sadly the offer is limited to 1h a day, but hopefully it'll still be
> useful.
>
> You can book me at https://ucb.youcanbook.me/
>
> Cheers!
>
>
> On 18 April 2014 03:03, Leif  wrote:
>
>> @Miguel: There are somewhat subtle arrows on the sides for navigation.
>> Thursday, April 24 is still open.  I will give a slot to you if you want
>> one, just email me if the 24th is full when you check again.
>>
>> @all: But yes, this round of office hours is almost over.  I will be in
>> transit for at least a couple weeks in the beginning of May, but I will
>> probably book some more hours when I become stationary again.  It will
>> probably be more like 4 or 5 hours a week, though, not 8.
>>
>> @all: Several poor souls from Europe are going to stay up until 2 a.m.
>> for this, and people further east are probably just silent because the time
>> difference is so large; So, I definitely think some European / African /
>> Asian / Australian clojure devs' office hours would be popular.  It's fun,
>> and you might find some people to hire, if that's your thing!
>>
>> --Leif
>>
>>
>> On Thursday, April 17, 2014 10:43:50 AM UTC-4, Miguel Ping wrote:
>>>
>>> Hey, the schedule's full! :\
>>>
>>> On Wednesday, April 16, 2014 2:57:49 AM UTC+1, Marcus Blankenship wrote:

 Leif, thanks for the great session today.  Not only did I get a jump
 start on my next 4Clojure problems, but I learned some emacs as well!  Very
 enjoyable, and I look forward to next week’s session.  THANK YOU!

 All, if you’re trying to get a jumpstart on Clojure, I highly recommend
 Leif’s office hours.

 -Marcus

 On Apr 15, 2014, at 6:50 PM, Leif  wrote:

 @Jakub: Thanks for your kind words.  I'm definitely no "industry hero,"
 but I hope Clojure devs of all levels start having more pair programming
 fun.

 @Tim: Clojurescript UI programming being *way* out of my comfort zone,
 I learned quite a lot from you yesterday.  So thank *you*.

 @Everyone:  To clarify / reiterate:  You do *not* need a plan, a
 project, or a specific problem.  If you want to work through Project Euler,
 4clojure, clojure-koans, the ClojureBridge materials, some other clojure
 tutorial, or just play it by ear, I am happy to try it out.

 --Leif

 On Tuesday, April 15, 2014 8:00:17 AM UTC-4, frye wrote:
>
> I just came from an office hours session, yesterday with Leif.
>
> This is good stuff guys, and a great way to learn and meet with other
> developers. Highly recommended.
>
>
> Thanks Leif
>
> Tim Washington
> Interruptsoftware.com 
>
>
> On Tue, Apr 15, 2014 at 5:12 AM, Jakub Holy wrote:
>
>> Hi Leif,
>>
>> This is a great activity, thank you for contributing to the community
>> this way!
>>
>> Do not be surprise and discouraged by the fact that the interest
>> seems low. I have a similar experience - in my company we can consult 
>> with
>> an "industry hero" yet people use the opportunity seldom, presumably
>> because of multiple factors: they (wrongly) don't feel that they do not
>> have something important/interesting enough to bother him, they are 
>> little
>> scared of talking to and exposing themselves and their work to this
>> experienced guy, and might find it difficult to explain their challenge 
>> to
>> an outsider and get an advice within the limited time scope. On the other
>> hand, those who dare to use the opportunity benefit from it greatly.
>>
>> Good luck, Jakub
>>
>>
>> On Friday, April 11, 2014 4:13:18 AM UTC+2, Leif wrote:
>>>
>>> Hmm... less interest than I'd expected, given recent posts.  Maybe I
>>> should rename the thread to "Free Clojure Consulting / Tutoring."
>>> Tht's not spammy.
>>>
>>> FYI, all bookings are automatically confirmed, so don't fret if I
>>> don't instantly respond.
>>>
>>> @Tim: Sounds good!  Of course, now I'll have to take some time this
>>> weekend and try to actually understand Om. :)  (or maybe ?o_0? )
>>>
>>> --Leif
>>>
>>> On Thursday, Ap

Re: Clojure Office Hours

2014-04-18 Thread Ulises
Inspired by Leif's offer, I've decided to offer Clojure office hours as
well.

I'm based in the UK so I reckon the times will be more amenable to those in
Europe (not sure the times will be good for those in Asia unfortunately.)

Sadly the offer is limited to 1h a day, but hopefully it'll still be useful.

You can book me at https://ucb.youcanbook.me/

Cheers!


On 18 April 2014 03:03, Leif  wrote:

> @Miguel: There are somewhat subtle arrows on the sides for navigation.
> Thursday, April 24 is still open.  I will give a slot to you if you want
> one, just email me if the 24th is full when you check again.
>
> @all: But yes, this round of office hours is almost over.  I will be in
> transit for at least a couple weeks in the beginning of May, but I will
> probably book some more hours when I become stationary again.  It will
> probably be more like 4 or 5 hours a week, though, not 8.
>
> @all: Several poor souls from Europe are going to stay up until 2 a.m. for
> this, and people further east are probably just silent because the time
> difference is so large; So, I definitely think some European / African /
> Asian / Australian clojure devs' office hours would be popular.  It's fun,
> and you might find some people to hire, if that's your thing!
>
> --Leif
>
>
> On Thursday, April 17, 2014 10:43:50 AM UTC-4, Miguel Ping wrote:
>>
>> Hey, the schedule's full! :\
>>
>> On Wednesday, April 16, 2014 2:57:49 AM UTC+1, Marcus Blankenship wrote:
>>>
>>> Leif, thanks for the great session today.  Not only did I get a jump
>>> start on my next 4Clojure problems, but I learned some emacs as well!  Very
>>> enjoyable, and I look forward to next week’s session.  THANK YOU!
>>>
>>> All, if you’re trying to get a jumpstart on Clojure, I highly recommend
>>> Leif’s office hours.
>>>
>>> -Marcus
>>>
>>> On Apr 15, 2014, at 6:50 PM, Leif  wrote:
>>>
>>> @Jakub: Thanks for your kind words.  I'm definitely no "industry hero,"
>>> but I hope Clojure devs of all levels start having more pair programming
>>> fun.
>>>
>>> @Tim: Clojurescript UI programming being *way* out of my comfort zone,
>>> I learned quite a lot from you yesterday.  So thank *you*.
>>>
>>> @Everyone:  To clarify / reiterate:  You do *not* need a plan, a
>>> project, or a specific problem.  If you want to work through Project Euler,
>>> 4clojure, clojure-koans, the ClojureBridge materials, some other clojure
>>> tutorial, or just play it by ear, I am happy to try it out.
>>>
>>> --Leif
>>>
>>> On Tuesday, April 15, 2014 8:00:17 AM UTC-4, frye wrote:

 I just came from an office hours session, yesterday with Leif.

 This is good stuff guys, and a great way to learn and meet with other
 developers. Highly recommended.


 Thanks Leif

 Tim Washington
 Interruptsoftware.com 


 On Tue, Apr 15, 2014 at 5:12 AM, Jakub Holy wrote:

> Hi Leif,
>
> This is a great activity, thank you for contributing to the community
> this way!
>
> Do not be surprise and discouraged by the fact that the interest seems
> low. I have a similar experience - in my company we can consult with an
> "industry hero" yet people use the opportunity seldom, presumably because
> of multiple factors: they (wrongly) don't feel that they do not have
> something important/interesting enough to bother him, they are little
> scared of talking to and exposing themselves and their work to this
> experienced guy, and might find it difficult to explain their challenge to
> an outsider and get an advice within the limited time scope. On the other
> hand, those who dare to use the opportunity benefit from it greatly.
>
> Good luck, Jakub
>
>
> On Friday, April 11, 2014 4:13:18 AM UTC+2, Leif wrote:
>>
>> Hmm... less interest than I'd expected, given recent posts.  Maybe I
>> should rename the thread to "Free Clojure Consulting / Tutoring."
>> Tht's not spammy.
>>
>> FYI, all bookings are automatically confirmed, so don't fret if I
>> don't instantly respond.
>>
>> @Tim: Sounds good!  Of course, now I'll have to take some time this
>> weekend and try to actually understand Om. :)  (or maybe ?o_0? )
>>
>> --Leif
>>
>> On Thursday, April 10, 2014 9:56:37 AM UTC-4, frye wrote:
>>>
>>> Sounds great. I just sent a request.
>>>
>>> Tim Washington
>>>  Interruptsoftware.com 
>>>
>>>
>>> On Thu, Apr 10, 2014 at 9:43 AM, Colin Fleming <
>>> colin.ma...@gmail.com> wrote:
>>>
 Hi Leif,

 This sounds like a very interesting project, please report back and
 let us know how it went! I'd be very interested to know.

 Cheers,
 Colin


 On 11 April 2014 00:53, Leif  wrote:

> Hi, everybody.  Inspired by the SF Bay Area clojure group,
>>>

[ANN] clj-cn-nlp 0.2.1 released

2014-04-18 Thread Mingli Yuan
Hi, folks, we just released clj-cn-nlp version 0.2.1, a Clojure NLP wrapper
based on Stanford-CoreNLP for Simplified Chinese users.

Three default Chinese language model was shipped with this wrapper to
provide:

   - seg: Chinese word segmentation
   - ner: Chinese naming entity recognition
   - tag: Chinese POS tagging

In this release, the API dose not change, but we simplified the
implementation a lot, remove reflection and customised class loading in
code, and in the meantime the performance should be better than the
previous release.

Add below dependency in your project.clj

[com.guokr/clj-cn-nlp "0.2.1"]


And then in repl you will see


> (use 'com.guokr.nlp.seg)

> (use 'com.guokr.nlp.ner)

> (use 'com.guokr.nlp.tag)

> (seg "Clojure是由里奇·希基发明的一门编程语言,它的开发者已经遍布世界,渗入到各个应用领域!")

> "Clojure 是 由 里 奇·希基 发明 的 一 门 编程 语言 , 它 的 开发者 已经 遍布 世界 , 渗入 到 各个 应用 领域 !"

> (ner "Clojure是由多才多艺的瑞奇·希基发明的一门编程语言,它的开发者已经遍布世界,渗入到各个应用领域!")

> "Clojure/O 是/O 由/O 多才多艺/O 的/O 瑞奇/PERSON·/O希基/PERSON 发明/O 的/O 一/O 门/O 编程/O 
> 语言/O ,/O 它/O 的/O 开发者/O 已经/O 遍布/O 世界/O ,/O 渗入/O 到/O 各个/O 应用/O 领域/O !/O"

> (tag "Clojure是由多才多艺的瑞奇·希基发明的一门编程语言,它的开发者已经遍布世界,渗入到各个应用领域!")

> "Clojure#NR 是#VC 由#P 多才多艺#VV 的#DEC 瑞奇·希基#NR 发明#VV 的#DEC 一#CD 门#M 编程#NN 语言#NN 
> ,#PU 它#PN 的#DEG 开发者#NN 已经#AD 遍布#VV 世界#NN ,#PU 渗入#VV 到#VV 各个#DT 应用#NN 领域#NN 
> !#PU"


Any comments and bugfix are welcomed!


Regards,

Mingli

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


Code snippets to attract new users

2014-04-18 Thread kurofune
Hello everyone!

A Java programmer recently mentioned to me that if the Clojure community 
wants to appeal to industry programmers that they would need to provide 
example code comparisons, which clearly show why it is good to choose 
Clojure over another language. The same person gave me the following link 
with Java snippets that have proved useful for learners, something like a 
mini-cookbook: 
http://viralpatel.net/blogs/20-useful-java-code-snippets-for-java-developers/

When I google "Java Clojure code comparisons", nothing simple or 
straightforward like this comes up, so I want to translate these snippets 
into their Clojure equivalents and place them side by side with the Java, 
for comparison. I hope it will also provide a resource for Clojure 
programmers who want to get a better feel for Java and gain a more 
intuitive grasp of what goes on during interop. I'd like to cloud the task 
out to anyone interested in picking one snippet and posting it here. I'll 
then collect them, clean them up, post them and provide a link to either a 
blog post or github gists page. 

Does this appeal to anyone? If not, what succinct piece of media would you 
suggest for wowing the pants off a Clojure skeptic?

Jesse

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


Re: New namespace per session in nREPL

2014-04-18 Thread Arkadiusz Komarzewski
Sean,
I'm aware of that, but if I was using this kind of "shared" nrepl server 
the first thing I would do after connecting is changing namespace to 
slightly reduce chance of someone messing up with what I'm doing. That's 
why I thought about creating new namespace for each session.

On Thursday, 17 April 2014 19:40:13 UTC+2, Sean Corfield wrote:
>
> Since they can move into any namespace they want and they're all sharing 
> the same running JVM context, I'm not sure what separate namespaces buys... 
> Can you elaborate on your use case? 
>
> Sean 
>
> On Apr 17, 2014, at 5:35 AM, Arkadiusz Komarzewski 
> > 
> wrote: 
> > I would like to let multiple users use single nrepl server. One problem 
> I noticed is that after connecting you are by default put in 'user' 
> namespace. I am looking for a way to configure nrepl server in a way it 
> will assign new namespace (let's say random-generated) for each session. 
> > 
> > Are there any existing solutions for that? 
> > 
> > So far I (after browsing nrepl source) I think I would have to write my 
> own session middleware, which would handle creation of new namespaces per 
> session. Is this the correct approach? 
>
>
>

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