Re: I can get this if() clause to ever be true

2012-10-19 Thread Sean Corfield
On Fri, Oct 19, 2012 at 12:53 AM, Kevin Downey wrote: > conj can surely produce maps, and does so happily in the following cases: > Doh! Of course. Thank you for the correction. I assumed that was his problem without actually trying it - my bad :( -- Sean A Corfield -- (904) 302-SEAN An Archite

Re: I can get this if() clause to ever be true

2012-10-19 Thread AtKaaZ
Does the println show you what you expect? On Fri, Oct 19, 2012 at 5:35 PM, larry google groups < lawrencecloj...@gmail.com> wrote: > > > I suggesting adding printlns or logging or a debugger > > and checking the > > value of this-users-params, it is almost certainly not > > what you expect > > i

Re: I can get this if() clause to ever be true

2012-10-19 Thread AtKaaZ
maybe make the string "username" be a symbol ie. 'username On Fri, Oct 19, 2012 at 6:39 PM, larry google groups < lawrencecloj...@gmail.com> wrote: > >you have `username` a symbol as the key in your map, but you are > >looking for `:username` they keyword as a key > > Ah, interesting, perhaps I t

Re: I can get this if() clause to ever be true

2012-10-19 Thread AtKaaZ
On Fri, Oct 19, 2012 at 6:39 PM, larry google groups < lawrencecloj...@gmail.com> wrote: > >you have `username` a symbol as the key in your map, but you are > >looking for `:username` they keyword as a key > > Ah, interesting, perhaps I tested this somewhere else. To be sure, I tried > this again:

Re: I can get this if() clause to ever be true

2012-10-19 Thread AtKaaZ
On Fri, Oct 19, 2012 at 5:47 PM, larry google groups < lawrencecloj...@gmail.com> wrote: > > > Also: > > > > > I suggesting adding printlns or logging or a debugger and checking the > > value of this-users-params, it is almost certainly not what you expect > > it to be. > > I showed the output pre

Re: I can get this if() clause to ever be true

2012-10-19 Thread AtKaaZ
(get {:username "a"} "username") nil (get {:username "a"} :username) "a" *(get {'username "a"} :username)* nil (get {'username "a"} 'username) "a" (get {:username "a"} 'username) nil *(get {'username "a"} "username")* nil On Fri, Oct 19, 2012 at 6:26 PM, larry google groups < lawrencecloj...@gmail

Re: I can get this if() clause to ever be true

2012-10-19 Thread larry google groups
Okay, thanks for that last tip. I removed the use of :username everywhere and instead replaced it with: (get new-user-entry "username") everywhere in the code. Now everything works fine. I realize now that was the big difference between the REPL and the live server -- I used :username at the R

Re: I can get this if() clause to ever be true

2012-10-19 Thread larry google groups
>you have `username` a symbol as the key in your map, but you are >looking for `:username` they keyword as a key Ah, interesting, perhaps I tested this somewhere else. To be sure, I tried this again: (defn add-to-logged-in-registry [this-users-params] (let [right-now (. (Date.) getTime)

Re: I can get this if() clause to ever be true

2012-10-19 Thread larry google groups
>you have `username` a symbol as the key in your map, but you are >looking for `:username` they keyword as a key At some point I tried: (get new-user-entry "username") but that had the same result. Username is clearly a key, yes? What would you suggest? On Friday, October 19, 2012 12:0

Re: I can get this if() clause to ever be true

2012-10-19 Thread Kevin Downey
you have `username` a symbol as the key in your map, but you are looking for `:username` they keyword as a key On Fri, Oct 19, 2012 at 8:47 AM, larry google groups wrote: > > > Also: > > > >> I suggesting adding printlns or logging or a debugger and checking the >> value of this-users-params, it

Re: I can get this if() clause to ever be true

2012-10-19 Thread larry google groups
Also: > I suggesting adding printlns or logging or a debugger and checking the > value of this-users-params, it is almost certainly not what you expect > it to be. I showed the output previously, but I will do it again. If I add a println like this: (defn add-to-logged-in-registry [this-

Re: I can get this if() clause to ever be true

2012-10-19 Thread larry google groups
On Friday, October 19, 2012 3:10:19 AM UTC-4, larry google groups wrote: > > Assume data that looks like this: > > {ziri {:last_name ziri, :image ziggy_stardust.jpg, :username larry, > :first_name larry, updated 1350626694791}, erich {:last_name 7ich, > :image 7ot_mein.jpg, :usernam

Re: I can get this if() clause to ever be true

2012-10-19 Thread larry google groups
> I suggesting adding printlns or logging or a debugger > and checking the > value of this-users-params, it is almost certainly not > what you expect > it to be. I already showed the output of the println statements I'd done, but I'll go through this again. I eventually try to output my i

Re: I can get this if() clause to ever be true

2012-10-19 Thread AtKaaZ
On Fri, Oct 19, 2012 at 9:10 AM, larry google groups < lawrencecloj...@gmail.com> wrote: > Assume data that looks like this: > > {ziri {:last_name ziri, :image ziggy_stardust.jpg, :username larry, > :first_name larry, updated 1350626694791}, erich {:last_name 7ich, > :image 7ot_mein.jp

Re: I can get this if() clause to ever be true

2012-10-19 Thread Kevin Downey
conj can surely produce maps, and does so happily in the following cases: (conj {} [:foo :bar]) (conj {} {:foo :bar}) I suggesting adding printlns or logging or a debugger and checking the value of this-users-params, it is almost certainly not what you expect it to be. as a side note creating a

Re: I can get this if() clause to ever be true

2012-10-19 Thread Sean Corfield
On Fri, Oct 19, 2012 at 12:10 AM, larry google groups < lawrencecloj...@gmail.com> wrote: > (defn add-to-logged-in-registry [this-users-params] > (let [right-now (. (Date.) getTime) > new-user-entry (conj this-users-params { "updated" right-now })] > (if (:username new-user-entry) >

I can get this if() clause to ever be true

2012-10-19 Thread larry google groups
Assume data that looks like this: {ziri {:last_name ziri, :image ziggy_stardust.jpg, :username larry, :first_name larry, updated 1350626694791}, erich {:last_name 7ich, :image 7ot_mein.jpg, :username erich, :first_name 754545_halle, updated 1350626679436}} When fed into th