Re: Clojure/West (Portland, Mar 18-20) - Mission Kontrol, unsessions, lightning talks

2013-02-07 Thread Rich Morin
On Feb 6, 2013, at 21:07, Leonardo Borges wrote:
 Where can we find more about this datomic hack session?

Sorry, it appears that I only posted about this to the Datomic list:

  There will be some unconference sessions Monday evening, so I'll try to
  schedule something then for Codeq / Datomic.  However, those sessions
  will be pretty short, so I'm still planning to do a hack session Sunday
  afternoon from 3-6 (or so :-).

  I probably won't have a specific location until Sunday afternoon, so my
  plan is to leave some cookie crumbs lying about.

  *  a relevant tweet, eg:

   The #datomic hack session at #clojurewest is located at ___.
   Look for the ___.

  *  a note on a message board and/or front desk, eg:

   Datomic hack session, 3-6 pm, ___

  This is a good-sized hotel, so I'm pretty sure we'll be able to find a
  spot to hang out (eg, in the main lobby).  Worst case, a few of us can
  meet in my hotel room.  After the session, I'll lead a dinner run.

If anyone is arriving earlier and wants to help with logistics, contact me
(off-list) so we can coordinate...

-r

 -- 
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: mysql auth issue when using upstart for ring

2013-02-07 Thread Michael Wood
Hi

On 7 February 2013 09:12, Omer Iqbal momeriqb...@gmail.com wrote:
 Hey, I used a similar upstart script which works fine for ring.
 However, weirdly enough, my auth with a mysql database fails. I'm using
 korma to interface with the db. The problem only occurs with upstart
 script,, because it works fine when I run it myself.
 To be clearer. When I run: lein trampoline run/lein ring server, my db
 connects fine.
 However, I use the following upstart script:

 start on startup
 start on runlevel [2345]
 stop on runlevel [!2345]
 chdir /home/ubuntu/www
 setuid ubuntu
 exec lein trampoline run  out.log 21

 When I run the daemon, ring runs fine. However, when it communicates with
 the mysql server, it throw the following exception (amongst a sea of stack
 traces): java.sql.SQLException: Access denied for user 'root'@'localhost'
 (using password: NO)

 This is weird because my korma config does supply a password, and it works
 fine when I run lein run myself. However for reference sake, I check for an
 environment variable(CLJ_ENV) to decide which config to use. SInce the only
 differentiating factor is upstart, my assumption is that the problem is due
 to setuid. But to be honest, I have no idea what's going wrong.

See this:

http://upstart.ubuntu.com/cookbook/#environment-variables

In particular this part:

Note that a Job Configuration File does not have access to a user's
environment variables, not even the superuser. This is not possible
since all job processes created are children of init which does not
have a user's environment.

I suspect that has something to do with the problem.

 Oh, and for clarification this is all on an aws machine running Ubuntu
 Server 12.04 LTS.
 Any ideas on whats going on?


-- 
Michael Wood esiot...@gmail.com

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




Re: [ANN] Morph v0.1.0 Monads friends: pure functions, less boilerplate

2013-02-07 Thread Marek Šrank
btw, have you seen https://github.com/jduey/protocol-monads ?

Marek

On Thursday, February 7, 2013 1:06:39 AM UTC+1, Armando Blancas wrote:

 Morph is a new implementation of monads based on protocols. It's intended 
 to provide the common patterns of error-handling, short-circuit sequencing, 
 and modeling of stateful computations in pure functions. I've tried to make 
 this library idiomatic while keeping it close to its Haskell roots.

 This is a utility library that, I hope, can make your coding easier. No 
 particular knowledge is assumed or required. The docs name things but rely 
 on getting an intuitive feeling of what's going on. Protocols are relevant 
 only if you want to write your own plumbing, which shouldn't be difficult; 
 otherwise it's all ready to use.

 Project:   https://github.com/blancas/morph
 User Guide: https://github.com/blancas/morph/wiki
 Codox API:  http://blancas.github.com/morph

 Please use the project wiki for feedback, bug reports, or feature requests.



-- 
-- 
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: Prismatic Plumbing and Graph Open-Source Release

2013-02-07 Thread Edmund
Hey Aria / Jason,

  Thanks for OSing this library, its really useful.  One question: how do 
you deal with nesting on the output side of graph declaration ?  I 
understand it for fnk, but but how would I achieve:

{:a {:b 1}} - {:a {:b 1, :c 2}}

with a single declaration:

(graph/eager-compile
 {??? (fnk [[:a b]] (inc b))}

where ??? is the binding form I'm after to describe the nesting ?  

I'm currently doing this by breaking up my map and using update-in, but it 
seems you must have a sneaky trick to do this declaratively ?

I figure [:a :c] would be an possible syntax ?

Thanks again,

 Edmund
On Tuesday, 29 January 2013 18:46:54 UTC, Aria Haghighi wrote:

 Hey all,

  Prismatic has open-sourced our Plumbing and Graph library on 
 githubhttps://github.com/prismatic/plumbing. 
 Jason Wolfe gave a 
 talkhttp://blog.getprismatic.com/blog/2012/10/1/prismatics-graph-at-strange-loop.htmlabout
  how we use graph for systems composition at Strange loop last year. 
 Please give the library
 a whirl and let us know if you're using it and if you find any issues or 
 feature requests. We use this library very heavily throughout our code and 
 hope others find it useful as well.

  Best, Aria


-- 
-- 
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: mysql auth issue when using upstart for ring

2013-02-07 Thread Omer Iqbal
Thanks Michael. That was the problem!

On Thu, Feb 7, 2013 at 5:20 PM, Michael Wood esiot...@gmail.com wrote:

 Hi

 On 7 February 2013 09:12, Omer Iqbal momeriqb...@gmail.com wrote:
  Hey, I used a similar upstart script which works fine for ring.
  However, weirdly enough, my auth with a mysql database fails. I'm using
  korma to interface with the db. The problem only occurs with upstart
  script,, because it works fine when I run it myself.
  To be clearer. When I run: lein trampoline run/lein ring server, my db
  connects fine.
  However, I use the following upstart script:
 
  start on startup
  start on runlevel [2345]
  stop on runlevel [!2345]
  chdir /home/ubuntu/www
  setuid ubuntu
  exec lein trampoline run  out.log 21
 
  When I run the daemon, ring runs fine. However, when it communicates with
  the mysql server, it throw the following exception (amongst a sea of
 stack
  traces): java.sql.SQLException: Access denied for user 'root'@
 'localhost'
  (using password: NO)
 
  This is weird because my korma config does supply a password, and it
 works
  fine when I run lein run myself. However for reference sake, I check for
 an
  environment variable(CLJ_ENV) to decide which config to use. SInce the
 only
  differentiating factor is upstart, my assumption is that the problem is
 due
  to setuid. But to be honest, I have no idea what's going wrong.

 See this:

 http://upstart.ubuntu.com/cookbook/#environment-variables

 In particular this part:

 Note that a Job Configuration File does not have access to a user's
 environment variables, not even the superuser. This is not possible
 since all job processes created are children of init which does not
 have a user's environment.

 I suspect that has something to do with the problem.

  Oh, and for clarification this is all on an aws machine running Ubuntu
  Server 12.04 LTS.
  Any ideas on whats going on?


 --
 Michael Wood esiot...@gmail.com

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




-- 
-- 
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] Kern 0.5.0 -- A text-parsing library

2013-02-07 Thread Ragnar Dahlén
Hi Armando,

Thank you for your great work with this library! I don't have much previous 
experience with parser combinators, but with your implementation, and the 
wonderful documentation, I've had a lot of fun playing and learning.

I've been hacking on a small project for implementing a subset of HAML for 
Clojure, with the goal of using HAML instead of HTML for enlive templates. 
It is very early days, but if you're interested, I'd be very happy for any 
feedback on the parser, which uses kern. I've probably done a lot of stupid 
stuff.

Project:
https://github.com/ragnard/hamelito

Parser:
https://github.com/ragnard/hamelito/blob/master/src/hamelito/parsing.clj

Best regards,

Ragnar


On Monday, 21 January 2013 18:27:07 UTC, Armando Blancas wrote:

 Kern is a text-parsing library based on Parsec, the Haskell monadic 
 combinators library. It is useful for parsing all kinds of text: data, 
 program input, configuration files, DSLs, or a full-blown programming 
 language.

 My main goal is, like the Self folks, the power of simplicity. In the 
 ideal case the grammar is the implementation, but I'm OK with something 
 close. Next comes performance, which appears to be fine with hot code but 
 not great otherwise. Let me know and will see what I can do.

 https://github.com/blancas/kern

 The wiki has a user's guide, tutorials, and links to several samples; will 
 be adding some more topics there. There's also a Codox API zip file 
 available for download. Feedback, suggestions, requests, bug reports are 
 all very welcome; please use the project wiki.



