Re: How do I return the data I need from this Exception?

2015-10-08 Thread Thomas Heller
I see no code to ever call

 (timbre/log :trace (str  "in catch-exceptions our reply was: " reply))   

Probably just a copy error, other than that things look correct.

The JVM is complex, but strange things happening are pretty much always 
related to programmer errors.

If you add that line things should work as expected?

Cheers,
/thomas

On Thursday, October 8, 2015 at 8:35:18 AM UTC+2, Lawrence Krubner wrote:
>
> I'm thinking that I've misunderstood something about how to catch an 
> Exception. I have these 2 functions: 
>
> (defn catch-exceptions [e this-users-conversation]
>   (try 
> (timbre/log :trace (str  "in catch-exceptions our exception was: " e))
> (let [error (:object (ex-data e))
>   status (if (:status error)
>(:status error)
>500)
>   body (if (:body error)
>  (:body error)
>  (str e))
>   intent (if (:intent this-users-conversation)
>(:intent this-users-conversation)
>"api")
>   reply {:message body :status status :intent intent}]
>   reply)
> (catch Exception e (println "in catch-exceptions we triggered this 
> exception: " e
>
> (defn pull-response-from-query [this-users-conversation function-to-call]
>   "Formatting exceptions as Peter requested so the iPhone app only needs 
> to check the top-level status."
>   (try
> (function-to-call this-users-conversation)
> (catch Exception e (catch-exceptions e this-users-conversation
>
>
> Testing in the terminal, and feeding in garbage in a deliberate attempt to 
> trigger the exception, I see this line over and over again: 
>
> (timbre/log :trace (str  "in catch-exceptions our exception was: " e))
>
> but I never get this line: 
>
>   (timbre/log :trace (str  "in catch-exceptions our reply was: " 
> reply))
>
> nor do I ever see: 
>
> "in catch-exceptions we triggered this exception: "
>
> What am I doing wrong? 
>
>
>
>
>

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


Re: palingdrome problem (4 clojure)

2015-10-08 Thread r/ Wobben
I have now this : 

(ns fourclojure.core
  (:gen-class))


(defn checker [x]
  ( = x (if (string? x)
(clojure.string/reverse x)
(into (empty x) (reverse x)


(checker '(1 2 3 4 5)) true


( = '( 1 2 3 4 5) '( 5 4 3 2 1) ) false

So something is wrong about my code 

it works fine with string but not with a set 

Roelof





Op woensdag 7 oktober 2015 23:40:11 UTC+2 schreef Erik Assum:

> I do believe that a palindrome could be defined as 
>
> user> (defn palindrome [s] (= s (clojure.string/reverse s))) 
> ;; => #'user/palindrome 
> user> (palindrome "agnesisenga") 
> ;; => true 
> user> 
>
> No need to split in half. 
>
>
> > On 7. okt. 2015, at 20.24, Tristan Strange  > wrote: 
> > 
> > Hey Roelof, 
> > 
> > Moe's answered your question perfectly. 
> > 
> > Unfortunately I'm not sure it'll help you. All that's been written up 
> > there is a reverse function that works on both a string and a 
> > sequence. 
> > 
> > Firstly I think you might need to check up on what a palindrome is: 
> > https://en.wikipedia.org/wiki/Palindrome 
> > 
> > You need to: 
> > - take the first half of the sequence 
> > - take second half 
> > - compare them 
> > 
> > and work around the fact that sometimes sequences have an odd number 
> > of elements. 
> > 
> > Have you seen the take and drop functions yet? They'd really help. As 
> > would Math/floor and Math/ceil. Those, a reverse and an = will make 
> > bob your uncle. 
> > 
> > If you haven't seen them writing a recursive function would be a 
> solution too. 
> > 
> > I'm not sure what the "hint" is about. It seems very misleading to me. 
> > 
> > Good luck! 
> > 
> > Cheers, 
> > Tristan 
> > 
> > 
> > On 7 October 2015 at 19:06, Moe Aboulkheir  > wrote: 
> >> Roelof, 
> >> 
> >> Something like this: 
> >> 
> >> (defn palindrome [x] 
> >>  (if (string? x) 
> >>(clojure.string/reverse x) 
> >>(into (empty x) (reverse x 
> >> 
> >> Alternatively, you may want to consider explicitly using seq on your 
> inputs 
> >> when you get them, and using that of the basis of comparison & input to 
> >> reverse.  If you don't actually care about the concrete sequence type 
> (i.e. 
> >> you only want sensible equality semantics after reversing something), 
> >> dropping it as soon as possible may be a better strategy. 
> >> 
> >> Take care, 
> >> Moe 
> >> 
> >> On Wed, Oct 7, 2015 at 6:51 PM, Roelof Wobben  > 
> >> wrote: 
> >>> 
> >>> Hello, 
> >>> 
> >>> I try to solve a problem for 4clojure where I have to make a 
> palingdrome 
> >>> detector. 
> >>> 
> >>> So for trying I did this : 
> >>> 
> >>> (ns fourclojure.core 
> >>>  (:gen-class)) 
> >>> 
> >>> 
> >>> (defn palingdrome [string] 
> >>>  ( reverse string)) 
> >>> 
> >>> (apply str (palingdrome '( 1 2 3) ))  '321' 
> >>> (apply str (palingdrome "Roelof" )) "foleoR" 
> >>> 
> >>> (defn palingdrome2 [string] 
> >>>  ( reverse string)) 
> >>> 
> >>> (palingdrome2 '( 1 2 3) )  ( 3 2 1 ) 
> >>> (palingdrome2  "Roelof" )  (\f \o \l \e \o \R) 
> >>> 
> >>> So it works for a map or for a string. 
> >>> 
> >>> Is there a way I can make it work for both ? 
> >>> 
> >>> Roelof 
> >>> 
> >>> 
> >>> 
> >>> -- 
> >>> You received this message because you are subscribed to the Google 
> >>> Groups "Clojure" group. 
> >>> To post to this group, send email to clo...@googlegroups.com 
>  
> >>> Note that posts from new members are moderated - please be patient 
> with 
> >>> your first post. 
> >>> To unsubscribe from this group, send email to 
> >>> clojure+u...@googlegroups.com  
> >>> For more options, visit this group at 
> >>> http://groups.google.com/group/clojure?hl=en 
> >>> --- 
> >>> You received this message because you are subscribed to the Google 
> Groups 
> >>> "Clojure" group. 
> >>> To unsubscribe from this group and stop receiving emails from it, send 
> an 
> >>> email to clojure+u...@googlegroups.com . 
> >>> For more options, visit https://groups.google.com/d/optout. 
> >> 
> >> 
> >> -- 
> >> You received this message because you are subscribed to the Google 
> >> Groups "Clojure" group. 
> >> To post to this group, send email to clo...@googlegroups.com 
>  
> >> Note that posts from new members are moderated - please be patient with 
> your 
> >> first post. 
> >> To unsubscribe from this group, send email to 
> >> clojure+u...@googlegroups.com  
> >> For more options, visit this group at 
> >> http://groups.google.com/group/clojure?hl=en 
> >> --- 
> >> You received this message because you are subscribed to the Google 
> Groups 
> >> "Clojure" group. 
> >> To unsubscribe from this group and stop receiving emails from it, send 
> an 
> >> email to clojure+u...@googlegroups.com . 
> >> For more options, visit https://groups.google.com/d/optout. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Clojure" group. 
> > To post to this group, send email to clo...@googlegroups.com 
>  

Re: How do I return the data I need from this Exception?

2015-10-08 Thread Lawrence Krubner

That the second logging line did not print when the first one did will 
continue to baffle me. There is absolutely no reason why that should 
happen. When a println statement goes missing the cause is usually 1 of 2 
things: the println was on a background thread, or there was an uncaught 
exception. But neither apply in this case. I am absolutely baffled. 

But I suppose it does not matter. The JVM is complex and sometimes strange 
things happen. I worked around the immediate issue with (throw) and I built 
a separation execution path to handle the exceptions that are thrown, but I 
don't like having this separate execution path. I want to bring the 
exception back into the normal flow of the program. I know there are 
libraries out there such as Hara/Ribol and I assume they do something like 
what I want. I can give them a look. 


On Thursday, October 8, 2015 at 4:01:14 AM UTC-4, Di Xu wrote:
>
> Well, I think you just misunderstand exception and try..catch expression.
>
> catch subexpression (in your case println) will evaluated only when try 
> subexpression (in your case log & let) throws exception.
>
> Thanks,
> Di Xu
>
> 2015-10-08 14:35 GMT+08:00 Lawrence Krubner  >:
>
>> I'm thinking that I've misunderstood something about how to catch an 
>> Exception. I have these 2 functions: 
>>
>> (defn catch-exceptions [e this-users-conversation]
>>   (try 
>> (timbre/log :trace (str  "in catch-exceptions our exception was: " e))
>> (let [error (:object (ex-data e))
>>   status (if (:status error)
>>(:status error)
>>500)
>>   body (if (:body error)
>>  (:body error)
>>  (str e))
>>   intent (if (:intent this-users-conversation)
>>(:intent this-users-conversation)
>>"api")
>>   reply {:message body :status status :intent intent}]
>>   reply)
>> (catch Exception e (println "in catch-exceptions we triggered this 
>> exception: " e
>>
>> (defn pull-response-from-query [this-users-conversation function-to-call]
>>   "Formatting exceptions as Peter requested so the iPhone app only needs 
>> to check the top-level status."
>>   (try
>> (function-to-call this-users-conversation)
>> (catch Exception e (catch-exceptions e this-users-conversation
>>
>>
>> Testing in the terminal, and feeding in garbage in a deliberate attempt 
>> to trigger the exception, I see this line over and over again: 
>>
>> (timbre/log :trace (str  "in catch-exceptions our exception was: " e))
>>
>> but I never get this line: 
>>
>>   (timbre/log :trace (str  "in catch-exceptions our reply was: " 
>> reply))
>>
>> nor do I ever see: 
>>
>> "in catch-exceptions we triggered this exception: "
>>
>> What am I doing wrong? 
>>
>>
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> 
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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


Re: How do I return the data I need from this Exception?

2015-10-08 Thread Di Xu
Well, I think you just misunderstand exception and try..catch expression.

catch subexpression (in your case println) will evaluated only when try
subexpression (in your case log & let) throws exception.

Thanks,
Di Xu

2015-10-08 14:35 GMT+08:00 Lawrence Krubner :

> I'm thinking that I've misunderstood something about how to catch an
> Exception. I have these 2 functions:
>
> (defn catch-exceptions [e this-users-conversation]
>   (try
> (timbre/log :trace (str  "in catch-exceptions our exception was: " e))
> (let [error (:object (ex-data e))
>   status (if (:status error)
>(:status error)
>500)
>   body (if (:body error)
>  (:body error)
>  (str e))
>   intent (if (:intent this-users-conversation)
>(:intent this-users-conversation)
>"api")
>   reply {:message body :status status :intent intent}]
>   reply)
> (catch Exception e (println "in catch-exceptions we triggered this
> exception: " e
>
> (defn pull-response-from-query [this-users-conversation function-to-call]
>   "Formatting exceptions as Peter requested so the iPhone app only needs
> to check the top-level status."
>   (try
> (function-to-call this-users-conversation)
> (catch Exception e (catch-exceptions e this-users-conversation
>
>
> Testing in the terminal, and feeding in garbage in a deliberate attempt to
> trigger the exception, I see this line over and over again:
>
> (timbre/log :trace (str  "in catch-exceptions our exception was: " e))
>
> but I never get this line:
>
>   (timbre/log :trace (str  "in catch-exceptions our reply was: "
> reply))
>
> nor do I ever see:
>
> "in catch-exceptions we triggered this exception: "
>
> What am I doing wrong?
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [ANN] Yesql 0.5.1 Released.

2015-10-08 Thread Josh Kamau
Thanks a million!  Having come from mybatis world, this really helps.

Josh.

On Thu, Oct 8, 2015 at 8:56 AM, Andrey Antukh  wrote:

> Great work!
>
> Any change for have yesql decoupled from java.jdbc? I really want to use
> it, but with other jdbc libraries...
>
>
> Regards
> Andrey
>
> On Thu, Oct 8, 2015 at 12:55 AM, Kris Jenkins 
> wrote:
>
>> Yesql - the Clojure library for using SQL - has just released v0.5.1.
>>
>> The API is much improved - especially if you're using queries with many
>> arguments - so see the migration guide if you're upgrading:
>>
>> My thanks to everyone who has contributed to this release, and for all
>> the users who've been patiently waiting for v0.5 to go official. :-)
>>
>> Kris
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Andrey Antukh - Андрей Антух - 
> http://www.niwi.nz
> https://github.com/niwinz
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


How do I return the data I need from this Exception?

2015-10-08 Thread Lawrence Krubner
I'm thinking that I've misunderstood something about how to catch an 
Exception. I have these 2 functions: 

(defn catch-exceptions [e this-users-conversation]
  (try 
(timbre/log :trace (str  "in catch-exceptions our exception was: " e))
(let [error (:object (ex-data e))
  status (if (:status error)
   (:status error)
   500)
  body (if (:body error)
 (:body error)
 (str e))
  intent (if (:intent this-users-conversation)
   (:intent this-users-conversation)
   "api")
  reply {:message body :status status :intent intent}]
  reply)
(catch Exception e (println "in catch-exceptions we triggered this 
exception: " e

(defn pull-response-from-query [this-users-conversation function-to-call]
  "Formatting exceptions as Peter requested so the iPhone app only needs to 
check the top-level status."
  (try
(function-to-call this-users-conversation)
(catch Exception e (catch-exceptions e this-users-conversation


Testing in the terminal, and feeding in garbage in a deliberate attempt to 
trigger the exception, I see this line over and over again: 

(timbre/log :trace (str  "in catch-exceptions our exception was: " e))

but I never get this line: 

  (timbre/log :trace (str  "in catch-exceptions our reply was: " 
reply))

nor do I ever see: 

"in catch-exceptions we triggered this exception: "

What am I doing wrong? 




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


Re: Trying to understand Clojure/Java concurrency performance?

2015-10-08 Thread Christopher Small
I'd just like to point something which may have been glossed over from 
Timothy's post (and now Andrey's as well).

> ... if you're doing actual processing, handling that many connections on 
a box seems like premature optimization.

> Have the ability to handle 2M persistent connections does not depends 
only on the server/language and how they handle the "hello world" 
request/response, where are other players in the equation: persistence and 
your business logic, operating system tuning, virtual/bare metal hardware, 
network hardware...

If you're interested in the question of a maximum number of connections 
from a purely theoretical standpoint, then great; it's an interesting 
question. But if you're really thinking about it from the perspective of 
making an infrastructure decision for a real world project, I'd have to 
agree with Andrey and Timothy here. In most real world scenarios, you're 
not going to be able to get even close to those upper limits, and you'll 
see other aspects of the runtimes become much more important. So I wouldn't 
put too much weight on this particular question in isolation. If your 
application's processing per connection really is super minimal with almost 
0 real work being done (as in a chat server, as mentioned), then it's a 
factor worth considering. But most of the time we need to do things with 
our data, so it's important that we consider the bigger picture.

I'll also echo the sentiment that scaling horizontally over vertically has 
a lot of advantages, so it's worth considering designing your architecture 
in this direction regardless of which language you choose.

Best

Chris
 

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


Re: palingdrome problem (4 clojure)

2015-10-08 Thread 'Alan Forrester' via Clojure
On 8 Oct 2015, at 09:15, r/ Wobben  wrote:

> I have now this :
> 
> (ns fourclojure.core
>   (:gen-class))
> 
> 
> (defn checker [x]
>   ( = x (if (string? x)
> (clojure.string/reverse x)
> (into (empty x) (reverse x)
> 
> 
> (checker '(1 2 3 4 5)) true
> 
> 
> ( = '( 1 2 3 4 5) '( 5 4 3 2 1) ) false
> 
> So something is wrong about my code
> 
> it works fine with string but not with a set

First, ‘(1 2 3 4 5) is a list, not a set.

Second, (reverse ‘(1 2 3 4 5)) is  ‘(5 4 3 2 1) and according to the docs for 
into

https://clojuredocs.org/clojure.core/into

that function conjoins items from (reverse ‘(1 2 3 4 5)) onto  (empty ‘(1 2 3 4 
5)). The docs for conj tell you what will happen

https://clojuredocs.org/clojure.core/conj

(empty ‘(1 2 3 4 5)) is a list and conjoining to a list puts items at the front 
of the list not the back, so it puts 5 in at the from, then puts 4 in front of 
the 5 and so on. So you are doing  ( = '( 1 2 3 4 5) ‘(1 2 3 4 5)).

Alan

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


[ANN]: clojure.tools.trace 0.7.9

2015-10-08 Thread Luc Prefontaine

A Clojure trace tool. Defines tracing macros/fns to help you see what your code 
is doing.

Summary of changes of this release:

* Release 0.7.9 October 8, 2015:
  * Closed TTRACE-11, trace-vars/untrace-vars now accept vars
  * Closed TTRACE-12, move away from Java 5, extend some new throwables with 
ThrowableRecompose  
  * Added more tests for TTRACE-12

-- 
Luc Préfontaine
SoftAddicts inc.
Québec, Canada
Rabat, Morocco


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


Re: palingdrome problem (4 clojure)

2015-10-08 Thread Marc O'Morain
> So you convert the coll first to a sequence and compared it to the
reverse.
> Does the reversed coll not to be converted to a sequence then?

`reverse` will call `seq` on the coll that is passed in, so you don't need
to.

I used `doc` and `source` to find this out:

user=> (doc reverse)
-
clojure.core/reverse
([coll])
  Returns a seq of the items in coll in reverse order. Not lazy.


user=> (source reverse)
(defn reverse
  "Returns a seq of the items in coll in reverse order. Not lazy."
  {:added "1.0"
   :static true}
  [coll]
(reduce1 conj () coll))


user=> (source clojure.core/reduce1)
(defn ^:private ^:static
  reduce1
   ([f coll]
 (let [s (seq coll)]
   (if s
 (reduce1 f (first s) (next s))
 (f
   ([f val coll]
  (let [s (seq coll)]
(if s
  (if (chunked-seq? s)
(recur f
   (.reduce (chunk-first s) f val)
   (chunk-next s))
(recur f (f val (first s)) (next s)))
 val

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


Re: palingdrome problem (4 clojure)

2015-10-08 Thread r/ Wobben
Chjips you are right. See  this : 

(defn palindrome [x]
  (if (string? x)
(clojure.string/reverse x)
(into (empty x) (reverse x

(palindrome '( 1 2 3 4)) (1 2 3 4)

So back to the drawing table.

Roelof


Op donderdag 8 oktober 2015 10:59:30 UTC+2 schreef Alan Forrester:

> On 8 Oct 2015, at 09:15, r/ Wobben  
> wrote: 
>
> > I have now this : 
> > 
> > (ns fourclojure.core 
> >   (:gen-class)) 
> > 
> > 
> > (defn checker [x] 
> >   ( = x (if (string? x) 
> > (clojure.string/reverse x) 
> > (into (empty x) (reverse x) 
> > 
> > 
> > (checker '(1 2 3 4 5)) true 
> > 
> > 
> > ( = '( 1 2 3 4 5) '( 5 4 3 2 1) ) false 
> > 
> > So something is wrong about my code 
> > 
> > it works fine with string but not with a set 
>
> First, ‘(1 2 3 4 5) is a list, not a set. 
>
> Second, (reverse ‘(1 2 3 4 5)) is  ‘(5 4 3 2 1) and according to the docs 
> for into 
>
> https://clojuredocs.org/clojure.core/into 
>
> that function conjoins items from (reverse ‘(1 2 3 4 5)) onto  (empty ‘(1 
> 2 3 4 5)). The docs for conj tell you what will happen 
>
> https://clojuredocs.org/clojure.core/conj 
>
> (empty ‘(1 2 3 4 5)) is a list and conjoining to a list puts items at the 
> front of the list not the back, so it puts 5 in at the from, then puts 4 in 
> front of the 5 and so on. So you are doing  ( = '( 1 2 3 4 5) ‘(1 2 3 4 
> 5)). 
>
> Alan

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


Re: palingdrome problem (4 clojure)

2015-10-08 Thread Marc O'Morain
This should do it:

(defn palindrome? [coll]
  (= (seq coll) (reverse coll)))


user=> (palindrome? "tattarrattat")
true
user=> (palindrome? [1 5 10 10 5 1])
true
user=> (palindrome? "marc")
false
user=> (palindrome? [1 2 3])
false


On 8 October 2015 at 12:48, r/ Wobben  wrote:

> Chjips you are right. See  this :
>
> (defn palindrome [x]
>   (if (string? x)
> (clojure.string/reverse x)
> (into (empty x) (reverse x
>
> (palindrome '( 1 2 3 4)) (1 2 3 4)
>
> So back to the drawing table.
>
> Roelof
>
>
> Op donderdag 8 oktober 2015 10:59:30 UTC+2 schreef Alan Forrester:
>
>> On 8 Oct 2015, at 09:15, r/ Wobben  wrote:
>>
>> > I have now this :
>> >
>> > (ns fourclojure.core
>> >   (:gen-class))
>> >
>> >
>> > (defn checker [x]
>> >   ( = x (if (string? x)
>> > (clojure.string/reverse x)
>> > (into (empty x) (reverse x)
>> >
>> >
>> > (checker '(1 2 3 4 5)) true
>> >
>> >
>> > ( = '( 1 2 3 4 5) '( 5 4 3 2 1) ) false
>> >
>> > So something is wrong about my code
>> >
>> > it works fine with string but not with a set
>>
>> First, ‘(1 2 3 4 5) is a list, not a set.
>>
>> Second, (reverse ‘(1 2 3 4 5)) is  ‘(5 4 3 2 1) and according to the docs
>> for into
>>
>> https://clojuredocs.org/clojure.core/into
>>
>> that function conjoins items from (reverse ‘(1 2 3 4 5)) onto  (empty ‘(1
>> 2 3 4 5)). The docs for conj tell you what will happen
>>
>> https://clojuredocs.org/clojure.core/conj
>>
>> (empty ‘(1 2 3 4 5)) is a list and conjoining to a list puts items at the
>> front of the list not the back, so it puts 5 in at the from, then puts 4 in
>> front of the 5 and so on. So you are doing  ( = '( 1 2 3 4 5) ‘(1 2 3 4
>> 5)).
>>
>> Alan
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: palingdrome problem (4 clojure)

2015-10-08 Thread r/ Wobben
Oke, 

So you convert the coll first to a sequence and compared it to the reverse.
Does the reversed coll not to be converted to a sequence then? 



Op donderdag 8 oktober 2015 14:10:43 UTC+2 schreef Marc O'Morain:

> This should do it:
>
> (defn palindrome? [coll]
>   (= (seq coll) (reverse coll)))
>
>
> user=> (palindrome? "tattarrattat")
> true
> user=> (palindrome? [1 5 10 10 5 1])
> true
> user=> (palindrome? "marc")
> false
> user=> (palindrome? [1 2 3])
> false
>
>
> On 8 October 2015 at 12:48, r/ Wobben  
> wrote:
>
>> Chjips you are right. See  this : 
>>
>> (defn palindrome [x]
>>   (if (string? x)
>> (clojure.string/reverse x)
>> (into (empty x) (reverse x
>>
>> (palindrome '( 1 2 3 4)) (1 2 3 4)
>>
>> So back to the drawing table.
>>
>> Roelof
>>
>>
>> Op donderdag 8 oktober 2015 10:59:30 UTC+2 schreef Alan Forrester:
>>
>>> On 8 Oct 2015, at 09:15, r/ Wobben  wrote: 
>>>
>>> > I have now this : 
>>> > 
>>> > (ns fourclojure.core 
>>> >   (:gen-class)) 
>>> > 
>>> > 
>>> > (defn checker [x] 
>>> >   ( = x (if (string? x) 
>>> > (clojure.string/reverse x) 
>>> > (into (empty x) (reverse x) 
>>> > 
>>> > 
>>> > (checker '(1 2 3 4 5)) true 
>>> > 
>>> > 
>>> > ( = '( 1 2 3 4 5) '( 5 4 3 2 1) ) false 
>>> > 
>>> > So something is wrong about my code 
>>> > 
>>> > it works fine with string but not with a set 
>>>
>>> First, ‘(1 2 3 4 5) is a list, not a set. 
>>>
>>> Second, (reverse ‘(1 2 3 4 5)) is  ‘(5 4 3 2 1) and according to the 
>>> docs for into 
>>>
>>> https://clojuredocs.org/clojure.core/into 
>>>
>>> that function conjoins items from (reverse ‘(1 2 3 4 5)) onto  (empty 
>>> ‘(1 2 3 4 5)). The docs for conj tell you what will happen 
>>>
>>> https://clojuredocs.org/clojure.core/conj 
>>>
>>> (empty ‘(1 2 3 4 5)) is a list and conjoining to a list puts items at 
>>> the front of the list not the back, so it puts 5 in at the from, then puts 
>>> 4 in front of the 5 and so on. So you are doing  ( = '( 1 2 3 4 5) ‘(1 2 3 
>>> 4 5)). 
>>>
>>> Alan
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> 
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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


Re: Lazy fold-right, help with Scala translation

2015-10-08 Thread Rastko Soskic
Posted before finishing :)

Thanks in advance for any tip/suggestion.

Cheers,
R.

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


[ANN] Clojure High Performance Programming, 2nd edition

2015-10-08 Thread Shantanu Kumar
Hi,

I am happy to share that second edition of `Clojure High Performance 
Programming` is now published. This book is targeted at intermediate 
Clojure programmers and covers Clojure abstractions, Java interop, JVM 
internals, Concurrency and other performance-related topics.

On Packt website: 
https://www.packtpub.com/application-development/clojure-high-performance-programming-second-edition
On Amazon: 
http://www.amazon.com/Clojure-Performance-Programming-Shantanu-Kumar-ebook/dp/B013EJ3DRK

This edition is updated for Clojure 1.7 and Java 8, and includes a new 
chapter on measuring performance. The book is updated throughout with 
practical tips and techniques. I hope readers will enjoy the book.

Shantanu

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


How to do functional programming

2015-10-08 Thread Pattern-chaser
I started in software with structured design. In the 80s/90s, I discovered 
OO, and was surprised to find that the main thing I gained was a different 
way of looking at things. This informed my designs from then on, even when 
I returned from C++ to C (I'm a firmware designer by specialisation). Now I 
want to find out about functional programming, in the hope that another new 
perspective will inform and improve my design and programming skills. The 
question I'm posing here is simple: how do you do functional programming?

For an OO design, you put together a number of co-operating but autonomous 
class instances, and let them get on with it. Functional programming 
doesn't seem to involve classes or any of the OO concepts I'm used to. So 
how you do you design a program in a functional way?

TIA for your advice, opinions and thoughts. :)

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


Re: No recent activity for core.async?

2015-10-08 Thread Alex Miller
A mostly complete set of what I expect to be in it:

http://dev.clojure.org/jira/browse/ASYNC-86 - update to recent 
tools.analyzer (fixes many issues in go block analysis)
http://dev.clojure.org/jira/browse/ASYNC-101 - make async/reduce respect 
reduced
http://dev.clojure.org/jira/browse/ASYNC-104 - NEW offer! and poll!
http://dev.clojure.org/jira/browse/ASYNC-103 - NEW promise-chan
http://dev.clojure.org/jira/browse/ASYNC-124 - fix for expanding transducer 
channels to notify multiple pending takers


On Wednesday, October 7, 2015 at 8:41:43 AM UTC-5, Yehonathan Sharvit wrote:
>
> any important new featres on perspective?
>
>
> On Wed, Oct 7, 2015 at 3:24 PM, Alex Miller  > wrote:
>
>> When Rich has time to approve things. 
>>
>> -- 
>> 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 a topic in the 
>> Google Groups "Clojure" group. 
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/clojure/aAofuL0Hj5A/unsubscribe. 
>> To unsubscribe from this group and all its topics, send an email to 
>> clojure+u...@googlegroups.com . 
>> For more options, visit https://groups.google.com/d/optout. 
>>
>
>

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


Re: [ANN] Yesql 0.5.1 Released.

2015-10-08 Thread Charles Harvey III
I have a question that I hope you can answer about using Yesql with 
Component.

Currently I pass the db-spec into my endpoint and then pass it into each 
call to a query. Now that I can call defqueries with the db-spec, how do I 
send that in from component? Sorry for asking, I am new to both libraries 
and am still learning.

Thanks.



On Wednesday, October 7, 2015 at 5:55:11 PM UTC-4, Kris Jenkins wrote:
>
> Yesql - the Clojure library for using SQL - has just released v0.5.1.
>
> The API is much improved - especially if you're using queries with many 
> arguments - so see the migration guide if you're upgrading:
>
> My thanks to everyone who has contributed to this release, and for all the 
> users who've been patiently waiting for v0.5 to go official. :-)
>
> Kris
>

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


Lazy fold-right, help with Scala translation

2015-10-08 Thread Rastko Soskic
Hi,
I have come up this implementation of fold-right in Scala:

def foldRight[B](z: => B)(f: (A, => B) => B): B = // Here, arrow => in 
front of argument means it is arg by name (lazy) and won't be evaluated 
until required
// z - init, f - combining f, and target sequence is 
this match {
  case Cons(h,t) => f(h(), t().foldRight(z)(f)) // If "f" doesn't 
evaluate second arg, there will be no recursion...
  case _ => z
}

Now, I know that Clojure doesn't provide facility such is lazy vals (lazy 
args that is)
and there are lazy sequences.

Could someone aid me in porting it to clojure as plain translation like:

(defn fold-right [z f s] ; z - init, f - combining function, s - target sequence
  (let [[h & t] s]
(if h
  (f h (fold-right z f t))
  z)))

is eager unlike Scala's lazy variant due to fact there are no lazy 
args/vals and argument is evaluated
regardless if function f evaluates really that argument or not.

I know I could use Clojure's reduce and that it is lazy but I'd like to 
figure out how I could achieve 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/d/optout.


Re: How to do functional programming

2015-10-08 Thread Jason Stewart
The way I like to think about FP vs OO is that OO usually couples state
with identity and the code that operates on both, while FP defines a clear
boundary between data, state, and the functions that operate on the data.

Designing a FP program often involves looking at the data first, then
thinking about what transformations that the data needs in order to become
what you want it to be. I like to think of functions as instructions about
how to transform that data.

This is overly simplistic, and I would definitely recommend some background
reading/watching of videos.

A good starting point would be to watch these:
https://changelog.com/rich-hickeys-greatest-hits/

And read the book Functional Programming for the Object Oriented Programmer
by Brian Marick if you've been writing OO code for a long time.

Cheers,
Jason


On Thu, Oct 8, 2015 at 8:23 AM, Pattern-chaser 
wrote:

> I started in software with structured design. In the 80s/90s, I discovered
> OO, and was surprised to find that the main thing I gained was a different
> way of looking at things. This informed my designs from then on, even when
> I returned from C++ to C (I'm a firmware designer by specialisation). Now I
> want to find out about functional programming, in the hope that another new
> perspective will inform and improve my design and programming skills. The
> question I'm posing here is simple: how do you do functional programming?
>
> For an OO design, you put together a number of co-operating but autonomous
> class instances, and let them get on with it. Functional programming
> doesn't seem to involve classes or any of the OO concepts I'm used to. So
> how you do you design a program in a functional way?
>
> TIA for your advice, opinions and thoughts. :)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


[meta] Unwelcome changes around here.

2015-10-08 Thread Fluid Dynamics
I don't know what you guys did, but as of about 2 days ago, when browsing 
this site about 1 time in 20 after reading an article and then clicking 
"back" to go back to the topic list my main Firefox window disappears and 
is replaced by a small dialog with two options, "restart Firefox" and "quit 
Firefox". I DON'T WANT TO DO EITHER. I WANT TO GO BACK TO THE TOPIC LIST. 
THAT IS WHY I CLICKED THE "BACK" BUTTON AND NOT THE "RESTART OR QUIT" 
BUTTON.

Whatever alterations you have made to this site a few days ago, you are to 
un-make immediately. Hijacking your site's viewers' browsers is NOT 
acceptable under ANY circumstances. If you have not restored the previous 
behavior ("back" button behaves exactly as advertised, 100% of the time) in 
three (3) days (so, by Monday morning), I will quit using this site and 
recommend to everyone I know -- friends, everyone I work with, bosses, etc. 
-- that they avoid this site due to browser hijacking behavior.

I recommend you simply retrieve the site's code as it existed a week ago 
from your backup tapes (you DO keep backups, right?) and replace the 
currently running web-app with this older version. The version of a week 
ago lacked the objectionable browser hijacking behavior. It shouldn't take 
you more than 30 minutes. Assuming you did your due diligence and kept 
proper backups, especially making them before introducing changes that 
could have major repercussions. That makes the three-day deadline quite 
generous.

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


Re: [meta] Unwelcome changes around here.

2015-10-08 Thread Phillip Lord

We've been here before with Fluid Dynamics. The whole rational
explanation/discussion thing didn't work last time, and probably won't
this time.

I'd suggest ending this thread immediately.

Timothy Baldridge  writes:

> To expand my previous reply. What site are you talking about? I got your
> email via my email client (Gmail) so what are you talking about?
>
> And if you are talking about the Google Groups website, perhaps contact
> them? This is completely the wrong place to complain about how your browser
> reacts to some site's view of a mailing list. This list has 0 control over
> whatever site it is that you use, so complaining here not only is
> pointless, but is also just spam.
>
> Timothy
>
> On Thu, Oct 8, 2015 at 9:09 AM, Timothy Baldridge 
> wrote:
>
>> lol, wut?
>>
>> On Thu, Oct 8, 2015 at 9:06 AM, Fluid Dynamics  wrote:
>>
>>> I don't know what you guys did, but as of about 2 days ago, when browsing
>>> this site about 1 time in 20 after reading an article and then clicking
>>> "back" to go back to the topic list my main Firefox window disappears and
>>> is replaced by a small dialog with two options, "restart Firefox" and "quit
>>> Firefox". I DON'T WANT TO DO EITHER. I WANT TO GO BACK TO THE TOPIC LIST.
>>> THAT IS WHY I CLICKED THE "BACK" BUTTON AND NOT THE "RESTART OR QUIT"
>>> BUTTON.
>>>
>>> Whatever alterations you have made to this site a few days ago, you are
>>> to un-make immediately. Hijacking your site's viewers' browsers is NOT
>>> acceptable under ANY circumstances. If you have not restored the previous
>>> behavior ("back" button behaves exactly as advertised, 100% of the time) in
>>> three (3) days (so, by Monday morning), I will quit using this site and
>>> recommend to everyone I know -- friends, everyone I work with, bosses, etc.
>>> -- that they avoid this site due to browser hijacking behavior.
>>>
>>> I recommend you simply retrieve the site's code as it existed a week ago
>>> from your backup tapes (you DO keep backups, right?) and replace the
>>> currently running web-app with this older version. The version of a week
>>> ago lacked the objectionable browser hijacking behavior. It shouldn't take
>>> you more than 30 minutes. Assuming you did your due diligence and kept
>>> proper backups, especially making them before introducing changes that
>>> could have major repercussions. That makes the three-day deadline quite
>>> generous.

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


Re: [meta] Unwelcome changes around here.

2015-10-08 Thread Timothy Baldridge
lol, wut?

On Thu, Oct 8, 2015 at 9:06 AM, Fluid Dynamics  wrote:

> I don't know what you guys did, but as of about 2 days ago, when browsing
> this site about 1 time in 20 after reading an article and then clicking
> "back" to go back to the topic list my main Firefox window disappears and
> is replaced by a small dialog with two options, "restart Firefox" and "quit
> Firefox". I DON'T WANT TO DO EITHER. I WANT TO GO BACK TO THE TOPIC LIST.
> THAT IS WHY I CLICKED THE "BACK" BUTTON AND NOT THE "RESTART OR QUIT"
> BUTTON.
>
> Whatever alterations you have made to this site a few days ago, you are to
> un-make immediately. Hijacking your site's viewers' browsers is NOT
> acceptable under ANY circumstances. If you have not restored the previous
> behavior ("back" button behaves exactly as advertised, 100% of the time) in
> three (3) days (so, by Monday morning), I will quit using this site and
> recommend to everyone I know -- friends, everyone I work with, bosses, etc.
> -- that they avoid this site due to browser hijacking behavior.
>
> I recommend you simply retrieve the site's code as it existed a week ago
> from your backup tapes (you DO keep backups, right?) and replace the
> currently running web-app with this older version. The version of a week
> ago lacked the objectionable browser hijacking behavior. It shouldn't take
> you more than 30 minutes. Assuming you did your due diligence and kept
> proper backups, especially making them before introducing changes that
> could have major repercussions. That makes the three-day deadline quite
> generous.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



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


Re: [meta] Unwelcome changes around here.

2015-10-08 Thread Timothy Baldridge
To expand my previous reply. What site are you talking about? I got your
email via my email client (Gmail) so what are you talking about?

And if you are talking about the Google Groups website, perhaps contact
them? This is completely the wrong place to complain about how your browser
reacts to some site's view of a mailing list. This list has 0 control over
whatever site it is that you use, so complaining here not only is
pointless, but is also just spam.

Timothy

On Thu, Oct 8, 2015 at 9:09 AM, Timothy Baldridge 
wrote:

> lol, wut?
>
> On Thu, Oct 8, 2015 at 9:06 AM, Fluid Dynamics  wrote:
>
>> I don't know what you guys did, but as of about 2 days ago, when browsing
>> this site about 1 time in 20 after reading an article and then clicking
>> "back" to go back to the topic list my main Firefox window disappears and
>> is replaced by a small dialog with two options, "restart Firefox" and "quit
>> Firefox". I DON'T WANT TO DO EITHER. I WANT TO GO BACK TO THE TOPIC LIST.
>> THAT IS WHY I CLICKED THE "BACK" BUTTON AND NOT THE "RESTART OR QUIT"
>> BUTTON.
>>
>> Whatever alterations you have made to this site a few days ago, you are
>> to un-make immediately. Hijacking your site's viewers' browsers is NOT
>> acceptable under ANY circumstances. If you have not restored the previous
>> behavior ("back" button behaves exactly as advertised, 100% of the time) in
>> three (3) days (so, by Monday morning), I will quit using this site and
>> recommend to everyone I know -- friends, everyone I work with, bosses, etc.
>> -- that they avoid this site due to browser hijacking behavior.
>>
>> I recommend you simply retrieve the site's code as it existed a week ago
>> from your backup tapes (you DO keep backups, right?) and replace the
>> currently running web-app with this older version. The version of a week
>> ago lacked the objectionable browser hijacking behavior. It shouldn't take
>> you more than 30 minutes. Assuming you did your due diligence and kept
>> proper backups, especially making them before introducing changes that
>> could have major repercussions. That makes the three-day deadline quite
>> generous.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> “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)
>



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


Re: [ClojureScript] new thi.ng website and additions

2015-10-08 Thread Marc Fawzi
as always, super cool and inspiring.

It raises the standard for others way too high! :)

Nice and thank you for sharing!!!

On Thu, Oct 8, 2015 at 11:14 AM, Karsten Schmidt  wrote:

> Just a quick heads up that I've been re-working the website for my
> collection of 20+ libraries, now with a bit more one-stop info, stats
> and projects filterable via tags. The site now also features recent
> additions like:
>
> http://thi.ng/#thi.ng/fabric 0.0.376
>
> Flexible compute graph framework, fact graph & query engine/DSL,
> linked data server components
>
> http://thi.ng/#thi.ng/color 1.0.0
>
> This library has been completely rewritten to use protocols for easier
> conversion between color spaces and offers optimized operations for
> each...
>
> 
> Oh, and am also going to teach a bunch of workshops focused on
> Clojure(script) & various thi.ng libraries over the next couple of
> months (2x London, 1x Seoul). Infos on the site:
> http://workshop.thi.ng/
> 
>
> Over & out.
> K.
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.
>

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


Writing Friendlier Clojure

2015-10-08 Thread Alan Thompson
A very nice blog posting about making your clojure functions more readable
to other people (or a future you!).  Enjoy.

http://adambard.com/blog/write-friendlier-clojure/

Alan

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


Re: [ClojureScript] new thi.ng website and additions

2015-10-08 Thread Marc Fawzi
hidden deep:

https://github.com/thi-ng/tweeny

:)

On Thu, Oct 8, 2015 at 12:08 PM, Marc Fawzi  wrote:

> as always, super cool and inspiring.
>
> It raises the standard for others way too high! :)
>
> Nice and thank you for sharing!!!
>
> On Thu, Oct 8, 2015 at 11:14 AM, Karsten Schmidt  wrote:
>
>> Just a quick heads up that I've been re-working the website for my
>> collection of 20+ libraries, now with a bit more one-stop info, stats
>> and projects filterable via tags. The site now also features recent
>> additions like:
>>
>> http://thi.ng/#thi.ng/fabric 0.0.376
>>
>> Flexible compute graph framework, fact graph & query engine/DSL,
>> linked data server components
>>
>> http://thi.ng/#thi.ng/color 1.0.0
>>
>> This library has been completely rewritten to use protocols for easier
>> conversion between color spaces and offers optimized operations for
>> each...
>>
>> 
>> Oh, and am also going to teach a bunch of workshops focused on
>> Clojure(script) & various thi.ng libraries over the next couple of
>> months (2x London, 1x Seoul). Infos on the site:
>> http://workshop.thi.ng/
>> 
>>
>> Over & out.
>> K.
>>
>> --
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "ClojureScript" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojurescript+unsubscr...@googlegroups.com.
>> To post to this group, send email to clojurescr...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/clojurescript.
>>
>
>

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


Re: How to do functional programming

2015-10-08 Thread Colin Yates
This is a great course. I still get a bit green with envy when I recall the 
workbook capabilities in Eclipse. Another recommendation for Brian Marick’s OO 
to FP book.

> On 8 Oct 2015, at 21:00, Sean Corfield  wrote:
> 
> On 10/8/15, 12:45 PM, "Raoul Duke"  rao...@gmail.com> wrote:
> 
> 
>> i did this one a while back as a refresher on my university stuff :-)
>> https://www.coursera.org/course/progfun
> 
> I’ll second this as a great recommendation. I first took the course several 
> years ago and I’ve taken it twice since as a Community TA — that’s how much I 
> like that course! :)
> 
> It is switching from scheduled to on-demand so it won’t be available for a 
> while yet, but then folks will be able to take it whenever they want, at 
> their own speed.
> 
> Sean
> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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


Re: Lazy fold-right, help with Scala translation

2015-10-08 Thread Elango Cheran
Hi Rastko,
I was about to respond with the reverse + reduce answer, but it seems that
it was already covered here:
https://groups.google.com/forum/#!topic/clojure/MizwTxHwLE4

But there is a more detailed answer about short-circuiting reduce that you
might also be interested in (using the function 'reduced', which I didn't
know about until now):
http://stackoverflow.com/questions/16800255/how-do-we-do-both-left-and-right-folds-in-clojure

-- Elango

On Thu, Oct 8, 2015 at 6:49 AM, Rastko Soskic  wrote:

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

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


Re: [ANN] Yesql 0.5.1 Released.

2015-10-08 Thread Charles Harvey III
That's what I have now and I was wondering if it could/should change now 
that I can pass the connection into defqueries. It seems like it could 
change. But, component is just a place to keep state/global values. The 
connection being one of them. defqueries must be storing it somewhere (an 
atom?) but if component already has it than I do not need to give it to 
yesql to hold as well.

Does this all sound right?

Thanks.




On Thursday, October 8, 2015 at 3:48:33 PM UTC-4, Robin Heggelund Hansen 
wrote:
>
> For a component-based workflow, you wouldn't send in the db-spec with the 
> defqueries. You would do it when calling a query.
>
> (defqueries "somepath")
>
> (defn code [component]
>   (some-query {:name "Robin", :age 6} {:db (:db-spec component)}))
>
> torsdag 8. oktober 2015 15.34.09 UTC+2 skrev Charles Harvey III følgende:
>>
>> I have a question that I hope you can answer about using Yesql with 
>> Component.
>>
>> Currently I pass the db-spec into my endpoint and then pass it into each 
>> call to a query. Now that I can call defqueries with the db-spec, how do I 
>> send that in from component? Sorry for asking, I am new to both libraries 
>> and am still learning.
>>
>> Thanks.
>>
>>
>>
>> On Wednesday, October 7, 2015 at 5:55:11 PM UTC-4, Kris Jenkins wrote:
>>>
>>> Yesql - the Clojure library for using SQL - has just released v0.5.1.
>>>
>>> The API is much improved - especially if you're using queries with many 
>>> arguments - so see the migration guide if you're upgrading:
>>>
>>> My thanks to everyone who has contributed to this release, and for all 
>>> the users who've been patiently waiting for v0.5 to go official. :-)
>>>
>>> Kris
>>>
>>

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


Re: How to do functional programming

2015-10-08 Thread Sean Corfield
On 10/8/15, 1:32 PM, "Colin Yates"  wrote:


>This is a great course. I still get a bit green with envy when I recall the 
>workbook capabilities in Eclipse. Another recommendation for Brian Marick’s OO 
>to FP book.

Ah, just realized this is Odersky’s course which is not what I was thinking of! 
I really did NOT enjoy the progfun course. I found the exercises boring and I 
found Scala itself fussy and annoying (and I _hate_ Eclipse!). And this is from 
someone who did Scala in production for about 18 months before switching to 
Clojure in 2011!

The course I was thinking of, which I praised so highly was actually this one:

https://www.coursera.org/course/proglang

Programming Languages, University of Washington, Professor Dan Grossman.

That’s the one I enjoyed so much I took it three times!

It starts out with Standard ML to teach you about statically typed FP, then it 
moves on to Racket to teach you about dynamically typed FP, then it wraps up 
with Ruby to look at how dynamically typed OOP contrasts with the two FP 
approaches.

Sean

>
>> On 8 Oct 2015, at 21:00, Sean Corfield  wrote:
>> 
>> On 10/8/15, 12:45 PM, "Raoul Duke" > rao...@gmail.com> wrote:
>> 
>> 
>>> i did this one a while back as a refresher on my university stuff :-)
>>> https://www.coursera.org/course/progfun
>> 
>> I’ll second this as a great recommendation. I first took the course several 
>> years ago and I’ve taken it twice since as a Community TA — that’s how much 
>> I like that course! :)
>> 
>> It is switching from scheduled to on-demand so it won’t be available for a 
>> while yet, but then folks will be able to take it whenever they want, at 
>> their own speed.
>> 
>> Sean


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


Re: [ANN] Yesql 0.5.1 Released.

2015-10-08 Thread Robin Heggelund Hansen
If you pass the db connection to defqueries, you are essentially storing 
global state. The point of component is to not have global state. So yeah, 
you shouldn't pass the db-connection to defqueries, but pass the connection 
to every db-call.

fredag 9. oktober 2015 03.01.29 UTC+2 skrev Charles Harvey III følgende:
>
> That's what I have now and I was wondering if it could/should change now 
> that I can pass the connection into defqueries. It seems like it could 
> change. But, component is just a place to keep state/global values. The 
> connection being one of them. defqueries must be storing it somewhere (an 
> atom?) but if component already has it than I do not need to give it to 
> yesql to hold as well.
>
> Does this all sound right?
>
> Thanks.
>
>
>
>
> On Thursday, October 8, 2015 at 3:48:33 PM UTC-4, Robin Heggelund Hansen 
> wrote:
>>
>> For a component-based workflow, you wouldn't send in the db-spec with the 
>> defqueries. You would do it when calling a query.
>>
>> (defqueries "somepath")
>>
>> (defn code [component]
>>   (some-query {:name "Robin", :age 6} {:db (:db-spec component)}))
>>
>> torsdag 8. oktober 2015 15.34.09 UTC+2 skrev Charles Harvey III følgende:
>>>
>>> I have a question that I hope you can answer about using Yesql with 
>>> Component.
>>>
>>> Currently I pass the db-spec into my endpoint and then pass it into each 
>>> call to a query. Now that I can call defqueries with the db-spec, how do I 
>>> send that in from component? Sorry for asking, I am new to both libraries 
>>> and am still learning.
>>>
>>> Thanks.
>>>
>>>
>>>
>>> On Wednesday, October 7, 2015 at 5:55:11 PM UTC-4, Kris Jenkins wrote:

 Yesql - the Clojure library for using SQL - has just released v0.5.1.

 The API is much improved - especially if you're using queries with many 
 arguments - so see the migration guide if you're upgrading:

 My thanks to everyone who has contributed to this release, and for all 
 the users who've been patiently waiting for v0.5 to go official. :-)

 Kris

>>>

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


Re: How to do functional programming

2015-10-08 Thread Raoul Duke
> https://www.coursera.org/course/proglang

cool. thanks for the pointer, i will have to find the time.

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


Re: How to do functional programming

2015-10-08 Thread Baishampayan Ghose
Haha, Sean... you got me stumped there for a second. I completely
agree with your assessment though. Dan Grossman's course on
"Programming Languages" is an absolute blockbuster. Highly
recommended! ~BG

On Fri, Oct 9, 2015 at 5:49 AM, Sean Corfield  wrote:
> On 10/8/15, 1:32 PM, "Colin Yates"  colin.ya...@gmail.com> wrote:
>
>
>>This is a great course. I still get a bit green with envy when I recall the 
>>workbook capabilities in Eclipse. Another recommendation for Brian Marick’s 
>>OO to FP book.
>
> Ah, just realized this is Odersky’s course which is not what I was thinking 
> of! I really did NOT enjoy the progfun course. I found the exercises boring 
> and I found Scala itself fussy and annoying (and I _hate_ Eclipse!). And this 
> is from someone who did Scala in production for about 18 months before 
> switching to Clojure in 2011!
>
> The course I was thinking of, which I praised so highly was actually this one:
>
> https://www.coursera.org/course/proglang
>
> Programming Languages, University of Washington, Professor Dan Grossman.
>
> That’s the one I enjoyed so much I took it three times!
>
> It starts out with Standard ML to teach you about statically typed FP, then 
> it moves on to Racket to teach you about dynamically typed FP, then it wraps 
> up with Ruby to look at how dynamically typed OOP contrasts with the two FP 
> approaches.
>
> Sean
>
>>
>>> On 8 Oct 2015, at 21:00, Sean Corfield  wrote:
>>>
>>> On 10/8/15, 12:45 PM, "Raoul Duke" >> rao...@gmail.com> wrote:
>>>
>>>
 i did this one a while back as a refresher on my university stuff :-)
 https://www.coursera.org/course/progfun
>>>
>>> I’ll second this as a great recommendation. I first took the course several 
>>> years ago and I’ve taken it twice since as a Community TA — that’s how much 
>>> I like that course! :)
>>>
>>> It is switching from scheduled to on-demand so it won’t be available for a 
>>> while yet, but then folks will be able to take it whenever they want, at 
>>> their own speed.
>>>
>>> Sean
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Baishampayan Ghose
b.ghose at 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/d/optout.


new thi.ng website and additions

2015-10-08 Thread Karsten Schmidt
Just a quick heads up that I've been re-working the website for my
collection of 20+ libraries, now with a bit more one-stop info, stats
and projects filterable via tags. The site now also features recent
additions like:

http://thi.ng/#thi.ng/fabric 0.0.376

Flexible compute graph framework, fact graph & query engine/DSL,
linked data server components

http://thi.ng/#thi.ng/color 1.0.0

This library has been completely rewritten to use protocols for easier
conversion between color spaces and offers optimized operations for
each...


Oh, and am also going to teach a bunch of workshops focused on
Clojure(script) & various thi.ng libraries over the next couple of
months (2x London, 1x Seoul). Infos on the site:
http://workshop.thi.ng/


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


Re: Writing Friendlier Clojure

2015-10-08 Thread Raoul Duke
blah.

"Whenever you notice this pattern, you can probably turn to one of the
threading macros instead."

that would fly in the face of being more declarative; when we start to
put in explicit ordering, instead of leaving it as just relationships,
that can be bad. of course it can also be good. even both at the same
time.

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


Re: How to do functional programming

2015-10-08 Thread Raoul Duke
https://duckduckgo.com/?q=amit+clojure+book
http://www.htdp.org/
http://realmofracket.com/about.html
http://landoflisp.com
http://book.realworldhaskell.org/
http://www.powells.com/biblio/9781617290657

etc.

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


Re: How to do functional programming

2015-10-08 Thread Raoul Duke
> The way I like to think about FP vs OO is that OO usually couples state with
> identity and the code that operates on both, while FP defines a clear
> boundary between data, state, and the functions that operate on the data.

https://en.wikipedia.org/wiki/Expression_problem

> Designing a FP program often involves looking at the data first, then
> thinking about what transformations that the data needs in order to become
> what you want it to be. I like to think of functions as instructions about
> how to transform that data.

http://lists.racket-lang.org/users/archive/2010-April/038935.html

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


Re: How to do functional programming

2015-10-08 Thread Mimmo Cosenza
https://tbaldridge.pivotshare.com/media/oop-lesson-1/28290 


I do not remember if the other tutorials (2,3 and 4) on OOP are free as well…

mimmo

> On 08 Oct 2015, at 21:36, Raoul Duke  wrote:
> 
>> The way I like to think about FP vs OO is that OO usually couples state with
>> identity and the code that operates on both, while FP defines a clear
>> boundary between data, state, and the functions that operate on the data.
> 
> https://en.wikipedia.org/wiki/Expression_problem
> 
>> Designing a FP program often involves looking at the data first, then
>> thinking about what transformations that the data needs in order to become
>> what you want it to be. I like to think of functions as instructions about
>> how to transform that data.
> 
> http://lists.racket-lang.org/users/archive/2010-April/038935.html
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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


Re: How to do functional programming

2015-10-08 Thread Raoul Duke
> https://tbaldridge.pivotshare.com/media/oop-lesson-1/28290
> I do not remember if the other tutorials (2,3 and 4) on OOP are free as
> well…


i did this one a while back as a refresher on my university stuff :-)
https://www.coursera.org/course/progfun

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


Re: How to do functional programming

2015-10-08 Thread Raoul Duke
heck if you pay me U$D120 an hour, you can send me your code (as long
as it isn't more than a single page at 10 pt font, with regular
formatting ;-) and i'll tell ya how to do it more FPish
(kidding.)

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


Re: [ANN] Yesql 0.5.1 Released.

2015-10-08 Thread Robin Heggelund Hansen
For a component-based workflow, you wouldn't send in the db-spec with the 
defqueries. You would do it when calling a query.

(defqueries "somepath")

(defn code [component]
  (some-query {:name "Robin", :age 6} {:db (:db-spec component)}))

torsdag 8. oktober 2015 15.34.09 UTC+2 skrev Charles Harvey III følgende:
>
> I have a question that I hope you can answer about using Yesql with 
> Component.
>
> Currently I pass the db-spec into my endpoint and then pass it into each 
> call to a query. Now that I can call defqueries with the db-spec, how do I 
> send that in from component? Sorry for asking, I am new to both libraries 
> and am still learning.
>
> Thanks.
>
>
>
> On Wednesday, October 7, 2015 at 5:55:11 PM UTC-4, Kris Jenkins wrote:
>>
>> Yesql - the Clojure library for using SQL - has just released v0.5.1.
>>
>> The API is much improved - especially if you're using queries with many 
>> arguments - so see the migration guide if you're upgrading:
>>
>> My thanks to everyone who has contributed to this release, and for all 
>> the users who've been patiently waiting for v0.5 to go official. :-)
>>
>> Kris
>>
>

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


Re: How to do functional programming

2015-10-08 Thread Sean Corfield
On 10/8/15, 12:45 PM, "Raoul Duke"  wrote:


>i did this one a while back as a refresher on my university stuff :-)
>https://www.coursera.org/course/progfun

I’ll second this as a great recommendation. I first took the course several 
years ago and I’ve taken it twice since as a Community TA — that’s how much I 
like that course! :)

It is switching from scheduled to on-demand so it won’t be available for a 
while yet, but then folks will be able to take it whenever they want, at their 
own speed.

Sean


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