<!--
RSS generated by JIRA (4.4#649-r158309) at Tue May 21 11:49:23 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=labels+%3D+bug&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://dev.clojure.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Clojure JIRA</title>
        <link>http://dev.clojure.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=labels+%3D+bug</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="54" total="54"/>
                <build-info>
            <version>4.4</version>
            <build-number>649</build-number>
            <build-date>25-07-2011</build-date>
        </build-info>
<item>
            <title>[TMACRO-2] protect let-bound symbols from macrolet expansion</title>
                <link>http://dev.clojure.org/jira/browse/TMACRO-2</link>
                <project id="10083" key="TMACRO">tools.macro</project>
                        <description>&lt;p&gt;As discussed here: &lt;a href=&quot;https://groups.google.com/d/msg/clojure-dev/-/UheAzkyI_WcJ&quot;&gt;https://groups.google.com/d/msg/clojure-dev/-/UheAzkyI_WcJ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Patch macrolet-protect.diff fixes the issue and provides a test.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15858">TMACRO-2</key>
            <summary>protect let-bound symbols from macrolet expansion</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="khinsen">Konrad Hinsen</assignee>
                                <reporter username="tomoj">Tom Jack</reporter>
                        <labels>
                        <label>bug</label>
                        <label>patch</label>
                    </labels>
                <created>Mon, 26 Nov 2012 05:15:37 -0600</created>
                <updated>Tue, 27 Nov 2012 08:41:28 -0600</updated>
                    <resolved>Tue, 27 Nov 2012 08:41:27 -0600</resolved>
                                                                    <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30041" author="tomoj" created="Mon, 26 Nov 2012 14:55:48 -0600"  >&lt;p&gt;D&apos;oh, patch macrolet-protect.diff has a bug &#8212; it doesn&apos;t macroexpand-1 if the symbol is protected.&lt;/p&gt;</comment>
                    <comment id="30045" author="tsdh" created="Tue, 27 Nov 2012 01:38:48 -0600"  >&lt;p&gt;This patch supersedes Tom&apos;s patch as discussed on the clojure-dev mailinglist.  See&lt;/p&gt;

&lt;p&gt;  Message-ID: &amp;lt;CADygAw4ArNq4Z2=ZJmT6MwkBw160ShJmfQwoFEh4VOiwxfjDKQ@mail.gmail.com&amp;gt;&lt;/p&gt;

&lt;p&gt;for reference.&lt;/p&gt;

&lt;p&gt;The patch also adds &lt;tt&gt;letfn*&lt;/tt&gt; as a form introducing protected symbols.  That one was completely missing.&lt;/p&gt;

&lt;p&gt;I added test cases for both &lt;tt&gt;let&lt;/tt&gt; as well as &lt;tt&gt;letfn&lt;/tt&gt;.&lt;/p&gt;</comment>
                    <comment id="30048" author="khinsen" created="Tue, 27 Nov 2012 08:40:36 -0600"  >&lt;p&gt;Patch applied: &lt;a href=&quot;https://github.com/clojure/tools.macro/commit/19c8197e10079f04e55d81c26884b9248762c2ca&quot;&gt;https://github.com/clojure/tools.macro/commit/19c8197e10079f04e55d81c26884b9248762c2ca&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11712" name="0001-Don-t-apply-macro-expansion-to-protected-forms.patch" size="3285" author="tsdh" created="Tue, 27 Nov 2012 01:38:48 -0600" />
                    <attachment id="11709" name="macrolet-protect.diff" size="1833" author="tomoj" created="Mon, 26 Nov 2012 05:15:37 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[NREPL-38] Certain Calendar values don&apos;t seem to be able to print</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-38</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;If I try to run lein repl outside of a project folder, I get Clojure 1.4.0.&lt;br/&gt;
I then run&lt;/p&gt;

&lt;p&gt;(println (javax.xml.bind.DatatypeConverter/parseDateTime &quot;2008-07-21T19:17:29&quot;))&lt;/p&gt;

&lt;p&gt;which produces&lt;/p&gt;

&lt;p&gt;IndexOutOfBoundsException start 26, end 2, s.length() 28  java.lang.AbstractStringBuilder.append (AbstractStringBuilder.java:476)&lt;br/&gt;
#inst &quot;2008-07-21T19:17:29.000+01:&lt;/p&gt;

&lt;p&gt;Note the absence of a closing &apos;&quot;&apos;.&lt;/p&gt;

&lt;p&gt;My apologies in advance if this is impossible to reproduce.&lt;/p&gt;</description>
                <environment>Ubuntu 12.10, running through Leiningen 2</environment>
            <key id="15958">NREPL-38</key>
            <summary>Certain Calendar values don&apos;t seem to be able to print</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="julian">Julian Birch</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Sat, 12 Jan 2013 07:55:07 -0600</created>
                <updated>Sun, 13 Jan 2013 12:29:52 -0600</updated>
                    <resolved>Sun, 13 Jan 2013 12:29:52 -0600</resolved>
                            <version>0.2.0</version>
                                <fixVersion>0.2.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30430" author="jafingerhut" created="Sun, 13 Jan 2013 09:55:10 -0600"  >&lt;p&gt;I can reproduce this with Clojure 1.4.0 and 1.5.0-RC2 if I do it within &quot;lein2 repl&quot; (I was using Leiningen version 2.0.0-preview10 to reproduce the problem).&lt;/p&gt;

&lt;p&gt;If I use &quot;java -cp clojure.jar clojure.main&quot; to start a REPL session, with either Clojure 1.4.0 or 1.5.0-RC2 for clojure.jar, I don&apos;t see any problem.  I was testing on Mac OS X 10.6.8 with Oracle/Apple JDK 1.6.0_37.&lt;/p&gt;

&lt;p&gt;I also don&apos;t see this problem if I use Leiningen version 1.7.1, tested with both Clojure 1.4.0 and 1.5.0-RC2.&lt;/p&gt;

&lt;p&gt;This appears to be some kind of bad interaction between Leiningen 2.0.0-preview10 and Clojure.&lt;/p&gt;</comment>
                    <comment id="30431" author="jafingerhut" created="Sun, 13 Jan 2013 10:05:13 -0600"  >&lt;p&gt;I also reproduced this issue with the latest version of Leiningen, which is 2.0.0-RC2.  Email sent to the Leiningen developer email list so they know about it.&lt;/p&gt;</comment>
                    <comment id="30433" author="cemerick" created="Sun, 13 Jan 2013 10:52:40 -0600"  >&lt;p&gt;This is an nREPL bug involving an API mismatch between java.io.Writer.write() and java.lang.AbstractStringBuilder.append().&lt;/p&gt;

&lt;p&gt;The fix is simple; patch release coming later today.&lt;/p&gt;</comment>
                    <comment id="30434" author="cemerick" created="Sun, 13 Jan 2013 12:29:52 -0600"  >&lt;p&gt;Fixed with &lt;a href=&quot;https://github.com/clojure/tools.nrepl/commit/b9e930a1bfbd9616644aa6f0112769cc233cc61e&quot;&gt;b9e930a1&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Will be a part of &lt;tt&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;org.clojure/tools.nrepl &amp;quot;0.2.1&amp;quot;&amp;#93;&lt;/span&gt;&lt;/tt&gt;, to be released later today.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-37] Printing reference returned by clojure.tools.nrepl.server/start-server causes multimethod exception</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-37</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;I was accidentally printing the reference returned by start-server by calling it as the final function in my main method, which causes this error:&lt;/p&gt;

&lt;p&gt;java.lang.IllegalArgumentException: Multiple methods in multimethod &apos;print-method&apos; match dispatch value: class clojure.tools.nrepl.server.Server -&amp;gt; interface clojure.lang.IDeref and interface clojure.lang.IRecord, and neither is preferred&lt;br/&gt;
        at clojure.lang.MultiFn.findAndCacheBestMethod(MultiFn.java:136)&lt;br/&gt;
        at clojure.lang.MultiFn.getMethod(MultiFn.java:111)&lt;br/&gt;
        at clojure.lang.MultiFn.getFn(MultiFn.java:119)&lt;br/&gt;
        at clojure.lang.MultiFn.invoke(MultiFn.java:167)&lt;br/&gt;
        at clojure.core$pr_on.invoke(core.clj:3266)&lt;br/&gt;
        at clojure.core$pr.invoke(core.clj:3278)&lt;br/&gt;
        at clojure.lang.AFn.applyToHelper(AFn.java:161)&lt;br/&gt;
        at clojure.lang.RestFn.applyTo(RestFn.java:132)&lt;br/&gt;
        at clojure.core$apply.invoke(core.clj:601)&lt;br/&gt;
        at clojure.core$prn.doInvoke(core.clj:3311)&lt;br/&gt;
        at clojure.lang.RestFn.invoke(RestFn.java:408)&lt;br/&gt;
        at clojure.main$eval_opt.invoke(main.clj:299)&lt;br/&gt;
        at clojure.main$initialize.invoke(main.clj:316)&lt;br/&gt;
        at clojure.main$null_opt.invoke(main.clj:349)&lt;br/&gt;
        at clojure.main$main.doInvoke(main.clj:427)&lt;br/&gt;
        at clojure.lang.RestFn.invoke(RestFn.java:421)&lt;br/&gt;
        at clojure.lang.Var.invoke(Var.java:419)&lt;br/&gt;
        at clojure.lang.AFn.applyToHelper(AFn.java:163)&lt;br/&gt;
        at clojure.lang.Var.applyTo(Var.java:532)&lt;br/&gt;
        at clojure.main.main(main.java:37)&lt;/p&gt;</description>
                <environment></environment>
            <key id="15910">NREPL-37</key>
            <summary>Printing reference returned by clojure.tools.nrepl.server/start-server causes multimethod exception</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="vaughnd">Vaughn Dickson</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Thu, 20 Dec 2012 08:05:27 -0600</created>
                <updated>Tue, 26 Feb 2013 04:42:58 -0600</updated>
                    <resolved>Tue, 26 Feb 2013 04:42:58 -0600</resolved>
                            <version>0.2.0-RC1</version>
                                <fixVersion>0.2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30526" author="cemerick" created="Sat, 2 Feb 2013 07:35:19 -0600"  >&lt;p&gt;The fact that the returned record is also a &lt;tt&gt;clojure.lang.IDeref&lt;/tt&gt; is a temporary compatibility measure, a result of changing to returning a record.&lt;/p&gt;

&lt;p&gt;Adding a print-method implementation for the &lt;tt&gt;Server&lt;/tt&gt; type that explicitly delegates to the &lt;tt&gt;IRecord&lt;/tt&gt; implementation would resolve the problem.&lt;/p&gt;</comment>
                    <comment id="30651" author="cemerick" created="Tue, 26 Feb 2013 04:42:58 -0600"  >&lt;p&gt;Fixed @ &lt;a href=&quot;http://github.com/clojure/tools.nrepl/commit/0f016eb&quot;&gt;http://github.com/clojure/tools.nrepl/commit/0f016eb&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-19] Android: nREPL starts with no namespace</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-19</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;When I start the nREPL on the Android device (by calling `(clojure.tools.nrepl.server/start-server :port 9999)`) it all goes well. But when I try to connect to this REPL using any of the clients I find myself in an empty namespace (or something like that). The var &lt;b&gt;ns&lt;/b&gt; is unbound, no functions from the clojure.core are available. At the beginning REPLy tries to perform some actions but they fail (says that it cannot find symbol `defn` - because nothing from clojure.core is being mapped).&lt;/p&gt;

&lt;p&gt;However I can do (in-ns &apos;anywhere) it works. Everything else in the REPL works correctly (as far as I see). The issue itself is minor but I&apos;m afraid that it is caused by some crash during nREPL initialization that might lead to other problems in future.&lt;/p&gt;</description>
                <environment>Android w/ Clojure 1.4.0, REPLy client / Eclipse CCW client</environment>
            <key id="15434">NREPL-19</key>
            <summary>Android: nREPL starts with no namespace</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="alexyakushev">Alexander Yakushev</reporter>
                        <labels>
                        <label>android,</label>
                        <label>bug</label>
                    </labels>
                <created>Fri, 11 May 2012 11:05:31 -0500</created>
                <updated>Wed, 20 Jun 2012 07:07:27 -0500</updated>
                    <resolved>Wed, 20 Jun 2012 07:07:27 -0500</resolved>
                            <version>0.2.0</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28456" author="alexyakushev" created="Fri, 11 May 2012 11:06:34 -0500"  >&lt;p&gt;Can&apos;t edit, I meant the *&lt;b&gt;ns&lt;/b&gt;* var, of course.&lt;/p&gt;</comment>
                    <comment id="28541" author="alexyakushev" created="Sat, 19 May 2012 16:32:21 -0500"  >&lt;p&gt;With the help of Daniel Solano G&#243;mez I managed to fix this bug. The problem was caused by the lack of &lt;tt&gt;user&lt;/tt&gt; namespace in the Android-patched Clojure. nREPL assumes that the &lt;tt&gt;user&lt;/tt&gt; namespace is present and uses it by default.&lt;/p&gt;

&lt;p&gt;Here&apos;s the so called fix I ended up with:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;...
(let [user-ns (create-ns &apos;user)]
  (binding [*ns* user-ns]
    (clojure.tools.nrepl.server/start-server :port 9999)))
...&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The issue can be closed now.&lt;/p&gt;</comment>
                    <comment id="28616" author="cemerick" created="Sun, 27 May 2012 16:04:05 -0500"  >&lt;p&gt;A follow up Q: &lt;tt&gt;user&lt;/tt&gt; is created by &lt;tt&gt;clojure.lang.RT&lt;/tt&gt;&apos;s static initialization.  Is the lack of that in &quot;Android-patched Clojure&quot; an optimization of some sort?&lt;/p&gt;</comment>
                    <comment id="28617" author="alexyakushev" created="Sun, 27 May 2012 16:49:28 -0500"  >&lt;p&gt;Exactly, Daniel Solano G&#243;mez removed it because it&apos;s initialization took additional time, it seems.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-16] nrepl.middleware.interruptible_eval/interruptible_eval raises a stack inconsistence Exception if the call to clojure.main/repl fails</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-16</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;If the call to clojure.main/repl in `evaluate&apos; raises an exception before the :init part gets evaluated (so the expression `(push-thread-bindings @bindings)&apos; is executed) then nREPL crashes with the following exception:&lt;/p&gt;

&lt;p&gt;java.lang.IllegalStateException: Pop without matching push&lt;/p&gt;

&lt;p&gt;It happens because after the underlining exception in clojure.main/repl is caught by the try block in `evaluate&apos;, the `finally&apos; black calls (pop-thread-bindings) which were not actually &quot;pushed&quot;.&lt;/p&gt;</description>
                <environment>clojure 1.4.0-beta5, Android (?)</environment>
            <key id="15330">NREPL-16</key>
            <summary>nrepl.middleware.interruptible_eval/interruptible_eval raises a stack inconsistence Exception if the call to clojure.main/repl fails</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="alexyakushev">Alexander Yakushev</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Thu, 12 Apr 2012 02:41:45 -0500</created>
                <updated>Fri, 20 Apr 2012 13:40:04 -0500</updated>
                    <resolved>Mon, 16 Apr 2012 17:34:22 -0500</resolved>
                            <version>0.2.0</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28165" author="cemerick" created="Mon, 16 Apr 2012 17:34:22 -0500"  >&lt;p&gt;Fixed in &lt;tt&gt;0.2.0-beta6&lt;/tt&gt;.  Please give it a try and see how it works on Android.&lt;/p&gt;</comment>
                    <comment id="28191" author="alexyakushev" created="Fri, 20 Apr 2012 13:40:04 -0500"  >&lt;p&gt;It is OK now. OK in a sense that if something wrong happens inside the clojure.main/repl function then the stacktrace points there after the application dies.&lt;br/&gt;
Thanks for you help!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[MATCH-61] Exception thrown when matching using :seq when there is a seq call in the tail of the occurrences</title>
                <link>http://dev.clojure.org/jira/browse/MATCH-61</link>
                <project id="10050" key="MATCH">core.match</project>
                        <description>&lt;p&gt;&amp;lt;iframe style=&quot;width: 648px; height: 400px; border: 0px;&quot; src=&quot;http://refheap.com/paste/3294/framed&quot; &amp;gt;&lt;/p&gt;

&lt;p&gt;I also tested with three occurrences. When there is a seq call in the second occurrence onward a RuntimeException is thrown. &lt;/p&gt;</description>
                <environment>with Clojure 1.3</environment>
            <key id="15550">MATCH-61</key>
            <summary>Exception thrown when matching using :seq when there is a seq call in the tail of the occurrences</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="dnolen">David Nolen</assignee>
                                <reporter username="etosch">Emma Tosch</reporter>
                        <labels>
                        <label>bug</label>
                        <label>seq</label>
                    </labels>
                <created>Fri, 22 Jun 2012 16:11:35 -0500</created>
                <updated>Fri, 22 Jun 2012 17:33:34 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28890" author="etosch" created="Fri, 22 Jun 2012 17:33:34 -0500"  >&lt;p&gt;&lt;a href=&quot;https://gist.github.com/626088b01817ac638fae&quot;&gt;https://gist.github.com/626088b01817ac638fae&lt;/a&gt;&lt;br/&gt;
Two expressions, macro-expanded. The only difference between the expressions is that the second occurrence in the second expression is seq&apos;ed. The second let is the one throwing the exception; it&apos;s the one with the binding&lt;/p&gt;

&lt;p&gt;(clojure.core/let [q_tail_&lt;em&gt;3472 q_tail&lt;/em&gt;_3472&lt;br/&gt;
                   q_head_&lt;em&gt;3471 q_head&lt;/em&gt;_3471&lt;br/&gt;
                   ocr-3470 (seq y)&lt;br/&gt;
                   z z]&lt;br/&gt;
...)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[LOGIC-127] Swapping noms turns maps (and other collections) into seqs</title>
                <link>http://dev.clojure.org/jira/browse/LOGIC-127</link>
                <project id="10020" key="LOGIC">core.logic</project>
                        <description>&lt;p&gt;When I unify two binders, the swapping procedure turns all the maps inside the body into seqs of key/value pairs, which do not unify with maps, leading to the following trickiness:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(require &apos;[clojure.core.logic :as l])
(require &apos;[clojure.core.logic.nominal :as n])
(l/run* [q]
  (l/fresh [body]
    (n/fresh [a b]
      (l/== (n/tie a {:k a}) (n/tie b body))
      (l/== {:k q} body))))
;=&amp;gt; ()
; Expected (a_0)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;For my purposes, fixing this by adding two new implementations of INomSwap for vectors and maps works well.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16121">LOGIC-127</key>
            <summary>Swapping noms turns maps (and other collections) into seqs</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="namin">Nada Amin</assignee>
                                <reporter username="jirkamarsik">Ji&#345;&#237; Mar&#353;&#237;k</reporter>
                        <labels>
                        <label>bug</label>
                        <label>nominal</label>
                    </labels>
                <created>Tue, 2 Apr 2013 11:11:52 -0500</created>
                <updated>Wed, 10 Apr 2013 03:33:00 -0500</updated>
                    <resolved>Wed, 10 Apr 2013 03:33:00 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30854" author="jirkamarsik" created="Tue, 2 Apr 2013 11:14:44 -0500"  >&lt;p&gt;Oops, sorry for the malformatted code snippet. Here it is inside a code tag.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(require &apos;[clojure.core.logic :as l])
(require &apos;[clojure.core.logic.nominal :as n])
(l/run* [q]
        (l/fresh [body]
                 (n/fresh [a b]
                          (l/== (n/tie a {:k a}) (n/tie b body))
                          (l/== {:k q} body))))
;=&amp;gt; ()
; Expected (a_0)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="30855" author="dnolen" created="Tue, 2 Apr 2013 11:22:17 -0500"  >&lt;p&gt;This seems like a easy one to fix, perhaps Nada can see quicker than I can. If not I can take a look.&lt;/p&gt;

&lt;p&gt;Also your patch may very well solve the issue best, feel free to attach it to the ticket. We won&apos;t be able to apply it until you&apos;ve submitted your Contributor Agreement - if you have a free moment please send it in. Thanks!&lt;/p&gt;</comment>
                    <comment id="30857" author="jirkamarsik" created="Tue, 2 Apr 2013 11:48:19 -0500"  >&lt;p&gt;The patch that I use to fix the issue. I haven&apos;t signed the CA, but I would definitely like to. Might take a while to arrive though, since I&apos;m in Europe and I&apos;m lazy.&lt;/p&gt;</comment>
                    <comment id="30862" author="namin" created="Wed, 3 Apr 2013 02:36:53 -0500"  >&lt;p&gt;The patch LGTM. I would also add a test from the ticket example.&lt;/p&gt;

&lt;p&gt;I guess we have to wait until the CA arrives, now.&lt;/p&gt;</comment>
                    <comment id="30863" author="jirkamarsik" created="Wed, 3 Apr 2013 04:28:06 -0500"  >&lt;p&gt;I have also added the test case, the new patch INomSwap-vectors-maps-with-test.patch contains both the fix and the test case. I have just signed the CA and I plan to post it today.&lt;/p&gt;</comment>
                    <comment id="30918" author="jirkamarsik" created="Tue, 9 Apr 2013 10:55:17 -0500"  >&lt;p&gt;OK, the CA has arrived and been processed.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://clojure.org/contributing&quot;&gt;http://clojure.org/contributing&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Jiri Marsik (jirkamarsik)&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="30920" author="namin" created="Wed, 10 Apr 2013 03:32:38 -0500"  >&lt;p&gt;Applied as &lt;a href=&quot;https://github.com/clojure/core.logic/commit/d73c836c0d4bab2af12b4bdedb31daad4a661fb6&quot;&gt;https://github.com/clojure/core.logic/commit/d73c836c0d4bab2af12b4bdedb31daad4a661fb6&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11936" name="INomSwap-vectors-maps.patch" size="807" author="jirkamarsik" created="Tue, 2 Apr 2013 11:48:19 -0500" />
                    <attachment id="11938" name="INomSwap-vectors-maps-with-test.patch" size="1885" author="jirkamarsik" created="Wed, 3 Apr 2013 04:28:06 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10005">Accepted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[LOGIC-116] ClassCastException in core.logic depending on ordering</title>
                <link>http://dev.clojure.org/jira/browse/LOGIC-116</link>
                <project id="10020" key="LOGIC">core.logic</project>
                        <description>&lt;p&gt;I have two files:&lt;br/&gt;
1 -&lt;a href=&quot;https://github.com/m0smith/LogicPuzzles/blob/master/src/logicpuzzles/coresucceed.clj&quot;&gt;https://github.com/m0smith/LogicPuzzles/blob/master/src/logicpuzzles/coresucceed.clj&lt;/a&gt;&lt;br/&gt;
2 -&lt;a href=&quot;https://github.com/m0smith/LogicPuzzles/blob/master/src/logicpuzzles/corefail.clj&quot;&gt;https://github.com/m0smith/LogicPuzzles/blob/master/src/logicpuzzles/corefail.clj&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first one compiles and runs fine.  The second throws a ClassCastException.  The only difference is that rule-0 is moved in the second file.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16067">LOGIC-116</key>
            <summary>ClassCastException in core.logic depending on ordering</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="dnolen">David Nolen</assignee>
                                <reporter username="m0smith">Matthew O. Smith</reporter>
                        <labels>
                        <label>0.8.0</label>
                        <label>bug</label>
                    </labels>
                <created>Fri, 8 Mar 2013 13:47:44 -0600</created>
                <updated>Sun, 17 Mar 2013 18:29:49 -0500</updated>
                    <resolved>Sun, 17 Mar 2013 18:29:49 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30724" author="dnolen" created="Mon, 11 Mar 2013 07:40:03 -0500"  >&lt;p&gt;There&apos;s far too much context here. Do you have a minimal case? Thanks much!&lt;/p&gt;</comment>
                    <comment id="30726" author="m0smith" created="Mon, 11 Mar 2013 09:15:57 -0500"  >&lt;p&gt;Here is the stack trace.  I will try to narrow it down further.&lt;/p&gt;

&lt;p&gt;java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.IPersistentSet&lt;br/&gt;
 at clojure.core$disj.invoke (core.clj:1420)&lt;br/&gt;
    clojure.core.logic.ConstraintStore/fn (logic.clj:339)&lt;br/&gt;
    clojure.lang.ArrayChunk.reduce (ArrayChunk.java:58)&lt;br/&gt;
    clojure.core.protocols/fn (protocols.clj:94)&lt;br/&gt;
    clojure.core.protocols$fn_&lt;em&gt;5854$G&lt;/em&gt;&lt;em&gt;5849&lt;/em&gt;_5863.invoke (protocols.clj:19)&lt;br/&gt;
    clojure.core.protocols$seq_reduce.invoke (protocols.clj:31)&lt;br/&gt;
    clojure.core.protocols/fn (protocols.clj:60)&lt;br/&gt;
    clojure.core.protocols$fn_&lt;em&gt;5828$G&lt;/em&gt;&lt;em&gt;5823&lt;/em&gt;_5841.invoke (protocols.clj:13)&lt;br/&gt;
    clojure.core$reduce.invoke (core.clj:6030)&lt;br/&gt;
    clojure.core.logic.ConstraintStore.remc (logic.clj:338)&lt;br/&gt;
    clojure.core.logic$remcg$fn__3272.invoke (logic.clj:2374)&lt;br/&gt;
    clojure.core.logic$&lt;em&gt;BANG$reify&lt;/em&gt;_3422.invoke (logic.clj:2719)&lt;br/&gt;
    clojure.core.logic$composeg$fn__2569.invoke (logic.clj:1141)&lt;br/&gt;
    clojure.core.logic$composeg$fn__2569.invoke (logic.clj:1142)&lt;br/&gt;
    clojure.core.logic$run_constraint$fn__3285.invoke (logic.clj:2397)&lt;br/&gt;
    clojure.core.logic$fix_constraints.invoke (logic.clj:2424)&lt;br/&gt;
    clojure.core.logic$run_constraints$fn__3290.invoke (logic.clj:2434)&lt;br/&gt;
    clojure.core.logic.Substitutions.bind (logic.clj:612)&lt;br/&gt;
    clojure.core.logic$run_constraints_STAR_$fn__3296.invoke (logic.clj:2444)&lt;br/&gt;
    clojure.core.logic.Substitutions.bind (logic.clj:612)&lt;br/&gt;
    clojure.core.logic$run_constraints_STAR_$fn__3296.invoke (logic.clj:2446)&lt;br/&gt;
    clojure.core.logic$&lt;em&gt;EQ&lt;/em&gt;&lt;em&gt;EQ&lt;/em&gt;$fn__2647.invoke (logic.clj:1255)&lt;br/&gt;
    clojure.core.logic.Substitutions.bind (logic.clj:612)&lt;br/&gt;
    clojure.core.logic$rembero$fn_&lt;em&gt;3465$_inc&lt;/em&gt;&lt;em&gt;3466$fn&lt;/em&gt;&lt;em&gt;3475$fn&lt;/em&gt;&lt;em&gt;3476$_inc&lt;/em&gt;&lt;em&gt;3477$fn&lt;/em&gt;&lt;em&gt;3478$_inc&lt;/em&gt;_3479.invoke (logic.clj:2790)&lt;br/&gt;
    clojure.core.logic$eval2628$fn_&lt;em&gt;2633$_inc&lt;/em&gt;_2634.invoke (logic.clj:1223)&lt;br/&gt;
    clojure.core.logic$eval2628$fn_&lt;em&gt;2633$_inc&lt;/em&gt;_2634.invoke (logic.clj:1223)&lt;br/&gt;
    clojure.core.logic$eval2628$fn_&lt;em&gt;2637$_inc&lt;/em&gt;_2638.invoke (logic.clj:1220)&lt;br/&gt;
    clojure.core.logic$eval2628$fn_&lt;em&gt;2633$_inc&lt;/em&gt;_2634.invoke (logic.clj:1223)&lt;br/&gt;
    clojure.core.logic$eval2628$fn_&lt;em&gt;2633$_inc&lt;/em&gt;_2634.invoke (logic.clj:1223)&lt;br/&gt;
    clojure.core.logic$eval2628$fn_&lt;em&gt;2633$_inc&lt;/em&gt;_2634.invoke (logic.clj:1223)&lt;br/&gt;
    clojure.core.logic$eval2628$fn_&lt;em&gt;2637$_inc&lt;/em&gt;_2638.invoke (logic.clj:1220)&lt;br/&gt;
    clojure.core.logic$eval2628$fn_&lt;em&gt;2633$_inc&lt;/em&gt;_2634.invoke (logic.clj:1223)&lt;br/&gt;
    clojure.core.logic$eval2628$fn_&lt;em&gt;2637$_inc&lt;/em&gt;_2638.invoke (logic.clj:1220)&lt;br/&gt;
    clojure.core.logic$eval2628$fn_&lt;em&gt;2629$fn&lt;/em&gt;_2630.invoke (logic.clj:1225)&lt;br/&gt;
    clojure.lang.LazySeq.sval (LazySeq.java:42)&lt;br/&gt;
    clojure.lang.LazySeq.seq (LazySeq.java:67)&lt;br/&gt;
    clojure.lang.RT.seq (RT.java:473)&lt;br/&gt;
    clojure.core$seq.invoke (core.clj:133)&lt;br/&gt;
    clojure.core$take$fn__4112.invoke (core.clj:2501)&lt;br/&gt;
    clojure.lang.LazySeq.sval (LazySeq.java:42)&lt;br/&gt;
    clojure.lang.LazySeq.seq (LazySeq.java:60)&lt;br/&gt;
    clojure.lang.LazySeq.first (LazySeq.java:82)&lt;br/&gt;
    clojure.lang.RT.first (RT.java:566)&lt;br/&gt;
    clojure.core$first.invoke (core.clj:55)&lt;br/&gt;
    clojure.pprint$pprint_reader_macro.invoke (dispatch.clj:50)&lt;br/&gt;
    clojure.pprint$pprint_list.invoke (dispatch.clj:77)&lt;br/&gt;
    clojure.lang.MultiFn.invoke (MultiFn.java:163)&lt;br/&gt;
    clojure.pprint$write_out.invoke (pprint_base.clj:194)&lt;br/&gt;
    clojure.pprint$pprint_vector$fn__7949.invoke (dispatch.clj:83)&lt;br/&gt;
    clojure.pprint$pprint_vector.invoke (dispatch.clj:82)&lt;br/&gt;
    clojure.lang.MultiFn.invoke (MultiFn.java:163)&lt;br/&gt;
    clojure.pprint$write_out.invoke (pprint_base.clj:194)&lt;br/&gt;
    clojure.pprint$pprint$fn__7359.invoke (pprint_base.clj:250)&lt;br/&gt;
    clojure.pprint$pprint.invoke (pprint_base.clj:248)&lt;br/&gt;
    clojure.pprint$pprint.invoke (pprint_base.clj:245)&lt;br/&gt;
    logicpuzzles.corefail$show.invoke (corefail.clj:9)&lt;br/&gt;
    logicpuzzles.corefail$eval3796.invoke (corefail.clj:153)&lt;br/&gt;
    clojure.lang.Compiler.eval (Compiler.java:6511)&lt;br/&gt;
    clojure.lang.Compiler.load (Compiler.java:6952)&lt;br/&gt;
    user$eval971.invoke (NO_SOURCE_FILE:1)&lt;br/&gt;
    clojure.lang.Compiler.eval (Compiler.java:6511)&lt;br/&gt;
    clojure.lang.Compiler.eval (Compiler.java:6477)&lt;br/&gt;
    clojure.core$eval.invoke (core.clj:2797)&lt;br/&gt;
    clojure.main$repl$read_eval_print__6405.invoke (main.clj:245)&lt;br/&gt;
    clojure.main$repl$fn__6410.invoke (main.clj:266)&lt;br/&gt;
    clojure.main$repl.doInvoke (main.clj:266)&lt;br/&gt;
    clojure.lang.RestFn.invoke (RestFn.java:1096)&lt;br/&gt;
    clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__544.invoke (interruptible_eval.clj:56)&lt;br/&gt;
    clojure.lang.AFn.applyToHelper (AFn.java:159)&lt;br/&gt;
    clojure.lang.AFn.applyTo (AFn.java:151)&lt;br/&gt;
    clojure.core$apply.invoke (core.clj:601)&lt;br/&gt;
    clojure.core$with_bindings_STAR_.doInvoke (core.clj:1771)&lt;br/&gt;
    clojure.lang.RestFn.invoke (RestFn.java:425)&lt;br/&gt;
    clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke (interruptible_eval.clj:41)&lt;br/&gt;
    clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn_&lt;em&gt;585$fn&lt;/em&gt;_587.invoke (interruptible_eval.clj:171)&lt;br/&gt;
    clojure.core$comp$fn__4034.invoke (core.clj:2278)&lt;br/&gt;
    clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__578.invoke (interruptible_eval.clj:138)&lt;br/&gt;
    clojure.lang.AFn.run (AFn.java:24)&lt;br/&gt;
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)&lt;br/&gt;
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615)&lt;br/&gt;
    java.lang.Thread.run (Thread.java:722)&lt;/p&gt;</comment>
                    <comment id="30727" author="m0smith" created="Mon, 11 Mar 2013 09:24:33 -0500"  >&lt;p&gt;I tightened up the fail case &lt;a href=&quot;https://github.com/m0smith/LogicPuzzles/blob/master/src/logicpuzzles/corefail.clj&quot;&gt;https://github.com/m0smith/LogicPuzzles/blob/master/src/logicpuzzles/corefail.clj&lt;/a&gt; .  Is that enough?&lt;/p&gt;</comment>
                    <comment id="30728" author="dnolen" created="Mon, 11 Mar 2013 10:17:02 -0500"  >&lt;p&gt;Thanks can you add the failing code to the ticket as an attachment? Thanks.&lt;/p&gt;</comment>
                    <comment id="30735" author="m0smith" created="Mon, 11 Mar 2013 18:23:09 -0500"  >&lt;p&gt;corefail.clj exhibits the error&lt;/p&gt;</comment>
                    <comment id="30782" author="dnolen" created="Sun, 17 Mar 2013 18:29:49 -0500"  >&lt;p&gt;fixed, &lt;a href=&quot;http://github.com/clojure/core.logic/commit/7e4d0b6b71707e248fd4d0de3f6c090b50a18624&quot;&gt;http://github.com/clojure/core.logic/commit/7e4d0b6b71707e248fd4d0de3f6c090b50a18624&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11907" name="corefail.clj" size="2837" author="m0smith" created="Mon, 11 Mar 2013 18:23:09 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[LOGIC-75] Combining maps and finite domains in core.logic returns only one result</title>
                <link>http://dev.clojure.org/jira/browse/LOGIC-75</link>
                <project id="10020" key="LOGIC">core.logic</project>
                        <description>&lt;p&gt;I&apos;m trying to combine maps with finite domains with some odd results.&lt;/p&gt;