-- 
-- 
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: Prismatic Plumbing and Graph Open-Source Release

2013-02-07 Thread Valentin Golev
Graph definitions really remind me of `do` syntax in Haskell, where you can 
bind values and then use them in later steps of the computation.

On Tuesday, January 29, 2013 10:46:54 PM UTC+4, Aria Haghighi wrote:

 Hey all,

  Prismatic has open-sourced our Plumbing and Graph library on 
 githubhttps://github.com/prismatic/plumbing. 
 Jason Wolfe gave a 
 talkhttp://blog.getprismatic.com/blog/2012/10/1/prismatics-graph-at-strange-loop.htmlabout
  how we use graph for systems composition at Strange loop last year. 
 Please give the library
 a whirl and let us know if you're using it and if you find any issues or 
 feature requests. We use this library very heavily throughout our code and 
 hope others find it useful as well.

  Best, Aria


-- 
-- 
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 - Python Style suggestion

2013-02-07 Thread Softaddicts
Having worked with a number of languages sensitive to white spaces including
 magic columns reminiscent of the paper cards, I honestly do not find any
sex-appeal in a syntax relying on spaces, line breaks and indentation.

It's error prone, errors are harder to detect, and breaks the tool chain.

As far as this alternate proposal, I find the end result ugly at best.
It does not favor a compact coding style which I have chosen years ago
after stopping using the older languages above which did not allow me to be
concise.

Mixing both styles together does not do anything to dissipate this repulsion 
feeling.

Frankly, I do not catch it, I have been working in at least a dozen languages
and half  a dozen assemblers dating back to Fortran and Cobol, older Lisps,...
Working I said, not as a hobby.

I never tried to bend a language to my previous habits. I adapted and made my 
playground within the  limits imposed by the language, that's it.

Are these discussions about parenthesis a sign that humans cannot adapt anymore
and truly try new concepts before judging their merit ? In a decent amount of 
time ?
It took me three months to adapt to Clojure while writing production code and 
I started at ... 47 years old.

It's like if this parenthesis issue is the end of the world.

What will happen the day Earth suffers a major blow (The aftermath series) ?
Insects will pick up were we left ?

http://www.banquedessinee.be/all--21-58.html

No need to understand french, just look at the last picture of the page...

Sorry for the rant but I find these discussions a bad use of our life time.
There is so much to do aside from nit picking on parenthesis

Luc P.



 If someone does write a Lisp with significant whitespace, can we please
 call it Whitespathe?
 
 On 7 February 2013 10:30, Marco Munizaga drchoc...@gmail.com wrote:
 
  We had this talk with scheme. They called it I expressions. Here is the
  link http://srfi.schemers.org/srfi-49/srfi-49.html
 
  Do it because you can, and so you can decide for yourself what to think
  about it.
 
  --
  --
  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.
 
 
 
--
Softaddictslprefonta...@softaddicts.ca sent by ibisMail from my ipad!

-- 
-- 
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/West (Portland, Mar 18-20) - Mission Kontrol, unsessions, lightning talks

2013-02-07 Thread Leonardo Borges
ah now that makes sense. I'll watch the twittersphere :)
Leonardo Borges
www.leonardoborges.com


On Thu, Feb 7, 2013 at 7:07 PM, Rich Morin r...@cfcl.com wrote:
 On Feb 6, 2013, at 21:07, Leonardo Borges wrote:
 Where can we find more about this datomic hack session?

 Sorry, it appears that I only posted about this to the Datomic list:

   There will be some unconference sessions Monday evening, so I'll try to
   schedule something then for Codeq / Datomic.  However, those sessions
   will be pretty short, so I'm still planning to do a hack session Sunday
   afternoon from 3-6 (or so :-).

   I probably won't have a specific location until Sunday afternoon, so my
   plan is to leave some cookie crumbs lying about.

   *  a relevant tweet, eg:

The #datomic hack session at #clojurewest is located at ___.
Look for the ___.

   *  a note on a message board and/or front desk, eg:

Datomic hack session, 3-6 pm, ___

   This is a good-sized hotel, so I'm pretty sure we'll be able to find a
   spot to hang out (eg, in the main lobby).  Worst case, a few of us can
   meet in my hotel room.  After the session, I'll lead a dinner run.

 If anyone is arriving earlier and wants to help with logistics, contact me
 (off-list) so we can coordinate...

 -r

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



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




Type hints ignored in proxy-super

2013-02-07 Thread Vladimir Tsichevski
Hi,

seems type hints are ignored when we use proxy-super:

(set! *warn-on-reflection* true)
(proxy [Object][]
  (equals[o]
(proxy-super equals)))

Reflection warning, null:3 - reference to field equals can't be resolved.

Regards,
Vladimir

PS: I'm on clojure-1.4

-- 
-- 
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: Prismatic Plumbing and Graph Open-Source Release

2013-02-07 Thread László Török
+1, was also wondering

2013/2/7 Valentin Golev m...@valyagolev.net

 Graph definitions really remind me of `do` syntax in Haskell, where you
 can bind values and then use them in later steps of the computation.


 On Tuesday, January 29, 2013 10:46:54 PM UTC+4, Aria Haghighi wrote:

 Hey all,

  Prismatic has open-sourced our Plumbing and Graph library on 
 githubhttps://github.com/prismatic/plumbing.
 Jason Wolfe gave a 
 talkhttp://blog.getprismatic.com/blog/2012/10/1/prismatics-graph-at-strange-loop.htmlabout
  how we use graph for systems composition at Strange loop last year.
 Please give the library
 a whirl and let us know if you're using it and if you find any issues or
 feature requests. We use this library very heavily throughout our code and
 hope others find it useful as well.

  Best, Aria

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






-- 
László Török

-- 
-- 
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: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-07 Thread larry google groups
 You've also got a max-age of 90 for your session cookies, which would 
mean your sessions will 
 time out in 90 seconds. Is that what you want?

Yes, a painful compromise, since the designers didn't want to make the 
Start Over link obvious, we went with a short session. This is for a 
little search widget that most users would only interact with for 60 
seconds or so. (Or we could be wrong about this, in which case we will need 
to extend the session length). 

Thanks for the tips I am implementing them now. 

  (route/resources /)

What is your hunch about this? The placement? 



On Wednesday, February 6, 2013 4:37:09 PM UTC-5, James Reeves wrote:

 Could you try replacing the wrap-resource middleware with the 
 route/resources function? The latter operates in a slightly different way 
 to the Ring middleware, and if the Compojure route works without issue, I 
 might have an idea what the problem is.

 i.e. your code should look like:

 (defroutes app-routes
   (ANY / request (index request))
   ;; rest of routes
   (GET /finish-user-sign-up request (finish-user-sign-up request))
   (route/resources /)
   (route/not-found Page not found))

 You've also got a max-age of 90 for your session cookies, which would mean 
 your sessions will time out in 90 seconds. Is that what you want?

 Also:

(GET /foo request (foo request))

 Is equivalent to:

(GET /foo [] foo)

 - James


  On 6 February 2013 15:10, larry google groups 
 lawrenc...@gmail.comjavascript:
  wrote:


 I created a web app using Ring, Jetty, Enlive, Compojure. 

 At the end, I bundled everything together by running the command lein 
 uberjar. The resulting file was 21 megs. 

 I scp the file to the server, then I ssh to the server. I start a 
 screen session. Inside the screen session I type :

 java -jar kiosk-0.1-standalone.jar 30001
  
 The number at the end is the port that I have it running on. 

 Sometimes, when people look at the app, none of the CSS files load. I 
 have run into this bug myself. Sometimes, when I look at the app, the 
 Javascript and CSS paths are broken. If I click view source and see the 
 source, and if I try to follow the links to the CSS or Javascript, then I 
 get 404 errors. 

 I have this in my code: 

   (wrap-resource public)

 The structure of the code is: 

 /resources
 /public
 /css
 /javascript
 /templates
 /src
 /kiosk

 The code is still able to find the templates in resources/templates, and 
 that HTML is given to Enlive, so something appears on screen. It's just the 
 stuff in public that sometimes goes missing. 

 Can anyone suggest why? My routes are defined like this:


 (defroutes app-routes
   (ANY / request (index request))
   (GET /search-results request (search-results request))
   (GET /schema [] (schema))
   (GET /account request (account request))
   (GET /login request (login request))
   (GET /start-over request (start-over request))
   (GET /admin request (admin request))
   (GET /ok request (ok request))
   (POST /admin request (record-new-question-if-any request))
   (GET /delete-question/:question-to-delete request (delete-question 
 request))
   (GET /finish-user-sign-up request (finish-user-sign-up request))
   (route/not-found Page not found))

 (def app
   (- app-routes
   (wrap-resource public)
   (wrap-session {:cookie-name discovery-session :cookie-attrs 
 {:max-age 90 }})
   (wrap-cookies)
   (wrap-keyword-params)
   (wrap-nested-params)
   (wrap-params)))


  -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.comjavascript:
 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 javascript:
 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 javascript:.
 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: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-07 Thread larry google groups
