Re: I tripped out

2013-05-06 Thread Pierre-Yves Ritschard
atkaaz, you can do this: (fn [& {:keys [arg1 arg2 arg3]}] ...)


On Mon, May 6, 2013 at 10:03 PM, AtKaaZ  wrote:

> I agree, I'm not sure what he means xD
> If you ask me, I'd rather have each arg be identified by a keyword instead
> of by order
> like: (somefn :arg1 "somestr" :arg3 100 :arg2 (+ 1 2))
> or all those in a map
> I'll probably still do that for me, so that any function will take params
> like this. There's probably a way this can be done but it's not good enough
> for me, was it with :keys and :as map ?
>
>
>
> On Sun, May 5, 2013 at 10:52 PM, Alex Fowler wrote:
>
>> Tell us more about it.
>>
>>
>> On Sunday, May 5, 2013 11:54:32 AM UTC+4, JvJ wrote:
>>>
>>> Is anyone else tripped out when they realize that when you write args
>>> for a function you're basically just destructuring an arg vector?  It
>>> trips me 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.
>
>
>

-- 
-- 
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: Clojure developer wanted for 4-6 week project ASAP

2013-05-06 Thread Bruce Durling
James,

As you're in London I'd also ask on the London Clojurian Jobs list:

https://groups.google.com/forum/?fromgroups#!forum/london-clojurian-jobs

cheers,
Bruce

On Tue, May 7, 2013 at 1:11 AM, James Adams  wrote:
> Hi all, I'm looking for a Clojure developer to help me on a 4-6 week project
> starting ASAP.  I'm based in London so if you are too that's a bonus, but
> otherwise remote working will be ok.
>
> You'll be helping me finish off the backend on a new multiplayer HTML5 poker
> game.  Development is going well, but the deadline is a bit earlier than I
> previously thought so I'm looking for a bit of help.  The codebase has been
> written from scratch for this project in Clojure so no nasty legacy stuff.
> You won't need to write any front end Javascript/CSS but if you can it's a
> bonus. The front end uses Javascript JQuery & ClojureScript.
>
> There is the possibility of permanent position afterwards.
>
> Send me a message if you're interested, thanks
>
> James
>
> ja...@joyplay.com
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



-- 
@otfrom | CTO & co-founder @MastodonC | mastodonc.com
See recent coverage of us in the Economist http://econ.st/WeTd2i and
the Financial Times http://on.ft.com/T154BA

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




Lisp 2013 summer programming contest

2013-05-06 Thread Andy Fingerhut
I have not heard of this before.  Wanted to pass on the word in case anyone
was interested in applying.  $2000 grand prize, and a chance to speak at a
conference about your project.

http://lispinsummerprojects.org

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.




Clojure developer wanted for 4-6 week project ASAP

2013-05-06 Thread James Adams
Hi all, I'm looking for a Clojure developer to help me on a 4-6 week 
project starting ASAP.  I'm based in London so if you are too that's a 
bonus, but otherwise remote working will be ok.

You'll be helping me finish off the backend on a new multiplayer HTML5 
poker game.  Development is going well, but the deadline is a bit earlier 
than I previously thought so I'm looking for a bit of help.  The codebase 
has been written from scratch for this project in Clojure so no nasty 
legacy stuff. 
You won't need to write any front end Javascript/CSS but if you can it's a 
bonus. The front end uses Javascript JQuery & ClojureScript.  

There is the possibility of permanent position afterwards.

Send me a message if you're interested, thanks

James

ja...@joyplay.com

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




Re: link for clojure programs

2013-05-06 Thread Zack Maril
Once I had really cut your teeth on the introductory materials, I found 
that reading parts of the Clojure source code can be helpful. 

https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj
This one file defines over half of the functions you'll be working with day 
to day. There are patches of code here and there that are very readable and 
patches that are still way beyond me. No matter what my skill level has 
been, every time I open that file up I learn something new about the 
language, whether it is a new function, a new language feature, or just a 
new way of thinking about how to implement certain ideas. It's not the 
right way to get started today, but reading the source has been one of the 
ways I've felt I've leveled up with Clojure the fastest.
 
-Zack

