Bug in clojure.contrib.core/-?> (improper quoting?)

13 views
Skip to first unread message

Jason Wolfe

unread,
Dec 6, 2010, 10:27:02 PM12/6/10
to Clojure, steve....@gmail.com
This happens in both Clojure 1.2 and 1.3-latest:

user=> (require 'clojure.contrib.core)
nil
user=> (clojure.contrib.core/-?> 1 inc)
2
user=> (clojure.contrib.core/-?> 1 inc inc)
CompilerException java.lang.Exception: Unable to resolve symbol: -?>
in this context, compiling:(NO_SOURCE_PATH:3)

I assume the other nil-safe operators are affected as well.

-Jason

Ken Wesson

unread,
Dec 6, 2010, 11:41:09 PM12/6/10
to clo...@googlegroups.com
On Mon, Dec 6, 2010 at 10:27 PM, Jason Wolfe <jaw...@berkeley.edu> wrote:
> This happens in both Clojure 1.2 and 1.3-latest:
>
> user=> (require 'clojure.contrib.core)
> nil
> user=> (clojure.contrib.core/-?> 1 inc)
> 2
> user=> (clojure.contrib.core/-?> 1 inc inc)
> CompilerException java.lang.Exception: Unable to resolve symbol: -?>
> in this context, compiling:(NO_SOURCE_PATH:3)

Sure looks like a quoting problem:

user=> (require 'clojure.contrib.core)
nil
user=> (clojure.contrib.core/-?> 1 inc)
2
user=> (clojure.contrib.core/-?> 1 inc inc)

#<CompilerException java.lang.Exception: Unable to resolve symbol: -?>
in this context (NO_SOURCE_FILE:214)>
user=> (use 'clojure.contrib.core)


nil
user=> (clojure.contrib.core/-?> 1 inc)
2
user=> (clojure.contrib.core/-?> 1 inc inc)

3
user=>

It's obviously calling -?> recursively when there's additional args,
and when it does, it's obviously looking for -?> in the current ns
instead of for clojure.contrib.core/-?>. Which wouldn't happen with
`(-?> ~foo ~bar). Someone used something like (list '-?> foo bar)
instead, or something.

Someone ought to open an Assembla ticket for this.

Jason Wolfe

unread,
Dec 7, 2010, 3:05:05 PM12/7/10
to Clojure


On Dec 6, 8:41 pm, Ken Wesson <kwess...@gmail.com> wrote:
http://dev.clojure.org/jira/browse/CONTRIB-102

Laurent PETIT

unread,
Dec 7, 2010, 5:52:52 PM12/7/10
to clo...@googlegroups.com

Will provide a patch soon,

thanks for the bug report

2010/12/7 Jason Wolfe <jaw...@berkeley.edu>

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

Jason Wolfe

unread,
Dec 7, 2010, 6:58:54 PM12/7/10
to Clojure
Great, thanks!

-Jason

On Dec 7, 2:52 pm, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> Will provide a patch soon,
>
> thanks for the bug report
>
> 2010/12/7 Jason Wolfe <jawo...@berkeley.edu>
> > Groups "Clojure" group.> To post to this group, send email tocl...@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<clojure%2Bunsu...@googlegroups.com>

Ken Wesson

unread,
Dec 7, 2010, 9:58:34 PM12/7/10
to clo...@googlegroups.com
On Tue, Dec 7, 2010 at 3:05 PM, Jason Wolfe <jaw...@berkeley.edu> wrote:
> http://dev.clojure.org/jira/browse/CONTRIB-102

Link doesn't work. It goes to a login prompt and not to ... well,
whatever you intended it to go to.

Alan

unread,
Dec 7, 2010, 10:53:14 PM12/7/10
to Clojure
Link works fine. You have to be logged in (this is a point of
contention, I think).

On Dec 7, 6:58 pm, Ken Wesson <kwess...@gmail.com> wrote:

Ken Wesson

unread,
Dec 7, 2010, 11:38:03 PM12/7/10
to clo...@googlegroups.com
On Tue, Dec 7, 2010 at 10:53 PM, Alan <al...@malloys.org> wrote:
> Link works fine.

Does it?

> You have to be logged in

Then, in my opinion, it does NOT work fine. I should be able to VIEW
anything non-confidential without logging in, though I expect to
possibly have to login to POST stuff. (And if something IS
confidential, but is also intended for me, then I should actually have
whatever login is needed to view it. Say, the login for my gmail
account.)

Furthermore, the link was posted as a response to one of my posts
here. This implies that the link is meant for me, and that I should be
able to read whatever's there (the actual meat of the response to my
post, presumably) with my existing access credentials.

Posting a reply to someone that consists solely of a link that, when
accessed by that someone, throws up an access denied message in their
face, is an equivalent act to sending them an encrypted reply for
which they don't have the key, or handing them a locked briefcase for
which they don't know the combination. So, kind of silly, and
ineffective at actually communicating with them since they can't read
your reply.

Hence my assumption that a mistake of some sort had been made. It
seems unlikely that someone would intentionally send me a reply I
can't actually read, so I figured they did not intend that effect, but
technical problems of some kind occurred or they simply misspelled the
URL.

Now I'm simply confused. What, exactly, was intended? And if there's
nothing actually private-to-me about the attempted communication and
someone here is prviy to its contents, perhaps they could simply
repost those contents here?

Stuart Halloway

unread,
Dec 8, 2010, 12:02:37 AM12/8/10
to clo...@googlegroups.com
The permissions were not set correctly for anonymous read access. I have changed them, you should be able to get there now: http://dev.clojure.org/jira/browse/CONTRIB-102.

Effective communication tip: Please preserve links in responses, so that when somebody is trying to track down issues they don't have to work back through the thread to find links.

Stu

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

Ken Wesson

unread,
Dec 8, 2010, 1:03:41 AM12/8/10
to clo...@googlegroups.com
On Wed, Dec 8, 2010 at 12:02 AM, Stuart Halloway
<stuart....@gmail.com> wrote:
> The permissions were not set correctly for anonymous read access. I have changed them, you should be able to get there now: http://dev.clojure.org/jira/browse/CONTRIB-102.

Ah, so there was indeed a technical snafu. Glad that's cleared up.

> Effective communication tip: Please preserve links in responses, so that when somebody is trying to track down issues they don't have to work back through the thread to find links.

Sorry. I'm using gmail's web interface, which gives a very good
presentation of discussion threads and read/unread. (My first post
excepted; I was replying to a post that was posted before I
subscribed, so it wasn't mailed to me, and so I used the icky Google
Groups interface to reply to that one. In particular, the link's just
there a click away from any post to this thread -- at least, it is for
me. I guess if you're using other mail software (or deleting old
messages once read) you'd have more trouble finding it.

Jason Wolfe

unread,
Dec 8, 2010, 1:08:32 AM12/8/10
to Clojure
> Posting a reply to someone that consists solely of a link that, when
> accessed by that someone, throws up an access denied message in their
> face, is an equivalent act to sending them an encrypted reply for
> which they don't have the key, or handing them a locked briefcase for
> which they don't know the combination. So, kind of silly, and
> ineffective at actually communicating with them since they can't read
> your reply.
>
> Hence my assumption that a mistake of some sort had been made. It
> seems unlikely that someone would intentionally send me a reply I
> can't actually read, so I figured they did not intend that effect, but
> technical problems of some kind occurred or they simply misspelled the
> URL.
>
> Now I'm simply confused. What, exactly, was intended? And if there's
> nothing actually private-to-me about the attempted communication and
> someone here is prviy to its contents, perhaps they could simply
> repost those contents here?

I apologize for my terseness; thanks for your contribution to the
discussion. I was in a rush, and assumed the link was world-
viewable; it certainly didn't look protected, and I knew that issues
for Clojure (but I guess not C-C) were publicly browsable without an
account from prior experience. Looks like Stuart has fixed this wart
(thanks!).

-Jason


Ken Wesson

unread,
Dec 8, 2010, 1:10:44 AM12/8/10
to clo...@googlegroups.com

That's OK. Thanks.

I can confirm that the link works now.

Laurent PETIT

unread,
Dec 8, 2010, 3:16:38 AM12/8/10
to clo...@googlegroups.com
Patch added.

I'm unable to understand how I can do the following 2 actions that I should do, following the recipe in  http://clojure.org/patches :

  a. please add the 'patch' tag.
  b. Please mark the ticket 'ready to test' by checking that option under Choose an action...

Maybe a permissions problem ?



2010/12/8 Ken Wesson <kwes...@gmail.com>

wlr

unread,
Dec 8, 2010, 9:02:52 AM12/8/10
to Clojure
> Effective communication tip: Please preserve links in responses, so that when somebody is trying to track down issues they don't have to work back through the thread to find links.
>

Effective communication tip #2: Please don't top post, so that when
somebody is trying to track down issues they don't have to work back
from response to stimulus.
Reply all
Reply to author
Forward
0 new messages