About this:

(defroutes app-routes
  (ANY / request (index request))
  ;; rest of routes
  (GET /finish-user-sign-up request (finish-user-sign-up request))
  (route/resources /)
  (route/not-found Page not found))


I removed (wrap-resource) and added (route/resources /) to the routes, in 
the penultimate position as you suggest, but that seems to have busted 
things completely. None of the images, css or javascript inside of 
resources/public can now be found. 

Any further thoughts on this? This app is suppose to go live today so I 
would like to figure this out. 





On Wednesday, February 6, 2013 4:37:09 PM UTC-5, James Reeves wrote:

 Could you try replacing the wrap-resource middleware with the 
 route/resources function? The latter operates in a slightly different way 
 to the Ring middleware, and if the Compojure route works without issue, I 
 might have an idea what the problem is.

 i.e. your code should look like:

 (defroutes app-routes
   (ANY / request (index request))
   ;; rest of routes
   (GET /finish-user-sign-up request (finish-user-sign-up request))
   (route/resources /)
   (route/not-found Page not found))

 You've also got a max-age of 90 for your session cookies, which would mean 
 your sessions will time out in 90 seconds. Is that what you want?

 Also:

(GET /foo request (foo request))

 Is equivalent to:

(GET /foo [] foo)

 - James


  On 6 February 2013 15:10, larry google groups 
 lawrenc...@gmail.comjavascript:
  wrote:


 I created a web app using Ring, Jetty, Enlive, Compojure. 

 At the end, I bundled everything together by running the command lein 
 uberjar. The resulting file was 21 megs. 

 I scp the file to the server, then I ssh to the server. I start a 
 screen session. Inside the screen session I type :

 java -jar kiosk-0.1-standalone.jar 30001
  
 The number at the end is the port that I have it running on. 

 Sometimes, when people look at the app, none of the CSS files load. I 
 have run into this bug myself. Sometimes, when I look at the app, the 
 Javascript and CSS paths are broken. If I click view source and see the 
 source, and if I try to follow the links to the CSS or Javascript, then I 
 get 404 errors. 

 I have this in my code: 

   (wrap-resource public)

 The structure of the code is: 

 /resources
 /public
 /css
 /javascript
 /templates
 /src
 /kiosk

 The code is still able to find the templates in resources/templates, and 
 that HTML is given to Enlive, so something appears on screen. It's just the 
 stuff in public that sometimes goes missing. 

 Can anyone suggest why? My routes are defined like this:


 (defroutes app-routes
   (ANY / request (index request))
   (GET /search-results request (search-results request))
   (GET /schema [] (schema))
   (GET /account request (account request))
   (GET /login request (login request))
   (GET /start-over request (start-over request))
   (GET /admin request (admin request))
   (GET /ok request (ok request))
   (POST /admin request (record-new-question-if-any request))
   (GET /delete-question/:question-to-delete request (delete-question 
 request))
   (GET /finish-user-sign-up request (finish-user-sign-up request))
   (route/not-found Page not found))

 (def app
   (- app-routes
   (wrap-resource public)
   (wrap-session {:cookie-name discovery-session :cookie-attrs 
 {:max-age 90 }})
   (wrap-cookies)
   (wrap-keyword-params)
   (wrap-nested-params)
   (wrap-params)))


  -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.comjavascript:
 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 javascript:
 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 javascript:.
 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: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-07 Thread larry google groups
Ah, sorry, that does seem to have worked (I think I forgot to recompile). 
What do you think the problem was?


On Thursday, February 7, 2013 10:41:00 AM UTC-5, larry google groups wrote:

 About this:

 (defroutes app-routes
   (ANY / request (index request))
   ;; rest of routes
   (GET /finish-user-sign-up request (finish-user-sign-up request))
   (route/resources /)
   (route/not-found Page not found))


 I removed (wrap-resource) and added (route/resources /) to the routes, 
 in the penultimate position as you suggest, but that seems to have busted 
 things completely. None of the images, css or javascript inside of 
 resources/public can now be found. 

 Any further thoughts on this? This app is suppose to go live today so I 
 would like to figure this out. 





 On Wednesday, February 6, 2013 4:37:09 PM UTC-5, James Reeves wrote:

 Could you try replacing the wrap-resource middleware with the 
 route/resources function? The latter operates in a slightly different way 
 to the Ring middleware, and if the Compojure route works without issue, I 
 might have an idea what the problem is.

 i.e. your code should look like:

 (defroutes app-routes
   (ANY / request (index request))
   ;; rest of routes
   (GET /finish-user-sign-up request (finish-user-sign-up request))
   (route/resources /)
   (route/not-found Page not found))

 You've also got a max-age of 90 for your session cookies, which would 
 mean your sessions will time out in 90 seconds. Is that what you want?

 Also:

(GET /foo request (foo request))

 Is equivalent to:

(GET /foo [] foo)

 - James


  On 6 February 2013 15:10, larry google groups lawrenc...@gmail.comwrote:


 I created a web app using Ring, Jetty, Enlive, Compojure. 

 At the end, I bundled everything together by running the command lein 
 uberjar. The resulting file was 21 megs. 

 I scp the file to the server, then I ssh to the server. I start a 
 screen session. Inside the screen session I type :

 java -jar kiosk-0.1-standalone.jar 30001
  
 The number at the end is the port that I have it running on. 

 Sometimes, when people look at the app, none of the CSS files load. I 
 have run into this bug myself. Sometimes, when I look at the app, the 
 Javascript and CSS paths are broken. If I click view source and see the 
 source, and if I try to follow the links to the CSS or Javascript, then I 
 get 404 errors. 

 I have this in my code: 

   (wrap-resource public)

 The structure of the code is: 

 /resources
 /public
 /css
 /javascript
 /templates
 /src
 /kiosk

 The code is still able to find the templates in resources/templates, and 
 that HTML is given to Enlive, so something appears on screen. It's just the 
 stuff in public that sometimes goes missing. 

 Can anyone suggest why? My routes are defined like this:


 (defroutes app-routes
   (ANY / request (index request))
   (GET /search-results request (search-results request))
   (GET /schema [] (schema))
   (GET /account request (account request))
   (GET /login request (login request))
   (GET /start-over request (start-over request))
   (GET /admin request (admin request))
   (GET /ok request (ok request))
   (POST /admin request (record-new-question-if-any request))
   (GET /delete-question/:question-to-delete request (delete-question 
 request))
   (GET /finish-user-sign-up request (finish-user-sign-up request))
   (route/not-found Page not found))

 (def app
   (- app-routes
   (wrap-resource public)
   (wrap-session {:cookie-name discovery-session :cookie-attrs 
 {:max-age 90 }})
   (wrap-cookies)
   (wrap-keyword-params)
   (wrap-nested-params)
   (wrap-params)))


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

Re: ANN: Tawny-OWL 0.9

2013-02-07 Thread Phillip Lord
Michael Klishin michael.s.klis...@gmail.com writes:

 2013/2/6 Phillip Lord phillip.l...@newcastle.ac.uk

 You mean what is the name of this library as maven artifact? Rather
 than it's dependencies.

 Are you sure people will find it there if it's not in the README? The
 thinking if I can't even get started with it, why do I need to see
 documentation may be fairly common.


That's a risk, although they will be hyperlinked. The library is
specialist enough, though, that I don't think this will be too much of a
problem. I would expect that most of the people who are interested in
the library will not know what a maven artifact is, or if they do, not
know what to do with it in the context of Clojure, as they will not know
what Clojure is. 

Won't know, till we try!

Phil

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




Re: ANN: Tawny-OWL 0.9

2013-02-07 Thread Phillip Lord

Frank Siebenlist frank.siebenl...@gmail.com writes:
 There is one more important difference between EPL and GPL/LGPL that
 we should be aware off:

 You cannot copy snippets out of Philip's LGPL'ed code and use them in
 your own EPL'ed code.

This is a true and is, indeed, a risk. Most of the code in tawny is not
that much use, I suspect, outside of the immediate context of the
library; in a sense, it's not really a library, more an end user
application. 