On Monday, May 6, 2013 8:45:27 PM UTC+4, Mimmo Cosenza wrote:
>
> In some way, what we miss is a book on co-recursion (the dual of 
> recursion). In my experience in teaching clojure to mathematicians, they 
> very naturally get co-recursion, because they really know how to be elegant 
> and concise. 
>
> Is there any very good online resource on co-recursion with clojure?
>
> thanks
>
> Mimmo
>
>
>
> On May 6, 2013, at 5:03 PM, Niels van Klaveren wrote:
>
> +1 to Clinton's advice. If anything, SICP et al teach the wrong habits fo 
> working with Clojure.
>
> Christophe Grand, one of the authors of the aforementioned "Clojure 
> Programming" book, held a great presentation 
> called "You aren't gonna need 
> it" 
> at the first meetup of the The Hague/Rotterdam Clojure group. In it he gave 
> some solid advice what you should concentrate on (and what not) when 
> learning Clojure.
>
> Learning the core (higher order) functions of Clojure is paramount, and I 
> found working through the 4clojure problems  a 
> great way to the rationale behind and working with them.  
>
> If you need practical help with setting up your Clojure development 
> environment, or other indepth tutorials for specific parts of the language, 
> clojure-doc.org is great. It lacks a bit in overview, and hasn't got the 
> narrative qualities of a book for guiding you from one subject to another 
> though, so I'd recommend one of 
> themas well.
>
>  Clojuredocs.org is great as cheat-sheet and for short examples.
>
> my experience, being inculcated with Scheme will make your Clojure 
>> code look insane, as idiomatic Clojure (insomuch as there is such a 
>> thing) doesn't have functions nested with a butt-load of anonymous 
>> functions. 
>>
>> http://clojure-doc.org is great and you should go there first. Don't 
>> freak out about your environment just yet. Use whatever you use now, 
>> and if you're lucky enough to use Vim or Emacs, it'll work for the 
>> future, too. 
>>
>> Clojure Programming is, in my opinion, the best book out there right 
>> now for Clojure. Check it out if you get the chance. 
>>
>> Do not rush into refs, atoms, agents, or any of that stuff. Just right 
>> some simple code, learn it, and then expand. I've been writing Clojure 
>> code for about 15 or so months, with the last six being every day 
>> professionally and I still have never created a protocol. 
>>
>> Good luck! Clojure is no harder than Python, C#, or whatever you come 
>> from, and is totally rewarding. Learning it will be a pleasure. 
>>
>> Best, 
>> Clinton 
>>
>>
>> On Mon, May 6, 2013 at 6:11 AM, Catonano  wrote: 
>> > 2013/5/4 nre...@yahoo.com  
>> >> 
>> >> Can anybody give me a link/websites of codes for BEGINNERS FOR 
>> CLOJURE? 
>> >> thanks a lot... 
>> > 
>> > 
>> > There are tons of resources on line. 
>> > 
>> > But in my experience, the famous MIT course  with Abelsson and Sussman 
>> is a 
>> > must. It´s about Scheme, not Clojure, but it´s important anyway. 
>> > 
>> > There is also a course on youtube on Scheme by another professor, from 
>> > Stanford. That can be important too. 
>> > 
>> > Then, you have to set up an enviroinment. That´s not a subtlety, it´s a 
>> main 
>> > concern. 
>> > 
>> > As for that, I strongly suggest the Peepcode footage about Emacs and 
>> then 
>> > live-emacs ( https://github.com/overtone/emacs-live ) 
>> > 
>> > On my shameful github account I have a little watered down game life 
>> with a 
>> > little visual layer made with Quilt. So you can see your bot filling 
>> square 
>> > tiles according to your "strategy". 
>> > 
>> > It was an exercise from the lambda-next clojure training event. I´m not 
>> sure 
>> > about its license but I don´t think the guys are gonna object ;-) 
>> > 
>> > It uses refs and can be a good first step in learning. The 
>> multithreading 
>> > stuff is specific to Clojure on the Jvm, I think. It has no readme file 
>> but 
>> > I could give you a couple of directions in order to have it up and 
>> running. 
>> > 
>> > That´s

[GSoC] Mentors: becoming a mentor on Melange (was Re: Mentors: please review student proposals)

2013-05-06 Thread Daniel Solano Gómez
First, my apologies to Rich for not responding to him earlier.

For anyone else who is having trouble viewing student proposals, you
need to be sure you are signed up as a mentor for Clojure.  To do this,
you'll need to have sign up with Melange.  Once you have done so, visit

and find the sign up to be a mentor link about 3/4 of the way down the
page.  You'll fill out a small form, and that will kick off an e-mail to
me.  When I get the e-mail, I'll approve you as a mentor and you should
be good.

If this still doesn't work, e-mail me and I can try sending you an
invitation link.

Sincerely,

Daniel

On Mon May  6 13:21 2013, Rich Morin wrote:
> I sent you a note the other day about the fact that I was unable to
> make any progress on signing up.  Please reply.
> 
> -r
> 
> 
> On May 6, 2013, at 06:23, Daniel Solano Gómez wrote:
> 
> > Hello, all,
> > 
> > This is just a quick reminder for mentors.  Please sign up to be a
> > mentor on Melange[1] with Clojure.  Once you do so, please take a moment
> > to review the proposal that have been submitted.  If you are interested
> > in mentoring, please be sure to set the 'Wish to Mentor' switch to
> > 'yes'.
> > 
> > [1]: https://www.google-melange.com/gsoc/org/google/gsoc2013/clojure_dev
> > 
> > Thanks,
> > 
> > Daniel
> 
>  -- 
> http://www.cfcl.com/rdmRich Morin
> http://www.cfcl.com/rdm/resume r...@cfcl.com
> http://www.cfcl.com/rdm/weblog +1 650-873-7841
> 
> Software system design, development, and documentation
> 
> 
> -- 
> -- 
> 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.
> 
> 


signature.asc
Description: Digital signature


Re: [GSoC] Mentors: please review student proposals

2013-05-06 Thread Rich Morin
I sent you a note the other day about the fact that I was unable to
make any progress on signing up.  Please reply.

-r


On May 6, 2013, at 06:23, Daniel Solano Gómez wrote:

> Hello, all,
> 
> This is just a quick reminder for mentors.  Please sign up to be a
> mentor on Melange[1] with Clojure.  Once you do so, please take a moment
> to review the proposal that have been submitted.  If you are interested
> in mentoring, please be sure to set the 'Wish to Mentor' switch to
> 'yes'.
> 
> [1]: https://www.google-melange.com/gsoc/org/google/gsoc2013/clojure_dev
> 
> Thanks,
> 
> Daniel

 -- 
http://www.cfcl.com/rdmRich Morin
http://www.cfcl.com/rdm/resume r...@cfcl.com
http://www.cfcl.com/rdm/weblog +1 650-873-7841

Software system design, development, and documentation


-- 
-- 
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: I tripped out

2013-05-06 Thread AtKaaZ
I agree, I'm not sure what he means xD
If you ask me, I'd rather have each arg be identified by a keyword instead
of by order
like: (somefn :arg1 "somestr" :arg3 100 :arg2 (+ 1 2))
or all those in a map
I'll probably still do that for me, so that any function will take params
like this. There's probably a way this can be done but it's not good enough
for me, was it with :keys and :as map ?



