Call for volunteers to help moderate a ClojureScript Google group

2013-01-23 Thread Edward Tsech
Glad to help.

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




Re: if-let/when-let

2013-01-04 Thread Edward Tsech
Sorry guys, I forget to mention that it should behave like let in Clojure 
or like let* in Scheme.

I mean e.g.:
(if-let* [x 1 y nil z (inc y)]
  (+ x y z)
  0) ; = 0 
;; (inc y) shouldn't be evaluated here.

Which means and doesn't work there.
In terms of implementation I mean smth like that:

(defmacro if-let*
  ([bindings then]
   `(if-let* ~bindings ~then nil))
  ([bindings then else]
   (if (seq bindings)
 `(if-let [~(first bindings) ~(second bindings)]
(if-let* ~(drop 2 bindings) ~then ~else)
~else)
 then)))

But anyway I'm more interested in history of that behavior rather than 
implementation.
Because for me it seems logical if let support more than two forms 
if-let also could do that. 
And I'd like to understand: Am I wrong or it's just historical reason?

Ed

On Friday, January 4, 2013 1:29:41 PM UTC+6, Andy Fingerhut wrote:

 I don't know the history of the answer to why, except perhaps as hinted 
 by Evan's answer, which is that it becomes implicit how to combine the 
 results of the multiple values to get the final true/false for the if 
 condition.  You imply and, which is a perfectly reasonable choice.

 My main reason for responding is to let you know that if you really want 
 such behavior, macros let you roll your own without much trouble.

 Andy

 On Jan 3, 2013, at 10:24 PM, Edward Tsech wrote:

 Hey guys,

 if-let and when-let macros support only 2 forms in binding vector:

 (if-let [x 1 y 2]
   ...)
 java.lang.IllegalArgumentExcepdtion: if-let requires exactly 2 forms in 
 binding vector(NO_SOURCE_FILE:1)

 Why doesn't if-let support any even amount of binding forms as let 
 does?

 e.g.
 (if-let [x 1 y 2 z 3]
   (+ x y z)
   0) ; = 6

 (if-let [x 1 y nil z 3]
   (+ x y z)
   0) ; = 0

 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

Re: if-let/when-let

2013-01-04 Thread Edward Tsech
Thanks Dave! Seems like different people expect slightly different behavior.

On Friday, January 4, 2013 9:34:38 PM UTC+6, daveray wrote:

 I don't know if it will answer your history question, but there was a 
 fairly long discussion about this last year: 

   
 https://groups.google.com/forum/?fromgroups=#!searchin/clojure/let-else/clojure/1g5dEvIvGYY/EWjwFGnS-rYJ
  

 Cheers, 

 Dave 

 On Fri, Jan 4, 2013 at 7:23 AM, Edward Tsech edt...@gmail.comjavascript: 
 wrote: 
  Sorry guys, I forget to mention that it should behave like let in 
 Clojure 
  or like let* in Scheme. 
  
  I mean e.g.: 
  (if-let* [x 1 y nil z (inc y)] 
(+ x y z) 
0) ; = 0 
  ;; (inc y) shouldn't be evaluated here. 
  
  Which means and doesn't work there. 
  In terms of implementation I mean smth like that: 
  
  (defmacro if-let* 
([bindings then] 
 `(if-let* ~bindings ~then nil)) 
([bindings then else] 
 (if (seq bindings) 
   `(if-let [~(first bindings) ~(second bindings)] 
  (if-let* ~(drop 2 bindings) ~then ~else) 
  ~else) 
   then))) 
  
  But anyway I'm more interested in history of that behavior rather than 
  implementation. 
  Because for me it seems logical if let support more than two forms 
  if-let also could do that. 
  And I'd like to understand: Am I wrong or it's just historical reason? 
  
  Ed 
  
  On Friday, January 4, 2013 1:29:41 PM UTC+6, Andy Fingerhut wrote: 
  
  I don't know the history of the answer to why, except perhaps as 
 hinted 
  by Evan's answer, which is that it becomes implicit how to combine the 
  results of the multiple values to get the final true/false for the if 
  condition.  You imply and, which is a perfectly reasonable choice. 
  
  My main reason for responding is to let you know that if you really 
 want 
  such behavior, macros let you roll your own without much trouble. 
  
  Andy 
  
  On Jan 3, 2013, at 10:24 PM, Edward Tsech wrote: 
  
  Hey guys, 
  
  if-let and when-let macros support only 2 forms in binding vector: 
  
  (if-let [x 1 y 2] 
...) 
  java.lang.IllegalArgumentExcepdtion: if-let requires exactly 2 forms in 
  binding vector(NO_SOURCE_FILE:1) 
  
  Why doesn't if-let support any even amount of binding forms as let 
  does? 
  
  e.g. 
  (if-let [x 1 y 2 z 3] 
(+ x y z) 
0) ; = 6 
  
  (if-let [x 1 y nil z 3] 
(+ x y z) 
0) ; = 0 
  
  Thanks! 
  
  
  -- 
  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 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

if-let/when-let

2013-01-03 Thread Edward Tsech
Hey guys,

if-let and when-let macros support only 2 forms in binding vector:

(if-let [x 1 y 2]
  ...)
java.lang.IllegalArgumentExcepdtion: if-let requires exactly 2 forms in 
binding vector(NO_SOURCE_FILE:1)

Why doesn't if-let support any even amount of binding forms as let does?

e.g.
(if-let [x 1 y 2 z 3]
  (+ x y z)
  0) ; = 6

(if-let [x 1 y nil z 3]
  (+ x y z)
  0) ; = 0

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

Re: Clojure @ Prague?

2012-07-13 Thread Edward Tsech
What do you think guys about informal meeting at the weekend?

On Monday, July 9, 2012 9:21:51 AM UTC+2, Zuzkins wrote:

 Hi guys,
 I, somehow, missed this thread but I am all up for clojure @ Prague

 On Thu, Jul 5, 2012 at 7:54 PM, Edward Tsech edts...@gmail.com wrote:

 HI Daniel,

 I'm interested in Clojure and I would like to meet some Clojurians in 
 Prague too!

 Ed


 On Friday, June 29, 2012 12:21:58 PM UTC+2, Daniel Skarda wrote:

 Hi,

 are there fellow Clojurians from Prague, Czech Republic using Clojure to 
 attack real problems?
 I started with Clojure about three months ago. At the beginning it was 
 curious experiment, now it is full time engagement. And you know - 
 programming can be fun again :)

 Would you like to meet for a beer and discuss Clojure, ClojureScript or 
 Datomic?

 Cheers,
 Dan


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




 -- 
 :J
  

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