If there is stuff in it which is generic enough that others wish to use,
and that is of general use, I would be happy enough to spin it out as
an independent library. 


 For me, one of the great benefits of all the EPL'ed clojure libraries out
 there is, that I've freely borrowed and stolen many functions and snippets
 from libraries of coders much smarter than me…

Just so; although I generally prefer LGPL or GPL all things being equal,
in this case my reason for choosing this license (which I did carefully)
was for consistency with the libraries that I am using. The OWL API is
doing most of the work under the hood is LGPL. The two reasons I offer
are dual LGPL/Apache, and Apache so that was an option also. In gaining
this consistency, I lost it with Clojure.

Still, it's always better to use a library than copy the code, and this
is still allowable; hopefully, therefore, this should not be a problem. 


 This is just an observation and warning, and I do not want to engage in any
 religious open source licensing argument…

Indeed; they do tend to be drag a bit, as most people already have their
opinions, so it's a bit pointless. Sadly, the legal issues cannot be
avoided, and it's good that you point out the consequences of this.


Phil

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




Re: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-07 Thread larry google groups
Any reason this would work on all browsers except IE? 


On Thursday, February 7, 2013 10:45:02 AM UTC-5, larry google groups wrote:

 Ah, sorry, that does seem to have worked (I think I forgot to recompile). 
 What do you think the problem was?


 On Thursday, February 7, 2013 10:41:00 AM UTC-5, larry google groups wrote:

 About this:

 (defroutes app-routes
   (ANY / request (index request))
   ;; rest of routes
   (GET /finish-user-sign-up request (finish-user-sign-up request))
   (route/resources /)
   (route/not-found Page not found))


 I removed (wrap-resource) and added (route/resources /) to the routes, 
 in the penultimate position as you suggest, but that seems to have busted 
 things completely. None of the images, css or javascript inside of 
 resources/public can now be found. 

 Any further thoughts on this? This app is suppose to go live today so I 
 would like to figure this out. 





 On Wednesday, February 6, 2013 4:37:09 PM UTC-5, James Reeves wrote:

 Could you try replacing the wrap-resource middleware with the 
 route/resources function? The latter operates in a slightly different way 
 to the Ring middleware, and if the Compojure route works without issue, I 
 might have an idea what the problem is.

 i.e. your code should look like:

 (defroutes app-routes
   (ANY / request (index request))
   ;; rest of routes
   (GET /finish-user-sign-up request (finish-user-sign-up request))
   (route/resources /)
   (route/not-found Page not found))

 You've also got a max-age of 90 for your session cookies, which would 
 mean your sessions will time out in 90 seconds. Is that what you want?

 Also:

(GET /foo request (foo request))

 Is equivalent to:

(GET /foo [] foo)

 - James


  On 6 February 2013 15:10, larry google groups lawrenc...@gmail.comwrote:


 I created a web app using Ring, Jetty, Enlive, Compojure. 

 At the end, I bundled everything together by running the command lein 
 uberjar. The resulting file was 21 megs. 

 I scp the file to the server, then I ssh to the server. I start a 
 screen session. Inside the screen session I type :

 java -jar kiosk-0.1-standalone.jar 30001
  
 The number at the end is the port that I have it running on. 

 Sometimes, when people look at the app, none of the CSS files load. I 
 have run into this bug myself. Sometimes, when I look at the app, the 
 Javascript and CSS paths are broken. If I click view source and see the 
 source, and if I try to follow the links to the CSS or Javascript, then I 
 get 404 errors. 

 I have this in my code: 

   (wrap-resource public)

 The structure of the code is: 

 /resources
 /public
 /css
 /javascript
 /templates
 /src
 /kiosk

 The code is still able to find the templates in resources/templates, 
 and that HTML is given to Enlive, so something appears on screen. It's 
 just 
 the stuff in public that sometimes goes missing. 

 Can anyone suggest why? My routes are defined like this:


 (defroutes app-routes
   (ANY / request (index request))
   (GET /search-results request (search-results request))
   (GET /schema [] (schema))
   (GET /account request (account request))
   (GET /login request (login request))
   (GET /start-over request (start-over request))
   (GET /admin request (admin request))
   (GET /ok request (ok request))
   (POST /admin request (record-new-question-if-any request))
   (GET /delete-question/:question-to-delete request (delete-question 
 request))
   (GET /finish-user-sign-up request (finish-user-sign-up request))
   (route/not-found Page not found))

 (def app
   (- app-routes
   (wrap-resource public)
   (wrap-session {:cookie-name discovery-session :cookie-attrs 
 {:max-age 90 }})
   (wrap-cookies)
   (wrap-keyword-params)
   (wrap-nested-params)
   (wrap-params)))


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

Re: [ANN] Morph v0.1.0 Monads friends: pure functions, less boilerplate

2013-02-07 Thread Armando Blancas
Yeap, I've had looked at Jim Duey's projects and had read his articles at 
his website; it's good content.

On Thursday, February 7, 2013 1:48:12 AM UTC-8, Marek Srank wrote:

 btw, have you seen https://github.com/jduey/protocol-monads ?

 Marek

 On Thursday, February 7, 2013 1:06:39 AM UTC+1, Armando Blancas wrote:

 Morph is a new implementation of monads based on protocols. It's intended 
 to provide the common patterns of error-handling, short-circuit sequencing, 
 and modeling of stateful computations in pure functions. I've tried to make 
 this library idiomatic while keeping it close to its Haskell roots.

 This is a utility library that, I hope, can make your coding easier. No 
 particular knowledge is assumed or required. The docs name things but rely 
 on getting an intuitive feeling of what's going on. Protocols are relevant 
 only if you want to write your own plumbing, which shouldn't be difficult; 
 otherwise it's all ready to use.

 Project:   https://github.com/blancas/morph
 User Guide: https://github.com/blancas/morph/wiki
 Codox API:  http://blancas.github.com/morph

 Please use the project wiki for feedback, bug reports, or feature 
 requests.



-- 
-- 
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: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-07 Thread larry google groups
Okay, got all this working. Thank you very much for your tip. Can you say 
what you think the problem was? 


On Thursday, February 7, 2013 11:16:46 AM UTC-5, larry google groups wrote:

 Any reason this would work on all browsers except IE? 


 On Thursday, February 7, 2013 10:45:02 AM UTC-5, larry google groups wrote:

 Ah, sorry, that does seem to have worked (I think I forgot to recompile). 
 What do you think the problem was?


 On Thursday, February 7, 2013 10:41:00 AM UTC-5, larry google groups 
 wrote:

 About this:

 (defroutes app-routes
   (ANY / request (index request))
   ;; rest of routes
   (GET /finish-user-sign-up request (finish-user-sign-up request))
   (route/resources /)
   (route/not-found Page not found))


 I removed (wrap-resource) and added (route/resources /) to the routes, 
 in the penultimate position as you suggest, but that seems to have busted 
 things completely. None of the images, css or javascript inside of 
 resources/public can now be found. 

 Any further thoughts on this? This app is suppose to go live today so I 
 would like to figure this out. 





 On Wednesday, February 6, 2013 4:37:09 PM UTC-5, James Reeves wrote:

 Could you try replacing the wrap-resource middleware with the 
 route/resources function? The latter operates in a slightly different way 
 to the Ring middleware, and if the Compojure route works without issue, I 
 might have an idea what the problem is.

 i.e. your code should look like:

 (defroutes app-routes
   (ANY / request (index request))
   ;; rest of routes
   (GET /finish-user-sign-up request (finish-user-sign-up request))
   (route/resources /)
   (route/not-found Page not found))

 You've also got a max-age of 90 for your session cookies, which would 
 mean your sessions will time out in 90 seconds. Is that what you want?

 Also:

(GET /foo request (foo request))

 Is equivalent to:

(GET /foo [] foo)

 - James


  On 6 February 2013 15:10, larry google groups lawrenc...@gmail.comwrote:


 I created a web app using Ring, Jetty, Enlive, Compojure. 

 At the end, I bundled everything together by running the command lein 
 uberjar. The resulting file was 21 megs. 

 I scp the file to the server, then I ssh to the server. I start a 
 screen session. Inside the screen session I type :

 java -jar kiosk-0.1-standalone.jar 30001
  
 The number at the end is the port that I have it running on. 

 Sometimes, when people look at the app, none of the CSS files load. I 
 have run into this bug myself. Sometimes, when I look at the app, the 
 Javascript and CSS paths are broken. If I click view source and see the 
 source, and if I try to follow the links to the CSS or Javascript, then I 
 get 404 errors. 

 I have this in my code: 

   (wrap-resource public)

 The structure of the code is: 

 /resources
 /public
 /css
 /javascript
 /templates
 /src
 /kiosk

 The code is still able to find the templates in resources/templates, 
 and that HTML is given to Enlive, so something appears on screen. It's 
 just 
 the stuff in public that sometimes goes missing. 

 Can anyone suggest why? My routes are defined like this:


 (defroutes app-routes
   (ANY / request (index request))
   (GET /search-results request (search-results request))
   (GET /schema [] (schema))
   (GET /account request (account request))
   (GET /login request (login request))
   (GET /start-over request (start-over request))
   (GET /admin request (admin request))
   (GET /ok request (ok request))
   (POST /admin request (record-new-question-if-any request))
   (GET /delete-question/:question-to-delete request (delete-question 
 request))
   (GET /finish-user-sign-up request (finish-user-sign-up request))
   (route/not-found Page not found))

 (def app
   (- app-routes
   (wrap-resource public)
   (wrap-session {:cookie-name discovery-session :cookie-attrs 
 {:max-age 90 }})
   (wrap-cookies)
   (wrap-keyword-params)
   (wrap-nested-params)
   (wrap-params)))


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

Re: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-07 Thread James Reeves
On 7 February 2013 16:37, larry google groups lawrencecloj...@gmail.comwrote:

 Okay, got all this working. Thank you very much for your tip. Can you say
 what you think the problem was?


I noticed that the wrap-resource middleware didn't account for the HTTP
HEAD method, while route/resources does.

According to the HTTP specification, a HEAD request to a URI should return
the same status and headers as a GET request to the same URI. My guess is
that sometimes, instead of sending a GET directly, the browser sends a
HEAD, perhaps to check the Last-Modified date or ETag. The HEAD request
would erroneously return a 404.

I'll mark this as an issue in Ring and get it fixed.

- James

-- 
-- 
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: Prismatic Plumbing and Graph Open-Source Release

2013-02-07 Thread Jason Wolfe
Hi Edmund,