On Sun, May 5, 2013 at 10:52 PM, Alex Fowler wrote:

> Tell us more about it.
>
>
> On Sunday, May 5, 2013 11:54:32 AM UTC+4, JvJ wrote:
>>
>> Is anyone else tripped out when they realize that when you write args for
>> a function you're basically just destructuring an arg vector?  It trips
>> me 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.




Re: Problems Bootstrapping With Shoreleave-Remote

2013-05-06 Thread Timothy Washington
Ok, I got this working too. Turns out that *namespaced keywords* do not
keep their namespaces as they are transferred from Clojurescript, over to
Clojure-land. This was causing my named remote function, not to be seen.
Anyways, hopefully this can help someone in future.


Cheers
Tim

On Mon, May 6, 2013 at 1:59 PM, Timothy Washington wrote:

> Ok, I got this sorted.
>
> *A)* I used :optimizations :simple , and the JS files are separated out
> *B)* There was a stale version of clojurescript referenced in my
> project.clj file. I just removed that, cleaned out gen'd files with `lein
> cljsbuild clean`, then iii) `lein cljsbuild (once|auto)`.
>
>
> Then my edgar.js loads as expected. HTH.
>
>
> *BUT*, now when my client tries to go to "*
> http://localhost:8080/_shoreleave*";, it gets a 404, "*Remote not found.*"
> error. Now the marginali docs (see 
> here)
> show that the function wrap-rpc, should be setting up that just remote. Is
> there any other magic I need to throw in?
>
>
>(ns edgar.handler
> (:gen-class)
> (:import [java.io File])
> (:use [clojure.core.strint]
>   [compojure.core]
>   [ring.middleware.params]
>   [ring.middleware.multipart-params]
>   [ring.adapter.jetty])
> (:require [clojure.tools.logging :as log]
>   [compojure.handler :as handler]
>   [compojure.route :as route]
>   [ring.util.response :as ring-response]
>[clojure.java.io :as io]
>   [shoreleave.middleware.rpc :as rpc]
>   ))
>
>(defn *remote-fn* [arg1 & remaining]
> "thing")
>
>   (rpc/defremote ^{:remote-name :handler/heartbeat} *remote-fn*)
>
>   (defroutes *app-routes*
>  (GET "/" [] (ring-response/file-response "include/index.html" {
> :root "public"}))
> (route/files "/" { :root "public"})
> (route/resources "/" { :root "public"})
>  (route/not-found "Not Found"))
>
>(def app
> (-> *app-routes*
> *rpc/wrap-rpc*
> handler/site
>  wrap-params
> wrap-multipart-params
>  ))
>
>   (defn -main []
> (let [port (Integer. (get (System/getenv) "PORT" "8080"))]
>   (run-jetty app {:port port :join? false})))
>
> *handler.clj*
>
>
> Thanks
> Tim
>
>
> On Mon, May 6, 2013 at 12:14 PM, Timothy Washington wrote:
>
>> Hi there,
>>
>> I'm trying to use 
>> shoreleave-remote(and
>> shoreleave-remote-ring)
>> in my Clojurescript application, and am running into a few problems.
>>
>>
>>
>> *A)* With the i) Clojurescript and ii) HTML code below, in Chrome,
>> main.js gives me the error "Uncaught Error: Namespace "edgar" already
>> declared.". I'm using lein-cljsbuild, and this happens whether compiled
>> with :optimizations :whitespace or :advanced.
>>
>>   (ns edgar
>> (:require-macros [shoreleave.remotes.macros :as macros])
>> (:require [clojure.browser.repl :as repl]
>>   [shoreleave.remotes.http-rpc :as rpc]))
>>
>>   (rpc/remote-callback :handler/heartbeat ["heartbeat"]
>>#(js/alert %))
>>
>>  *edgar.cljs*
>>
>>
>>   
>>
>>
>>
>>
>>
>> 
>>
>>
>>
>>
>>
>>   
>>
>>
>>
>>
>>
>>   Edgar: At your command
>>
>>
>>
>>
>>
>> 
>>
>>
>>
>>
>>
>> 
>>
>>
>>
>>
>>
>>   
>>
>>
>>
>>
>>
>> 
>>
>>
>>
>>
>>
>> > type='text/javascript'>
>>
>>
>>
>>
>> 
>>
>>
>>
>>
>>
>>   goog.require("edgar")
>>
>>
>>
>>
>>
>> 
>>
>>
>>
>>
>>
>>   
>>
>>
>>
>>
>>
>> 
>>
>>
>>
>>
>>
>>   
>>
>> *index.html*
>>
>>   (ns edgar.handler ...)
>>
>>
>>
>>
>>
>>
>>   (rpc/defremote ^{:remote-name :handler/heartbeat} remote-fn [arg1 &
>> remaining]
>> "fubar" )
>>
>>
>>
>>
>>
>>
>>   (defroutes app-routes
>>
>>
>>
>>
>>
>> (GET "/" []
>>  (ring-response/file-response "include/index.html" { :root
>> "public"}))
>>  
>> )
>>
>>
>>
>>
>>
>>
>>   (def app
>> (-> app-routes
>> rpc/wrap-rpc
>>  wrap-params
>> wrap-multipart-params
>> handler/site))
>>
>>
>>
>>
>>
>>
>>   (defn -main []
>> (let [port (Integer. (get (System/getenv) "PORT" "8080"))]
>>(run-jetty app {:port port :join? false})))
>>
>> *handler.clj ( ... for good measure )*
>>
>>
>>
>> *B)* Next, calling those remotes seems to be a problem. In the generated
>> main.js file, the error "Uncaught TypeError: Cannot call method 'call'
>> of undefined" is produced from the line in fig.1. I checked, and this
>> error is i) happening before any network calls are made and ii) coming from
>> the bottom of the generated main.js file (see fig.2, which is strangely
>> similar to the generated edgar,js file).
>>
>>
>>
>>  shoreleave.remotes.protocols._data_str["_"] = function(t) {
>> return[cljs.core.str(goog.Uri.QueryData.createFromMap(new
>> goog.structs.Map(shoreleave.remotes.common.cl

Re: Problems Bootstrapping With Shoreleave-Remote

2013-05-06 Thread Timothy Washington
Ok, I got this sorted.

*A)* I used :optimizations :simple , and the JS files are separated out
*B)* There was a stale version of clojurescript referenced in my
project.clj file. I just removed that, cleaned out gen'd files with `lein
cljsbuild clean`, then iii) `lein cljsbuild (once|auto)`.


Then my edgar.js loads as expected. HTH.


*BUT*, now when my client tries to go to "*http://localhost:8080/_shoreleave
*", it gets a 404, "*Remote not found.*" error. Now the marginali docs (see
here ) show that the
function wrap-rpc, should be setting up that just remote. Is there any
other magic I need to throw in?


  (ns edgar.handler
(:gen-class)
(:import [java.io File])
(:use [clojure.core.strint]
  [compojure.core]
  [ring.middleware.params]
  [ring.middleware.multipart-params]
  [ring.adapter.jetty])
(:require [clojure.tools.logging :as log]
  [compojure.handler :as handler]
  [compojure.route :as route]
  [ring.util.response :as ring-response]
  [clojure.java.io :as io]
  [shoreleave.middleware.rpc :as rpc]
  ))

  (defn *remote-fn* [arg1 & remaining]
"thing")

  (rpc/defremote ^{:remote-name :handler/heartbeat} *remote-fn*)

  (defroutes *app-routes*
(GET "/" [] (ring-response/file-response "include/index.html" { :root
"public"}))
(route/files "/" { :root "public"})
(route/resources "/" { :root "public"})
(route/not-found "Not Found"))

  (def app
(-> *app-routes*
*rpc/wrap-rpc*
handler/site
wrap-params
wrap-multipart-params
))

  (defn -main []
(let [port (Integer. (get (System/getenv) "PORT" "8080"))]
  (run-jetty app {:port port :join? false})))

*handler.clj*


Thanks
Tim


On Mon, May 6, 2013 at 12:14 PM, Timothy Washington wrote:

> Hi there,
>
> I'm trying to use 
> shoreleave-remote(and
> shoreleave-remote-ring)
> in my Clojurescript application, and am running into a few problems.
>
>
>
> *A)* With the i) Clojurescript and ii) HTML code below, in Chrome,
> main.js gives me the error "Uncaught Error: Namespace "edgar" already
> declared.". I'm using lein-cljsbuild, and this happens whether compiled
> with :optimizations :whitespace or :advanced.
>
>   (ns edgar
> (:require-macros [shoreleave.remotes.macros :as macros])
> (:require [clojure.browser.repl :as repl]
>   [shoreleave.remotes.http-rpc :as rpc]))
>
>   (rpc/remote-callback :handler/heartbeat ["heartbeat"]
>#(js/alert %))
>
>  *edgar.cljs*
>
>
>   
>
>
>
>
>
> 
>
>
>
>
>
>   
>
>
>
>
>
>   Edgar: At your command
>
>
>
>
>
> 
>
>
>
>
>
> 
>
>
>
>
>
>   
>
>
>
>
>
> 
>
>
>
>
>
> 
>
>
>
>
>
> 
>
>
>
>
>
>   goog.require("edgar")
>
>
>
>
>
> 
>
>
>
>
>
>   
>
>
>
>
>
> 
>
>
>
>
>
>   
>
> *index.html*
>
>   (ns edgar.handler ...)
>
>
>
>
>
>   (rpc/defremote ^{:remote-name :handler/heartbeat} remote-fn [arg1 &
> remaining]
> "fubar" )
>
>
>
>
>
>
>   (defroutes app-routes
>
>
>
>
>
> (GET "/" []
>  (ring-response/file-response "include/index.html" { :root
> "public"}))
>  
> )
>
>
>
>
>
>
>   (def app
> (-> app-routes
> rpc/wrap-rpc
>  wrap-params
> wrap-multipart-params
> handler/site))
>
>
>
>
>
>
>   (defn -main []
> (let [port (Integer. (get (System/getenv) "PORT" "8080"))]
>(run-jetty app {:port port :join? false})))
>
> *handler.clj ( ... for good measure )*
>
>
>
> *B)* Next, calling those remotes seems to be a problem. In the generated
> main.js file, the error "Uncaught TypeError: Cannot call method 'call' of
> undefined" is produced from the line in fig.1. I checked, and this error
> is i) happening before any network calls are made and ii) coming from the
> bottom of the generated main.js file (see fig.2, which is strangely similar
> to the generated edgar,js file).
>
>
>
>  shoreleave.remotes.protocols._data_str["_"] = function(t) {
> return[cljs.core.str(goog.Uri.QueryData.createFromMap(new
> goog.structs.Map(shoreleave.remotes.common.clj__GT_js.*call*(null,
> t].join("")
> };
>
>  fig.1
>
> ...
> goog.provide("edgar");
> goog.require("cljs.core");
> goog.require("shoreleave.remotes.http_rpc");
> goog.require("clojure.browser.repl");
> shoreleave.remotes.http_rpc.remote_callback.call(null, "\ufdd0'handler/
> heartbeat", cljs.core.PersistentVector.fromArray(["heartbeat"], true),
> function(p1__5971_SHARP_) {
>  return alert(p1__5971_SHARP_)
> });
>
> fig.2
>
>
>
>
> Any insights on these? Thanks in advance
>
>
> Tim Washington
> Interruptsoftware.ca
>
> No 6: "I'm not a number. I'M A FREE MAN!!!"
> No 2: "HA HA HA HA HAAA"
>
> -- The Prisoner
>

-- 
-- 
You received this message because you

Re: link for clojure programs

2013-05-06 Thread Abraham Varghese

Watch Chas Emerick video ...

Read Clojure Programming by Chas



On Saturday, May 4, 2013 11:31:48 AM UTC+5:30, nre...@yahoo.com wrote:
>
> Can anybody give me a link/websites of codes for BEGINNERS FOR CLOJURE? 
> thanks a lot...
>

-- 
-- 
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: link for clojure programs

2013-05-06 Thread Giacomo Cosenza
In some way, what we miss is a book on co-recursion (the dual of recursion). In 
my experience in teaching clojure to mathematicians, they very naturally get 
co-recursion, because they really know how to be elegant and concise. 

Is there any very good online resource on co-recursion with clojure?

thanks

Mimmo



On May 6, 2013, at 5:03 PM, Niels van Klaveren wrote:

> +1 to Clinton's advice. If anything, SICP et al teach the wrong habits fo 
> working with Clojure.
> 
> Christophe Grand, one of the authors of the aforementioned "Clojure 
> Programming" book, held a great presentation called "You aren't gonna need 
> it" at the first meetup of the The Hague/Rotterdam Clojure group. In it he 
> gave some solid advice what you should concentrate on (and what not) when 
> learning Clojure.
> 
> Learning the core (higher order) functions of Clojure is paramount, and I 
> found working through the 4clojure problems a great way to the rationale 
> behind and working with them.  
> 
> If you need practical help with setting up your Clojure development 
> environment, or other indepth tutorials for specific parts of the language, 
> clojure-doc.org is great. It lacks a bit in overview, and hasn't got the 
> narrative qualities of a book for guiding you from one subject to another 
> though, so I'd recommend one of them as well.
> 
>  Clojuredocs.org is great as cheat-sheet and for short examples.
> 
> my experience, being inculcated with Scheme will make your Clojure 
> code look insane, as idiomatic Clojure (insomuch as there is such a 
> thing) doesn't have functions nested with a butt-load of anonymous 
> functions. 
> 
> http://clojure-doc.org is great and you should go there first. Don't 
> freak out about your environment just yet. Use whatever you use now, 
> and if you're lucky enough to use Vim or Emacs, it'll work for the 
> future, too. 
> 
> Clojure Programming is, in my opinion, the best book out there right 
> now for Clojure. Check it out if you get the chance. 
> 
> Do not rush into refs, atoms, agents, or any of that stuff. Just right 
> some simple code, learn it, and then expand. I've been writing Clojure 
> code for about 15 or so months, with the last six being every day 
> professionally and I still have never created a protocol. 
> 
> Good luck! Clojure is no harder than Python, C#, or whatever you come 
> from, and is totally rewarding. Learning it will be a pleasure. 
> 
> Best, 
> Clinton 
> 
> 
> On Mon, May 6, 2013 at 6:11 AM, Catonano  wrote: 
> > 2013/5/4 nre...@yahoo.com  
> >> 
> >> Can anybody give me a link/websites of codes for BEGINNERS FOR CLOJURE? 
> >> thanks a lot... 
> > 
> > 
> > There are tons of resources on line. 
> > 
> > But in my experience, the famous MIT course  with Abelsson and Sussman is a 
> > must. It´s about Scheme, not Clojure, but it´s important anyway. 
> > 
> > There is also a course on youtube on Scheme by another professor, from 
> > Stanford. That can be important too. 
> > 
> > Then, you have to set up an enviroinment. That´s not a subtlety, it´s a 
> > main 
> > concern. 
> > 
> > As for that, I strongly suggest the Peepcode footage about Emacs and then 
> > live-emacs ( https://github.com/overtone/emacs-live ) 
> > 
> > On my shameful github account I have a little watered down game life with a 
> > little visual layer made with Quilt. So you can see your bot filling square 
> > tiles according to your "strategy". 
> > 
> > It was an exercise from the lambda-next clojure training event. I´m not 
> > sure 
> > about its license but I don´t think the guys are gonna object ;-) 
> > 
> > It uses refs and can be a good first step in learning. The multithreading 
> > stuff is specific to Clojure on the Jvm, I think. It has no readme file but 
> > I could give you a couple of directions in order to have it up and running. 
> > 
> > That´s all comes to m mind at the moment ;-) 
> > 
> > Bye 
> > Catonano 
> > 
> > -- 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Clojure" group. 
> > To post to this group, send email to clo...@googlegroups.com 
> > Note that posts from new members are moderated - please be patient with 
> > your 
> > first post. 
> > To unsubscribe from this group, send email to 
> > clojure+u...@googlegroups.com 
> > For more options, visit this group at 
> > http://groups.google.com/group/clojure?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google Groups 
> > "Clojure" group. 
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to clojure+u...@googlegroups.com. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
> 
> -- 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscrib

Re: ANN: ClojureScript release 0.0-1798

2013-05-06 Thread David Nolen
Stuart Sierra just pushed out 0.0-1803 which fixes a regression around seq,
get, & reduce and extension to JavaScript natives pointed out by Kevin
Lynagh.


On Fri, May 3, 2013 at 6:14 PM, David Nolen  wrote:

> artifact:
> http://search.maven.org/#artifactdetails%7Corg.clojure%7Cclojurescript%7C0.0-1798%7Cjar
>
> Git log: https://github.com/clojure/clojurescript/compare/r1586...r1798
>
> Enhancements
> 
>
> * Code size improvements, (.log js/console "Hello world!") now
>   generates ~100 LOC of pretty printed advanced compiled JavaScript
> * Source map merging, can produce composition source map, source map
> * Optimize PersistentArrayMaps
>
> Changes
> ---
>
> * Symbols are no longer JavaScript strings, support metadata
>
> Fixes
> -
>
> * CLJS-367: chunked seq support in for and doseq, comprehension benchmarks
> * CLJS-496: better implementation of `char`
> * CLJS-495: add exists? macro
> * CLJS-493: get should accept any type
> * CLJS-492: avoid producing unnecessary calls to next in emit-apply-to
> * CLJS-491: avoid layered subvecs
> * CLJS-488: resolve aliased keywords properly
> * CLJS-438: import new threading macros from 1.5
> * CLJS-482: bind *out* as the target of Rhino REPL env printing
> * CLJS-484: Throw exception instead of trying to throw string in defmulti
> compiler macro
> * CLJS-468: Implement IKVReduce for nil, Test reduce-kv and fold with nil
> * CLJS-477: Vararg fns break when first vararg is undefined.
> * CLJS-473: cljs.closure/add-dep-string calls wrong munge
>

-- 
-- 
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: ClojureScript release 0.0-1798

2013-05-06 Thread david
Please don't forget to run "lein cljsbuild clean" after upgrading, assuming 
you're using the cljsbuild lein plugin.  Hope this saves someone some valuable 
time :)

David

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




Re: [GSoC] Mentors: please review student proposals

2013-05-06 Thread David Nolen
Thanks for the reminder!


On Mon, May 6, 2013 at 9:23 AM, Daniel Solano Gómez wrote:

> Hello, all,
>
> This is just a quick reminder for mentors.  Please sign up to be a
> mentor on Melange[1] with Clojure.  Once you do so, please take a moment
> to review the proposal that have been submitted.  If you are interested
> in mentoring, please be sure to set the 'Wish to Mentor' switch to
> 'yes'.
>
> [1]: https://www.google-melange.com/gsoc/org/google/gsoc2013/clojure_dev
>
> Thanks,
>
> Daniel
>

-- 
-- 
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: link for clojure programs

2013-05-06 Thread Niels van Klaveren
+1 to Clinton's advice. If anything, SICP et al teach the wrong habits fo 
working with Clojure.

Christophe Grand, one of the authors of the aforementioned "Clojure 
Programming" book, held a great presentation 
called "You aren't gonna need 
it" 
at the first meetup of the The Hague/Rotterdam Clojure group. In it he gave 
some solid advice what you should concentrate on (and what not) when 
learning Clojure.

Learning the core (higher order) functions of Clojure is paramount, and I 
found working through the 4clojure problems  a 
great way to the rationale behind and working with them.  

If you need practical help with setting up your Clojure development 
environment, or other indepth tutorials for specific parts of the language, 
clojure-doc.org is great. It lacks a bit in overview, and hasn't got the 
narrative qualities of a book for guiding you from one subject to another 
though, so I'd recommend one of 
themas well.

 Clojuredocs.org is great as cheat-sheet and for short examples.

my experience, being inculcated with Scheme will make your Clojure 
> code look insane, as idiomatic Clojure (insomuch as there is such a 
> thing) doesn't have functions nested with a butt-load of anonymous 
> functions. 
>
> http://clojure-doc.org is great and you should go there first. Don't 
> freak out about your environment just yet. Use whatever you use now, 
> and if you're lucky enough to use Vim or Emacs, it'll work for the 
> future, too. 
>
> Clojure Programming is, in my opinion, the best book out there right 
> now for Clojure. Check it out if you get the chance. 
>
> Do not rush into refs, atoms, agents, or any of that stuff. Just right 
> some simple code, learn it, and then expand. I've been writing Clojure 
> code for about 15 or so months, with the last six being every day 
> professionally and I still have never created a protocol. 
>
> Good luck! Clojure is no harder than Python, C#, or whatever you come 
> from, and is totally rewarding. Learning it will be a pleasure. 
>
> Best, 
> Clinton 
>
>
> On Mon, May 6, 2013 at 6:11 AM, Catonano > 
> wrote: 
> > 2013/5/4 nre...@yahoo.com  > 
>
> >> 
> >> Can anybody give me a link/websites of codes for BEGINNERS FOR CLOJURE? 
> >> thanks a lot... 
> > 
> > 
> > There are tons of resources on line. 
> > 
> > But in my experience, the famous MIT course  with Abelsson and Sussman 
> is a 
> > must. It´s about Scheme, not Clojure, but it´s important anyway. 
> > 
> > There is also a course on youtube on Scheme by another professor, from 
> > Stanford. That can be important too. 
> > 
> > Then, you have to set up an enviroinment. That´s not a subtlety, it´s a 
> main 
> > concern. 
> > 
> > As for that, I strongly suggest the Peepcode footage about Emacs and 
> then 
> > live-emacs ( https://github.com/overtone/emacs-live ) 
> > 
> > On my shameful github account I have a little watered down game life 
> with a 
> > little visual layer made with Quilt. So you can see your bot filling 
> square 
> > tiles according to your "strategy". 
> > 
> > It was an exercise from the lambda-next clojure training event. I´m not 
> sure 
> > about its license but I don´t think the guys are gonna object ;-) 
> > 
> > It uses refs and can be a good first step in learning. The 
> multithreading 
> > stuff is specific to Clojure on the Jvm, I think. It has no readme file 
> but 
> > I could give you a couple of directions in order to have it up and 
> running. 
> > 
> > That´s all comes to m mind at the moment ;-) 
> > 
> > Bye 
> > Catonano 
> > 
> > -- 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Clojure" group. 
> > To post to this group, send email to clo...@googlegroups.com 
> > Note that posts from new members are moderated - please be patient with 
> your 
> > first post. 
> > To unsubscribe from this group, send email to 
> > clojure+u...@googlegroups.com  
> > For more options, visit this group at 
> > http://groups.google.com/group/clojure?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Clojure" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to clojure+u...@googlegroups.com . 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>

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

Re: link for clojure programs

2013-05-06 Thread Clinton Dreisbach
Holy smokes, please ignore the previous email on this thread. You most
certainly do not need to read SICP (the MIT course mentioned), and in
my experience, being inculcated with Scheme will make your Clojure
code look insane, as idiomatic Clojure (insomuch as there is such a
thing) doesn't have functions nested with a butt-load of anonymous
functions.

http://clojure-doc.org is great and you should go there first. Don't
freak out about your environment just yet. Use whatever you use now,
and if you're lucky enough to use Vim or Emacs, it'll work for the
future, too.

Clojure Programming is, in my opinion, the best book out there right
now for Clojure. Check it out if you get the chance.

Do not rush into refs, atoms, agents, or any of that stuff. Just right
some simple code, learn it, and then expand. I've been writing Clojure
code for about 15 or so months, with the last six being every day
professionally and I still have never created a protocol.

Good luck! Clojure is no harder than Python, C#, or whatever you come
from, and is totally rewarding. Learning it will be a pleasure.

Best,
Clinton


On Mon, May 6, 2013 at 6:11 AM, Catonano  wrote:
> 2013/5/4 nrel...@yahoo.com 
>>
>> Can anybody give me a link/websites of codes for BEGINNERS FOR CLOJURE?
>> thanks a lot...
>
>
> There are tons of resources on line.
>
> But in my experience, the famous MIT course  with Abelsson and Sussman is a
> must. It´s about Scheme, not Clojure, but it´s important anyway.
>
> There is also a course on youtube on Scheme by another professor, from
> Stanford. That can be important too.
>
> Then, you have to set up an enviroinment. That´s not a subtlety, it´s a main
> concern.
>
> As for that, I strongly suggest the Peepcode footage about Emacs and then
> live-emacs ( https://github.com/overtone/emacs-live )
>
> On my shameful github account I have a little watered down game life with a
> little visual layer made with Quilt. So you can see your bot filling square
> tiles according to your "strategy".
>
> It was an exercise from the lambda-next clojure training event. I´m not sure
> about its license but I don´t think the guys are gonna object ;-)
>
> It uses refs and can be a good first step in learning. The multithreading
> stuff is specific to Clojure on the Jvm, I think. It has no readme file but
> I could give you a couple of directions in order to have it up and running.
>
> That´s all comes to m mind at the moment ;-)
>
> Bye
> Catonano
>
> --
> --
> 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] http-kit 2.1.1. Bug fix release, please upgrade if using the WebSocket

2013-05-06 Thread Takahiro Hozumi
Shen, Thank you for your announcement.


2013/5/6 Shen, Feng 

> Hi,
>
> It's a bug fix release. *If using the WebSocket support, please upgrade.
> All older version has this bug.*
>
> The bug is "Large websocket requests get corrupted". Detail:
> https://github.com/http-kit/http-kit/issues/47. And thanks Gal Dolber for
> reporting it.
>
> Condition this bug will be triggered:
>
>1. A large message sent to server,  server may received this message
>segmented, will likely to unmark the message wrongly
>2. Small message ( 1k - 30k kilobytes, is less likely to have this
>problem)
>
>
> The fixed version is already push to clojars:
>
> [http-kit "2.1.1"]
>
>  --
> --
> 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.




[GSoC] Mentors: please review student proposals

2013-05-06 Thread Daniel Solano Gómez
Hello, all,

This is just a quick reminder for mentors.  Please sign up to be a
mentor on Melange[1] with Clojure.  Once you do so, please take a moment
to review the proposal that have been submitted.  If you are interested
in mentoring, please be sure to set the 'Wish to Mentor' switch to
'yes'.

[1]: https://www.google-melange.com/gsoc/org/google/gsoc2013/clojure_dev

Thanks,

Daniel


signature.asc
Description: Digital signature


[ANN] http-kit 2.1.1. Bug fix release, please upgrade if using the WebSocket

2013-05-06 Thread Shen, Feng
Hi,

It's a bug fix release. *If using the WebSocket support, please upgrade.
All older version has this bug.*

The bug is "Large websocket requests get corrupted". Detail:
https://github.com/http-kit/http-kit/issues/47. And thanks Gal Dolber for
reporting it.

Condition this bug will be triggered:

   1. A large message sent to server,  server may received this message
   segmented, will likely to unmark the message wrongly
   2. Small message ( 1k - 30k kilobytes, is less likely to have this
   problem)


The fixed version is already push to clojars:

[http-kit "2.1.1"]

-- 
-- 
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] conf-er 1.0.1

2013-05-06 Thread Adam Clements
If you have a look in the tests you'll see how I override the config there,
but it is a bit naff making you with-redefs one of the library's internal
vars, and double naff that you have to wrap it in a delay.

(with-redefs [conf-er/config-map (delay {:test 42})]
  (fact (config :test) => 42))

If you do that for now, I'll include a tests util in the next release which
does the same from a guaranteed stable api function

Adam
On 6 May 2013 01:46, "Russell Mull"  wrote:

> This looks simple and useful, thanks!
>
> Supposing I had a function that called this library, how could I go about
> testing it easily? That is, the configuration file becomes implicitly an
> input to the function, one that I'd like to be able to control from my
> tests. Perhaps something like this could be used to provide or override
> config settings dynamically:
>
> (with-config {:username "bogus"}
>   (...))
>
> I'm not trying to open the dynamic scoping can of worms here; this library
> clearly is a choice for people already willing to work in that way.
>
>
> On Thursday, May 2, 2013 9:40:29 PM UTC+9, Adam Clements wrote:
>>
>> A very simple library for loading application level config from a
>> configuration file in a nice way, with caching and reloading functionality.
>>
>> Any other configuration libraries I found were either massively overkill
>> for my needs (full on validation schemas built in), too complicated to set
>> up and pass around or involved simply read-evaling a whole namespace which
>> could be insecure depending where you get your config.
>>
>> Simple but useful - I found myself duplicating this code in almost all my
>> projects before making it into a library! Well tested and documented,
>> there are very few moving parts so I expect this to stay stable and not
>> really change over time.
>>
>> Source:  
>> https://github.com/TouchType/**conf-er
>> Clojars: [conf-er "1.0.1"]
>>
>> The idea is to have a single configuration file which consists of a
>> keyworded map, you then look up individual properties with nested keywords,
>> for example your config file looks like this (simple EDN map):
>>
>> ;; my-config.conf
>>> {:username "joe.bloggs"
>>>  :password "letmein"
>>>  :database {:host "127.0.0.1"
>>> :port 1234}
>>>  :my.library/number 42}
>>
>>
>> And then look up the configuration from anywhere within your program!
>> Simply include the conf-er namespace
>>
>> (use 'conf-er)
>>
>>
>>> (config :username) => "joe.bloggs"
>>> (configured? :database) => true
>>> (config :database) => {:host "127.0.0.1" :port 1234}
>>> (config :database :port) => 1234
>>
>>
>>
>> Tell your program where to find the configuration file from your
>> leiningen project.clj during development, or if you are distributing a jar
>> then add the property onto the java command line call:
>>>
>>> ...
>>> :jvm-opts ["-Dconfig=~/my-config.conf"]
>>> ...
>>
>>
>> (config :database :connections) => (Exception "Couldn't find :database
>> :connections in configuration file")
>> (opt-config :database :connections) => nil
>>
>> If you use this from within a library, you must namespace your
>> configuration in case the application using your library also wishes to use
>> conf-er. You can do this like so:
>>
>> (ns my.library
>>>   (:require [conf-er :refer [config]]))
>>> (config ::number) => 42
>>
>>
>> Here :number will expand out to the namespaced keyword
>> :my.library/number, which we put in our configuration file earlier.
>>
>> Hope this is of use to some people.
>>
>> Adam
>>
>  --
> --
> 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: link for clojure programs

2013-05-06 Thread Catonano
2013/5/4 nrel...@yahoo.com 

> Can anybody give me a link/websites of codes for BEGINNERS FOR CLOJURE?
> thanks a lot...
>

There are tons of resources on line.

But in my experience, the famous MIT course  with Abelsson and Sussman is a
must. It´s about Scheme, not Clojure, but it´s important anyway.

There is also a course on youtube on Scheme by another professor, from
Stanford. That can be important too.

Then, you have to set up an enviroinment. That´s not a subtlety, it´s a
main concern.

As for that, I strongly suggest the Peepcode footage about Emacs and then
live-emacs ( https://github.com/overtone/emacs-live )

On my shameful github account I have a little watered down game life with a
little visual layer made with Quilt. So you can see your bot filling square
tiles according to your "strategy".

It was an exercise from the lambda-next clojure training event. I´m not
sure about its license but I don´t think the guys are gonna object ;-)

It uses refs and can be a good first step in learning. The multithreading
stuff is specific to Clojure on the Jvm, I think. It has no readme file but
I could give you a couple of directions in order to have it up and running.

That´s all comes to m mind at the moment ;-)

Bye
Catonano

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




Re: core.logic: Strange behaviour when using featurec with nested feature map (bug?).

2013-05-06 Thread Martin Forsgren
Thanks for fixing it!

Den måndagen den 6:e maj 2013 kl. 02:43:53 UTC+2 skrev David Nolen:
>
> Fixed in master, thanks for the report!
>
>
> On Thu, Apr 25, 2013 at 5:53 PM, Martin Forsgren 
> 
> > wrote:
>
>> Hi!
>>
>> I noticed something strange when using featurec with a nested feature 
>> map(I'm using core.logic 0.8.3). 
>> This works as expected:
>> (run* [x y]
>>   (featurec x {:a {:b 1}})
>>   (== y {:b 1})
>>   (== x {:a y}))
>> and returns:
>> ([{:a {:b 1}} {:b 1}])
>>
>> But with the last two goals swapped I get an exception: 
>> (run* [x y]
>>   (featurec x {:a {:b 1}})
>>   (== x {:a y})
>>   (== y {:b 1}))
>> Throws:
>> Exception clojure.core.logic.PMap@3c6f0bed is non-storable
>> clojure.core.logic.LVar (logic.clj:647)
>> clojure.core.logic/unify (logic.clj:231)
>> clojure.core.logic/unify-with-pmap* (logic.clj:2601)
>> clojure.core.logic.PMap (logic.clj:2614)
>> clojure.core.logic/unify (logic.clj:232)
>> clojure.core.logic/==/fn--2819 (logic.clj:1135)
>> clojure.core.logic/composeg/fn--2745 (logic.clj:1029)
>> clojure.core.logic/-featurec/reify--3655 (logic.clj:2646)
>> clojure.core.logic/composeg/fn--2745 (logic.clj:1029)
>> clojure.core.logic/composeg/fn--2745 (logic.clj:1030)
>> clojure.core.logic/run-constraint/fn--3431 (logic.clj:2184)
>> clojure.core.logic/fix-constraints (logic.clj:2211)
>>
>> I get the same exception when (== y {:b 1}) is left out:
>> (run* [x y]
>>   (featurec x {:a {:b 1}})
>>   (== x {:a y}))
>>
>> Any ideas why this is happening? 
>>
>> - Martin
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

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