&lt;p&gt;A simple query using finite domains correctly returns all values:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(run* [q]
	  (fresh [x]
	    (infd x (interval 1 3))
	    (== q x)))
	
	;=&amp;gt; (1 2 3)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But putting this result in a map returns only the first value:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(run* [q]
	  (fresh [x]
	    (infd x (interval 1 3))
	    (== q {:foo x})))
	
	;=&amp;gt; ({:foo 1})&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;FYI this works with vectors:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(run* [q]
	  (fresh [x]
	    (infd x (interval 1 3))
	    (== q [x])))
	
	;=&amp;gt; ([1] [2] [3])&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But lcons seems to fail as well:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(run* [q]
	  (fresh [x]
	    (infd x (interval 1 3))
	    (== q (lcons x &apos;foo))))
	
	;=&amp;gt; ((1 . foo))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Clojure 1.4.0, core.logic 0.8.0-beta2</environment>
            <key id="15881">LOGIC-75</key>
            <summary>Combining maps and finite domains in core.logic returns only one result</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="dnolen">David Nolen</assignee>
                                <reporter username="frederikdb">Frederik De Bleser</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Tue, 11 Dec 2012 04:41:12 -0600</created>
                <updated>Wed, 12 Dec 2012 11:53:35 -0600</updated>
                    <resolved>Wed, 12 Dec 2012 11:53:35 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30218" author="dnolen" created="Wed, 12 Dec 2012 11:53:35 -0600"  >&lt;p&gt;fixed, &lt;a href=&quot;http://github.com/clojure/core.logic/commit/c96402f3e60b1118446b3e681d98e444e4ce417d&quot;&gt;http://github.com/clojure/core.logic/commit/c96402f3e60b1118446b3e681d98e444e4ce417d&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[LOGIC-74] Bug in conde (ClojureScript)</title>
                <link>http://dev.clojure.org/jira/browse/LOGIC-74</link>
                <project id="10020" key="LOGIC">core.logic</project>
                        <description>&lt;p&gt;While working on a project I found a somewhat strange behaviour. I reworked the problem in some simple predicate. Let&apos;s take this predicate foobad.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defn foobad 
  [?bar]
  (l/project [?bar]
    (l/fresh [?&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;]
      (l/conde 
        [(l/== &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt; (instance? js/Array ?bar))
          (membero ?&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; (seq ?bar))]))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When running (l/run* &lt;span class=&quot;error&quot;&gt;&amp;#91;?f&amp;#93;&lt;/span&gt; (foobad 0)) it produces this error:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;#&amp;lt;Error: No protocol method ISeqable.-seq defined for type number: 0&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Because 0 is not an instance of Array it should not be entering that conde clause where it tries (seq 0).&lt;/p&gt;

&lt;p&gt;With this workaround we get a normal behaviour:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defn foo 
  [?bar]
  (l/project [?bar]
    (l/fresh [?&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;]
      (l/conde 
        [(l/== &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt; (instance? js/Array ?bar)) 
         (fresh [?s]
          (l/== ?s (seq ?bar))
          (membero ?&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; ?s))]))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Running (l/run* &lt;span class=&quot;error&quot;&gt;&amp;#91;?f&amp;#93;&lt;/span&gt; (foo 0)) gives us (), which is what we expect.&lt;br/&gt;
While 0 is clearly not an instance of Array that conde clause is still executed resulting in previous error.&lt;/p&gt;</description>
                <environment>[org.clojure/clojure &amp;quot;1.4.0&amp;quot;]&lt;br/&gt;
[org.clojure/core.logic &amp;quot;0.8.0-beta2&amp;quot;]</environment>
            <key id="15857">LOGIC-74</key>
            <summary>Bug in conde (ClojureScript)</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="dnolen">David Nolen</assignee>
                                <reporter username="kdevalck">Kevin De Valck</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Mon, 26 Nov 2012 03:45:48 -0600</created>
                <updated>Sun, 17 Mar 2013 19:00:30 -0500</updated>
                    <resolved>Sun, 17 Mar 2013 19:00:30 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30335" author="dnolen" created="Fri, 28 Dec 2012 00:49:59 -0600"  >&lt;p&gt;I&apos;m assuming this is referring the ClojureScript version of core.logic?&lt;/p&gt;</comment>
                    <comment id="30786" author="dnolen" created="Sun, 17 Mar 2013 19:00:30 -0500"  >&lt;p&gt;This is not a bug. Goals do not delay evaluation in this way.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[LOGIC-52] Bug in finite domains (+fd, infd)</title>
                <link>http://dev.clojure.org/jira/browse/LOGIC-52</link>
                <project id="10020" key="LOGIC">core.logic</project>
                        <description>&lt;p&gt;When running the code:&lt;/p&gt;

&lt;p&gt;(run* &lt;span class=&quot;error&quot;&gt;&amp;#91;q&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (fresh &lt;span class=&quot;error&quot;&gt;&amp;#91;a b c d&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (infd a b c d (domain 1 3 4 5))&lt;br/&gt;
    (+fd b 1 a)&lt;br/&gt;
    (+fd c 1 b)&lt;br/&gt;
    (+fd d 1 c)&lt;br/&gt;
    (== q &lt;span class=&quot;error&quot;&gt;&amp;#91;a b c d&amp;#93;&lt;/span&gt;)))&lt;/p&gt;

&lt;p&gt;I get the ouput:&lt;/p&gt;

&lt;p&gt;(&lt;span class=&quot;error&quot;&gt;&amp;#91;5 4 3 1&amp;#93;&lt;/span&gt;)&lt;/p&gt;

&lt;p&gt;But I would expect:&lt;/p&gt;

&lt;p&gt;()&lt;/p&gt;

&lt;p&gt;Because &lt;span class=&quot;error&quot;&gt;&amp;#91;5 4 3 1&amp;#93;&lt;/span&gt; is no sequence where the next element is always one number higher than the one before.&lt;/p&gt;

&lt;p&gt;It seems to me like +fd behaves as it would take the next element in the domain, instead of taking the next higher number (I hope I didn&apos;t misunderstand +fd or infd).&lt;/p&gt;</description>
                <environment>Clojure 1.4, core.logic 0.8-alpha3</environment>
            <key id="15690">LOGIC-52</key>
            <summary>Bug in finite domains (+fd, infd)</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="dnolen">David Nolen</assignee>
                                <reporter username="naeg">naeg</reporter>
                        <labels>
                        <label>+fd</label>
                        <label>bug</label>
                        <label>finite-domains</label>
                        <label>infd</label>
                    </labels>
                <created>Mon, 10 Sep 2012 16:50:28 -0500</created>
                <updated>Fri, 26 Oct 2012 01:03:46 -0500</updated>
                    <resolved>Fri, 26 Oct 2012 01:03:46 -0500</resolved>
                                                                    <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29425" author="naeg" created="Tue, 11 Sep 2012 16:48:06 -0500"  >&lt;p&gt;There is workaround using membero:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(run* [q]
  (fresh [a b c d]
    (everyg #(membero % [1 3 4 5]) [a b c d])
    (+fd b 1 a)
    (+fd c 1 b)
    (+fd d 1 c)
    (== q [a b c d])))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;=&amp;gt; ()&lt;/p&gt;

&lt;p&gt;Note that this is quite a lot slower than it would be with infd.&lt;/p&gt;</comment>
                    <comment id="29807" author="dnolen" created="Fri, 26 Oct 2012 01:03:46 -0500"  >&lt;p&gt;This is fixed try the latest 0.8.0 beta&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JMX-7] Extend Destract protocol on nil to handle Null references gracefully</title>
                <link>http://dev.clojure.org/jira/browse/JMX-7</link>
                <project id="10060" key="JMX">java.jmx</project>
                        <description>&lt;p&gt;JMX Attributes can have null references. Currently a Exception is thrown because the &quot;null-type&quot; is not handled via objects-&amp;gt;data:&lt;/p&gt;

&lt;p&gt;user&amp;gt; (jmx/mbean &quot;java.lang:type=GarbageCollector,name=PS MarkSweep&quot;)&lt;br/&gt;
{:LastGcInfo &lt;font color=&quot;red&quot;&gt; #&amp;lt;IllegalArgumentException java.lang.IllegalArgumentException: No implementation of method: :objects-&amp;gt;data of protocol: #&apos;clojure.java.jmx/Destract found for class: nil&amp;gt;, &lt;/font&gt;  :CollectionCount 0, :CollectionTime 0, :MemoryPoolNames #&amp;lt;String[] [Ljava.lang.String;@57b8fe29&amp;gt;, :Name &quot;PS MarkSweep&quot;, :Valid true, :ObjectName #&amp;lt;ObjectName java.lang:type=GarbageCollector,name=PS MarkSweep&amp;gt;}&lt;/p&gt;

&lt;p&gt;After applying this patch:&lt;/p&gt;

&lt;p&gt;user&amp;gt; (jmx/mbean  &quot;java.lang:type=GarbageCollector,name=PS MarkSweep&quot;)&lt;br/&gt;
{:LastGcInfo nil, :CollectionCount 0, :CollectionTime 0, :MemoryPoolNames #&amp;lt;String[] [Ljava.lang.String;@2225be1e&amp;gt;, :Name &quot;PS MarkSweep&quot;, :Valid true, :ObjectName #&amp;lt;ObjectName java.lang:type=GarbageCollector,name=PS MarkSweep&amp;gt;}&lt;/p&gt;</description>
                <environment></environment>
            <key id="15643">JMX-7</key>
            <summary>Extend Destract protocol on nil to handle Null references gracefully</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="juergenhoetzel">J&#252;rgen H&#246;tzel</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Thu, 23 Aug 2012 12:24:32 -0500</created>
                <updated>Tue, 18 Sep 2012 23:20:50 -0500</updated>
                    <resolved>Tue, 18 Sep 2012 23:20:50 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29334" author="nickmbailey" created="Fri, 31 Aug 2012 16:42:30 -0500"  >&lt;p&gt;I don&apos;t suppose you know of a standard mbean that ships with most jvms we could use to write a test case for this?&lt;/p&gt;</comment>
                    <comment id="29417" author="juergenhoetzel" created="Mon, 10 Sep 2012 09:21:59 -0500"  >&lt;p&gt;I don&apos;t know of a standard MBean attribute which is reproducible Null. &quot;LastGcInfo&quot; of &quot;java.lang:type=GarbageCollector,name=PS MarkSweep&quot; is non-Null after a garbage collection.&lt;/p&gt;

&lt;p&gt;I think its better to test the Destract protocol directly instead of using a &quot;live&quot; MBean in this case.&lt;/p&gt;

&lt;p&gt;BTW. there was also a duplicate definition of the existing Destract tests in test-objects-&amp;gt;data.  Patches enclosed.&lt;/p&gt;</comment>
                    <comment id="29496" author="nickmbailey" created="Tue, 18 Sep 2012 23:20:50 -0500"  >&lt;p&gt;Committed:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/clojure/java.jmx/commit/31b58b9c78baa9f6f31a51cd6e8b8b729af4622a&quot;&gt;https://github.com/clojure/java.jmx/commit/31b58b9c78baa9f6f31a51cd6e8b8b729af4622a&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11489" name="0001-fix-duplicate-definition-of-test-objects-data.patch" size="1864" author="juergenhoetzel" created="Mon, 10 Sep 2012 09:22:53 -0500" />
                    <attachment id="11490" name="0002-Test-Destract-protocol-on-nil-refs-JMX-7.patch" size="963" author="juergenhoetzel" created="Mon, 10 Sep 2012 09:22:53 -0500" />
                    <attachment id="11491" name="0003-Extend-Destract-protocol-on-nil-to-handle-null-refer.patch" size="866" author="juergenhoetzel" created="Mon, 10 Sep 2012 09:22:53 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10005">Accepted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10009">Fixed</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-50] insert-rows (incorrectly) patches incomplete records</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-50</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;When using sql/insert-rows with a dataset that contains incomplete rows the rows will be patched with values from the preceding rows. The behaviour to be expected is not documented.&lt;/p&gt;

&lt;p&gt;I would expect insert-rows either only accepts complete rows. When accepting incomplete rows I would expect patching with nil-values instead of values from other rows.&lt;/p&gt;

&lt;p&gt;Attached you find an example and the output when running in comments.&lt;/p&gt;
</description>
                <environment>Postgres database on Debian machine</environment>
            <key id="16098">JDBC-50</key>
            <summary>insert-rows (incorrectly) patches incomplete records</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="cvkemenade">Cees van Kemenade</reporter>
                        <labels>
                        <label>bug</label>
                        <label>docs</label>
                    </labels>
                <created>Thu, 21 Mar 2013 13:38:32 -0500</created>
                <updated>Sat, 6 Apr 2013 15:38:46 -0500</updated>
                    <resolved>Sat, 6 Apr 2013 15:38:46 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30886" author="seancorfield" created="Sat, 6 Apr 2013 15:10:42 -0500"  >&lt;p&gt;This looks like an old / long-standing bug that no one has run into before.&lt;/p&gt;

&lt;p&gt;In the new (soon-to-be 0.3.0) release, (clojure.java.jdbc.sql/insert :table &lt;span class=&quot;error&quot;&gt;&amp;#91;1 1&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; []) would throw an exception:&lt;/p&gt;

&lt;p&gt;IllegalArgumentException insert called with inconsistent number of columns / values  clojure.java.jdbc.sql/insert-multi-row (sql.clj:116)&lt;/p&gt;

&lt;p&gt;I will update clojure.java.jdbc/insert-rows to throw a similar exception.&lt;/p&gt;</comment>
                    <comment id="30887" author="seancorfield" created="Sat, 6 Apr 2013 15:38:46 -0500"  >&lt;p&gt;Fixed in 0.3.0-SNAPSHOT by throwing an exception if the value-groups are not all the same length.&lt;/p&gt;

&lt;p&gt;Currently relies on the DB to trap column names not matching value groups (which is known not to work on SQLite but does work on other DBs as far as I know).&lt;/p&gt;

&lt;p&gt;insert-rows is deprecated in 0.3.0 - use insert! instead going  forward (which does more validation).&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11922" name="jdbcIssue.clj" size="855" author="cvkemenade" created="Thu, 21 Mar 2013 13:38:32 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-49] jdbc insert-records can not handle spaces in columnames</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-49</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>
&lt;p&gt;If a database contains column-names that include spaces an sql/insert-record will fail. However, inserting via sql/do-commands or sql/insert-rows works as expected.&lt;/p&gt;

&lt;p&gt;Attached you find a file showing the error.&lt;/p&gt;</description>
                <environment>Postgres on Debian</environment>
            <key id="16099">JDBC-49</key>
            <summary>jdbc insert-records can not handle spaces in columnames</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="cvkemenade">Cees van Kemenade</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Thu, 21 Mar 2013 13:42:35 -0500</created>
                <updated>Sat, 6 Apr 2013 16:14:41 -0500</updated>
                    <resolved>Sat, 6 Apr 2013 16:14:41 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30802" author="cvkemenade" created="Fri, 22 Mar 2013 01:21:00 -0500"  >&lt;p&gt;Further analysis based on a suggestion of Sean leads to:&lt;/p&gt;

&lt;p&gt;It seems to be that there is an issue in the naming-strategy in this issue. Either in the way I define it of the way it is implemented&lt;br/&gt;
 (sql/with-connection db&lt;br/&gt;
       (sql/with-naming-strategy {:keyword identity :entity (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; (str \&quot; x \&quot;))}&lt;br/&gt;
        ...&lt;br/&gt;
))&lt;/p&gt;

&lt;p&gt;When I remove the naming-strategy and replace the offending insert by a manual quoting strategy via&lt;br/&gt;
 (sql/insert-records  &quot;test_jdbc_naming3&quot; {((fn [x] (str \&quot; x \&quot;)) &quot;b- b&quot;) 7})&lt;br/&gt;
which corresponds to&lt;br/&gt;
(sql/insert-records  &quot;test_jdbc_naming3&quot; {&quot;\&quot;b- b\&quot;&quot; 7})&lt;br/&gt;
then the code runs fine.&lt;/p&gt;

&lt;p&gt;So the issue is located in the handling of the naming-strategy, or in the way I defined the naming-strategy (for postgres).&lt;/p&gt;</comment>
                    <comment id="30888" author="seancorfield" created="Sat, 6 Apr 2013 16:14:41 -0500"  >&lt;p&gt;Fixed in 0.3.0-SNAPSHOT by wiring &lt;b&gt;as-str&lt;/b&gt; variable into compatibility layer as :entities argument.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11924" name="jdbcIssue2.clj" size="2615" author="cvkemenade" created="Thu, 21 Mar 2013 14:35:07 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-35] Wrong timezone for java.sql.Date, java.sql.Time and java.sql.Timestamp objects returned by with-query-results</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-35</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Our database stores date and time related information in UTC. But, the results from &lt;tt&gt;with-query-results&lt;/tt&gt; creates objects in the local timezone. This is causing a lot of unexpected behavior when constructing Joda &lt;tt&gt;DateTime&lt;/tt&gt; objects in &lt;tt&gt;clj-time&lt;/tt&gt;.  Currently, the &lt;tt&gt;with-query-results&lt;/tt&gt; function is using the single argument getter functions in the &lt;tt&gt;ResultSet&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;	&lt;tt&gt;getDate(int columnIndex)&lt;/tt&gt;&lt;br/&gt;
	&lt;tt&gt;getTime(int columnIndex)&lt;/tt&gt;&lt;br/&gt;
	&lt;tt&gt;getTimestamp(int columnIndex)&lt;/tt&gt; &lt;/p&gt;

&lt;p&gt;We can solve this problem if we can optionally pass the timezone information and call the two argument getter functions.&lt;/p&gt;

&lt;p&gt;	&lt;tt&gt;getDate(int columnIndex, Calendar cal)&lt;/tt&gt; &lt;br/&gt;
	&lt;tt&gt;getTime(int columnIndex, Calendar cal)&lt;/tt&gt; &lt;br/&gt;
	&lt;tt&gt;getTimestamp(int columnIndex, Calendar cal)&lt;/tt&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15583">JDBC-35</key>
            <summary>Wrong timezone for java.sql.Date, java.sql.Time and java.sql.Timestamp objects returned by with-query-results</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="jestinepaul">Jestine Paul</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Fri, 20 Jul 2012 10:31:09 -0500</created>
                <updated>Wed, 12 Sep 2012 20:01:37 -0500</updated>
                    <resolved>Wed, 12 Sep 2012 20:01:37 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29016" author="seancorfield" created="Sat, 21 Jul 2012 01:30:19 -0500"  >&lt;p&gt;Can you provide a self-contained test case? Lots of people are using java.jdbc in production without running into this problem, and at World Singles we&apos;ve had this in production for a long time in a high traffic environment without seeing any problems with timezones. Dates go in and out of the database unchanged, which is exactly as expected - and we have databases running in three different timezones.&lt;/p&gt;</comment>
                    <comment id="29017" author="jestinepaul" created="Sat, 21 Jul 2012 05:29:05 -0500"  >&lt;p&gt;I have added a new test and it is failing with my Postgresql.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/jestinepaul/java.jdbc/commit/195397b1b2a0245d2439ab9963fe2138450a27f3&quot;&gt;https://github.com/jestinepaul/java.jdbc/commit/195397b1b2a0245d2439ab9963fe2138450a27f3&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="29020" author="seancorfield" created="Sat, 21 Jul 2012 13:03:48 -0500"  >&lt;p&gt;Looking at recommended practices out there, such as listed here: &lt;a href=&quot;http://stackoverflow.com/questions/2532729/daylight-saving-time-and-timezone-best-practices&quot;&gt;http://stackoverflow.com/questions/2532729/daylight-saving-time-and-timezone-best-practices&lt;/a&gt; one important thing is: &quot;On Servers, set hardware clocks and OS clocks to UTC. Use NTP services on all servers.&quot; The same advice is repeated here: &lt;a href=&quot;http://www.dbspecialists.com/blog/database-theory/intelligent-date-handling/&quot;&gt;http://www.dbspecialists.com/blog/database-theory/intelligent-date-handling/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking further into PostgreSQL (a database I generally don&apos;t use), I see this: &lt;a href=&quot;http://stackoverflow.com/questions/6151084/which-timestamp-type-to-choose-in-a-postgresql-database&quot;&gt;http://stackoverflow.com/questions/6151084/which-timestamp-type-to-choose-in-a-postgresql-database&lt;/a&gt; which seems to contain a lot of PostgreSQL-specific stuff. However, that article makes it clear that you need to set the database timezone to UTC in order to SELECT timestamp columns correctly.&lt;/p&gt;

&lt;p&gt;In my opinion, the behavior you&apos;re seeing is not a bug (in java.jdbc) but an artifact of your environment being set up incorrectly. I&apos;ll leave this ticket open for a little while for more discussion but without a concrete patch that is shown to not affect other use cases, I will close this ticket by the end of August.&lt;/p&gt;</comment>
                    <comment id="29033" author="jestinepaul" created="Mon, 23 Jul 2012 13:26:04 -0500"  >&lt;p&gt;As mentioned earlier, the database server timezone is in UTC and the JDBC library runs on a client machine set to local time. If the database has a date value of 2012-7-23, it changes to 2012-7-22 on the client side (if the client is running at timezone greater than UTC) when coerced using &lt;tt&gt;to-date-time&lt;/tt&gt; in &lt;tt&gt;clj-time&lt;/tt&gt;. This is extremely dangerous and is not specific to any database. I noticed it first on Sybase Enterprise Server and I have now also replicated it in the test case with Postgresql.&lt;/p&gt;

&lt;p&gt;I have attached a patch which fixes this problem by passing in an optional parameter. The test case is also modified to use &lt;tt&gt;clj-time&lt;/tt&gt;, as it expresses the problem more clearly. Please let me know if you need any more clarification.&lt;/p&gt;

&lt;p&gt;p.s. I have already mailed the CA and should reach Durham in a few days.&lt;/p&gt;</comment>
                    <comment id="29431" author="seancorfield" created="Wed, 12 Sep 2012 20:01:26 -0500"  >&lt;p&gt;Since the proposed patch requires the user to pass in a list of columns to treat specially - and reorders columns in results and adds some performance overhead for all users, not just those wanting to adjust column values - I believe users who choose to run JDBC clients in timezones different to the database, against the widely-listed best practice recommendations, should bear the burden of adjusting the columns themselves in their own client code. Since they already know which columns to adjust and they know the difference between UTC and local time, they should be able to make the adjustments easily enough as part of post-processing the resultset-seq.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11394" name="resultset-timezone.diff" size="7215" author="jestinepaul" created="Mon, 23 Jul 2012 13:24:52 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-33] update-or-insert does not work with oracle</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-33</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;According to the &lt;a href=&quot;http://docs.oracle.com/cd/B28359_01/java.111/b31224/oraperf.htm#autoId17&quot;&gt;oracle documentation&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;For a prepared statement batch, it is not possible to know the number of rows affected in the database by each individual statement in the batch. Therefore, all array elements have a value of -2. According to the JDBC 2.0 specification, a value of -2 indicates that the operation was successful but the number of rows affected is unknown.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;As documented update-values returns (-2) which means that the (if (zero?)) check in update-or-insert-values will never return true.&lt;/p&gt;

&lt;p&gt;Oracle does provide the number of rows updated via an the method &lt;a href=&quot;http://docs.oracle.com/javase/6/docs/api/java/sql/Statement.html#getUpdateCount()&quot;&gt;getUpdateCount&lt;/a&gt; on instances of Statement.&lt;/p&gt;

&lt;p&gt;The following change fixes this problem for oracle users, but I am not sure how it will affect other drivers.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-none&quot;&gt;(defn oracle-do-prepared
  &quot;Executes an (optionally parameterized) SQL prepared statement on the                                           
  open database connection. Each param-group is a seq of values for all of                                        
  the parameters.                                                                                                 
  Return a seq of update counts (one count for each param-group).&quot;
  [sql &amp;amp; param-groups]
  (with-open [^PreparedStatement stmt (prepare-statement (connection) sql)]
    (if (empty? param-groups)
      (transaction* (&#402; [] (vector (.executeUpdate stmt))))
      (do
        (doseq [param-group param-groups]
          (set-parameters stmt param-group)
          (.addBatch stmt))
        (transaction* (&#402; [] (let [result (.executeBatch stmt)
                                  count  (.getUpdateCount stmt)]
                              (vector count))))))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>clojure 1.3.0&lt;br/&gt;
clojure.java.jdbc 0.2.1&lt;br/&gt;
oracle 10.2.0.4.0</environment>
            <key id="15461">JDBC-33</key>
            <summary>update-or-insert does not work with oracle</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="btatnall">Brian Tatnall</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Mon, 21 May 2012 10:16:40 -0500</created>
                <updated>Sun, 10 Jun 2012 18:13:59 -0500</updated>
                    <resolved>Sun, 10 Jun 2012 18:13:59 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28560" author="seancorfield" created="Tue, 22 May 2012 00:17:49 -0500"  >&lt;p&gt;Interesting. (.getUpdateCount stmt) is a standard part of the JDBC API so it looks reasonable to see if the result of the (.executeBatch stmt) is a single sequence with a -2 value, the code could call (.getUpdateCount stmt) and return that (single) value as a sequence. It looks like that should be completely portable but it will be hard to test since none of the other DBs return -2 as far as I know and I don&apos;t have an Oracle install to test against &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CTYP-20] Missing :require of clojure.main?</title>
                <link>http://dev.clojure.org/jira/browse/CTYP-20</link>
                <project id="10271" key="CTYP">core.typed</project>
                        <description>&lt;p&gt;Affects version 0.1.8 (but version isn&apos;t listed as a valid version in JIRA)&lt;/p&gt;

&lt;p&gt;clojure.core.typed refers to clojure.main/repl (line 725 in master)&lt;/p&gt;

&lt;p&gt;However clojure.main is not required by the clojure.core.typed namespace, so you get an error if clojure.main has not already been loaded. This can happen in various circumstances, e.g. running &quot;mvn test&quot;&lt;/p&gt;

&lt;p&gt;Code to reproduce / fix:&lt;/p&gt;

&lt;p&gt;(ns some.namespace&lt;br/&gt;
  (:require &lt;span class=&quot;error&quot;&gt;&amp;#91;clojure.main&amp;#93;&lt;/span&gt;)  ;; this line is needed to avoid an error&lt;br/&gt;
  (:require [clojure.core.typed :refer &lt;span class=&quot;error&quot;&gt;&amp;#91;ann inst cf fn&amp;gt; pfn&amp;gt; check-ns ann-form&amp;#93;&lt;/span&gt;]))&lt;/p&gt;
</description>
                <environment></environment>
            <key id="16095">CTYP-20</key>
            <summary>Missing :require of clojure.main?</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="ambrosebs">Ambrose Bonnaire-Sergeant</assignee>
                                <reporter username="mikera">Mike Anderson</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Wed, 20 Mar 2013 01:43:22 -0500</created>
                <updated>Mon, 25 Mar 2013 03:06:03 -0500</updated>
                    <resolved>Mon, 25 Mar 2013 03:06:03 -0500</resolved>
                            <version>0.2.0</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30813" author="ambrosebs" created="Mon, 25 Mar 2013 03:05:55 -0500"  >&lt;p&gt;Thanks for the report, fixed.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/clojure/core.typed/commit/59f4f5b216a45c2ace5dfbe088dc10796ad565b0&quot;&gt;https://github.com/clojure/core.typed/commit/59f4f5b216a45c2ace5dfbe088dc10796ad565b0&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-485] clojure.string/replace ignores regex flags</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-485</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;The replace function in namespace clojure.string ignores regex flag provided in the match pattern. For example: &lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;CLJS&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;clojure.string/replace &lt;span class=&quot;code-quote&quot;&gt;&quot;I am NOT matched&quot;&lt;/span&gt; #&lt;span class=&quot;code-quote&quot;&gt;&quot;(?i)not &quot;&lt;/span&gt; &quot;&quot;)
=&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;I am NOT matched&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;CLJ&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;clojure.string/replace &lt;span class=&quot;code-quote&quot;&gt;&quot;I am NOT matched&quot;&lt;/span&gt; #&lt;span class=&quot;code-quote&quot;&gt;&quot;(?i)not &quot;&lt;/span&gt; &quot;&quot;)
=&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;I am matched&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The attached patch fixes this by parsing the m and i flags, if set, from the match object, instead of explicitly setting only &quot;g&quot;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16082">CLJS-485</key>
            <summary>clojure.string/replace ignores regex flags</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="starvinraven">Esa Virtanen</reporter>
                        <labels>
                        <label>bug</label>
                        <label>patch</label>
                        <label>test</label>
                    </labels>
                <created>Tue, 12 Mar 2013 07:27:06 -0500</created>
                <updated>Tue, 12 Mar 2013 10:36:36 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                                <attachments>
                    <attachment id="11909" name="0001-Take-regex-flags-m-i-into-account-in-clojure.string-.patch" size="2023" author="starvinraven" created="Tue, 12 Mar 2013 07:27:07 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJS-476] Reading a value from a module does not work if the module is def&apos;ed</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-476</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;Referring to a value in a module can have a scoping issue when using the &quot;static accessor&quot; operator of module/VALUE_NAME. The static accessor works if the module is loaded into a local value but not if def&apos;ed. This example uses the mmap module for Node.js, and successfully reads the PROT_READ value:&lt;/p&gt;

&lt;p&gt;(ns stat.core)&lt;br/&gt;
(defn -main []&lt;br/&gt;
  (let &lt;span class=&quot;error&quot;&gt;&amp;#91;m (js/require &amp;quot;mmap&amp;quot;)&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (println &quot;value: &quot; m/PROT_READ)))&lt;br/&gt;
(set! &lt;b&gt;main-cli-fn&lt;/b&gt; -main)&lt;/p&gt;

&lt;p&gt;This correctly prints &quot;value: 1&quot;&lt;/p&gt;

&lt;p&gt;However, if the value for m is def&apos;ed instead, then the compiler assumes that the reference to m is local to the function and therefore not defined:&lt;/p&gt;

&lt;p&gt;(ns stat.core)&lt;br/&gt;
(def m (js/require &quot;mmap&quot;))&lt;br/&gt;
(defn -main []&lt;br/&gt;
  (println &quot;value: &quot; m/PROT_READ))&lt;br/&gt;
(set! &lt;b&gt;main-cli-fn&lt;/b&gt; -main)&lt;/p&gt;

&lt;p&gt;/Users/pag/src/test/clj/stat/target/stat.js:12836&lt;br/&gt;
  return cljs.core.println.call(null, &quot;value: &quot;, m.PROT_READ)&lt;br/&gt;
                                                 ^&lt;br/&gt;
ReferenceError: m is not defined&lt;br/&gt;
    at Function.stat.core._main (/Users/pag/src/test/clj/stat/target/stat.js:12836:50)&lt;br/&gt;
    at cljs.core.apply.b (/Users/pag/src/test/clj/stat/target/stat.js:5621:14)&lt;br/&gt;
    at cljs.core.apply.a (/Users/pag/src/test/clj/stat/target/stat.js:5656:18)&lt;br/&gt;
    at Object.&amp;lt;anonymous&amp;gt; (/Users/pag/src/test/clj/stat/target/stat.js:12844:17)&lt;br/&gt;
    at Module._compile (module.js:449:26)&lt;br/&gt;
    at Object.Module._extensions..js (module.js:467:10)&lt;br/&gt;
    at Module.load (module.js:356:32)&lt;br/&gt;
    at Function.Module._load (module.js:312:12)&lt;br/&gt;
    at Module.runMain (module.js:492:10)&lt;br/&gt;
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)&lt;/p&gt;

&lt;p&gt;In this case, the value of m.PROT_READ should have been stat.core.m.PROT_READ.&lt;/p&gt;

&lt;p&gt;On the other hand, using . syntax fixes the scoping issue:&lt;br/&gt;
(ns stat.core)&lt;br/&gt;
(def m (js/require &quot;mmap&quot;))&lt;br/&gt;
(defn -main []&lt;br/&gt;
  (println &quot;value: &quot; (.-PROT_READ m)))&lt;br/&gt;
(set! &lt;b&gt;main-cli-fn&lt;/b&gt; -main)&lt;/p&gt;
</description>
                <environment>Clojure 1.5.0-RC16 &lt;br/&gt;
Clojurescript 0.0-1586 &lt;br/&gt;
java version &amp;quot;1.7.0_04&amp;quot; &lt;br/&gt;
Java(TM) SE Runtime Environment (build 1.7.0_04-b21) &lt;br/&gt;
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode) &lt;br/&gt;
OSX Mountain Lion 10.8.2</environment>
            <key id="16025">CLJS-476</key>
            <summary>Reading a value from a module does not work if the module is def&apos;ed</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="quoll">Paul Gearon</reporter>
                        <labels>
                        <label>Compiler</label>
                        <label>bug</label>
                        <label>scope</label>
                    </labels>
                <created>Fri, 22 Feb 2013 13:13:40 -0600</created>
                <updated>Fri, 22 Feb 2013 13:13:40 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-475] Node.js target fails with optimizations set to :none or :whitespace</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-475</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;Compiling a hello world program for Node.js works fine if using optimizations of :advanced or :simple, but if using :none or :whitespace then an error will be reported for either &quot;goog undefined&quot; or &quot;goog.string&quot; undefined respectively.&lt;/p&gt;

&lt;p&gt;The program is shown here:&lt;/p&gt;

&lt;p&gt;(ns pr.core)&lt;br/&gt;
(defn -main []&lt;br/&gt;
  (println &quot;Hello World!&quot;))&lt;br/&gt;
(set! &lt;b&gt;main-cli-fn&lt;/b&gt; -main)&lt;/p&gt;

&lt;p&gt;This program is in src/cljs/pr/core.cljs. The repl line used to compile is:&lt;br/&gt;
(cljs.closure/build &quot;src/cljs&quot; {:output-to &quot;src/js/pr.js&quot; :target :nodejs :pretty-print true :optimizations :none})&lt;/p&gt;

&lt;p&gt;When compiled with optimizations of :none, the output is:&lt;/p&gt;

&lt;p&gt;$ node src/js/pr.js &lt;/p&gt;

&lt;p&gt;/Users/pag/src/test/clj/pr/src/js/pr.js:1&lt;br/&gt;
(function (exports, require, module, __filename, __dirname) { goog.addDependen&lt;br/&gt;
                                                              ^&lt;br/&gt;
ReferenceError: goog is not defined&lt;br/&gt;
    at Object.&amp;lt;anonymous&amp;gt; (/Users/pag/src/test/clj/pr/src/js/pr.js:1:63)&lt;br/&gt;
    at Module._compile (module.js:449:26)&lt;br/&gt;
    at Object.Module._extensions..js (module.js:467:10)&lt;br/&gt;
    at Module.load (module.js:356:32)&lt;br/&gt;
    at Function.Module._load (module.js:312:12)&lt;br/&gt;
    at Module.runMain (module.js:492:10)&lt;br/&gt;
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)&lt;/p&gt;

&lt;p&gt;&amp;#8212;&lt;br/&gt;
When running with optimizations of :whitespace the output is:&lt;/p&gt;

&lt;p&gt;$ node src/js/pr.js &lt;/p&gt;

&lt;p&gt;/Users/pag/src/test/clj/pr/src/js/pr.js:493&lt;br/&gt;
goog.string.Unicode = {NBSP:&quot;\u00a0&quot;};&lt;br/&gt;
                    ^&lt;br/&gt;
TypeError: Cannot set property &apos;Unicode&apos; of undefined&lt;br/&gt;
    at Object.&amp;lt;anonymous&amp;gt; (/Users/pag/src/test/clj/pr/src/js/pr.js:493:21)&lt;br/&gt;
    at Module._compile (module.js:449:26)&lt;br/&gt;
    at Object.Module._extensions..js (module.js:467:10)&lt;br/&gt;
    at Module.load (module.js:356:32)&lt;br/&gt;
    at Function.Module._load (module.js:312:12)&lt;br/&gt;
    at Module.runMain (module.js:492:10)&lt;br/&gt;
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)&lt;/p&gt;

&lt;p&gt;&amp;#8212;&lt;br/&gt;
When running with optimizations of either :simple or :advanced, the output is:&lt;/p&gt;

&lt;p&gt;$ node src/js/pr.js &lt;br/&gt;
Hello World!&lt;/p&gt;

&lt;p&gt;&amp;#8212;&lt;br/&gt;
I have included the two javascript output files that match the above errors.&lt;/p&gt;</description>
                <environment>Clojure 1.5.0-RC16&lt;br/&gt;
Clojurescript 0.0-1586&lt;br/&gt;
java version &amp;quot;1.7.0_04&amp;quot;&lt;br/&gt;
Java(TM) SE Runtime Environment (build 1.7.0_04-b21)&lt;br/&gt;
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)&lt;br/&gt;
OSX Mountain Lion 10.8.2</environment>
            <key id="16023">CLJS-475</key>
            <summary>Node.js target fails with optimizations set to :none or :whitespace</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="quoll">Paul Gearon</reporter>
                        <labels>
                        <label>Compiler</label>
                        <label>bug</label>
                    </labels>
                <created>Thu, 21 Feb 2013 16:34:15 -0600</created>
                <updated>Fri, 1 Mar 2013 13:26:48 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30641" author="quoll" created="Thu, 21 Feb 2013 16:40:49 -0600"  >&lt;p&gt;Remaining generated files&lt;/p&gt;</comment>
                    <comment id="30650" author="dnolen" created="Mon, 25 Feb 2013 15:46:41 -0600"  >&lt;p&gt;This is a known bug. We need goog.require/provide to actually mean something to Node.js. I&apos;m not sure how this can be made to work. I&apos;ve been hoping for a patch for this since ClojureScript was first announced, but I haven&apos;t seen anything yet.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11869" name="out-none.tar.gz" size="170636" author="quoll" created="Thu, 21 Feb 2013 16:40:49 -0600" />
                    <attachment id="11870" name="out-whitespace.tar.gz" size="125424" author="quoll" created="Thu, 21 Feb 2013 16:40:49 -0600" />
                    <attachment id="11867" name="pr.js-none" size="411" author="quoll" created="Thu, 21 Feb 2013 16:34:15 -0600" />
                    <attachment id="11868" name="pr.js-whitespace" size="758335" author="quoll" created="Thu, 21 Feb 2013 16:34:15 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-464] `get-in` not behaving like Clojure when accessing non-existing inner maps</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-464</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;In Clojurescript:&lt;br/&gt;
(get-in {:a {:b 1}} &lt;span class=&quot;error&quot;&gt;&amp;#91;:a :b :c&amp;#93;&lt;/span&gt;)&lt;br/&gt;
=&amp;gt; Error: 1 is not an instance of ILookup&lt;/p&gt;

&lt;p&gt;In Clojure:&lt;br/&gt;
(get-in {:a {:b 1}} &lt;span class=&quot;error&quot;&gt;&amp;#91;:a :b :c&amp;#93;&lt;/span&gt;)&lt;br/&gt;
=&amp;gt; nil&lt;/p&gt;</description>
                <environment>Gentoo 64, oracle-jvm</environment>
            <key id="15979">CLJS-464</key>
            <summary>`get-in` not behaving like Clojure when accessing non-existing inner maps</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="roman">Roman Gonzalez</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Sat, 26 Jan 2013 22:58:15 -0600</created>
                <updated>Mon, 28 Jan 2013 22:39:13 -0600</updated>
                    <resolved>Mon, 28 Jan 2013 22:39:13 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30493" author="roman" created="Sat, 26 Jan 2013 23:01:28 -0600"  >&lt;p&gt;Code and Test patch v1&lt;/p&gt;</comment>
                    <comment id="30495" author="dnolen" created="Sun, 27 Jan 2013 17:25:09 -0600"  >&lt;p&gt;Isn&apos;t this a duplicate of &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJS-458&quot; title=&quot;get-in throws exception when key-list contains key that doesn&amp;#39;t satisfy ILookup&quot;&gt;&lt;del&gt;CLJS-458&lt;/del&gt;&lt;/a&gt;? That&apos;s been fixed in master.&lt;/p&gt;</comment>
                    <comment id="30502" author="roman" created="Mon, 28 Jan 2013 22:06:11 -0600"  >&lt;p&gt;Hey David, &lt;/p&gt;

&lt;p&gt;Thanks for your prompt reply, I tested latest version of github&apos;s master with the test-case I added and got this error.&lt;/p&gt;

&lt;p&gt;```shell&lt;br/&gt;
Testing with V8                                                                                                                                                                  &lt;br/&gt;
out/core-advanced-test.js:1: Error: No protocol method ILookup.-lookup defined for type number: 2                                                                                &lt;br/&gt;
function d(a){throw a;}var e=void 0,f=!0,g=null,h=!1;function aa(){return func                                                                                                   &lt;br/&gt;
                    ^                                                                                                                                                            &lt;br/&gt;
Error: No protocol method ILookup.-lookup defined for type number: 2                                                                                                             &lt;br/&gt;
    at Error (&amp;lt;anonymous&amp;gt;)                                                                                                                                                       &lt;br/&gt;
    at t (out/core-advanced-test.js:5:962)                                                                                                                                       &lt;br/&gt;
    at Function.ab &lt;span class=&quot;error&quot;&gt;&amp;#91;as c&amp;#93;&lt;/span&gt; (out/core-advanced-test.js:11:239)                                                                                                                     &lt;br/&gt;
    at Function.wd &lt;span class=&quot;error&quot;&gt;&amp;#91;as c&amp;#93;&lt;/span&gt; (out/core-advanced-test.js:49:60)                                                                                                                      &lt;br/&gt;
    at Function.Dc &lt;span class=&quot;error&quot;&gt;&amp;#91;as h&amp;#93;&lt;/span&gt; (out/core-advanced-test.js:36:58)                                                                                                                      &lt;br/&gt;
    at Nk.l.Da (out/core-advanced-test.js:176:128)                                                                                                                               &lt;br/&gt;
    at Function.Bb &lt;span class=&quot;error&quot;&gt;&amp;#91;as h&amp;#93;&lt;/span&gt; (out/core-advanced-test.js:16:342)                                                                                                                     &lt;br/&gt;
    at Function.Ye &lt;span class=&quot;error&quot;&gt;&amp;#91;as h&amp;#93;&lt;/span&gt; (out/core-advanced-test.js:65:210)                                                                                                                     &lt;br/&gt;
    at Function.Lj &lt;span class=&quot;error&quot;&gt;&amp;#91;as c&amp;#93;&lt;/span&gt; (out/core-advanced-test.js:164:27)                                                                                                                     &lt;br/&gt;
    at Eu (out/core-advanced-test.js:602:398)                                                                                                                                    &lt;/p&gt;

&lt;p&gt;SPIDERMONKEY_HOME not set, skipping SpiderMonkey tests                                                                                                                           &lt;br/&gt;
JSC_HOME not set, skipping JavaScriptCore tests                                                                                                                                  &lt;br/&gt;
Tested with 1 out of 3 possible js targets&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;The test case is:&lt;/p&gt;

&lt;p&gt;```gitdiff&lt;br/&gt;
diff --git a/test/cljs/cljs/core_test.cljs b/test/cljs/cljs/core_test.cljs                                                                                                       &lt;br/&gt;
index 2d1d2f3..bf3f7bb 100644                                                                                                                                                    &lt;br/&gt;
&amp;#8212; a/test/cljs/cljs/core_test.cljs                                                                                                                                              &lt;br/&gt;
+++ b/test/cljs/cljs/core_test.cljs                                                                                                                                              &lt;br/&gt;
@@ -656,6 +656,7 @@                                                                                                                                                              &lt;br/&gt;
   (assert (= 1 (get-in &lt;span class=&quot;error&quot;&gt;&amp;#91;{:foo 1}, {:foo 2}&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;0 :foo&amp;#93;&lt;/span&gt;)))                                                                                                                         &lt;br/&gt;
   (assert (= 4 (get-in [{:foo 1 :bar &lt;span class=&quot;error&quot;&gt;&amp;#91;{:baz 1}, {:buzz 2}&amp;#93;&lt;/span&gt;}, {:foo 3 :bar &lt;span class=&quot;error&quot;&gt;&amp;#91;{:baz 3}, {:buzz 4}&amp;#93;&lt;/span&gt;}]                                                                               &lt;br/&gt;
                        &lt;span class=&quot;error&quot;&gt;&amp;#91;1 :bar 1 :buzz&amp;#93;&lt;/span&gt;)))                                                                                                                                      &lt;br/&gt;
+  (assert (nil? (get-in {:foo {:bar 2}} &lt;span class=&quot;error&quot;&gt;&amp;#91;:foo :bar :baz&amp;#93;&lt;/span&gt;)))                                                                                                                     &lt;/p&gt;

&lt;p&gt;   ;; arrays                                                                                                                                                                     &lt;br/&gt;
   (let [a (to-array &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;)] &lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;In case github&apos;s master is not the latest one, and test works on master, please discard this message.&lt;/p&gt;

&lt;p&gt;Cheers.&lt;/p&gt;</comment>
                    <comment id="30503" author="dnolen" created="Mon, 28 Jan 2013 22:39:13 -0600"  >&lt;p&gt;fixed, &lt;a href=&quot;http://github.com/clojure/clojurescript/commit/2b21e9d5b09cdd09f2831d11810fa2c5ae4f14b1&quot;&gt;http://github.com/clojure/clojurescript/commit/2b21e9d5b09cdd09f2831d11810fa2c5ae4f14b1&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11823" name="get-in-fix.patch" size="1299" author="roman" created="Sat, 26 Jan 2013 23:01:28 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-434] ClojureScript compiler prepends &quot;self__&quot; to defmulti forms when metadata in form of ^:field.</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-434</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;Using the def form, with the specific metadata ^:field causes the cljs compiler&lt;br/&gt;
to prepend &quot;self__&quot; to the output js form.&lt;/p&gt;

&lt;p&gt;The browser (latest chrome/firefox) does not recognize &quot;self__&quot;.&lt;/p&gt;


&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Test Case: Tested against master: 5ac1503
-------------

(ns test-def)

(def ^:foo e identity)
e
; test_def.e = cljs.core.identity;
; test_def.e;

(def ^:field f identity)
f
; test_def.f = cljs.core.identity;
; self__.test_def.f;
; Uncaught ReferenceError: self__ is not defined&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/4185793&quot;&gt;https://gist.github.com/4185793&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Mac OS X (10.7), java version &amp;quot;1.6.0_37&amp;quot;, leiningen 2 preview 10, cljsbuild 0.2.9.&lt;br/&gt;
clojure/clojurescript master 01 December 2012 - 5ac1503</environment>
            <key id="15868">CLJS-434</key>
            <summary>ClojureScript compiler prepends &quot;self__&quot; to defmulti forms when metadata in form of ^:field.</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="andrewmcveigh">Andrew Mcveigh</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Sat, 1 Dec 2012 17:34:52 -0600</created>
                <updated>Sun, 20 Jan 2013 00:54:25 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30133" author="bbloom" created="Sat, 1 Dec 2012 17:37:50 -0600"  >&lt;p&gt;code tags&lt;/p&gt;</comment>
                    <comment id="30460" author="dnolen" created="Sun, 20 Jan 2013 00:54:25 -0600"  >&lt;p&gt;This one is a bit annoying. We should probably use namespaced keywords internally.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-426] subvec function not behaving consitently with invalid subranges</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-426</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;When using the subvec function with a as a parameter vector and a range that is not in the original vector, the function returns a value: &lt;/p&gt;

&lt;p&gt;(subvec &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt; 0 4) =&amp;gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3 nil&amp;#93;&lt;/span&gt; &lt;/p&gt;

&lt;p&gt;However, when using with seqs, it works as it supposed to: &lt;/p&gt;

&lt;p&gt;(subvec (range 3) 0 4) =&amp;gt; ERROR: Index out of bounds &lt;/p&gt;

&lt;p&gt;This is because the validation of ranges is not happening at build time of the subvec type, this bug contains a patch that adds a new private `build-subvec` function into cljs.core. &lt;/p&gt;</description>
                <environment>Ubuntu precise 64 bits, Mac OS X Lion</environment>
            <key id="15846">CLJS-426</key>
            <summary>subvec function not behaving consitently with invalid subranges</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="roman">Roman Gonzalez</reporter>
                        <labels>
                        <label>bug</label>
                        <label>patch</label>
                    </labels>
                <created>Thu, 22 Nov 2012 17:00:13 -0600</created>
                <updated>Fri, 23 Nov 2012 15:25:10 -0600</updated>
                    <resolved>Fri, 23 Nov 2012 15:25:10 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30007" author="roman" created="Thu, 22 Nov 2012 17:05:56 -0600"  >&lt;p&gt;Patch for bug&lt;/p&gt;</comment>
                    <comment id="30017" author="dnolen" created="Fri, 23 Nov 2012 14:51:38 -0600"  >&lt;p&gt;This mostly looks good but there is a typo in the patch:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(build-subvec. meta (-assoc v v-pos val) ...&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="30018" author="roman" created="Fri, 23 Nov 2012 15:09:20 -0600"  >&lt;p&gt;Revised patch, removing small typo&lt;/p&gt;</comment>
                    <comment id="30019" author="roman" created="Fri, 23 Nov 2012 15:18:16 -0600"  >&lt;p&gt;Removing useless ^:mutable meta on function parameter&lt;/p&gt;</comment>
                    <comment id="30020" author="dnolen" created="Fri, 23 Nov 2012 15:25:10 -0600"  >&lt;p&gt;fixed, &lt;a href=&quot;http://github.com/clojure/clojurescript/commit/ee25599abb214074cbeefe37b399038d70c6ab89&quot;&gt;http://github.com/clojure/clojurescript/commit/ee25599abb214074cbeefe37b399038d70c6ab89&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11698" name="cljs_subvec.patch" size="3840" author="roman" created="Thu, 22 Nov 2012 17:05:56 -0600" />
                    <attachment id="11705" name="cljs_subvec_revised1.patch" size="3829" author="roman" created="Fri, 23 Nov 2012 15:18:16 -0600" />
                    <attachment id="11704" name="cljs_subvec_revised.patch" size="3839" author="roman" created="Fri, 23 Nov 2012 15:09:20 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJS-420] Unexpected behavior with dispatch on Keyword via protocols</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-420</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;At the moment if you create a protocol and expect it to be able to dispatch on keywords you need to do it in js/String, trying to extend on cljs.core.Keyword doesn&apos;t work as keywords are just Strings.&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;https://gist.github.com/4104635&quot;&gt;https://gist.github.com/4104635&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15829">CLJS-420</key>
            <summary>Unexpected behavior with dispatch on Keyword via protocols</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="mpenet">Max Penet</reporter>
                        <labels>
                        <label>bug</label>
                        <label>enhancement</label>
                    </labels>
                <created>Sun, 18 Nov 2012 05:32:49 -0600</created>
                <updated>Sun, 18 Nov 2012 15:27:05 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29962" author="dnolen" created="Sun, 18 Nov 2012 15:14:51 -0600"  >&lt;p&gt;This is a known issue which will have to wait for if and when Keywords and Symbols become proper types in ClojureScript.&lt;/p&gt;

&lt;p&gt;Extending js/Object is not recommended, if you actually need to add functionality to the base JS native types the convention is different from Clojure: default instead of Object, string instead of js/String. Please refer to core.cljs if you want more examples.&lt;/p&gt;</comment>
                    <comment id="29964" author="mpenet" created="Sun, 18 Nov 2012 15:27:05 -0600"  >&lt;p&gt;Thanks for the pointer about default and string, I didn&apos;t know about that. &lt;/p&gt;

&lt;p&gt;I reported the issue at the demand of bbloom. It does seem to be difficult to address without taking a (major) performance hit unfortunately.  &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-394] PersistentTreeSet lookup bug</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-394</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;The lookup function in PersistentTreeSet behaves differently in clojurescript than in clojure when a custom comparison function is used. If two elements are evaluated as equal, one of then is in the set and we do a lookup on the other, clojure returns the element in the set, whereas clojurescript returns the lookup element.  &lt;/p&gt;

&lt;p&gt;(let [compare-quot-2 #(compare (quot %1 2) (quot %2 2))&lt;br/&gt;
      s (sorted-set-by compare-quot-2 1)]&lt;br/&gt;
  (get s 0))&lt;/p&gt;

&lt;p&gt;Should return: 1&lt;br/&gt;
Returns: 0&lt;/p&gt;</description>
                <environment></environment>
            <key id="15754">CLJS-394</key>
            <summary>PersistentTreeSet lookup bug</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ejlo">Erik Ouchterlony</reporter>
                        <labels>
                        <label>bug</label>
                        <label>patch</label>
                    </labels>
                <created>Mon, 15 Oct 2012 07:29:52 -0500</created>
                <updated>Mon, 15 Oct 2012 22:02:51 -0500</updated>
                    <resolved>Mon, 15 Oct 2012 22:02:51 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29652" author="dnolen" created="Mon, 15 Oct 2012 22:02:51 -0500"  >&lt;p&gt;fixed, &lt;a href=&quot;http://github.com/clojure/clojurescript/commit/409fcc9a824668207953b2bc47d40aaab85191d3&quot;&gt;http://github.com/clojure/clojurescript/commit/409fcc9a824668207953b2bc47d40aaab85191d3&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11561" name="bugfix-PersistentTreeSet-lookup.diff" size="2119" author="ejlo" created="Mon, 15 Oct 2012 07:29:52 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJS-393] sebseq and sorted-set-by</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-393</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;ClojureScript:cljs.user&amp;gt;  (subseq (sorted-set-by &amp;lt;= 1 2 3 4 5) &amp;gt;= 2 &amp;lt;= 4)&lt;br/&gt;
&quot;Error evaluating:&quot; (subseq (sorted-set-by &amp;lt;= 1 2 3 4 5) &amp;gt;= 2 &amp;lt;= 4) :as &quot;cljs.core.subseq.call(null,cljs.core.sorted_set_by.call(null,cljs.core.&lt;em&gt;LT&lt;/em&gt;&lt;em&gt;EQ&lt;/em&gt;,1,2,3,4,5),cljs.core.&lt;em&gt;GT&lt;/em&gt;&lt;em&gt;EQ&lt;/em&gt;,2,cljs.core.&lt;em&gt;LT&lt;/em&gt;&lt;em&gt;EQ&lt;/em&gt;,4);\n&quot;&lt;br/&gt;
org.mozilla.javascript.JavaScriptException: Error: No protocol method IMapEntry.-key defined for type null:  (cljs/core.cljs#211)&lt;br/&gt;
        at cljs/core.cljs:211 (anonymous)&lt;br/&gt;
        at cljs/core.cljs:203 (_key)&lt;br/&gt;
        at cljs/core.cljs:5535 (key)&lt;br/&gt;
        at cljs/core.cljs:2479 (anonymous)&lt;br/&gt;
        at cljs/core.cljs:1791 (lazy_seq_value)&lt;br/&gt;
        at cljs/core.cljs:1840 (anonymous)&lt;br/&gt;
        at cljs/core.cljs:238 (_seq)&lt;br/&gt;
        at cljs/core.cljs:343 (seq)&lt;br/&gt;
        at cljs/core.cljs:817 (anonymous)&lt;br/&gt;
        at cljs/core.cljs:854 (anonymous)&lt;br/&gt;
        at cljs/core.cljs:857 (anonymous)&lt;br/&gt;
        at cljs/core.cljs:868 (anonymous)&lt;br/&gt;
        at cljs/core.cljs:5925 (anonymous)&lt;br/&gt;
        at cljs/core.cljs:5937 (anonymous)&lt;br/&gt;
        at &amp;lt;cljs repl&amp;gt;:1 (anonymous)&lt;br/&gt;
        at &amp;lt;cljs repl&amp;gt;:1&lt;/p&gt;</description>
                <environment></environment>
            <key id="15751">CLJS-393</key>
            <summary>sebseq and sorted-set-by</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ejlo">Erik Ouchterlony</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Sat, 13 Oct 2012 04:41:12 -0500</created>
                <updated>Thu, 18 Oct 2012 17:44:31 -0500</updated>
                    <resolved>Thu, 18 Oct 2012 17:44:31 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29677" author="ejlo" created="Wed, 17 Oct 2012 17:23:36 -0500"  >&lt;p&gt;I&apos;ve done some further analysis on this problem and found three different issues:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;The sorted-set-by in cljs doesn&apos;t support ordinary boolean operators, only comparison functions with values -1,0,1.&lt;/li&gt;
	&lt;li&gt;Bug in PersistentTreeSet lookup. Resolved in &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJS-394&quot;&gt;CLJS-394&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;Bug in PersistentTreeMap -sorted-seq-from. I have attached a patch that seems to resolve the issue.&lt;/li&gt;
&lt;/ol&gt;
</comment>
                    <comment id="29678" author="dnolen" created="Wed, 17 Oct 2012 21:25:17 -0500"  >&lt;p&gt;So does the patch address both 1 &amp;amp; 3 or only 3?&lt;/p&gt;</comment>
                    <comment id="29679" author="ejlo" created="Thu, 18 Oct 2012 02:48:41 -0500"  >&lt;p&gt;Only 3.&lt;/p&gt;</comment>
                    <comment id="29680" author="ejlo" created="Thu, 18 Oct 2012 06:04:19 -0500"  >&lt;p&gt;Here is a patch for the third issue. &lt;/p&gt;</comment>
                    <comment id="29681" author="ejlo" created="Thu, 18 Oct 2012 16:21:38 -0500"  >&lt;p&gt;I found a small bug in the last patch, so I attached a new one. This patch handles both the remaining issues.&lt;/p&gt;</comment>
                    <comment id="29682" author="dnolen" created="Thu, 18 Oct 2012 17:44:31 -0500"  >&lt;p&gt;fixed, &lt;a href=&quot;http://github.com/clojure/clojurescript/commit/e3ed0e7b69f9522e8759d0a6567afabb2a98d949&quot;&gt;http://github.com/clojure/clojurescript/commit/e3ed0e7b69f9522e8759d0a6567afabb2a98d949&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11570" name="bugfix-PersistentTreeMap.diff" size="3612" author="ejlo" created="Thu, 18 Oct 2012 16:21:38 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-392] Documentation says CLJS can open connections to the REPL server from a &quot;file://&quot; source, and you can&apos;t</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-392</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;At &lt;a href=&quot;https://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments&quot;&gt;https://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments&lt;/a&gt; there is the following paragraph:&lt;/p&gt;

&lt;p&gt;&quot;This is a problem for the browser-connected REPL because FireFox and Chrome both view opening a file from the file system and connecting to localhost:9000 as different domains. &lt;br/&gt;
(...)&lt;br/&gt;
Fortunately, Google has also run into this problem and has created something called a CrossPageChannel. Without going into the details, this allows an iframe served from one domain (the REPL) to communicate with the parent page which was served from another domain (the application server).&quot;&lt;/p&gt;

&lt;p&gt;From what I tested, you CANT connect to the REPL server at &quot;http://localhost:9000/repl&quot; if you initially loaded the page using the &quot;file://&quot; protocol. But you can if you loaded it from the same hostname on another port using &quot;http://&quot;. The documentation is wrong, and also it needs to be clarified on what you really can change from the initial domain, like the port, without broking the REPL connection (or link to a CrossPageChannel documentation page with the details on what same-origin policy checks it can overcome). &lt;/p&gt;</description>
                <environment>ClojureScript 0.0-1450</environment>
            <key id="15741">CLJS-392</key>
            <summary>Documentation says CLJS can open connections to the REPL server from a &quot;file://&quot; source, and you can&apos;t</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="5" iconUrl="http://dev.clojure.org/jira/images/icons/priority_trivial.gif">Trivial</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="nahuel">Nahuel Greco</reporter>
                        <labels>
                        <label>bug</label>
                        <label>docs</label>
                        <label>documentation</label>
                    </labels>
                <created>Tue, 9 Oct 2012 07:54:04 -0500</created>
                <updated>Wed, 24 Oct 2012 14:48:48 -0500</updated>
                    <resolved>Wed, 24 Oct 2012 14:48:48 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29783" author="dnolen" created="Tue, 23 Oct 2012 19:00:24 -0500"  >&lt;p&gt;Are you unable to edit the wiki?&lt;/p&gt;</comment>
                    <comment id="29788" author="nahuel" created="Wed, 24 Oct 2012 09:27:42 -0500"  >&lt;p&gt;I didn&apos;t know the wiki had public write permissions. Also I don&apos;t know the exact CrossPageChannel limitations. &lt;/p&gt;</comment>
                    <comment id="29789" author="dnolen" created="Wed, 24 Oct 2012 10:37:36 -0500"  >&lt;p&gt;The limitation is that it won&apos;t work with &lt;a href=&quot;file://&quot;&gt;file://&lt;/a&gt;. We now provide a simple webserver that will serve the files present in the directory where you started browser REPL. If you goto &lt;a href=&quot;http://localhost:9000/&quot;&gt;http://localhost:9000/&lt;/a&gt; we will serve index.html if it is present.&lt;/p&gt;</comment>
                    <comment id="29790" author="nahuel" created="Wed, 24 Oct 2012 10:47:25 -0500"  >&lt;p&gt;So CrossPageChannel overcomes the &quot;same origin policy&quot; for different ports, but not for different protocols. Thanks for the clarification.&lt;/p&gt;</comment>
                    <comment id="29794" author="dnolen" created="Wed, 24 Oct 2012 14:48:48 -0500"  >&lt;p&gt;No problem, closing this one.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-376] `case` doesn&apos;t match quoted symbols</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-376</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;It works fine in the Clojure 1.4.0 REPL:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (let [a &apos;a] (&lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; a nil :nil &apos;&amp;amp; :amp :none))
:none
user=&amp;gt; (let [a &apos;&amp;amp;] (&lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; a nil :nil &apos;&amp;amp; :amp :none))
:amp
user=&amp;gt; (let [a &apos;b] (&lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; a nil :nil &apos;b :b :none))
:b&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But in the CLJS Rhino REPL this is what I see:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;ClojureScript:cljs.user&amp;gt; (let [a &apos;a] (&lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; a nil :nil &apos;&amp;amp; :amp :none))
:none
ClojureScript:cljs.user&amp;gt; (let [a &apos;&amp;amp;] (&lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; a nil :nil &apos;&amp;amp; :amp :none))
:none
ClojureScript:cljs.user&amp;gt; (let [a &apos;b] (&lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; a nil :nil &apos;b :b :none))
:none&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>ClojureScript</environment>
            <key id="15684">CLJS-376</key>
            <summary>`case` doesn&apos;t match quoted symbols</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="kumarshantanu">Shantanu Kumar</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Fri, 7 Sep 2012 12:28:50 -0500</created>
                <updated>Fri, 7 Sep 2012 16:49:37 -0500</updated>
                    <resolved>Fri, 7 Sep 2012 16:49:37 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29402" author="dnolen" created="Fri, 7 Sep 2012 16:48:46 -0500"  >&lt;p&gt;This did reveal a bug though the ticket description does have a user error. The tests for case can only be literals - you should not quote the test values. For example the following is how symbols should be tested:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(let [a &apos;&amp;amp;] (&lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; a nil :nil &amp;amp; :amp :none))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The above code that quotes the test is actually equivalent to:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(let [a &apos;&amp;amp;] (&lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; a nil :nil (quote &amp;amp;) :amp :none))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Which happens to work but probably isn&apos;t intended.&lt;/p&gt;

&lt;p&gt;With the coming patch CLJS now works as Clojure.&lt;/p&gt;</comment>
                    <comment id="29403" author="dnolen" created="Fri, 7 Sep 2012 16:49:37 -0500"  >&lt;p&gt;Fixed, &lt;a href=&quot;http://github.com/clojure/clojurescript/commit/c8e301a9b058f81bb599026a07f97ccdf4441730&quot;&gt;http://github.com/clojure/clojurescript/commit/c8e301a9b058f81bb599026a07f97ccdf4441730&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-363] `format` %s behavior is incorrect for keyword, symbol etc.</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-363</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;On the Clojure REPL, `format` works fine:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (format &lt;span class=&quot;code-quote&quot;&gt;&quot;foo%s&quot;&lt;/span&gt; :s) 
&lt;span class=&quot;code-quote&quot;&gt;&quot;foo:s&quot;&lt;/span&gt; 
user=&amp;gt; (format &lt;span class=&quot;code-quote&quot;&gt;&quot;foo%s&quot;&lt;/span&gt; &apos;s) 
&lt;span class=&quot;code-quote&quot;&gt;&quot;foos&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, on the CLJS REPL (Rhino), the output is different:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;ClojureScript:cljs.user&amp;gt; (format &lt;span class=&quot;code-quote&quot;&gt;&quot;foo%s&quot;&lt;/span&gt; :s) 
&lt;span class=&quot;code-quote&quot;&gt;&quot;foo &apos;s&quot;&lt;/span&gt; 
ClojureScript:cljs.user&amp;gt; (format &lt;span class=&quot;code-quote&quot;&gt;&quot;foo%s&quot;&lt;/span&gt; &apos;s) 
&lt;span class=&quot;code-quote&quot;&gt;&quot;foo &apos;s&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Reference: &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/b253d810536a4046&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/b253d810536a4046&lt;/a&gt;&lt;/p&gt;</description>
                <environment>ClojureScript Rhino REPL</environment>
            <key id="15650">CLJS-363</key>
            <summary>`format` %s behavior is incorrect for keyword, symbol etc.</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="kumarshantanu">Shantanu Kumar</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Wed, 29 Aug 2012 09:40:38 -0500</created>
                <updated>Wed, 29 Aug 2012 19:54:29 -0500</updated>
                    <resolved>Wed, 29 Aug 2012 19:54:29 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29289" author="dnolen" created="Wed, 29 Aug 2012 19:54:29 -0500"  >&lt;p&gt;fixed, &lt;a href=&quot;http://github.com/clojure/clojurescript/commit/bf0622a594473c9a6de57fe3b5d10e0419fc7a2a&quot;&gt;http://github.com/clojure/clojurescript/commit/bf0622a594473c9a6de57fe3b5d10e0419fc7a2a&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-359] `with-meta` does not work on function objects</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-359</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;`with-meta` does not working on function objects in CLJS. Compilation fails with the following error:&lt;/p&gt;

&lt;p&gt;Error: No protocol method IWithMeta.-with-meta defined for type function: function &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/error.gif&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; {
      return x;
    }&lt;/p&gt;

&lt;p&gt;I tried it out on the REPL and found the following:&lt;/p&gt;

&lt;p&gt;---------- BEGIN: repl-rhino ----------&lt;br/&gt;
ClojureScript:cljs.user&amp;gt; (with-meta #(do :foo) {:foo :bar})&lt;br/&gt;
&quot;Error evaluating:&quot; (with-meta (fn* [] (do :foo)) {:foo :bar}) :as &quot;cljs.core.with_meta.call(null,(function (){\nreturn \&quot;\\uFDD0&apos;foo\&quot;;\n}),cljs.core.ObjMap.fromObject(&lt;span class=&quot;error&quot;&gt;&amp;#91;\&amp;quot;\\uFDD0&amp;#39;foo\&amp;quot;&amp;#93;&lt;/span&gt;,{\&quot;\\uFDD0&apos;foo\&quot;:\&quot;\\uFDD0&apos;bar\&quot;}));\n&quot;&lt;br/&gt;
org.mozilla.javascript.JavaScriptException: Error: No protocol method IWithMeta.-with-meta defined for type function: &lt;br/&gt;
function () {
    return &quot;\ufdd0&apos;foo&quot;;
}&lt;br/&gt;
 (cljs/core.cljs#222)&lt;br/&gt;
	at cljs/core.cljs:222 (anonymous)&lt;br/&gt;
	at cljs/core.cljs:214 (_with_meta)&lt;br/&gt;
	at cljs/core.cljs:806 (with_meta)&lt;br/&gt;
	at &amp;lt;cljs repl&amp;gt;:2 (anonymous)&lt;br/&gt;
	at &amp;lt;cljs repl&amp;gt;:2&lt;/p&gt;

&lt;p&gt;nil&lt;br/&gt;
---------- END: repl-rhino ----------&lt;/p&gt;

&lt;p&gt;Reference: &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure/pRO-5IlilNM&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure/pRO-5IlilNM&lt;/a&gt;&lt;/p&gt;</description>
                <environment>CLJS Rhino-REPL and during Compilation</environment>
            <key id="15644">CLJS-359</key>
            <summary>`with-meta` does not work on function objects</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="dnolen">David Nolen</assignee>
                                <reporter username="kumarshantanu">Shantanu Kumar</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Sat, 25 Aug 2012 16:39:55 -0500</created>
                <updated>Wed, 21 Nov 2012 16:21:13 -0600</updated>
                    <resolved>Wed, 21 Nov 2012 16:21:13 -0600</resolved>
                                                                    <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="29285" author="dnolen" created="Wed, 29 Aug 2012 09:52:35 -0500"  >&lt;p&gt;We could create a fn wrapper type of some kind that implements all the supported arities of IFn (this means the compiler needs to guarantee that args past 20 are collected into an array-seq) that include the extra meta fields. Seems doable.&lt;/p&gt;</comment>
                    <comment id="29554" author="ohpauleez" created="Fri, 28 Sep 2012 15:21:14 -0500"  >&lt;p&gt;I have created that exact function wrapper - it&apos;s in Shoreleave.  We can move it into CLJS proper if you like.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/shoreleave/shoreleave-core/blob/master/src/shoreleave/efunction.cljs&quot;&gt;https://github.com/shoreleave/shoreleave-core/blob/master/src/shoreleave/efunction.cljs&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="29555" author="dnolen" created="Fri, 28 Sep 2012 15:24:55 -0500"  >&lt;p&gt;That&apos;s nice but would prefer to have as little overhead as possible.&lt;/p&gt;</comment>
                    <comment id="29556" author="ohpauleez" created="Fri, 28 Sep 2012 15:27:30 -0500"  >&lt;p&gt;ala unrolling the invoke call?&lt;/p&gt;

&lt;p&gt;More than happy to start pulling together a patch.&lt;/p&gt;</comment>
                    <comment id="29557" author="dnolen" created="Fri, 28 Sep 2012 15:34:33 -0500"  >&lt;p&gt;Yes there&apos;s actually an existing ticket for that. Thanks. We also need compiler support for function invocations when there&apos;s more then 20 arguments - though that&apos;s a different existing ticket.&lt;/p&gt;</comment>
                    <comment id="29749" author="ohpauleez" created="Mon, 22 Oct 2012 07:50:55 -0500"  >&lt;p&gt;I was just waiting on &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJS-365&quot; title=&quot;apply needs to put all args after the 20th into an array seq&quot;&gt;CLJS-365&lt;/a&gt; to be completed.  Did you think of a better approach than the deftype-wrapper?  More than happy to push on this.&lt;/p&gt;</comment>
                    <comment id="29780" author="dnolen" created="Tue, 23 Oct 2012 18:36:25 -0500"  >&lt;p&gt;I thought about this some more - this patch is really about adding metadata to functions at runtime - static metadata on defs are stored in cljs.analyzer/namespaces. Given that it&apos;s runtime I think your simple patch is actually OK, we can&apos;t generally optimize functions like that anyway since we won&apos;t have that kind of information available.&lt;/p&gt;</comment>
                    <comment id="30003" author="bbloom" created="Wed, 21 Nov 2012 15:29:45 -0600"  >&lt;p&gt;Patch adds a Function type and extends js/function to support metadata. There is now an Fn marker protocol.&lt;/p&gt;

&lt;p&gt;Patch also includes an additional commit to fix the behavior of the this variable for IFn definitions.&lt;/p&gt;

&lt;p&gt;Not tested on JavaScriptCore.&lt;/p&gt;</comment>
                    <comment id="30004" author="bbloom" created="Wed, 21 Nov 2012 16:16:33 -0600"  >&lt;p&gt;v2 of patch improves speed of fn? and utilizes reify to avoid creating an explicit Function type&lt;/p&gt;</comment>
                    <comment id="30005" author="dnolen" created="Wed, 21 Nov 2012 16:21:13 -0600"  >&lt;p&gt;fixed, &lt;a href=&quot;http://github.com/clojure/clojurescript/commit/6ce3b1cef3824fd36e75402f5a8ed5053252b15e&quot;&gt;http://github.com/clojure/clojurescript/commit/6ce3b1cef3824fd36e75402f5a8ed5053252b15e&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11695" name="CLJS-359-v1.patch" size="3984" author="bbloom" created="Wed, 21 Nov 2012 15:29:45 -0600" />
                    <attachment id="11696" name="CLJS-359-v2.patch" size="3908" author="bbloom" created="Wed, 21 Nov 2012 16:16:33 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJS-339] (inc nil) returns 1 instead of throwing an exception</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-339</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;(inc nil) =&amp;gt; 1 in ClojureScript&lt;br/&gt;
(inc nil) =&amp;gt; raise NullPointerException in Clojure&lt;/p&gt;

&lt;p&gt;I think that Clojure&apos;s behavior (throwing) makes more sense in this context.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15587">CLJS-339</key>
            <summary>(inc nil) returns 1 instead of throwing an exception</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="emezeske">Evan Mezeske</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Mon, 23 Jul 2012 00:35:21 -0500</created>
                <updated>Mon, 23 Jul 2012 13:21:27 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29023" author="emezeske" created="Mon, 23 Jul 2012 00:44:05 -0500"  >&lt;p&gt;I observe that in my JS console, &quot;undefined + 1 =&amp;gt; NaN&quot; but &quot;null + 1 =&amp;gt; 1&quot;.  I assume this has something to do with this issue.&lt;/p&gt;</comment>
                    <comment id="29024" author="dnolen" created="Mon, 23 Jul 2012 12:30:28 -0500"  >&lt;p&gt;Do you have any suggestions on how to make this work without slowing arithmetic down? If not I&apos;m inclined to close this as Won&apos;t Fix.&lt;/p&gt;</comment>
                    <comment id="29025" author="emezeske" created="Mon, 23 Jul 2012 12:50:48 -0500"  >&lt;p&gt;I do not.  I haven&apos;t had a chance to put a lot of thought into it, though.&lt;/p&gt;

&lt;p&gt;I consider this kind of problem to be rather insidious.  Null is not a number, and treating it as zero &lt;b&gt;will&lt;/b&gt; lead to nasty bugs creeping into people&apos;s code.&lt;/p&gt;

&lt;p&gt;A historical anecdote: the C function &quot;int atoi(char* s)&quot; takes a string and returns the number it represents.  However, if the string can&apos;t be converted, it returns zero (which could also be a valid result for e.g. the string &quot;0&quot;).  Technically, it&apos;s possible to distinguish &quot;0 meaning error&quot; and &quot;0 meaning 0&quot; by taking additional steps after the function call, but in practice people forget to do this.  Thus, atoi is universally a disaster.  I have &lt;b&gt;literally&lt;/b&gt; seen the lights go off in a warehouse due to atoi&apos;s poor design (I used to work in building control).&lt;/p&gt;

&lt;p&gt;Treating null as zero will result in similar problems.  Someone forgets to check the result of a computation, it&apos;s null, and the program silently continues as if nothing is wrong.  Hello, data corruption.&lt;/p&gt;

&lt;p&gt;So I seriously urge you to not close this as Won&apos;t Fix, even if a performant solution is not yet obvious.  IMHO it&apos;s worth more thought.&lt;/p&gt;</comment>
                    <comment id="29026" author="dnolen" created="Mon, 23 Jul 2012 12:56:35 -0500"  >&lt;p&gt;Closing as Won&apos;t Fix doesn&apos;t mean we don&apos;t care, but this issue is simply a symptom of something much larger - punting on numerics. A ticket is the wrong place for this discussion as it has many nuances. It should be a part of a larger design for ClojureScript numerics. Without that larger discussion this ticket is likely to get stuck in limbo.&lt;/p&gt;</comment>
                    <comment id="29027" author="emezeske" created="Mon, 23 Jul 2012 12:59:20 -0500"  >&lt;p&gt;Fair enough!  I thought Won&apos;t Fix had stronger implications than that.  Do you know if there&apos;s already a design doc that addresses numerics?  Or should I start one?&lt;/p&gt;</comment>
                    <comment id="29028" author="fogus" created="Mon, 23 Jul 2012 13:04:24 -0500"  >&lt;p&gt;One place that this has burned me, that may warrant a separate card is &lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(update-in some-map [:foo :bar] inc)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; where the key at that location did not exist. I would have preferred an exception rather than an broken 1.&lt;/p&gt;</comment>
                    <comment id="29029" author="emezeske" created="Mon, 23 Jul 2012 13:09:38 -0500"  >&lt;p&gt;@Fogus: Huh, that is the &lt;b&gt;exact&lt;/b&gt; same use-case that burned me &amp;#8211; I was using update-in/inc on a nested map.  The default value for my &lt;span class=&quot;error&quot;&gt;&amp;#91;:foo :bar&amp;#93;&lt;/span&gt; was, in fact, supposed to be zero, so it silently worked for me.  But when I moved that code from the client in my webapp (ClojureScript) to the server (Clojure), I found out that my original implementation was wonky.&lt;/p&gt;</comment>
                    <comment id="29030" author="dnolen" created="Mon, 23 Jul 2012 13:17:34 -0500"  >&lt;p&gt;It doesn&apos;t seem to me that you could do that safely without fnil + 0. I too hate JS&apos;s silent failures around numerics. Been hoping someone would tackle this challenge with gusto.&lt;/p&gt;</comment>
                    <comment id="29031" author="emezeske" created="Mon, 23 Jul 2012 13:21:26 -0500"  >&lt;p&gt;@David Nolen: Yeah, fnil would do the job.  In my case, I was calling update-in on what I thought was an initialized map, but it was actually nil.  update-in initialized each level of nesting with an empty map, and then inc was called on nil.  My fix was simply to initialize the nested maps like I meant to.  &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="29032" author="fogus" created="Mon, 23 Jul 2012 13:21:27 -0500"  >&lt;p&gt;David,&lt;br/&gt;
That was ultimately the solution, so I suppose we need to start advocating this pattern so that others might avoid the same fate. &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-338] Incorrect implementation of IReduce by ArrayChunk</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-338</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;(reduce + (array-chunk (array 1 2 3 4) 1 3)) =&amp;gt; 2 (instead of 5)&lt;br/&gt;
(reduce + 0 (array-chunk (array 1 2 3 4) 1 3)) =&amp;gt; 3 (instead of 5)&lt;br/&gt;
(reduce + (array-chunk (array 1 2 3 4) 1 1)) =&amp;gt; 2 (instead of 0)&lt;/p&gt;

&lt;p&gt;In src/cljs/cljs/core.cljs, line #1817:&lt;br/&gt;
(deftype ArrayChunk &lt;span class=&quot;error&quot;&gt;&amp;#91;arr off end&amp;#93;&lt;/span&gt;&lt;br/&gt;
  ;; ...&lt;br/&gt;
  IReduce&lt;br/&gt;
  (-reduce &lt;span class=&quot;error&quot;&gt;&amp;#91;coll f&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (ci-reduce coll f (aget arr off) (inc off))) ;; should be (if (&amp;lt; off end) (ci-reduce coll f (aget arr off) 1) 0)&lt;br/&gt;
  (-reduce &lt;span class=&quot;error&quot;&gt;&amp;#91;coll f start&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (ci-reduce coll f start off))) ;; should be (ci-reduce coll f start 0)&lt;/p&gt;</description>
                <environment></environment>
            <key id="15585">CLJS-338</key>
            <summary>Incorrect implementation of IReduce by ArrayChunk</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="antonf">Anton Frolov</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Sun, 22 Jul 2012 02:48:09 -0500</created>
                <updated>Tue, 14 Aug 2012 06:29:35 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29134" author="dnolen" created="Tue, 14 Aug 2012 06:29:35 -0500"  >&lt;p&gt;Thanks for the report. ArrayChunk is an implementation detail - do these conditions actually arise?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-309] Bug - Typo in commit &quot;Tagged literals in the CLJS compiler and first blush tests &quot; </title>
                <link>http://dev.clojure.org/jira/browse/CLJS-309</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;I&apos;m pretty sure there is a typo in this commit,&lt;/p&gt;

&lt;p&gt;&lt;b&gt;cljs-data-readers&lt;/b&gt; is declared, but then &lt;b&gt;data-readers&lt;/b&gt; is bound in compile-file, which makes compilation fail&lt;/p&gt;

&lt;p&gt;Patch attached&lt;/p&gt;</description>
                <environment></environment>
            <key id="15520">CLJS-309</key>
            <summary>Bug - Typo in commit &quot;Tagged literals in the CLJS compiler and first blush tests &quot; </summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="raph_amiard">Rapha&#235;l AMIARD</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Fri, 8 Jun 2012 08:23:51 -0500</created>
                <updated>Fri, 8 Jun 2012 10:49:17 -0500</updated>
                    <resolved>Fri, 8 Jun 2012 10:49:17 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28740" author="fogus" created="Fri, 8 Jun 2012 08:43:49 -0500"  >&lt;p&gt;I&apos;m unable to reproduce this. Do you mind posting the steps that you ran to see the error?&lt;br/&gt;
Thank you.&lt;/p&gt;</comment>
                    <comment id="28746" author="raph_amiard" created="Fri, 8 Jun 2012 10:48:59 -0500"  >&lt;p&gt;Sorry, i failed to follow the implications of &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-890&quot; title=&quot;Tagged literals in reader&quot;&gt;&lt;del&gt;CLJ-890&lt;/del&gt;&lt;/a&gt;, the bug was related to my configuration, and the binding valid.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11299" name="fix-data-readers-typo.patch" size="1057" author="raph_amiard" created="Fri, 8 Jun 2012 08:23:51 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJS-262] vector-seq optimizations introduced un-conj-able sequence</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-262</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;Due to changes introduced in commit ddd7fa3d960b0fe32083d3cb35ff064e968d53c4 &quot;attempting to optimize seq on vectors&quot; the following code will fail with the an error:&lt;/p&gt;

&lt;p&gt;(conj (rest &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2&amp;#93;&lt;/span&gt;) 4)&lt;/p&gt;


&lt;p&gt;The error is &quot;No protocol method ICollection.-conj defined for type object: &lt;span class=&quot;error&quot;&gt;&amp;#91;object Object&amp;#93;&lt;/span&gt;&quot; and the object in question is the reify result returned by vector-seq.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15458">CLJS-262</key>
            <summary>vector-seq optimizations introduced un-conj-able sequence</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="netguy204">Brian Taylor</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Fri, 18 May 2012 21:26:27 -0500</created>
                <updated>Fri, 18 May 2012 21:58:28 -0500</updated>
                    <resolved>Fri, 18 May 2012 21:58:28 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28532" author="dnolen" created="Fri, 18 May 2012 21:58:28 -0500"  >&lt;p&gt;fixed, &lt;a href=&quot;http://github.com/clojure/clojurescript/commit/1d20ac061199a0acd3a1fe5ae08579edb255f377&quot;&gt;http://github.com/clojure/clojurescript/commit/1d20ac061199a0acd3a1fe5ae08579edb255f377&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-183] The pop function in PersistentVector is buggy</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-183</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;(conj (pop &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2&amp;#93;&lt;/span&gt;) 3) =&amp;gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2&amp;#93;&lt;/span&gt;&lt;/p&gt;
</description>
                <environment></environment>
            <key id="15338">CLJS-183</key>
            <summary>The pop function in PersistentVector is buggy</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ejlo">Erik Ouchterlony</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Wed, 18 Apr 2012 09:47:53 -0500</created>
                <updated>Thu, 19 Apr 2012 22:31:57 -0500</updated>
                    <resolved>Thu, 19 Apr 2012 22:31:57 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28170" author="bronsa" created="Wed, 18 Apr 2012 10:22:15 -0500"  >&lt;p&gt;this patch fixes pop&lt;/p&gt;</comment>
                    <comment id="28172" author="laczoka" created="Thu, 19 Apr 2012 02:38:51 -0500"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;good catch, but why not simply:&lt;/p&gt;

&lt;p&gt;(PersistentVector. meta (dec cnt) shift root (.slice tail 0 -1))&lt;br/&gt;
 ;; you don&apos;t need to aclone and splice, .slice returns a new array&lt;/p&gt;
</comment>
                    <comment id="28173" author="bronsa" created="Thu, 19 Apr 2012 03:48:36 -0500"  >&lt;p&gt;right, using slice is even faster.&lt;br/&gt;
patch updated&lt;/p&gt;</comment>
                    <comment id="28174" author="laczoka" created="Thu, 19 Apr 2012 06:01:22 -0500"  >&lt;p&gt;Nice, thank you!&lt;/p&gt;

&lt;p&gt;Could you please add a test that covers the issue?&lt;/p&gt;

&lt;p&gt;e.g. &lt;/p&gt;

&lt;p&gt;(assert (= (vec (range 33))&lt;br/&gt;
             (-&amp;gt; (vec (range 33))&lt;br/&gt;
                 (pop)&lt;br/&gt;
                 (pop)&lt;br/&gt;
                 (conj 31)&lt;br/&gt;
                 (conj 32))))&lt;/p&gt;</comment>
                    <comment id="28179" author="bronsa" created="Thu, 19 Apr 2012 10:15:26 -0500"  >&lt;p&gt;sure, here it is&lt;/p&gt;</comment>
                    <comment id="28180" author="dnolen" created="Thu, 19 Apr 2012 22:31:57 -0500"  >&lt;p&gt;Fixed, &lt;a href=&quot;https://github.com/clojure/clojurescript/commit/053b7fd9cbb0a24617592f490893d6a746e54ec7&quot;&gt;https://github.com/clojure/clojurescript/commit/053b7fd9cbb0a24617592f490893d6a746e54ec7&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11066" name="fix-persistentvector-pop.diff" size="1007" author="bronsa" created="Thu, 19 Apr 2012 03:48:36 -0500" />
                    <attachment id="11062" name="fix-persistentvector-pop.diff" size="1173" author="bronsa" created="Wed, 18 Apr 2012 12:50:51 -0500" />
                    <attachment id="11067" name="fix-persistentvector-pop-with-tests.diff" size="1892" author="bronsa" created="Thu, 19 Apr 2012 10:15:26 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-162] cljs.core/str behavior not consistent with clojure</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-162</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;When running the cljs.core/str function with symbols or keywords the output is not the same as in clojure&lt;/p&gt;

&lt;p&gt;ClojureScript:cljs.user&amp;gt; (str &quot;hello&quot; :world)&lt;br/&gt;
&quot;hello?&apos;world&quot;&lt;/p&gt;

&lt;p&gt;The same happens with symbols, it seems the characters used internally for figuring out if a string is a keyword or symbol are not being escaped correctly on the cljs.core/str function.&lt;/p&gt;</description>
                <environment>This is the behavior on rhino repl, haven&amp;#39;t tested on browser</environment>
            <key id="15280">CLJS-162</key>
            <summary>cljs.core/str behavior not consistent with clojure</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="5" iconUrl="http://dev.clojure.org/jira/images/icons/priority_trivial.gif">Trivial</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="roman">Roman Gonzalez</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Thu, 15 Mar 2012 21:15:03 -0500</created>
                <updated>Mon, 19 Mar 2012 21:25:45 -0500</updated>
                    <resolved>Mon, 19 Mar 2012 21:25:45 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="27957" author="roman" created="Thu, 15 Mar 2012 21:18:29 -0500"  >&lt;p&gt;Added check of symbols and keywords on the private cljs.core/str* function&lt;/p&gt;</comment>
                    <comment id="27959" author="dnolen" created="Fri, 16 Mar 2012 11:57:42 -0500"  >&lt;p&gt;The patch looks good but some tests fail now. Can you address that? Thanks!&lt;/p&gt;</comment>
                    <comment id="27960" author="roman" created="Fri, 16 Mar 2012 23:55:48 -0500"  >&lt;p&gt;Thanks for checking this out David, I didn&apos;t read the developer wiki (my bad), I added a few tests and added a new small function that will allow both str* and str to behave correctly, cheers.&lt;/p&gt;

&lt;p&gt;Note: Use &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJS-162&quot; title=&quot;cljs.core/str behavior not consistent with clojure&quot;&gt;&lt;del&gt;CLJS-162&lt;/del&gt;&lt;/a&gt;_1.patch&lt;/p&gt;</comment>
                    <comment id="27969" author="roman" created="Mon, 19 Mar 2012 17:45:05 -0500"  >&lt;p&gt;New patch which just replicates the StringBuffer code from `str*` into the `str` implementation.&lt;/p&gt;</comment>
                    <comment id="27970" author="dnolen" created="Mon, 19 Mar 2012 21:25:45 -0500"  >&lt;p&gt;Fixed, &lt;a href=&quot;https://github.com/clojure/clojurescript/commit/ec75a897fc7069176aff81e2df91b848c26af1c8&quot;&gt;https://github.com/clojure/clojurescript/commit/ec75a897fc7069176aff81e2df91b848c26af1c8&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10996" name="CLJS-162_1.patch" size="4077" author="roman" created="Fri, 16 Mar 2012 23:55:48 -0500" />
                    <attachment id="10998" name="CLJS-162_2.patch" size="3311" author="roman" created="Mon, 19 Mar 2012 17:45:05 -0500" />
                    <attachment id="10993" name="CLJS-162.patch" size="808" author="roman" created="Thu, 15 Mar 2012 21:18:29 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1184] Evaling #{do ...} or [do ...] is treated as the do special form</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1184</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Evaluating a persistent collection for which the function &apos;first&apos; returns the symbol &apos;do&apos; leads to that collection being treated as the do special form, even though it may be a vector or even a set. IMHO, the expected result would be to report that &apos;do&apos; cannot be resolved. For the cause, see the if condition on line 6604 of Compiler.java in clojure-1.5.1.&lt;/p&gt;

&lt;p&gt;E.g.:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;do 1 2&amp;#93;&lt;/span&gt;&lt;br/&gt;
;=&amp;gt; 2&lt;/p&gt;

&lt;p&gt;#{&quot;hello&quot; &quot;goodbye&quot; do}&lt;br/&gt;
;=&amp;gt; &quot;hello&quot;&lt;br/&gt;
; Wat?&lt;/p&gt;</description>
                <environment></environment>
            <key id="16093">CLJ-1184</key>
            <summary>Evaling #{do ...} or [do ...] is treated as the do special form</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="5" iconUrl="http://dev.clojure.org/jira/images/icons/priority_trivial.gif">Trivial</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jirkamarsik">Ji&#345;&#237; Mar&#353;&#237;k</reporter>
                        <labels>
                        <label>Compiler</label>
                        <label>bug</label>
                    </labels>
                <created>Sat, 16 Mar 2013 08:56:32 -0500</created>
                <updated>Fri, 12 Apr 2013 09:42:02 -0500</updated>
                                    <version>Release 1.5</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1182] Regexp are never equal</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1182</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The following (= #&quot;asd&quot; #&quot;asd&quot;) will return false in CLJ, even if they are the same.&lt;/p&gt;

&lt;p&gt;Consequently, everything with a regexp in it (lists, vectors, maps...) will never be equal.&lt;/p&gt;

&lt;p&gt;It seems to have been fixed for CLJS, but not for CLJ.&lt;br/&gt;
&lt;a href=&quot;https://github.com/clojure/clojurescript/commit/e35c3a57472fa62ae41591418a73794dc8ac6dde&quot;&gt;https://github.com/clojure/clojurescript/commit/e35c3a57472fa62ae41591418a73794dc8ac6dde&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="16083">CLJ-1182</key>
            <summary>Regexp are never equal</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="olenhad">Omer Iqbal</assignee>
                                <reporter username="frozenlock">Christian Fortin</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Tue, 12 Mar 2013 13:28:59 -0500</created>
                <updated>Sat, 13 Apr 2013 21:13:52 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="30746" author="olenhad" created="Tue, 12 Mar 2013 16:08:55 -0500"  >&lt;p&gt;added an implementation for the equiv method if both args are java.util.regex.Pattern&lt;/p&gt;</comment>
                    <comment id="30749" author="jafingerhut" created="Tue, 12 Mar 2013 17:54:40 -0500"  >&lt;p&gt;Omer, could you also include in your patch a few test cases?  At least one that validates that two regex&apos;s that should be equal, are equal, and another that two regex&apos;s that should be different, are non-equal.  Preferably the first of those tests should fail with the existing Clojure code, and pass with your changes.&lt;/p&gt;</comment>
                    <comment id="30754" author="olenhad" created="Wed, 13 Mar 2013 05:39:13 -0500"  >&lt;p&gt;I updated the patch with some tests. Hope I added them in the correct file. I also changed the implementation a bit, by instead of adding another implementation of equiv with a different signature, checking the type of the Object in the equiv method with signature (Object k1, Object k2).&lt;br/&gt;
For the sake of consistency I also added an EquivPred implementation, though I&apos;m not entirely sure when its used.&lt;/p&gt;</comment>
                    <comment id="30757" author="jafingerhut" created="Wed, 13 Mar 2013 13:04:58 -0500"  >&lt;p&gt;All comments here refer to the patch named fix-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1182&quot; title=&quot;Regexp are never equal&quot;&gt;CLJ-1182&lt;/a&gt;.diff dated Mar 13, 2013.&lt;/p&gt;

&lt;p&gt;The location for the new tests looks reasonable.  However, note that your new patch has your old changes plus some new ones, not just the new ones.  In particular, the new signature for equiv is still in your latest patch.  You should start from a clean pull of the latest Clojure master and make only the changes you want when creating a patch, not build on top of previous changes you have made.&lt;/p&gt;

&lt;p&gt;Also, there are several whitespace-only changes in your patch that should not be included.&lt;/p&gt;</comment>
                    <comment id="30758" author="olenhad" created="Wed, 13 Mar 2013 13:39:09 -0500"  >&lt;p&gt;I uploaded a clean patch, removing the whitespace diff and only adding the latest changes. Thanks for clarifying the workflow!&lt;br/&gt;
Just to clarify, this refers to the patch named fix-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1182&quot; title=&quot;Regexp are never equal&quot;&gt;CLJ-1182&lt;/a&gt;.diff dated Mar 13 1:34 PM&lt;/p&gt;</comment>
                    <comment id="30835" author="stu" created="Fri, 29 Mar 2013 05:46:25 -0500"  >&lt;p&gt;I am recategorizing this as an enhancement, because if this is a bug it is a bug in Java &amp;#8211; the Java Patterns class documents being immutable, but apparently does not implement .equals.&lt;/p&gt;

&lt;p&gt;Other recent &quot;make Clojure more complicated to work around problems in Java&quot; patches have been rejected, and I suspect this one will be too, because it might impact the performance of equality everywhere.&lt;/p&gt;</comment>
                    <comment id="30940" author="stu" created="Fri, 12 Apr 2013 09:04:57 -0500"  >&lt;p&gt;At first pass, Rich and I both believe that, as regex equality is undecidable, that Java made the right choice in using identity for equality, that this ticket should be declined, and the ClojureScript should revert to match.&lt;/p&gt;

&lt;p&gt;But leaving this ticket open for now so that ClojureScript dev can weigh in.&lt;/p&gt;</comment>
                    <comment id="30941" author="michael-drogalis" created="Fri, 12 Apr 2013 09:32:14 -0500"  >&lt;p&gt;What do you mean when you say &quot;undecidable&quot;?&lt;/p&gt;</comment>
                    <comment id="30942" author="aredington" created="Fri, 12 Apr 2013 10:03:45 -0500"  >&lt;p&gt;If Regex instances were interned by the reader, but still used identity for equality, then code like&lt;/p&gt;

&lt;p&gt;(= #&quot;abc&quot; #&quot;abc&quot;)&lt;/p&gt;

&lt;p&gt;would return true, but it wouldn&apos;t diverge in the definition of equality for regular expressions between Java and Clojure.&lt;/p&gt;</comment>
                    <comment id="30943" author="fogus" created="Fri, 12 Apr 2013 10:13:02 -0500"  >&lt;p&gt;Undecidable means that for any given regular expression, there is no single way to write it.  For example #&quot;&lt;span class=&quot;error&quot;&gt;&amp;#91;a&amp;#93;&lt;/span&gt;&quot; #&quot;a&quot; both match the same strings, but are they the same?  Maybe.  But how can we decide if /any/ given regular expression matches all of the same strings as any other?  The answer is, you can&apos;t.  Java does provide a Pattern#pattern method that returns the string that was used to build it, but I&apos;m not sure if that could/should be used as a basis for equality given the potential perf hit.&lt;/p&gt;</comment>
                    <comment id="30944" author="bendlas" created="Fri, 12 Apr 2013 10:31:54 -0500"  >&lt;p&gt;I posted in Stu&apos;s thread: &lt;a href=&quot;https://groups.google.com/d/topic/clojure-dev/OTPNJQbPtds/discussion&quot;&gt;https://groups.google.com/d/topic/clojure-dev/OTPNJQbPtds/discussion&lt;/a&gt;&lt;br/&gt;
TL;DR: Disagree with undecidability, agree with reverting to identity based equality&lt;/p&gt;</comment>
                    <comment id="30945" author="michael-drogalis" created="Fri, 12 Apr 2013 10:32:49 -0500"  >&lt;p&gt;That makes sense to me. Thanks Fogus.&lt;/p&gt;</comment>
                    <comment id="30947" author="bendlas" created="Fri, 12 Apr 2013 21:42:19 -0500"  >&lt;p&gt;From my post to the ml thread, it might not be entirely clear, why I don&apos;t think we should implement equality for host regexes:&lt;/p&gt;

&lt;p&gt;It would involve parsing and would leave a lot of room for errors and platform-idiosycracies to leak. And it would be different for every platform.&lt;/p&gt;

&lt;p&gt;As Alexander said, I also think this ticket could be resolved by interning regex literals, akin to keywords. That, however, would warrant a design page first, because there are tradeoffs to be made about how far the interning should go.&lt;/p&gt;</comment>
                    <comment id="30948" author="richhickey" created="Sat, 13 Apr 2013 08:51:17 -0500"  >&lt;p&gt;Why are we spending time on this? Where is the problem statement? Does someone actually need this for a real world purpose not solved by using regex strings as keys?&lt;/p&gt;</comment>
                    <comment id="30957" author="michael-drogalis" created="Sat, 13 Apr 2013 21:13:52 -0500"  >&lt;p&gt;It was prompted as a matter of consistency, which I think is valid. I can&apos;t think of a good reason to use regex&apos;s as keys though.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11913" name="fix-CLJ-1182.diff" size="2628" author="olenhad" created="Wed, 13 Mar 2013 13:34:11 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10120">Triaged</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1179] distinct? does not accept zero arguments</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1179</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;&lt;tt&gt;distinct?&lt;/tt&gt; cannot be invoked with zero arguments. When using the pattern &lt;tt&gt;(apply distinct? x)&lt;/tt&gt;, this is bothersome as you have to check whether x is empty or not. It is also logical that &lt;tt&gt;distinct?&lt;/tt&gt; should return &lt;tt&gt;true&lt;/tt&gt; if no arguments are given, since there are no duplicates.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;What%28smallsetof%29stepswillreproducetheproblem%3F&quot;&gt;&lt;/a&gt;What (small set of) steps will reproduce the problem?&lt;/h3&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user=&amp;gt; (apply distinct? [])
ArityException Wrong number of args (0) passed to: core$distinct-QMARK-  clojure.lang.AFn.throwArity (AFn.java:437)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name=&quot;Whatistheexpectedoutput%3FWhatdoyouseeinstead%3F&quot;&gt;&lt;/a&gt;What is the expected output? What do you see instead?&lt;/h3&gt;
&lt;p&gt;I would expect &lt;tt&gt;distinct?&lt;/tt&gt; to return true whenever given zero arguments.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Whatversionareyouusing%3F&quot;&gt;&lt;/a&gt;What version are you using?&lt;/h3&gt;
&lt;p&gt;This was tested under Clojure 1.4 and Clojure 1.5.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16068">CLJ-1179</key>
            <summary>distinct? does not accept zero arguments</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hypirion">Jean Niklas L&apos;orange</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Sat, 9 Mar 2013 05:46:03 -0600</created>
                <updated>Fri, 12 Apr 2013 09:12:55 -0500</updated>
                    <resolved>Fri, 12 Apr 2013 09:12:55 -0500</resolved>
                            <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30719" author="hypirion" created="Sat, 9 Mar 2013 06:08:41 -0600"  >&lt;p&gt;Attached the straightforward patch which solves this issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11902" name="clj-1179-distinct-zero-arguments.txt" size="603" author="hypirion" created="Sat, 9 Mar 2013 06:08:41 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10008">Not Approved</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1177] clojure.java.io/resource and non-ASCII characters</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1177</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;clojure.java.io/resource corrupts path containing UTF-8 characters without issuing warning.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (&lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;/getProperty &lt;span class=&quot;code-quote&quot;&gt;&quot;java.runtime.version&quot;&lt;/span&gt;)
&lt;span class=&quot;code-quote&quot;&gt;&quot;1.8.0-ea-b79&quot;&lt;/span&gt;
user=&amp;gt; (clojure-version)
&lt;span class=&quot;code-quote&quot;&gt;&quot;1.5.0&quot;&lt;/span&gt;
user=&amp;gt; (&lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;/getProperty &lt;span class=&quot;code-quote&quot;&gt;&quot;user.dir&quot;&lt;/span&gt;)
&lt;span class=&quot;code-quote&quot;&gt;&quot;/dir/d&#233;f&quot;&lt;/span&gt;
user=&amp;gt; (clojure.java.io/resource &lt;span class=&quot;code-quote&quot;&gt;&quot;myfile.txt&quot;&lt;/span&gt;)
#&amp;lt;URL file:/dir/d%c3%a9f/resources/myfile.txt&amp;gt;
user=&amp;gt; (slurp (clojure.java.io/resource &lt;span class=&quot;code-quote&quot;&gt;&quot;myfile.txt&quot;&lt;/span&gt;) :encoding &lt;span class=&quot;code-quote&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;)
FileNotFoundException /dir/d&#195;&#169;f/resources/myfile.txt (No such file or directory)  java.io.FileInputStream.open (FileInputStream.java:-2)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="16062">CLJ-1177</key>
            <summary>clojure.java.io/resource and non-ASCII characters</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="trevor">Trevor Wennblom</reporter>
                        <labels>
                        <label>bug</label>
                        <label>enhancement</label>
                    </labels>
                <created>Thu, 7 Mar 2013 16:54:43 -0600</created>
                <updated>Sun, 10 Mar 2013 17:56:52 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30713" author="jafingerhut" created="Fri, 8 Mar 2013 00:10:22 -0600"  >&lt;p&gt;Below is a workaround, at least.  I don&apos;t know, but perhaps the as-file method for URLs in io.clj of Clojure, the part that converts %hh sequences to a character with code point in the range 0 through 255, is at least partly at fault here.  I don&apos;t know right now if it is possible to modify that code to handle the general case of whatever character encoding munging is going on here to when .getResource creates the URL object.&lt;/p&gt;


&lt;p&gt;clojure.java.io/resource is documented to return a Java object of type java.net.URL, which seems like it does %hh escaping of many characters.  Reference &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; to a Java bug from 2001 where a Java user was surprised by the then-recent change in behavior of the getResource method &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;Doing a little searching I found this StackOverflow question &lt;span class=&quot;error&quot;&gt;&amp;#91;3&amp;#93;&lt;/span&gt;, which has what might be a workaround.  I tried it on my Mac OS X 10.6 system running JDK 1.6 and it seemed to work:&lt;/p&gt;

&lt;p&gt;(slurp (.getContent (clojure.java.io/resource &quot;abc&#237;d/foo.txt&quot;)))&lt;/p&gt;

&lt;p&gt;That getContent is a method for class java.net.URL &lt;span class=&quot;error&quot;&gt;&amp;#91;4&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; &lt;a href=&quot;http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4466485&quot;&gt;http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4466485&lt;/a&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; &lt;a href=&quot;http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html#getResource%28java.lang.String%29&quot;&gt;http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html#getResource%28java.lang.String%29&lt;/a&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;3&amp;#93;&lt;/span&gt; &lt;a href=&quot;http://stackoverflow.com/questions/13013629/best-international-alternative-to-javas-getclass-getresource&quot;&gt;http://stackoverflow.com/questions/13013629/best-international-alternative-to-javas-getclass-getresource&lt;/a&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;4&amp;#93;&lt;/span&gt; &lt;a href=&quot;http://docs.oracle.com/javase/1.5.0/docs/api/java/net/URL.html#getContent%28%29&quot;&gt;http://docs.oracle.com/javase/1.5.0/docs/api/java/net/URL.html#getContent%28%29&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30716" author="trevor" created="Fri, 8 Mar 2013 09:56:22 -0600"  >&lt;p&gt;Hi Andy,&lt;/p&gt;

&lt;p&gt;Thanks for the background and suggestions, that&apos;s very helpful.&lt;/p&gt;

&lt;p&gt;I&apos;m gradually learning Clojure with no Java experience. In this case I was searching for the preferred Clojure way to access items in directories declared under :resource-paths in a Leiningen project.clj file. Perhaps clojure.java.io/resource isn&apos;t the best way to do this as it&apos;s possibly too tied to the expectation for a URI instead of a more general IRI.&lt;/p&gt;

&lt;p&gt;You&apos;re suggested workaround did work for my use case:&lt;/p&gt;

&lt;p&gt;(slurp (.getContent (clojure.java.io/resource &quot;abc&#237;d/foo.txt&quot;)))&lt;/p&gt;

&lt;p&gt;but hopefully there would be more native/direct Clojure way to accomplish the same eventually.&lt;/p&gt;

&lt;p&gt;I don&apos;t know if java.net.IDN would be useful internally as a fix in clojure.java.io/resource &#8212; I&apos;m assuming not since it wasn&apos;t added until Java 6.&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &apos;java.net.IDN)
java.net.IDN
user=&amp;gt; (java.net.IDN/toASCII &lt;span class=&quot;code-quote&quot;&gt;&quot;/dir/d&#233;f&quot;&lt;/span&gt;)
&lt;span class=&quot;code-quote&quot;&gt;&quot;xn--/dir/df-gya&quot;&lt;/span&gt;
user=&amp;gt; (java.net.IDN/toUnicode &lt;span class=&quot;code-quote&quot;&gt;&quot;xn--/dir/df-gya&quot;&lt;/span&gt;)
&lt;span class=&quot;code-quote&quot;&gt;&quot;/dir/d&#233;f&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;: &lt;a href=&quot;http://docs.oracle.com/javase/6/docs/api/java/net/IDN.html&quot;&gt;http://docs.oracle.com/javase/6/docs/api/java/net/IDN.html&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30717" author="jafingerhut" created="Fri, 8 Mar 2013 13:30:05 -0600"  >&lt;p&gt;Patch clj-1177-patch-v1.txt dated Mar 8 2013 is an attempt to solve this issue, in what I think may be a correct way.  As specified in RFC 3986, when taking a Unicode string and making a URL of it, it should be encoded in UTF-8 and then each individual byte is subject to the %HH hex encoding.  This patch reverses that to turn URLs into file names.&lt;/p&gt;

&lt;p&gt;Tested on Mac OS X 10.6 with a command line like this (it doesn&apos;t work without the -Dfile.encoding=UTF-8 option on my Mac, probably because the default encoding is MacRoman):&lt;/p&gt;

&lt;p&gt;% java -cp clojure.jar:path/to/resource -Dfile.encoding=UTF-8 clojure.main&lt;br/&gt;
user=&amp;gt; (require &apos;&lt;span class=&quot;error&quot;&gt;&amp;#91;clojure.java.io :as io&amp;#93;&lt;/span&gt;)&lt;br/&gt;
nil&lt;br/&gt;
user=&amp;gt; (io/resource &quot;abc&#237;d/foo.txt&quot;)&lt;br/&gt;
#&amp;lt;URL &lt;a href=&quot;file:/Users/jafinger/clj/clj-ns-browser/resource/abc%c3%add/foo.txt&quot;&gt;file:/Users/jafinger/clj/clj-ns-browser/resource/abc%c3%add/foo.txt&lt;/a&gt;&amp;gt;&lt;br/&gt;
user=&amp;gt; (slurp (io/resource &quot;abc&#237;d/foo.txt&quot;))&lt;br/&gt;
&quot;The quick brown fox jumped over the l&#225;zy d&#246;g!\n&quot;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11900" name="clj-1177-patch-v1.txt" size="2673" author="jafingerhut" created="Fri, 8 Mar 2013 13:30:05 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1136] Type hinting for array classes does not work in binding forms</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1136</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Type hints don&apos;t work as expected in binding forms. &lt;/p&gt;

&lt;p&gt;The following form results in a reflection warning:&lt;/p&gt;

&lt;p&gt;    (let [^{:tag (Class/forName &quot;&lt;span class=&quot;error&quot;&gt;&amp;#91;Ljava.lang.Object;&amp;quot;)} a (make-array Object 2)&amp;#93;&lt;/span&gt;&lt;br/&gt;
      (aget a 0))&lt;/p&gt;

&lt;p&gt;However, hinting does appear to work correctly on vars:&lt;/p&gt;

&lt;p&gt;    (def ^{:tag (Class/forName &quot;[Ljava.lang.Object;&quot;)} a (make-array Object 2))&lt;br/&gt;
    (aget a 0) ;; no reflection warning&lt;/p&gt;</description>
                <environment>replicated on OpenJDK 7u9 on Ubuntu 12.04, and Hotspot 1.6.0_37 on OSX Lion</environment>
            <key id="15911">CLJ-1136</key>
            <summary>Type hinting for array classes does not work in binding forms</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="lvanderhart">Luke VanderHart</reporter>
                        <labels>
                        <label>Compiler</label>
                        <label>bug</label>
                    </labels>
                <created>Thu, 20 Dec 2012 14:59:58 -0600</created>
                <updated>Fri, 21 Dec 2012 11:09:56 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30272" author="gshayban" created="Thu, 20 Dec 2012 22:51:22 -0600"  >&lt;p&gt;It&apos;s a little more insidious than type hinting: the compiler doesn&apos;t evaluate metadata in the binding vec.&lt;/p&gt;

&lt;p&gt;This doesn&apos;t throw the necessary exception...&lt;/p&gt;

&lt;p&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;^{:foo (Class/forName &amp;quot;not real&amp;quot;)} bar 42&amp;#93;&lt;/span&gt;&lt;br/&gt;
  bar)&lt;/p&gt;

&lt;p&gt;neither this...&lt;/p&gt;

&lt;p&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;^{gyorgy ligeti} a 42&amp;#93;&lt;/span&gt;&lt;br/&gt;
  a)&lt;/p&gt;

&lt;p&gt;Gyorgy Ligeti never resolves.&lt;/p&gt;

&lt;p&gt;These two equivalent examples don&apos;t reflect: &lt;br/&gt;
(let &lt;span class=&quot;error&quot;&gt;&amp;#91;^objects a (make-array Object 2)&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (aget a 0))&lt;/p&gt;

&lt;p&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;a ^objects (make-array Object 2)&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (aget a 0))&lt;/p&gt;
</comment>
                    <comment id="30275" author="gshayban" created="Fri, 21 Dec 2012 11:09:56 -0600"  >&lt;p&gt;On only the left-hand side of a local binding, metadata on a symbol is not analyzed or evaluated.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1134] star-directive in clojure.pprint/cl-format with an at-prefix (&quot;~n@*&quot;) do not obey its specifications</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1134</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The star-directive in &lt;tt&gt;clojure.pprint/cl-format&lt;/tt&gt; with an at-prefix (&lt;tt&gt;&amp;#126;n@&amp;#42;&lt;/tt&gt;) does not obey its specifications according to &lt;a href=&quot;http://www.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/ai/html/cltl/clm/node200.html#SECTION002633000000000000000&quot;&gt;Common Lisp the Language, 2nd Edition&lt;/a&gt;. There are two bugs within &lt;tt&gt;&amp;#126;n@&amp;#42;&lt;/tt&gt; as of right now:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;When &lt;tt&gt;&amp;#126;n@&amp;#42;&lt;/tt&gt; is supposed to jump forward over more than one argument, it jumps one step backward as if it had seen &lt;tt&gt;&amp;#126;:&amp;#42;&lt;/tt&gt;. For instance, &lt;tt&gt;(cl-format nil &quot;~D ~3@*~D&quot; 0 1 2 3)&lt;/tt&gt; will return &lt;tt&gt;&quot;0 0&quot;&lt;/tt&gt; and not &lt;tt&gt;&quot;0 3&quot;&lt;/tt&gt; as expected.&lt;/li&gt;
	&lt;li&gt;When &lt;tt&gt;&amp;#126;@&amp;#42;&lt;/tt&gt; is seen, the formatter is supposed to jump to the first argument (as &lt;tt&gt;n&lt;/tt&gt; defaults to &lt;tt&gt;0&lt;/tt&gt;, see specification linked above). However, whenever a &lt;tt&gt;&amp;#126;@&amp;#42;&lt;/tt&gt;-directive is seen, the formatter jumps to the second argument instead.&lt;/li&gt;
&lt;/ol&gt;


&lt;h4&gt;&lt;a name=&quot;What%28smallsetof%29stepswillreproducetheproblem%3F&quot;&gt;&lt;/a&gt;What (small set of) steps will reproduce the problem?&lt;/h4&gt;

&lt;p&gt;Inside a clean Clojure repl, perform these steps:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user=&amp;gt; (require &apos;[clojure.pprint :refer [cl-format]])
nil
user=&amp;gt; (cl-format nil &quot;~D ~3@*~D&quot; 0 1 2 3)
&quot;0 0&quot;                                           ;; Expected: &quot;0 3&quot;
user=&amp;gt; (cl-format nil &quot;~D~D~D~D ~@*~D&quot; 0 1 2 3)
&quot;0123 1&quot;                                        ;; Expected: &quot;0123 0&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h4&gt;&lt;a name=&quot;Whatistheexpectedoutput%3FWhatdoyouseeinstead%3F&quot;&gt;&lt;/a&gt;What is the expected output? What do you see instead?&lt;/h4&gt;

&lt;p&gt;The expected output is &lt;tt&gt;&quot;0 3&quot;&lt;/tt&gt; and &lt;tt&gt;&quot;0123 0&quot;&lt;/tt&gt;, but is &lt;tt&gt;&quot;0 0&quot;&lt;/tt&gt; and &lt;tt&gt;&quot;0123 1&quot;&lt;/tt&gt; as shown above.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Whatversionareyouusing%3F&quot;&gt;&lt;/a&gt;What version are you using?&lt;/h4&gt;

&lt;p&gt;Tested on both &lt;tt&gt;1.4.0&lt;/tt&gt; and &lt;tt&gt;1.5.0-beta2&lt;/tt&gt;, both have the defect described.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Pleaseprovideanyadditionalinformationbelow.&quot;&gt;&lt;/a&gt;Please provide any additional information below.&lt;/h4&gt;

&lt;p&gt;The format strings which reproduces the problem has been compared with the &lt;tt&gt;format&lt;/tt&gt; function from the Common Lisp implementations SBCL, CLisp and Clozure. All of them print the expected output.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15907">CLJ-1134</key>
            <summary>star-directive in clojure.pprint/cl-format with an at-prefix (&quot;~n@*&quot;) do not obey its specifications</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hypirion">Jean Niklas L&apos;orange</reporter>
                        <labels>
                        <label>bug</label>
                        <label>pprint</label>
                    </labels>
                <created>Tue, 18 Dec 2012 20:34:25 -0600</created>
                <updated>Wed, 26 Dec 2012 19:57:30 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30261" author="hypirion" created="Tue, 18 Dec 2012 21:28:03 -0600"  >&lt;p&gt;Patch attached.&lt;/p&gt;

&lt;p&gt;It may be easier to read the changes the patch does from within JIRA instead from the commit message, so I&apos;ve added it here:&lt;/p&gt;

&lt;p&gt;This solves two issues as specified by #&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1134&quot; title=&quot;star-directive in clojure.pprint/cl-format with an at-prefix (&amp;quot;~n@*&amp;quot;) do not obey its specifications&quot;&gt;CLJ-1134&lt;/a&gt;. Issue #1 is solved by doing a&lt;br/&gt;
relative jump forward within &lt;tt&gt;absolute-reposition&lt;/tt&gt; in &lt;tt&gt;cl_format.clj&lt;/tt&gt;, line 114 by&lt;br/&gt;
switching &lt;tt&gt;(- (:pos navigator) position)&lt;/tt&gt; with &lt;tt&gt;(- position (:pos navigator))&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Issue #2 is handled by changing the default &lt;tt&gt;n&lt;/tt&gt;-parameter to &lt;tt&gt;*&lt;/tt&gt; depending on&lt;br/&gt;
whether the &lt;tt&gt;@&lt;/tt&gt;-prefix is placed or not. If it is placed, then &lt;tt&gt;n&lt;/tt&gt; defaults to&lt;br/&gt;
0, otherwise it defaults to 1.&lt;/p&gt;

&lt;p&gt;In addition, new tests have been appended to &lt;tt&gt;test_cl_format.clj&lt;/tt&gt; to ensure the&lt;br/&gt;
correctness of this patch. The tests have been tested on the Common Lisp&lt;br/&gt;
implementation GNU CLISP 2.49, which presumably handle the &lt;tt&gt;~n@*&lt;/tt&gt;&lt;br/&gt;
correctly. This patch and GNU CLISP returns the same output for each format&lt;br/&gt;
call, sans case for printed symbols; Common Lisp has case-insensitive symbols,&lt;br/&gt;
whereas Clojure has not.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11767" name="clj-1134-star-directive-in-cl-format.txt" size="4067" author="hypirion" created="Tue, 18 Dec 2012 21:28:03 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1087] clojure.data/diff uses set union on key seqs</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1087</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;&lt;tt&gt;clojure.data/diff&lt;/tt&gt;, on line 118, defines:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;java.util.Map
(diff-similar [a b]
  (diff-associative a b (set/union (keys a) (keys b))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Since &lt;tt&gt;keys&lt;/tt&gt; returns a key seq, this seems like an error. &lt;tt&gt;clojure.set/union&lt;/tt&gt; has strange and inconsistent behavior with regard to non-sets, and in this case the two key seqs are concatenated. Based on a cursory benchmark, it seems that this bug &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/help_16.gif&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; is a slight performance gain when the maps have no common keys, and a significant performance loss when the maps have the same keys. The results are still correct because of the merging reduce in &lt;tt&gt;diff-associative&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;The patch is easy (just call set on each key seq).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15753">CLJ-1087</key>
            <summary>clojure.data/diff uses set union on key seqs</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="tomoj">Tom Jack</reporter>
                        <labels>
                        <label>bug</label>
                        <label>performance</label>
                    </labels>
                <created>Mon, 15 Oct 2012 03:59:52 -0500</created>
                <updated>Mon, 15 Oct 2012 14:52:42 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29650" author="jafingerhut" created="Mon, 15 Oct 2012 14:52:04 -0500"  >&lt;p&gt;clj-1087-diff-perf-enhance-patch-v1.txt dated Oct 15 2012 implements Tom&apos;s suggested performance enhancement, although not exactly in the way he suggested.  It does calculate the union of the two key sequences.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11562" name="clj-1087-diff-perf-enhance-patch-v1.txt" size="760" author="jafingerhut" created="Mon, 15 Oct 2012 14:52:04 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1030] Misleading ClassCastException when coercing a String to int</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1030</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Observed behaviour&lt;/p&gt;

&lt;p&gt;(int &quot;0&quot;) =&amp;gt;&lt;br/&gt;
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Character&lt;/p&gt;

&lt;p&gt;Expected behaviour&lt;br/&gt;
(int &quot;0&quot;) =&amp;gt;&lt;br/&gt;
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer&lt;br/&gt;
or &lt;br/&gt;
IllegalArgumentException&lt;/p&gt;</description>
                <environment></environment>
            <key id="15591">CLJ-1030</key>
            <summary>Misleading ClassCastException when coercing a String to int</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ordnungswidrig">Philipp Meier</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Wed, 25 Jul 2012 06:13:21 -0500</created>
                <updated>Sun, 6 Jan 2013 20:52:40 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29532" author="jafingerhut" created="Mon, 24 Sep 2012 11:20:07 -0500"  >&lt;p&gt;If someone wants to improve the behavior of int in this case, they should also consider similar improvements to the error messages for unchecked-int, char, and unchecked-char.&lt;/p&gt;</comment>
                    <comment id="30383" author="michael-drogalis" created="Sun, 6 Jan 2013 20:45:00 -0600"  >&lt;p&gt;Patch improved-int-char-casting-error-messages.diff on January 6, 2013.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11793" name="improved-int-char-casting-error-messages.diff" size="3855" author="michael-drogalis" created="Sun, 6 Jan 2013 20:45:00 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1028] (compile) crashes with NullPointerException if public function &apos;load&apos; is defined</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1028</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When performing AOT compilation, if the namespace being compiled or one of the namespaces :required by it defines a public function named &apos;load&apos;, the compiler will crash with a NullPointerException.&lt;/p&gt;

&lt;p&gt;The following code demonstrates this:&lt;/p&gt;

&lt;p&gt;(ns ca.ancilla.kessler.core (:gen-class)) (defn load &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; x) (defn -main &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; args&amp;#93;&lt;/span&gt; 0)&lt;/p&gt;

&lt;p&gt;When run directly, with &apos;clojure -m ca.ancilla.kessler.core&apos; or &apos;clojure ca/ancilla/kessler/core.clj&apos;, it runs as expected. When loaded with &apos;clojure -i&apos; and (compile)d, however, or when automatically compiled by &apos;lein run&apos;, it results in a NullPointerException (the complete stack trace is attached).&lt;/p&gt;

&lt;p&gt;This occurs whether or not &apos;load&apos; or actually called. It does not, however, occur if &apos;load&apos; is private.&lt;/p&gt;</description>
                <environment>Linux, OpenJDK 1.6.0 64bit</environment>
            <key id="15584">CLJ-1028</key>
            <summary>(compile) crashes with NullPointerException if public function &apos;load&apos; is defined</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="toxicfrog">Ben Kelly</reporter>
                        <labels>
                        <label>Compiler</label>
                        <label>bug</label>
                    </labels>
                <created>Fri, 20 Jul 2012 12:40:30 -0500</created>
                <updated>Fri, 20 Jul 2012 22:06:22 -0500</updated>
                    <resolved>Fri, 20 Jul 2012 16:35:47 -0500</resolved>
                            <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29007" author="toxicfrog" created="Fri, 20 Jul 2012 12:43:33 -0500"  >&lt;p&gt;If you add (:refer-clojure :exclude &lt;span class=&quot;error&quot;&gt;&amp;#91;load&amp;#93;&lt;/span&gt;) to the (ns), it works fine:&lt;/p&gt;

&lt;p&gt;(ns ca.ancilla.kessler.core (:refer-clojure :exclude &lt;span class=&quot;error&quot;&gt;&amp;#91;load&amp;#93;&lt;/span&gt;) (:gen-class))&lt;br/&gt;
(defn load &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; x)&lt;br/&gt;
(defn -main &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; args&amp;#93;&lt;/span&gt; 0)&lt;/p&gt;

&lt;p&gt;Thanks to llasram on IRC for discovering this.&lt;/p&gt;</comment>
                    <comment id="29010" author="stu" created="Fri, 20 Jul 2012 16:35:38 -0500"  >&lt;p&gt;You should not replace functions in clojure.core.  This is left legal (with a loud CONSOLE warning) for compatibility, but programs that do it are in error.&lt;/p&gt;</comment>
                    <comment id="29015" author="toxicfrog" created="Fri, 20 Jul 2012 22:06:22 -0500"  >&lt;p&gt;So, just to make sure that I have this right, then...&lt;/p&gt;

&lt;p&gt;If I want to create a namespace with a public function that shares a name with a function in clojure.core, the only supported way of doing this is to (:refer-clojure :exclude &lt;span class=&quot;error&quot;&gt;&amp;#91;list of all such functions&amp;#93;&lt;/span&gt;)?&lt;/p&gt;

&lt;p&gt;If so, it would be nice if the warning were replaced with an error, rather than having the compiler emit an error and then &lt;b&gt;crash&lt;/b&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11391" name="stack-trace" size="1541" author="toxicfrog" created="Fri, 20 Jul 2012 12:40:30 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1022] gen-class destroys method annotations</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1022</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When extending a class gen-class doesn&apos;t preserve method annotations.&lt;/p&gt;

&lt;p&gt;If class com.bar.Foo has annotated methods  then in MyClass all annotations are gone.&lt;/p&gt;


&lt;p&gt;(gen-class&lt;br/&gt;
   :name com.my.MyClass&lt;br/&gt;
   :extends com.bar.Foo&lt;br/&gt;
   :implements &lt;span class=&quot;error&quot;&gt;&amp;#91;com.google.common.base.Supplier&amp;#93;&lt;/span&gt;&lt;br/&gt;
   :prefix demo-&lt;br/&gt;
   :post-init post-init)&lt;/p&gt;

&lt;p&gt;(defn demo-post-init &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (info &quot;initialized&quot;)&lt;br/&gt;
  (swank.swank/start-server :port 68478))&lt;/p&gt;

&lt;p&gt;(defn demo-get &lt;span class=&quot;error&quot;&gt;&amp;#91;_&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (get-msg))&lt;/p&gt;



&lt;p&gt;            Class&amp;lt;?&amp;gt; aClass = Class.forName(&quot;com.my.MyClass&quot;);&lt;br/&gt;
            Method[] methods = aClass.getMethods();&lt;/p&gt;

&lt;p&gt;            for (Method m : methods) {&lt;br/&gt;
                Annotation[] annotations = m.getAnnotations();&lt;br/&gt;
                System.out.println(m.getName()+&quot; &quot;+annotations.length);&lt;br/&gt;
                for (Annotation a : annotations) {
                    System.out.println(a.annotationType().getClass().getName());
                }&lt;br/&gt;
            }&lt;/p&gt;</description>
                <environment></environment>
            <key id="15566">CLJ-1022</key>
            <summary>gen-class destroys method annotations</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="maris">Maris Orbidans</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Tue, 3 Jul 2012 06:19:26 -0500</created>
                <updated>Tue, 3 Jul 2012 06:19:26 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1021] (let [i 5] (defmacro m [v] v) m) interprets m as a function, not a macro</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1021</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;i 5&amp;#93;&lt;/span&gt; (defmacro m &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; args&amp;#93;&lt;/span&gt; args) (def x (m (inc 5) (inc 6) (inc 7))) &lt;a href=&quot;#&amp;#39;m)&quot;&gt;x m (meta #&apos;m)&lt;/a&gt;)&lt;br/&gt;
is&lt;br/&gt;
[(8) #&amp;lt;user$eval522$m_&lt;em&gt;523 user$eval522$m&lt;/em&gt;_523@11a74355&amp;gt; {:macro true, :ns #&amp;lt;Namespace user&amp;gt;, :name m, :arglists (&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; args&amp;#93;&lt;/span&gt;), :line 1, :file &quot;NO_SOURCE_PATH&quot;}]&lt;/p&gt;

&lt;p&gt;It appears to be interpreting m as a function despite the metadata. This behavior only shows up inside the (let ...).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15565">CLJ-1021</key>
            <summary>(let [i 5] (defmacro m [v] v) m) interprets m as a function, not a macro</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="zii-prime">Zii Prime</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Mon, 2 Jul 2012 23:32:22 -0500</created>
                <updated>Thu, 13 Sep 2012 14:29:20 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29222" author="bronsa" created="Sat, 18 Aug 2012 11:43:42 -0500"  >&lt;p&gt;The problem is the same as the one for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-918&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-918&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The patch linked there was mine but i had no CA signed at that time, and no account on jira.&lt;/p&gt;

&lt;p&gt;Here is the same patch in the correct format.&lt;/p&gt;

&lt;p&gt;Bug #918 should be closed as this is a duplicate&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11443" name="001-propagate-on-macro-meta.diff" size="1018" author="bronsa" created="Sat, 18 Aug 2012 11:43:42 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1006] Quotient on bigdec may produce wrong result</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1006</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;As discussed on the mailing list in the message &quot;When arithmetic on a computer bite back&quot; (01/jun)&lt;/p&gt;

&lt;p&gt;There may be bug in the way quotient is implemented for bigdec.&lt;/p&gt;

&lt;p&gt;user&amp;gt; (quot 1.4411518807585587E17 2)   ;; correct with doubles&lt;br/&gt;
7.2057594037927936E16&lt;br/&gt;
user&amp;gt; (quot 1.4411518807585587E+17M 2) ;; wrong with BigDecs&lt;br/&gt;
72057594037927935M &lt;/p&gt;

&lt;p&gt;&amp;#8211;&lt;br/&gt;
Laurent&lt;/p&gt;</description>
                <environment>Linux 3.2.0-24-generic #39-Ubuntu SMP i686 GNU/Linux</environment>
            <key id="15500">CLJ-1006</key>
            <summary>Quotient on bigdec may produce wrong result</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="laurentj">laurent joigny</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Fri, 1 Jun 2012 16:12:34 -0500</created>
                <updated>Fri, 1 Mar 2013 12:47:08 -0600</updated>
                    <resolved>Fri, 9 Nov 2012 08:49:48 -0600</resolved>
                            <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28677" author="laurentj" created="Fri, 1 Jun 2012 17:48:24 -0500"  >&lt;p&gt;I can reproduce the bug when using BigDecimal constructor on String.&lt;br/&gt;
See attached file for a test class.&lt;/p&gt;

&lt;p&gt;More infos :&lt;br/&gt;
java version &quot;1.6.0_24&quot;&lt;br/&gt;
OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu3)&lt;br/&gt;
OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)&lt;/p&gt;</comment>
                    <comment id="28678" author="laurentj" created="Fri, 1 Jun 2012 17:49:50 -0500"  >&lt;p&gt;A simple test file, that you can drop in Clojure sources and execute to reproduce the bug on BigDecimal constructor using String as argument.&lt;/p&gt;</comment>
                    <comment id="28687" author="tsdh" created="Sun, 3 Jun 2012 04:30:44 -0500"  >&lt;p&gt;Seems to be a general precision problem.  Note that in&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user&amp;gt; (quot 1.4411518807585587E17 2) ;; correct with doubles
7.2057594037927936E16
user&amp;gt; (quot 1.4411518807585587E+17M 2) ;; wrong with BigDecs
72057594037927935M
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;the double result is actually wrong and the bigdec one is correct.  The problem which lead to the wrong conclusion is that in your calculation the input number is already wrong.&lt;/p&gt;

&lt;p&gt;So the moral is: don&apos;t use any floating points (neither doubles nor bigdecs) for computations involving divisibility tests.&lt;/p&gt;

&lt;p&gt;For bigdecs, you can set the math context for making computations throw exceptions if they lose precision, though:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user&amp;gt; (binding [*math-context* (java.math.MathContext. 1 java.math.RoundingMode/UNNECESSARY)]
	       (quot (bigdec (Math/pow 2 58)) 2))
;Division impossible
;  [Thrown class java.lang.ArithmeticException]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="29920" author="stuart.sierra" created="Fri, 9 Nov 2012 08:49:48 -0600"  >&lt;p&gt;Not a bug. Just floating-point arithmetic.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11282" name="TestBigDecimalQuotient.java" size="782" author="laurentj" created="Fri, 1 Jun 2012 17:49:50 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-988] the locking in MultiFn.java (synchronized methods) can cause lots of contention in multithreaded programs</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-988</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;if you call a single multimethod a lot in multithreaded code you get lots of contention for the lock on the multimethod. this contention slows things down a lot.&lt;/p&gt;

&lt;p&gt;this is due to getMethod being synchronized. it would be great if there was some fast non-locking path through the multimethod.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15419">CLJ-988</key>
            <summary>the locking in MultiFn.java (synchronized methods) can cause lots of contention in multithreaded programs</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="stuart.sierra">Stuart Sierra</assignee>
                                <reporter username="hiredman">Kevin Downey</reporter>
                        <labels>
                        <label>bug</label>
                        <label>performance</label>
                    </labels>
                <created>Tue, 8 May 2012 11:14:53 -0500</created>
                <updated>Fri, 21 Sep 2012 14:21:33 -0500</updated>
                    <resolved>Fri, 21 Sep 2012 14:21:33 -0500</resolved>
                                            <fixVersion>Release 1.5</fixVersion>
                                        <due></due>
                    <votes>10</votes>
                        <watches>9</watches>
                        <comments>
                    <comment id="28411" author="hiredman" created="Tue, 8 May 2012 11:30:00 -0500"  >&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/clojure-dev/browse_thread/thread/6a8219ae3d4cd0ae?hl=en&quot;&gt;http://groups.google.com/group/clojure-dev/browse_thread/thread/6a8219ae3d4cd0ae?hl=en&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="28446" author="santiago" created="Fri, 11 May 2012 06:38:34 -0500"  >&lt;p&gt;Here&apos;s a stab in the dark attempt at rewriting MultiFn to use atoms to swap between immutable copies of its otherwise mutable state. &lt;/p&gt;

&lt;p&gt;The four pieces of the MultiFn&apos;s state that are mutable and protected by locks are now contained in the MultiFn.State class, which is immutable and contains convenience functions for creating a new one with one field changed. An instance of this class is now held in an atom in the MultiFn called state. Changes to any of these four members are now done with an atomic swap of these State objects. &lt;/p&gt;

&lt;p&gt;The getMethod/findAndCacheBestMethod complex was rewritten to better enable the atomic logic. findAndCacheBestMethod was replaced with findBestMethod, which merely looks up the method; the caching logic was moved to getMethod so that it can be retried easily as part of the work that method does. &lt;/p&gt;

&lt;p&gt;As it was findAndCacheBestMethod seemingly had the potential to cause a stack overflow in a perfect storm of heavy concurrent modification, since it calls itself recursively if it finds that the hierarchy has changed while it has done its work. This logic is now done in the CAS looping of getMethod, so hopefully that is not even an unlikely possibility anymore.&lt;/p&gt;

&lt;p&gt;There is still seemingly a small race here, since the check is done of a regular variable against the value in a ref. Now as before, the ref could be updated just after you do the check, but before the MultiFn&apos;s state is updated. Of course, only the method lookup part of a MultiFn call was synchronized before; it could already change after the lookup but before the method itself executed, having a stale method finish seemingly after the method had been changed. Things are no different now in general, with the atom-based approach, so perhaps this race is not a big deal, as a stale value can&apos;t persist for long.&lt;/p&gt;

&lt;p&gt;The patch passes the tests and Clojure and multimethods seems to work.&lt;/p&gt;</comment>
                    <comment id="28482" author="hiredman" created="Sat, 12 May 2012 20:59:45 -0500"  >&lt;p&gt;this patch gets rid of the ugly lock contention issues. I have not been able to benchmark it vs. the old multimethod implementation, but looking at it, I would not be surprised if it is faster when the system is in a steady state.&lt;/p&gt;</comment>
                    <comment id="28747" author="stu" created="Fri, 8 Jun 2012 12:11:51 -0500"  >&lt;p&gt;This looks straightforward, except for getMethod. Can somebody with context add more discussion of how method caching works?&lt;/p&gt;

&lt;p&gt;Also, it would be great to have tests with this one.&lt;/p&gt;</comment>
                    <comment id="28810" author="santiago" created="Fri, 15 Jun 2012 04:44:53 -0500"  >&lt;p&gt;Obviously I didn&apos;t write the original code, so I&apos;m not the ideal&lt;br/&gt;
person to explain this stuff. But I did work with it a bit recently,&lt;br/&gt;
so in the hopes that I can be helpful, I&apos;m writing down my&lt;br/&gt;
understanding of the code as I worked with it. Since I came to the&lt;br/&gt;
code and sort of reverse engineered my way to this understanding,&lt;br/&gt;
hopefully laying this all out will make any mistakes or&lt;br/&gt;
misunderstandings I may have made easier to catch and correct. To&lt;br/&gt;
ensure some stability, I&apos;ll talk about the original MultiFn code as it&lt;br/&gt;
stands at this commit:&lt;br/&gt;
&lt;a href=&quot;https://github.com/clojure/clojure/blob/8fda34e4c77cac079b711da59d5fe49b74605553/src/jvm/clojure/lang/MultiFn.java&quot;&gt;https://github.com/clojure/clojure/blob/8fda34e4c77cac079b711da59d5fe49b74605553/src/jvm/clojure/lang/MultiFn.java&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are four pieces of state that change as the multimethod is either&lt;br/&gt;
populated with methods or called.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;methodTable: A persistent map from a dispatch value (Object) to&lt;br/&gt;
    a function (IFn). This is the obvious thing you think it is,&lt;br/&gt;
    determining which dispatch values call which function.&lt;/li&gt;
	&lt;li&gt;preferTable: A persistent map from a dispatch value (Object) to&lt;br/&gt;
    another value (Object), where the key &quot;is preferred&quot; to the value.&lt;/li&gt;
	&lt;li&gt;methodCache: A persistent map from a dispatch value (Object) to&lt;br/&gt;
    function (IFn). By default, the methodCache is assigned the same&lt;br/&gt;
    map value as the methodTable. If values are calculated out of the&lt;br/&gt;
    hierarchy during a dispatch, the originating value and the&lt;br/&gt;
    ultimate method it resolves to are inserted as additional items in&lt;br/&gt;
    the methodCache so that subsequent calls can jump right to the&lt;br/&gt;
    method without recursing down the hierarchy and preference table.&lt;/li&gt;
	&lt;li&gt;cachedHierarchy: An Object that refers to the hierarchy that is&lt;br/&gt;
    reflected in the latest cached values. It is used to check if the&lt;br/&gt;
    hierarchy has been updated since we last updated the cache. If it&lt;br/&gt;
    has been updated, then the cache is flushed.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I think reset(), addMethod(), removeMethod(), preferMethod(),&lt;br/&gt;
prefers(), isA(), dominates(), and resetCache() are extremely&lt;br/&gt;
straightforward in both the original code and the patch. In the&lt;br/&gt;
original code, the first four of those are synchronized, and the other&lt;br/&gt;
four are only called from methods that are synchronized (or from&lt;br/&gt;
methods only called from methods that are synchronized).&lt;/p&gt;

&lt;p&gt;Invoking a multimethod through its invoke() function will call&lt;br/&gt;
getFn(). getFn() will call the getMethod() function, which is&lt;br/&gt;
synchronized. This means any call of the multimethod will wait for and&lt;br/&gt;
take a lock as part of method invocation. The goal of the patch in&lt;br/&gt;
this issue is to remove this lock on calls into the multimethod. It in&lt;br/&gt;
fact removes the locks on all operations, and instead keeps its&lt;br/&gt;
internal mutable state by atomically swapping a private immutable&lt;br/&gt;
State object held in an Atom called state.&lt;/p&gt;

&lt;p&gt;The biggest change in the patch is to the&lt;br/&gt;
getFn()&lt;del&gt;&amp;gt;getMethod()&lt;/del&gt;&amp;gt;findAndCacheBestMethod() complex from the&lt;br/&gt;
original code. I&apos;ll describe how that code works first. &lt;/p&gt;

&lt;p&gt;In the original code, getFn() does nothing but bounce through&lt;br/&gt;
getMethod(). getMethod() tries three times to find a method to call,&lt;br/&gt;
after checking that the cache is up to date and flushing it if it&lt;br/&gt;
isn&apos;t:&lt;/p&gt;

&lt;p&gt;    1. It checks if there&apos;s a method for the dispatch value in the&lt;br/&gt;
    methodCache. &lt;/p&gt;

&lt;p&gt;    2. If not, it calls findAndCacheBestMethod() on the&lt;br/&gt;
    dispatch value. findAndCacheBestMethod() does the following:&lt;/p&gt;

&lt;p&gt;        1. It iterates through every map entry in the method table,&lt;br/&gt;
        keeping at each step the best entry it has found so far&lt;br/&gt;
        (according to the hierarchy and preference tables).  &lt;/p&gt;

&lt;p&gt;        2. If it did not find a suitable entry, it returns null.  &lt;/p&gt;

&lt;p&gt;        3. Otherwise, it checks if the hierarchy has been changed since the cache&lt;br/&gt;
        was last updated. If it has not changed, it inserts the method&lt;br/&gt;
        into the cache and returns it. If it has been changed, it&lt;br/&gt;
        resets the cache and calls itself recursively to repeat the process.&lt;/p&gt;

&lt;p&gt;    3. Failing all else, it will return the method for the default&lt;br/&gt;
    dispatch value.&lt;/p&gt;

&lt;p&gt;Again, remember everything in the list above happens in a call to a&lt;br/&gt;
synchronized function. Also note that as it is currently written,&lt;br/&gt;
findAndCacheBestMethod() uses recursion for iteration in a way that&lt;br/&gt;
grows the stack. This seems unlikely to cause a stack overflow unless&lt;br/&gt;
the multimethod is getting its hierarchy updated very rapidly for a&lt;br/&gt;
sustained period while someone else tries to call it. Nonetheless, the&lt;br/&gt;
hierarchy is held in an IRef that is updated independently of the&lt;br/&gt;
locking of the MultiFn. Finally, note that the multimethod is locked&lt;br/&gt;
only while the method is being found. Once it is found, the lock is&lt;br/&gt;
released and the method actually gets called afterwards without any&lt;br/&gt;
synchronization, meaning that by the time the method actually&lt;br/&gt;
executes, the multimethod may have already been modified in a way that&lt;br/&gt;
suggests a different method should have been called. Presumably this&lt;br/&gt;
is intended, understood, and not a big deal.&lt;/p&gt;

&lt;p&gt;Moving on now to the patch in this issue. As mentioned, the main&lt;br/&gt;
change is updating this entire apparatus to work with a single atomic&lt;br/&gt;
swap to control concurrency. This means that all updates to the&lt;br/&gt;
multimethod&apos;s state have to happen at one instant in time. Where the&lt;br/&gt;
original code could make multiple changes to the state at different&lt;br/&gt;
times, knowing it was safely protected by an exclusive lock, rewriting&lt;br/&gt;
for atom swaps requires us to reorganize the code so that all updates&lt;br/&gt;
to the state happen at the same time with a single CAS.&lt;/p&gt;

&lt;p&gt;To implement this change, I pulled the implicit looping logic from&lt;br/&gt;
findAndCacheBestMethod() up into getMethod() itself, and broke the&lt;br/&gt;
&quot;findBestMethod&quot; part into its own function, findBestMethod(), which&lt;br/&gt;
makes no update to any state while implementing the same&lt;br/&gt;
logic. getMethod() now has an explicit loop to avoid stack-consuming&lt;br/&gt;
recursion on retries. This infinite for loop covers all of the logic&lt;br/&gt;
in getMethod() and retries until a method is successfully found and a&lt;br/&gt;
CAS operation succeeds, or we determine that the method cannot be&lt;br/&gt;
found and we return the default dispatch value&apos;s implementation.&lt;/p&gt;

&lt;p&gt;I&apos;ll now describe the operation of the logic in the for loop. The&lt;br/&gt;
first two steps in the loop correspond to things getMethod() does&lt;br/&gt;
&quot;before&quot; its looping construct in the original code, but we have to do&lt;br/&gt;
in the loop to get the latest values.&lt;/p&gt;

&lt;p&gt;    1. First we dereference our state, and assign this value to both&lt;br/&gt;
    oldState and newState. We also set a variable called needWrite to&lt;br/&gt;
    false; this is so we can avoid doing a CAS (they&apos;re not free) when&lt;br/&gt;
    we have not actually updated the state.  &lt;/p&gt;

&lt;p&gt;    2. Check if the cache is stale, and flush it if so. If the cache&lt;br/&gt;
    gets flushed, set needWrite to true, as the state has changed.&lt;/p&gt;

&lt;p&gt;    3. Check if the methodCache has an entry for this dispatch&lt;br/&gt;
    value. If so, we are &quot;finished&quot; in the sense that we found the&lt;br/&gt;
    value we wanted. However, we may need to update the state. So, &lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;If needWrite is false, we can return without a CAS, so just&lt;br/&gt;
          break out of the loop and return the method.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;Otherwise, we need to update the state object with a CAS. If&lt;br/&gt;
          the CAS is successful, break out of the loop and return the&lt;br/&gt;
          target function. Otherwise, continue on the next iteration&lt;br/&gt;
          of the loop, skipping any other attempts to fetch the method&lt;br/&gt;
          later in the loop (useless work, at this point).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    4. The value was not in the methodCache, so call the function&lt;br/&gt;
    findBestMethod() to attempt to find a suitable method based on the&lt;br/&gt;
    hierarchy and preferences. If it does find us a suitable method,&lt;br/&gt;
    we now need to cache it ourselves. We create a new state object&lt;br/&gt;
    with the new method cache and attempt to update the state atom&lt;br/&gt;
    with a CAS (we definitely need a write here, so no need to check&lt;br/&gt;
    needWrite at this point).&lt;/p&gt;

&lt;p&gt;    The one thing that is possibly questionable is the check at this&lt;br/&gt;
    point to make sure the hierarchy has not been updated since the&lt;br/&gt;
    beginning of this method. I inserted this here to match the&lt;br/&gt;
    identical check at the corresponding point in&lt;br/&gt;
    findAndCacheBestMethod() in the original code. That is also a&lt;br/&gt;
    second check, since the cache is originally checked for freshness&lt;br/&gt;
    at the very beginning of getMethod() in the original code. That&lt;br/&gt;
    initial check happens at the beginning of the loop in the&lt;br/&gt;
    patch. Given that there is no synchronization with the method&lt;br/&gt;
    hierarchy, it is not clear to me that this second check is needed,&lt;br/&gt;
    since we are already proceeding with a snapshot from the beginning&lt;br/&gt;
    of the loop. Nonetheless, it can&apos;t hurt as far as I can tell, it&lt;br/&gt;
    is how the original code worked, and I assume there was some&lt;br/&gt;
    reason for that, so I kept the second check.&lt;/p&gt;

&lt;p&gt;    5. Finally, if findBestMethod() failed to find us a method for the&lt;br/&gt;
    dispatch value, find the method for the default dispatch value and&lt;br/&gt;
    return that by breaking out of the loop.&lt;/p&gt;

&lt;p&gt;So the organization of getMethod() in the patch is complicated by two&lt;br/&gt;
factors: (1) making the retry looping explicit and stackless, (2)&lt;br/&gt;
skipping the CAS when we don&apos;t need to update state, and (3) skipping&lt;br/&gt;
needless work later in the retry loop if we find a value but are&lt;br/&gt;
unable to succeed in our attempt to CAS. Invoking a multimethod that&lt;br/&gt;
has a stable hierarchy and a populated cache should not even have a&lt;br/&gt;
CAS operation (or memory allocation) on this code path, just a cache&lt;br/&gt;
lookup after the dispatch value is calculated.&lt;/p&gt;</comment>
                    <comment id="28811" author="santiago" created="Fri, 15 Jun 2012 04:45:58 -0500"  >&lt;p&gt;I&apos;ve updated this patch (removing the old version, which is entirely superseded by this one). The actual changes to MultiFn.java are identical (modulo any thing that came through in the rebase), but this newer patch has tests of basic multimethod usage, including defmulti, defmethod, remove-method, prefer-method and usage of these in a hierarchy that updates in a way interleaved with calls. &lt;/p&gt;</comment>
                    <comment id="28812" author="santiago" created="Fri, 15 Jun 2012 06:38:27 -0500"  >&lt;p&gt;I created a really, really simple benchmark to make sure this was an improvement. The following tests were on a quad-core hyper-threaded 2012 MBP. &lt;/p&gt;

&lt;p&gt;With two threads contending for a simple multimethod: &lt;br/&gt;
The lock-based multifns run at an average of 606ms, with about 12% user, 15% system CPU at around 150%. &lt;br/&gt;
The lockless multifns run at an average of 159ms, with about 25% user, 3% system CPU at around 195%.&lt;/p&gt;

&lt;p&gt;With four threads contending for a simple multimethod:&lt;br/&gt;
The lock-based multifns run at an average of 1.2s, with about 12% user, 15% system, CPU at around 150%.&lt;br/&gt;
The lockless multifns run at an average of 219ms, with about 50% user, 4% system, CPU at around 330%.&lt;/p&gt;

&lt;p&gt;You can get the code at &lt;a href=&quot;https://github.com/davidsantiago/multifn-perf&quot;&gt;https://github.com/davidsantiago/multifn-perf&lt;/a&gt; &lt;/p&gt;</comment>
                    <comment id="29159" author="santiago" created="Tue, 14 Aug 2012 22:02:00 -0500"  >&lt;p&gt;It&apos;s been a couple of months, and so I just wanted to check in and see if there was anything else needed to move this along. &lt;/p&gt;

&lt;p&gt;Also, Alan Malloy pointed out to me that my benchmarks above did not mention single-threaded performance. I actually wrote this into the tests above, but I neglected to report them at the time. Here are the results on the same machine as above (multithreaded versions are basically the same as the previous comment). &lt;/p&gt;

&lt;p&gt;With a single thread performing the same work:&lt;br/&gt;
The lock-based multifns run at an average of 142ms. &lt;br/&gt;
The lockless multifns run at an average of 115ms. &lt;/p&gt;

&lt;p&gt;So the lockless multimethods are still faster even in a single-threaded case, although the speedup is more modest compared to the speedups in the multithreaded cases above. This is not surprising, but it is good to know.&lt;/p&gt;</comment>
                    <comment id="29213" author="stuart.sierra" created="Fri, 17 Aug 2012 14:58:06 -0500"  >&lt;p&gt;Screened. The approach is sound. &lt;/p&gt;

&lt;p&gt;I can confirm similar performance measurements using David Santiago&apos;s benchmark, compared with Clojure 1.5 master as of commit f5f4faf.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Mean runtime (ms) of a multimethod when called repeatedly from N threads:

|            | N=1 | N=2 | N=4 |
|------------+-----+-----+-----|
| 1.5 master |  80 | 302 | 765 |
| lockless   |  63 |  88 | 125 |&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;My only concern is that the extra allocations of the &lt;tt&gt;State&lt;/tt&gt; class will create more garbage, but this is probably not significant if we are already using persistent maps. It would be interesting to compare this implementation with one using thread-safe mutable data structures (e.g. ConcurrentHashMap) for the cache.&lt;/p&gt;</comment>
                    <comment id="29216" author="santiago" created="Fri, 17 Aug 2012 19:05:54 -0500"  >&lt;p&gt;I think your assessment that it&apos;s not significant compared to the current implementation using persistent maps is correct. Regarding the extra garbage, note that the new State is only created when the hierarchy has changed or there&apos;s a cache miss (related, obviously)... situations where you&apos;re already screwed. Then it won&apos;t have to happen again for the same method (until another change to the multimethod). So for most code, it won&apos;t happen very often. &lt;/p&gt;

&lt;p&gt;ConcurrentHashMap might be faster, it&apos;d be interesting to see. My instinct is to keep it as close to being &quot;made out of Clojure&quot; as possible. In fact, it&apos;s hard to see why this couldn&apos;t be rewritten in Clojure itself some day, as I believe Chas Emerick has suggested. Also, I would point out that two of the three maps are used from the Clojure side in core.clj. I assume they would be happier if they were persistent maps. &lt;/p&gt;

&lt;p&gt;Funny story: I was going to point out the parts of the code that were called from the clojure side just now, and alarmingly cannot find two of the functions. I think I must have misplaced them while rewriting the state into an immutable object. Going to attach a new patch with the fix and some tests for it in a few minutes.&lt;/p&gt;</comment>
                    <comment id="29218" author="santiago" created="Fri, 17 Aug 2012 19:44:54 -0500"  >&lt;p&gt;Latest patch for this issue. Supersedes issue988-lockless-multifn+tests.diff as of 08/17/2012.&lt;/p&gt;</comment>
                    <comment id="29219" author="santiago" created="Fri, 17 Aug 2012 19:49:13 -0500"  >&lt;p&gt;As promised, I reimplemented those two functions. I also added more multimethod tests to the test suite. The new tests should definitely prevent a similar mistake. While I was at it, I went through core.clj and found all the multimethod API functions I could and ensured that there were at least some basic functionality tests for all of them. The ones I found were: defmulti, defmethod, remove-all-methods, remove-method, prefer-method, methods, get-method, prefers (Some of those already had tests from the earlier version of the patch). &lt;/p&gt;

&lt;p&gt;Really sorry about catching this right after you vetted the patch. 12771 test assertions were apparently not affected by prefers and methods ceasing to function, but now there are 12780 to help prevent a similar error. Since you just went through it, I&apos;m leaving the older version of the patch up so you can easily see the difference to what I&apos;ve added. &lt;/p&gt;</comment>
                    <comment id="29448" author="richhickey" created="Sat, 15 Sep 2012 09:05:46 -0500"  >&lt;p&gt;&lt;a href=&quot;https://github.com/clojure/clojure/commit/83ebf814d5d6663c49c1b2d0d076b57638bff673&quot;&gt;https://github.com/clojure/clojure/commit/83ebf814d5d6663c49c1b2d0d076b57638bff673&lt;/a&gt; should fix these issues. The patch here was too much of a change to properly vet.&lt;/p&gt;

&lt;p&gt;If you could though, I&apos;d appreciate a patch with just the multimethod tests.&lt;/p&gt;</comment>
                    <comment id="29449" author="jafingerhut" created="Sat, 15 Sep 2012 10:59:01 -0500"  >&lt;p&gt;Patch clj-988-tests-only-patch-v1.txt dated Sep 15 2012 is a subset of David Santiago&apos;s &lt;br/&gt;
patch issue988-lockless-multifn+tests-120817.diff dated Aug 17 2012.  It includes only the tests from that patch.  Applies cleanly and passes tests with latest master after Rich&apos;s read/write lock change for multimethods was committed.&lt;/p&gt;</comment>
                    <comment id="29463" author="richhickey" created="Mon, 17 Sep 2012 09:20:43 -0500"  >&lt;p&gt;tests-only patch ok&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11498" name="clj-988-tests-only-patch-v1.txt" size="3569" author="jafingerhut" created="Sat, 15 Sep 2012 10:59:01 -0500" />
                    <attachment id="11441" name="issue988-lockless-multifn+tests-120817.diff" size="15875" author="santiago" created="Fri, 17 Aug 2012 19:44:54 -0500" />
                    <attachment id="11321" name="issue988-lockless-multifn+tests.diff" size="12422" author="santiago" created="Fri, 15 Jun 2012 04:45:58 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-983] proxy-super does not restore original binding if call throws exception</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-983</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The code for proxy-call-with-super internally used by proxy-super does not handle exceptions from the call method:&lt;/p&gt;

&lt;p&gt;(defn proxy-call-with-super &lt;span class=&quot;error&quot;&gt;&amp;#91;call this meth&amp;#93;&lt;/span&gt;&lt;br/&gt;
 (let &lt;span class=&quot;error&quot;&gt;&amp;#91;m (proxy-mappings this)&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (update-proxy this (assoc m meth nil))&lt;br/&gt;
    (let &lt;span class=&quot;error&quot;&gt;&amp;#91;ret (call)&amp;#93;&lt;/span&gt;&lt;br/&gt;
      (update-proxy this m)&lt;br/&gt;
      ret)))&lt;/p&gt;

&lt;p&gt;As a result the following sequence behaves unexpectedly:&lt;br/&gt;
(def obj (proxy &lt;span class=&quot;error&quot;&gt;&amp;#91;java.lang.ClassLoader&amp;#93;&lt;/span&gt; []&lt;br/&gt;
		      (loadClass &lt;span class=&quot;error&quot;&gt;&amp;#91;cl&amp;#93;&lt;/span&gt; (println &quot;enter&quot;)&lt;br/&gt;
				 (proxy-super loadClass cl))))&lt;br/&gt;
(.loadClass obj &quot;nonexistent&quot;)&lt;br/&gt;
;; prints enter, then throws ClassNotFoundException&lt;br/&gt;
(.loadClass obj &quot;nonexistent&quot;)&lt;br/&gt;
;; does not print anything before throwing cnfe&lt;/p&gt;


&lt;p&gt;A try-finally block around the invocation would solve this particular issue.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15409">CLJ-983</key>
            <summary>proxy-super does not restore original binding if call throws exception</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="tuor713">Valentin Mahrwald</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Sat, 5 May 2012 03:36:15 -0500</created>
                <updated>Sat, 5 May 2012 09:04:26 -0500</updated>
                                    <version>Release 1.1</version>
                <version>Release 1.2</version>
                <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28392" author="tuor713" created="Sat, 5 May 2012 09:04:26 -0500"  >&lt;p&gt;Test &amp;amp; fix patch on latest Clojure github branch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11171" name="proxy_super.patch" size="1867" author="tuor713" created="Sat, 5 May 2012 09:04:26 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-971] Jar within a jar throws a runtime error</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-971</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I&apos;ve created two jar files in my multi-project Maven setup.  The first jar is the &quot;engine&quot;, and it includes the clojure jar in it.  The other jar is the &quot;application&quot;.  It includes the engine and then packages itself into a one-jar jar file.  This means we have a jar within a jar: The &quot;onejar&quot; contains the engine jar, which in turn contains that clojure jar.&lt;/p&gt;

&lt;p&gt;I then get an error in the runtime:&lt;/p&gt;

&lt;p&gt;Exception in thread &quot;main&quot; java.lang.reflect.InvocationTargetException&lt;br/&gt;
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br/&gt;
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;br/&gt;
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br/&gt;
    at java.lang.reflect.Method.invoke(Method.java:616)&lt;br/&gt;
    at com.simontuffs.onejar.Boot.run(Boot.java:340)&lt;br/&gt;
    at com.simontuffs.onejar.Boot.main(Boot.java:166)&lt;br/&gt;
Caused by: java.lang.ExceptionInInitializerError&lt;br/&gt;
    at com.ziroby.clojure.App.main(App.java:14)&lt;br/&gt;
    ... 6 more&lt;br/&gt;
Caused by: java.lang.NullPointerException&lt;br/&gt;
    at clojure.lang.RT.lastModified(RT.java:374)&lt;br/&gt;
    at clojure.lang.RT.load(RT.java:408)&lt;br/&gt;
    at clojure.lang.RT.load(RT.java:398)&lt;br/&gt;
    at clojure.lang.RT.doInit(RT.java:434)&lt;br/&gt;
    at clojure.lang.RT.&amp;lt;clinit&amp;gt;(RT.java:316)&lt;br/&gt;
... 7 more&lt;/p&gt;

&lt;p&gt;See also my Stack Overflow question on this at &lt;a href=&quot;http://stackoverflow.com/questions/7763480/making-an-executable-jar-that-evals-clojure-strings&quot;&gt;http://stackoverflow.com/questions/7763480/making-an-executable-jar-that-evals-clojure-strings&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In researching it, I&apos;ve found the problem lies in RT.lastModified, where it tries to determine last modified time by looking at the modified time on the jar file for Clojure.  But there&apos;s not actually a jar file, since it&apos;s embedded in another.&lt;/p&gt;

&lt;p&gt;I&apos;ve found that adding a null check solves the problem.  My lastModified looks like this now:&lt;/p&gt;

&lt;p&gt;static public long lastModified(URL url, String libfile) throws Exception{&lt;br/&gt;
	if(url.getProtocol().equals(&quot;jar&quot;)) {
		ZipEntry entry = ((JarURLConnection) url.openConnection()).getJarFile().getEntry(libfile);
		if (entry != null)
			return entry.getTime();
	}&lt;/p&gt;

&lt;p&gt;	return url.openConnection().getLastModified();&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;This runs successfully.&lt;/p&gt;

&lt;p&gt;If you&apos;d prefer, I can submit a patch, or commit directly.    &lt;/p&gt;
</description>
                <environment>Maven using the one-jar plugin</environment>
            <key id="15326">CLJ-971</key>
            <summary>Jar within a jar throws a runtime error</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ziroby">Ron Romero</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Tue, 10 Apr 2012 22:39:36 -0500</created>
                <updated>Tue, 10 Apr 2012 22:39:36 -0500</updated>
                                    <version>Release 1.2</version>
                <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CCACHE-21] LRU and LU caches never evict entries that came in as a seed and are never accessed</title>
                <link>http://dev.clojure.org/jira/browse/CCACHE-21</link>
                <project id="10171" key="CCACHE">core.cache</project>
                        <description>&lt;p&gt;If one initializes an LRU or LU cache with seed data and those datum are never touched, then they are never evicted.  &lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;  (def C (lru-cache-factory {:a 1, :b 2} :limit 2))
  
  (-&amp;gt; C (assoc :c 3) (assoc :d 4) (assoc :e 5))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You would expect that the cache should contain only &lt;tt&gt;:d&lt;/tt&gt; and &lt;tt&gt;:e&lt;/tt&gt;, but it instead includes &lt;tt&gt;:a&lt;/tt&gt;, &lt;tt&gt;:b&lt;/tt&gt;, &lt;tt&gt;:d&lt;/tt&gt; and &lt;tt&gt;:e&lt;/tt&gt;!  The problem is that seeds are never added to the eviction queue.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15276">CCACHE-21</key>
            <summary>LRU and LU caches never evict entries that came in as a seed and are never accessed</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="fogus">Fogus</assignee>
                                <reporter username="fogus">Fogus</reporter>
                        <labels>
                        <label>bug</label>
                        <label>cache</label>
                        <label>lru</label>
                        <label>lu</label>
                    </labels>
                <created>Wed, 14 Mar 2012 08:13:25 -0500</created>
                <updated>Wed, 14 Mar 2012 08:15:59 -0500</updated>
                    <resolved>Wed, 14 Mar 2012 08:15:17 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27943" author="fogus" created="Wed, 14 Mar 2012 08:15:17 -0500"  >&lt;p&gt;Fixed in 5751b7e8d8d2f10c87b8a79c8ed9b0324368514d&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CCACHE-1] Storing falsey value in underlying struct causes failure in get with not-found arg </title>
                <link>http://dev.clojure.org/jira/browse/CCACHE-1</link>
                <project id="10171" key="CCACHE">core.cache</project>
                        <description>&lt;p&gt;Cache &lt;tt&gt;c&lt;/tt&gt; seeded with {:a nil} and accessed via &lt;tt&gt;(get c :a 42)&lt;/tt&gt; returns &lt;tt&gt;42&lt;/tt&gt; instead of &lt;tt&gt;nil&lt;/tt&gt;.  The reason for this is that the map &lt;tt&gt;vatAt&lt;/tt&gt; delegates directly to the &lt;tt&gt;lookup&lt;/tt&gt; protocol function without a &lt;tt&gt;has?&lt;/tt&gt; guard.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15034">CCACHE-1</key>
            <summary>Storing falsey value in underlying struct causes failure in get with not-found arg </summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="fogus">Fogus</assignee>
                                <reporter username="fogus">Fogus</reporter>
                        <labels>
                        <label>associative</label>
                        <label>bug</label>
                    </labels>
                <created>Mon, 28 Nov 2011 22:04:28 -0600</created>
                <updated>Wed, 30 Nov 2011 10:57:33 -0600</updated>
                    <resolved>Wed, 30 Nov 2011 10:57:33 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27373" author="fogus" created="Wed, 30 Nov 2011 10:57:33 -0600"  >&lt;p&gt;Fixed in  &lt;a href=&quot;https://github.com/clojure/core.cache/commit/7f77aee164d59441caa56979821bae8f64affba7&quot;&gt;https://github.com/clojure/core.cache/commit/7f77aee164d59441caa56979821bae8f64affba7&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[ALGOM-4] algo.monad state-m fetch-val bug and efficiency issue</title>
                <link>http://dev.clojure.org/jira/browse/ALGOM-4</link>
                <project id="10072" key="ALGOM">algo.monads</project>
                        <description>&lt;p&gt;;; the bug&lt;/p&gt;

&lt;p&gt;(defn fetch-val&lt;br/&gt;
  &quot;Return a state-monad function that assumes the state to be a map and&lt;br/&gt;
   returns the value corresponding to the given key. The state is not modified.&quot;&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;key&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (domonad state-m&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;s (fetch-state)&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (key s))) ;; does not work for integer or string keys&lt;/p&gt;

&lt;p&gt;;; I propose replacing it with (get s key)&lt;/p&gt;

&lt;p&gt;;; the efficiency issue :&lt;br/&gt;
;;&lt;br/&gt;
;; domonad with monad parameter binds all the monad functions, &lt;br/&gt;
;; looking these up in the state-m map on each call&lt;br/&gt;
;;&lt;br/&gt;
;; solution :&lt;/p&gt;

&lt;p&gt;(defn fetch-val&lt;br/&gt;
  &quot;Return a state-monad function that assumes the state to be a map and&lt;br/&gt;
   returns the value corresponding to the given key. The state is not modified.&quot;&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;key&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;s&amp;#93;&lt;/span&gt;&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;(get s key) s&amp;#93;&lt;/span&gt;))&lt;/p&gt;


&lt;p&gt;;; - we avoid the monad map lookups&lt;br/&gt;
;; - coding style brought up to par with the rest of state-m functions&lt;/p&gt;</description>
                <environment>irrelevant</environment>
            <key id="15686">ALGOM-4</key>
            <summary>algo.monad state-m fetch-val bug and efficiency issue</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="khinsen">Konrad Hinsen</assignee>
                                <reporter username="cark">Sacha De Vos</reporter>
                        <labels>
                        <label>bug</label>
                        <label>performance</label>
                    </labels>
                <created>Sat, 8 Sep 2012 20:47:32 -0500</created>
                <updated>Sat, 8 Sep 2012 20:47:32 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>
</channel>
</rss>