Thanks for your interest.  There's actually no way to fill in ??? in your 
example, because it's a requirement of Graph that node names must be 
unique, and distinct from top-level input keys.  This ensures that the 
Graph has a unique topological order, and it's always clear where the input 
to a node comes from.  So we can't both treat :a as an input and an output. 
 (Of course, we could always wrap the graph function to merge the inputs 
in, but it still won't quite fit your example)

Here are three ways to do something similar:

;; As a single fnk that returns an explicit map
user ((eager-compile {:a2 (fnk [[:a1 b]] {:b b :c (inc b)})}) 
   {:a1 {:b 1}})
{:a2 {:b 1, :c 2}}

;; As a single fnk that modifies the input map
user ((eager-compile {:a2 (fnk [[:a1 b :as a1]] (assoc a1 :c (inc b)))}) 
   {:a1 {:b 1}})
{:a2 {:c 2, :b 1}}

;; As a hierarchical graph
user ((eager-compile {:a2 {:b (fnk [[:a1 b]] b) 
:c (fnk [[:a1 b]] (inc b))}}) 
   {:a1 {:b 1}})
{:a2 {:b 1, :c 2}}

Note that these all take input key :a1 and output :a2, to avoid a key 
clash, and explicitly copy :b to the output.  If you give me some more 
details about your use case I may be able to provide better advice.

Hope this helps -- let me know if you have any questions.

Cheers,
Jason

On Thursday, February 7, 2013 1:55:13 AM UTC-8, Edmund wrote:

 Hey Aria / Jason,

   Thanks for OSing this library, its really useful.  One question: how do 
 you deal with nesting on the output side of graph declaration ?  I 
 understand it for fnk, but but how would I achieve:

 {:a {:b 1}} - {:a {:b 1, :c 2}}

 with a single declaration:

 (graph/eager-compile
  {??? (fnk [[:a b]] (inc b))}

 where ??? is the binding form I'm after to describe the nesting ?  

 I'm currently doing this by breaking up my map and using update-in, but it 
 seems you must have a sneaky trick to do this declaratively ?

 I figure [:a :c] would be an possible syntax ?

 Thanks again,

  Edmund
 On Tuesday, 29 January 2013 18:46:54 UTC, Aria Haghighi wrote:

 Hey all,

  Prismatic has open-sourced our Plumbing and Graph library on 
 githubhttps://github.com/prismatic/plumbing. 
 Jason Wolfe gave a 
 talkhttp://blog.getprismatic.com/blog/2012/10/1/prismatics-graph-at-strange-loop.htmlabout
  how we use graph for systems composition at Strange loop last year. 
 Please give the library
 a whirl and let us know if you're using it and if you find any issues or 
 feature requests. We use this library very heavily throughout our code and 
 hope others find it useful as well.

  Best, Aria



-- 
-- 
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: Prismatic Plumbing and Graph Open-Source Release

2013-02-07 Thread Jason Wolfe
Interesting.  Our model came from large 'let' statements in Clojure, which 
I think is similar (I'm not too familiar with Haskell).  The advantage over 
the let statement is that now you can manipulate the composition, run only 
part of it, wrap the value functions to monitor them, and so on.  I think 
the latter use-case is actually very closely related to the Haskell 
example, since it lets us do the same kinds of things you would do with a 
monad (see graph_examples_test for an example with 'resources') .  But here 
the wrapping is a higher-order function, rather than a monad that has to be 
specified up front.

On Thursday, February 7, 2013 2:38:50 AM UTC-8, Valentin Golev wrote:

 Graph definitions really remind me of `do` syntax in Haskell, where you 
 can bind values and then use them in later steps of the computation.

 On Tuesday, January 29, 2013 10:46:54 PM UTC+4, Aria Haghighi wrote:

 Hey all,

  Prismatic has open-sourced our Plumbing and Graph library on 
 githubhttps://github.com/prismatic/plumbing. 
 Jason Wolfe gave a 
 talkhttp://blog.getprismatic.com/blog/2012/10/1/prismatics-graph-at-strange-loop.htmlabout
  how we use graph for systems composition at Strange loop last year. 
 Please give the library
 a whirl and let us know if you're using it and if you find any issues or 
 feature requests. We use this library very heavily throughout our code and 
 hope others find it useful as well.

  Best, Aria



-- 
-- 
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/West (Portland, Mar 18-20) - Mission Kontrol, unsessions, lightning talks

2013-02-07 Thread Austin Haas

The arcade is called Ground Kontrol (not Mission Kontrol).

http://groundkontrol.com/

Last summer, I attended another conference that rented Ground Kontrol
for a few hours of free play. Most games are multi-player, and you
know everyone is there for the conference, so it can be a really fun
way to meet people. (And they also have a full bar.)

-austin

-- 
Austin Haas
Pet Tomato, Inc.
http://pettomato.com

On Wed Feb 06 20:27 , Alex Miller wrote:
 Clojure/West has a great schedule lined up. If you haven't yet, check out
 the schedule at http://clojurewest.org/schedule. You can register at
 http://regonline.com/clojurewest2013.
 
 If you've seen the odd couple (Dan Friedman and Will Byrd) talking about
 miniKanren and logic programming, you know they have a lot of interesting
 stuff to show. We've got a whole miniKanren Confo lined up colocated with
 Clojure/West, with not just Dan and Will, but David Nolen, and some other
 great talks (http://clojurewest.org/sessions#confo). Register as an
 optional item when you register for Clojure/West.
 
 If you're coming in the night before the conference, we've got Mission
 Kontrol, the arcade wonderland reserved with FREE PLAY on all games from
 7-9 pm. It's just a couple blocks from the hotel.
 
 Unsessions (https://github.com/strangeloop/clojurewest2013/wiki/Unsessions)
 and lightning talks (http://bit.ly/WBqELu) are now open for submissions.
 Unsessions will be scheduled based on interest and lightning talks will be
 opened up to a poll of attendees prior to the conference.
 
 Gonna be great!
 Alex
 
 -- 
 -- 
 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.




[ClojureScript] Please test CLJS-418, fixing browser REPL

2013-02-07 Thread David Nolen
http://dev.clojure.org/jira/browse/CLJS-418

Some of you may have encountered bizarre problems when trying to use
browser REPL with the latest releases of ClojureScript. This ticket
contains a patch that should resolve the issue but we need people to test.

Thanks,
David

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




Re: [ANN] Kern 0.5.0 -- A text-parsing library

2013-02-07 Thread Armando Blancas
Ragnar, thanks for your kind words; I'm glad you're finding kern fun and 
useful.

The lexer module has parsers that take care of whitespace, and conveniences 
like parens, braces, comma-sep (and others) that shorten things. You might 
start with the namespace blancas.kern.lexer.basic and use similar functions 
as core (but without the star) like sym and token that handle whitespace 
(these functions parse and then consume any whitespace until the next 
char). 

Using some of the functions from that namespace, lines 93-102 may come down 
to:
(def ruby-attributes (braces (comma-sep ruby-attr-pair)))

Similarly, lines 64-69 could be:
(def html-attributes (parens (many html-attr-pair)))

just surround the values with (lexeme) to ignore whitespace: the defs for 
html-name, html-value, ruby-name, etc:
(def html-name (lexeme (| ...)))

That would reduce the checks for spaces in your (bind) sequences. Just 
experiment with these ideas and see if it gets simpler. Feel free to ask me 
any more questions.

On Thursday, February 7, 2013 2:35:02 AM UTC-8, Ragnar Dahlén wrote:

 Hi Armando,

 Thank you for your great work with this library! I don't have much 
 previous experience with parser combinators, but with your implementation, 
 and the wonderful documentation, I've had a lot of fun playing and learning.

 I've been hacking on a small project for implementing a subset of HAML for 
 Clojure, with the goal of using HAML instead of HTML for enlive templates. 
 It is very early days, but if you're interested, I'd be very happy for any 
 feedback on the parser, which uses kern. I've probably done a lot of stupid 
 stuff.

 Project:
 https://github.com/ragnard/hamelito

 Parser:
 https://github.com/ragnard/hamelito/blob/master/src/hamelito/parsing.clj

 Best regards,

 Ragnar


 On Monday, 21 January 2013 18:27:07 UTC, Armando Blancas wrote:

 Kern is a text-parsing library based on Parsec, the Haskell monadic 
 combinators library. It is useful for parsing all kinds of text: data, 
 program input, configuration files, DSLs, or a full-blown programming 
 language.

 My main goal is, like the Self folks, the power of simplicity. In the 
 ideal case the grammar is the implementation, but I'm OK with something 
 close. Next comes performance, which appears to be fine with hot code but 
 not great otherwise. Let me know and will see what I can do.

 https://github.com/blancas/kern

 The wiki has a user's guide, tutorials, and links to several samples; 
 will be adding some more topics there. There's also a Codox API zip file 
 available for download. Feedback, suggestions, requests, bug reports are 
 all very welcome; please use the project wiki.



-- 
-- 
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: Prismatic Plumbing and Graph Open-Source Release

2013-02-07 Thread Jason Wolfe
We've just posted a blog post with more high-level context on what we're 
trying to accomplish with Graph (plus more examples!)

http://blog.getprismatic.com/blog/2013/2/1/graph-abstractions-for-structured-computation

We're also answering questions and reading comments in the Hacker News 
thread, if that's your thing:

http://news.ycombinator.com/item?id=5183236

Cheers, Jason


On Tuesday, January 29, 2013 10:46:54 AM UTC-8, Aria Haghighi wrote:

 Hey all,

  Prismatic has open-sourced our Plumbing and Graph library on 
 githubhttps://github.com/prismatic/plumbing. 
 Jason Wolfe gave a 
 talkhttp://blog.getprismatic.com/blog/2012/10/1/prismatics-graph-at-strange-loop.htmlabout
  how we use graph for systems composition at Strange loop last year. 
 Please give the library
 a whirl and let us know if you're using it and if you find any issues or 
 feature requests. We use this library very heavily throughout our code and 
 hope others find it useful as well.

  Best, Aria


-- 
-- 
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: Prismatic Plumbing and Graph Open-Source Release

2013-02-07 Thread AtKaaZ
Hello.
https://github.com/Prismatic/plumbing/blob/master/test/plumbing/graph_examples_test.clj#L148
Why do they return in a map instead of maybe a set ? do we ever get {:key
false} ?
Thanks.


On Thu, Feb 7, 2013 at 7:22 PM, Jason Wolfe ja...@w01fe.com wrote:

 We've just posted a blog post with more high-level context on what we're
 trying to accomplish with Graph (plus more examples!)


 http://blog.getprismatic.com/blog/2013/2/1/graph-abstractions-for-structured-computation

 We're also answering questions and reading comments in the Hacker News
 thread, if that's your thing:

 http://news.ycombinator.com/item?id=5183236

 Cheers, Jason


 On Tuesday, January 29, 2013 10:46:54 AM UTC-8, Aria Haghighi wrote:

 Hey all,

  Prismatic has open-sourced our Plumbing and Graph library on 
 githubhttps://github.com/prismatic/plumbing.
 Jason Wolfe gave a 
 talkhttp://blog.getprismatic.com/blog/2012/10/1/prismatics-graph-at-strange-loop.htmlabout
  how we use graph for systems composition at Strange loop last year.
 Please give the library
 a whirl and let us know if you're using it and if you find any issues or
 feature requests. We use this library very heavily throughout our code and
 hope others find it useful as well.

  Best, Aria

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






-- 
Please correct me if I'm wrong or incomplete,
even if you think I'll subconsciously hate it.

-- 
-- 
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: Prismatic Plumbing and Graph Open-Source Release

2013-02-07 Thread Jason Wolfe
On Thu, Feb 7, 2013 at 10:54 AM, AtKaaZ atk...@gmail.com wrote:
 Hello.
 https://github.com/Prismatic/plumbing/blob/master/test/plumbing/graph_examples_test.clj#L148
 Why do they return in a map instead of maybe a set ? do we ever get {:key
 false} ?
 Thanks.

The leaf value for output schemata is always 'true'.  It's a bit odd,
but to support specifications of functions/graphs that return nested
maps, the outer layers need to be maps.  It's true that the innermost
layers could be represented as sets, but we chose to keep things
uniform instead.



 On Thu, Feb 7, 2013 at 7:22 PM, Jason Wolfe ja...@w01fe.com wrote:

 We've just posted a blog post with more high-level context on what we're
 trying to accomplish with Graph (plus more examples!)


 http://blog.getprismatic.com/blog/2013/2/1/graph-abstractions-for-structured-computation

 We're also answering questions and reading comments in the Hacker News
 thread, if that's your thing:

 http://news.ycombinator.com/item?id=5183236

 Cheers, Jason


 On Tuesday, January 29, 2013 10:46:54 AM UTC-8, Aria Haghighi wrote:

 Hey all,

  Prismatic has open-sourced our Plumbing and Graph library on github.
 Jason Wolfe gave a talk about how we use graph for systems composition at
 Strange loop last year. Please give the library
 a whirl and let us know if you're using it and if you find any issues or
 feature requests. We use this library very heavily throughout our code and
 hope others find it useful as well.

  Best, Aria

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






 --
 Please correct me if I'm wrong or incomplete,
 even if you think I'll subconsciously hate it.

 --
 --
 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: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-07 Thread larry google groups

Fantastic insight. Thanks much, it is working great now on all browsers 
(the bug had mostly appeared on IE). 


On Thursday, February 7, 2013 11:48:50 AM UTC-5, James Reeves wrote:

 On 7 February 2013 16:37, larry google groups 
 lawrenc...@gmail.comjavascript:
  wrote:

 Okay, got all this working. Thank you very much for your tip. Can you say 
 what you think the problem was? 


 I noticed that the wrap-resource middleware didn't account for the HTTP 
 HEAD method, while route/resources does.

 According to the HTTP specification, a HEAD request to a URI should return 
 the same status and headers as a GET request to the same URI. My guess is 
 that sometimes, instead of sending a GET directly, the browser sends a 
 HEAD, perhaps to check the Last-Modified date or ETag. The HEAD request 
 would erroneously return a 404.

 I'll mark this as an issue in Ring and get it fixed.

 - James


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




Simple Network Messaging

2013-02-07 Thread JvJ
I'm looking to do some simple messaging (json strings) between programs 
running on the same machine.  One will be in C# and one will be in Clojure. 
 Is there a library/set of libraries that could simplify this 
communication?  I haven't done much networking in the past, and I'd like to 
keep this as painless as possible.

Thanks.

-- 
-- 
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: Callbacks as Sequences

2013-02-07 Thread JvJ
Thanks, but I'm looking for something that would let me sent strings 
between programs on localhost.

On Wednesday, 6 February 2013 22:17:02 UTC-5, Feng Shen wrote:

 I did something for a http lib:

 ;; get them concurrently(let [response1 (http/get http://http-kit.org/;)
   response2 (http/get http://clojure.org/;)]
   ;; handle responses one-by-one, waiting for response as necessary
   ;; other keys :headers :status :error :opts
   (println response1:  (:body @response1))
   (println response2:  (:body @response2)))



 On Thursday, February 7, 2013 2:45:36 AM UTC+8, da...@dsargeant.com wrote:

 I'm not to clojure/clojurescript and was wondering if anyone has taken a 
 crack at writing a macro that transforms callbacks into a sequence.  There 
 is an awesome implementationion in LispyScript show here: 
 https://gist.github.com/santoshrajan/3715526.  Thanks for help.

 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: Clojure - Python Style suggestion

2013-02-07 Thread Jason Lewis
`quote` is a feature, not a bug. Its not just for distinguishing between
lists and function calls, its for deferring evaluation. Its also been part
of Lisp since the beginning... IIRC, its in McCarthy's paper that defined
the first lisp.
 On Feb 4, 2013 7:58 PM, Dave Sann daves...@gmail.com wrote:

 The syntax does complect in one case.
 When you really do want a list as opposed to a function call. hence quote
 and (list ...)

 On Tuesday, 5 February 2013 07:06:37 UTC+11, tbc++ wrote:

 Parens actually don't complect, they have a very very clear meaning. They
 organize functions and arguments. Let's take one line from your example:

 filter smaller xs

 Sois that the python equivalent to which of these?

 filter(smaller(xs))
 filter(smaller, xs)
 filter(smaller(), xs())
 filter(smaller(xs()))

 I would also assert that Python complects formatting and semantic meaning
 of the code. I'm quite proficient at Python and even I hate that fact.

 Timothy



 On Mon, Feb 4, 2013 at 1:01 PM, Sergey Didenko sergey@gmail.comwrote:

 Hi,

 For us as Clojure community it is easy to see how Clojure benefits
 from being a Lisp. Homoiconity, extreme conciseness, esoteric look and
 feel, etc.

 However it is hard to see from the inside how Clojure as ecosystem
 (probably) suffer from being a Lisp. Please don't throw rotten eggs at
 me, I mean only the part of Lisp that is ... parentheses.

 I remember a number of people that mention parentheses as obstacles to
 the wider Clojure adoption, in the Clojure space - in the Clojure
 related discussions, even on this mailing list IIRC.

 But the number of people thinking this way outside the Clojure groups
 is even bigger! We probably don't notice it because got immune to this
 famous argument it has too many parentheses early when diving into
 Clojure.

 I suggest there are a big number of people that could gain interest in
 clojure if we provide them with parentheses-lite Clojure syntax. For
 example we can steal Python way of intending blocks.

 For example the following quicksort implementation

 (defn qsort [[pivot  xs]]
   (when pivot
 (let [smaller #( % pivot)]
   (lazy-cat (qsort (filter smaller xs))
 [pivot]
 (qsort (remove smaller xs))

 could be written as

 (set! python-style-op-op true)

 defn qsort [[pivot  xs]]
   when pivot
 let [smaller #( % pivot)]
   lazy-cat
 qsort
   filter smaller xs
 [pivot]
 qsort
   remove smaller xs

 What do you think?

 Isn't is less complex?


 P.S. Ok, I must confess, the mention of the C-Word in the last
 sentence was just a desperate way to get Rich's attention.

 P.P.S. Actually I would also love to see Clojure community making
 video clip Clojure - Python Style as a remix for G... Style, but
 this idea is probably way ahead of its time.


 Regards, Sergey.

 --
 --
 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=enhttp://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_outhttps://groups.google.com/groups/opt_out
 .





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

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




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

Re: Simple Network Messaging

2013-02-07 Thread Herwig Hochleitner
I'd use sockets (or even pipes, if you really don't need any flexibility in
the setup),
it doesn't get much simpler than that.
They just work.

cheers


2013/2/7 JvJ kfjwhee...@gmail.com

 I'm looking to do some simple messaging (json strings) between programs
 running on the same machine.  One will be in C# and one will be in Clojure.
  Is there a library/set of libraries that could simplify this
 communication?  I haven't done much networking in the past, and I'd like to
 keep this as painless as possible.

 Thanks.

 --
 --
 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 - Python Style suggestion

2013-02-07 Thread Herwig Hochleitner
On Feb 4, 2013 7:58 PM, Dave Sann daves...@gmail.com wrote:

 The syntax does complect in one case.
 When you really do want a list as opposed to a function call. hence quote
 and (list ...)


The evaluation rules are clojure's implementation of reduction in lambda
calculus.
Every clojure form has an associated evaluation rule.
So syntax and semantic are already complected from the start. Otherwise we
wouldn't call it a language.

On Tuesday, 5 February 2013 07:06:37 UTC+11, tbc++ wrote:

 I would also assert that Python complects formatting and semantic meaning
 of the code.


It does, however the mind of the typical human reader does too. I think
that's the point of python.
In this sense, I think, making formatting significant is actually a good
idea.

The reason we can still leave this thread now is:
- Python - style significant white space only works for code blocks
- It works great for python, because python is _an imperative language_
- In functional style, only let is consistently formatted as a block,
  hence blocks just don't work as the foundation of formatting

 filter(smaller, xs)
 filter(smaller(), xs())

This, btw, is the reason I have a bit of language envy towards haskell.
(with lazy evaluation, the difference between f and (f) vanishes)

cheers

-- 
-- 
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: Sending Clojure Objects over TCP

2013-02-07 Thread Matthew
Aleph https://github.com/ztellman/aleph

On Thursday, February 7, 2013 12:16:03 PM UTC+11, JvJ wrote:

 Does anyone know if there's a simplified networking library that allows 
 this?

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




Re: Sending Clojure Objects over TCP

2013-02-07 Thread Feng Shen


slacker - Transparent, non-invasive RPC by clojure and for clojure.


https://*github*.com/sunng87/*slacker*
*
*

   1. 
   2. 
   
On Thursday, February 7, 2013 9:16:03 AM UTC+8, JvJ wrote:

 Does anyone know if there's a simplified networking library that allows 
 this?

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




Re: Simple Network Messaging

2013-02-07 Thread Feng Shen
For json, Clojure has a convenient lib:  
https://github.com/clojure/data.json 

for networking, how about using HTTP as the transport?  Clojure has 
many libraries for HTTP server  client,  c# has many libraries too.



On Friday, February 8, 2013 5:44:06 AM UTC+8, JvJ wrote:

 I'm looking to do some simple messaging (json strings) between programs 
 running on the same machine.  One will be in C# and one will be in Clojure. 
  Is there a library/set of libraries that could simplify this 
 communication?  I haven't done much networking in the past, and I'd like to 
 keep this as painless as possible.

 Thanks.


-- 
-- 
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 - Python Style suggestion

2013-02-07 Thread Dave Sann
yes, I did not mean to imply otherwise.

On Friday, 8 February 2013 09:04:43 UTC+11, Jason Lewis wrote:

 `quote` is a feature, not a bug. Its not just for distinguishing between 
 lists and function calls, its for deferring evaluation. Its also been part 
 of Lisp since the beginning... IIRC, its in McCarthy's paper that defined 
 the first lisp.
  On Feb 4, 2013 7:58 PM, Dave Sann dave...@gmail.com javascript: 
 wrote:

 The syntax does complect in one case. 
 When you really do want a list as opposed to a function call. hence quote 
 and (list ...)

 On Tuesday, 5 February 2013 07:06:37 UTC+11, tbc++ wrote:

 Parens actually don't complect, they have a very very clear meaning. 
 They organize functions and arguments. Let's take one line from your 
 example:

 filter smaller xs

 Sois that the python equivalent to which of these?

 filter(smaller(xs))
 filter(smaller, xs)
 filter(smaller(), xs())
 filter(smaller(xs()))

 I would also assert that Python complects formatting and semantic 
 meaning of the code. I'm quite proficient at Python and even I hate that 
 fact. 

 Timothy



 On Mon, Feb 4, 2013 at 1:01 PM, Sergey Didenko sergey@gmail.comwrote:

 Hi,

 For us as Clojure community it is easy to see how Clojure benefits
 from being a Lisp. Homoiconity, extreme conciseness, esoteric look and
 feel, etc.

 However it is hard to see from the inside how Clojure as ecosystem
 (probably) suffer from being a Lisp. Please don't throw rotten eggs at
 me, I mean only the part of Lisp that is ... parentheses.

 I remember a number of people that mention parentheses as obstacles to
 the wider Clojure adoption, in the Clojure space - in the Clojure
 related discussions, even on this mailing list IIRC.

 But the number of people thinking this way outside the Clojure groups
 is even bigger! We probably don't notice it because got immune to this
 famous argument it has too many parentheses early when diving into
 Clojure.

 I suggest there are a big number of people that could gain interest in
 clojure if we provide them with parentheses-lite Clojure syntax. For
 example we can steal Python way of intending blocks.

 For example the following quicksort implementation

 (defn qsort [[pivot  xs]]
   (when pivot
 (let [smaller #( % pivot)]
   (lazy-cat (qsort (filter smaller xs))
 [pivot]
 (qsort (remove smaller xs))

 could be written as

 (set! python-style-op-op true)

 defn qsort [[pivot  xs]]
   when pivot
 let [smaller #( % pivot)]
   lazy-cat
 qsort
   filter smaller xs
 [pivot]
 qsort
   remove smaller xs

 What do you think?

 Isn't is less complex?


 P.S. Ok, I must confess, the mention of the C-Word in the last
 sentence was just a desperate way to get Rich's attention.

 P.P.S. Actually I would also love to see Clojure community making
 video clip Clojure - Python Style as a remix for G... Style, but
 this idea is probably way ahead of its time.


 Regards, Sergey.

 --
 --
 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=enhttp://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_outhttps://groups.google.com/groups/opt_out
 .





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

  -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.comjavascript:
 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 javascript:
 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 javascript:.
 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 

Re: Clojure/West (Portland, Mar 18-20) - Mission Kontrol, unsessions, lightning talks

2013-02-07 Thread Alex Miller
CORRECT! Apparently I was hitting the Nyquil a little too hard the other 
night.

If someone wants to sponsor the night at Ground Kontrol, please let me 
know!  It's available.

Alex


On Thursday, February 7, 2013 10:58:07 AM UTC-6, Austin Haas wrote:


 The arcade is called Ground Kontrol (not Mission Kontrol). 

 http://groundkontrol.com/ 

 Last summer, I attended another conference that rented Ground Kontrol 
 for a few hours of free play. Most games are multi-player, and you 
 know everyone is there for the conference, so it can be a really fun 
 way to meet people. (And they also have a full bar.) 

 -austin 

 -- 
 Austin Haas 
 Pet Tomato, Inc. 
 http://pettomato.com 

 On Wed Feb 06 20:27 , Alex Miller wrote: 
  Clojure/West has a great schedule lined up. If you haven't yet, check 
 out 
  the schedule at http://clojurewest.org/schedule. You can register at 
  http://regonline.com/clojurewest2013. 
  
  If you've seen the odd couple (Dan Friedman and Will Byrd) talking about 
  miniKanren and logic programming, you know they have a lot of 
 interesting 
  stuff to show. We've got a whole miniKanren Confo lined up colocated 
 with 
  Clojure/West, with not just Dan and Will, but David Nolen, and some 
 other 
  great talks (http://clojurewest.org/sessions#confo). Register as an 
  optional item when you register for Clojure/West. 
  
  If you're coming in the night before the conference, we've got Mission 
  Kontrol, the arcade wonderland reserved with FREE PLAY on all games from 
  7-9 pm. It's just a couple blocks from the hotel. 
  
  Unsessions (
 https://github.com/strangeloop/clojurewest2013/wiki/Unsessions) 
  and lightning talks (http://bit.ly/WBqELu) are now open for 
 submissions. 
  Unsessions will be scheduled based on interest and lightning talks will 
 be 
  opened up to a poll of attendees prior to the conference. 
  
  Gonna be great! 
  Alex 
  
  -- 
  -- 
  You received this message because you are subscribed to the Google 
  Groups Clojure group. 
  To post to this group, send email to clo...@googlegroups.comjavascript: 
  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 javascript: 
  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 javascript:. 
  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.




Can a protocol method have the same name as a clojure.core function?

2013-02-07 Thread Don Jackson

I'd like to name a protocol method to be the same name as a clojure.core 
function, for example, get.

Is this possible, and if so, how?

user= (ns ptest.protocol
(:refer-clojure :exclude [get]))
nil

ptest.protocol= (defprotocol TestProtocol
(get
   [_ key]
Returns the contents of field :key) )

TestProtocol

ptest.protocol= (ns ptest.core
  (:require [ptest.protocol :as testp])
  (:refer-clojure :exclude [get]))

ptest.core= (defrecord TF
 [a
 b
 ]
   testp/TestProtocol
   (get
[this key]
   Doesn't work!))

CompilerException java.lang.ClassFormatError: Duplicate method namesignature 
in class file ptest/core/TF, compiling:(NO_SOURCE_PATH: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: Can a protocol method have the same name as a clojure.core function?

2013-02-07 Thread Ben Wolfson
You just can't use defrecord, because defrecord macroexpands into a
deftype that implements a *different* protocol with a function *also*
named get.

On Thu, Feb 7, 2013 at 9:24 PM, Don Jackson
cloj...@clark-communications.com wrote:

 I'd like to name a protocol method to be the same name as a clojure.core
 function, for example, get.

 Is this possible, and if so, how?

 user= (ns ptest.protocol
 (:refer-clojure :exclude [get]))
 nil

 ptest.protocol= (defprotocol TestProtocol
 (get
[_ key]
 Returns the contents of field :key) )

 TestProtocol

 ptest.protocol= (ns ptest.core
   (:require [ptest.protocol :as testp])
   (:refer-clojure :exclude [get]))

 ptest.core= (defrecord TF
  [a
  b
  ]
testp/TestProtocol
(get
 [this key]
Doesn't work!))

 CompilerException java.lang.ClassFormatError: Duplicate method
 namesignature in class file ptest/core/TF, compiling:(NO_SOURCE_PATH: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.





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

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




Re: Can a protocol method have the same name as a clojure.core function?

2013-02-07 Thread Don Jackson

That makes perfect sense, and I should have figured that out since defrecord is 
implementing
a bunch of useful protocols underneath….

Thanks for the quick response!

On Feb 7, 2013, at 9:38 PM, Ben Wolfson wolf...@gmail.com wrote:

 You just can't use defrecord, because defrecord macroexpands into a
 deftype that implements a *different* protocol with a function *also*
 named get.
 
 On Thu, Feb 7, 2013 at 9:24 PM, Don Jackson
 cloj...@clark-communications.com wrote:
 
 I'd like to name a protocol method to be the same name as a clojure.core
 function, for example, get.
 
 Is this possible, and if so, how?
 
 user= (ns ptest.protocol
(:refer-clojure :exclude [get]))
 nil
 
 ptest.protocol= (defprotocol TestProtocol
(get
   [_ key]
Returns the contents of field :key) )
 
 TestProtocol
 
 ptest.protocol= (ns ptest.core
  (:require [ptest.protocol :as testp])
  (:refer-clojure :exclude [get]))
 
 ptest.core= (defrecord TF
 [a
 b
 ]
   testp/TestProtocol
   (get
[this key]
   Doesn't work!))
 
 CompilerException java.lang.ClassFormatError: Duplicate method
 namesignature in class file ptest/core/TF, compiling:(NO_SOURCE_PATH: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.
 
 
 
 
 
 -- 
 Ben Wolfson
 Human kind has used its intelligence to vary the flavour of drinks,
 which may be sweet, aromatic, fermented or spirit-based. ... Family
 and social life also offer numerous other occasions to consume drinks
 for pleasure. [Larousse, Drink entry]
 
 -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.
 
 

-- 
-- 
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: Can a protocol method have the same name as a clojure.core function?

2013-02-07 Thread Meikel Brandmeyer (kotarak)
Hi,

you can still use a defrecord. Just don't implement the protocol inline.

Clojure
user= (ns foo.bar (:refer-clojure :exclude [get]))
nil
foo.bar= (defprotocol FooBar (get [this]))
FooBar
foo.bar= (ns foo.baz)
nil
foo.baz= (alias 'fb 'foo.bar) ; this is due to working only in the repl. 
Normally you would use :require in the ns clause.
nil
foo.baz= (defrecord Baz [a b c])
foo.baz.Baz
foo.baz= (extend-type Baz
fb/FooBar
(get [{:keys [a b c]}] (str a b c)))
nil
foo.baz= (fb/get (-Baz fo ob ar))
foobar

Implementing a protocol inline is an optimisation, not a requirement.

Meikel

-- 
-- 
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: Callbacks as Sequences

2013-02-07 Thread Erik Bakstad
Not sure it applies, but I found this very interesting: 
http://oobaloo.co.uk/clojure-from-callbacks-to-sequences

Erik


kl. 19:45:36 UTC+1 onsdag 6. februar 2013 skrev da...@dsargeant.com 
følgende:

 I'm not to clojure/clojurescript and was wondering if anyone has taken a 
 crack at writing a macro that transforms callbacks into a sequence.  There 
 is an awesome implementationion in LispyScript show here: 
 https://gist.github.com/santoshrajan/3715526.  Thanks for help.

 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.