<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Clojure</title><link>https://sourceforge.net/p/readable/wiki/Clojure/</link><description>Recent changes to Clojure</description><atom:link href="https://sourceforge.net/p/readable/wiki/Clojure/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 31 Oct 2014 21:35:00 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/readable/wiki/Clojure/feed" rel="self" type="application/rss+xml"/><item><title>Clojure modified by David A. Wheeler</title><link>https://sourceforge.net/p/readable/wiki/Clojure/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v8
+++ v9
@@ -25,7 +25,7 @@
 These look like the best options (if your display can handle them!):

 *   «x + 1» : Left/right-pointing double-angle quotation mark, U+AB/U+BB. These are very well-supported (e.g., they are used for French quotations and are in Latin-1), and in many cases are the easiest to enter. There is a risk of them being too similar to the comparison operators &amp;lt; and &amp;gt;, but this doesn't seem too bad.  Nested example: fact«n * «n - 1»» 
-*   ⦃x + 1⦄ : Left/Right white curly bracket, U+2983/U+2984. These are nice-looking, they are similar to {}, and yet easily distinguished from them and other characters. However, almost all fonts do *not* support them.  Nested example: fact⦃n * ⦃n - 1⦄⦄
+*   ⦃x + 1⦄ : Left/Right white curly bracket, U+2983/U+2984. These are nice-looking, they are similar to {}, and yet easily distinguished from them and other characters. However, most fonts do *not* support them.  Nested example: fact⦃n * ⦃n - 1⦄⦄

 Alternatives:

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David A. Wheeler</dc:creator><pubDate>Fri, 31 Oct 2014 21:35:00 -0000</pubDate><guid>https://sourceforge.net37ef861d3a34b29729ddbf3a0570439e88d5eb11</guid></item><item><title>Clojure modified by David A. Wheeler</title><link>https://sourceforge.net/p/readable/wiki/Clojure/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -56,3 +56,5 @@
 There is a macro implementation of infix for Clojure here: https://github.com/tristan/clojure-infix  - like all macro solutions, it doesn't work well when defining macros themselves.  The disclaimer is damning: "I have updated the code so it runs on clojure 1.6 using leiningen to start the repl, but as I've not worked on this or even clojure since v1.1, I cannot guarantee the code makes any sense in the clojure 1.6 world, nor provide any support for it."

 Unfortunately, the Clojure BDFL Rich Hickey appears to be hostile to the idea of support infix, even though people want it: https://groups.google.com/forum/#!topic/clojure/2rMAejsJYZ4
+
+One approach might be to propose adding just basic curly-infix, and if that's not accepted, don't even bother with higher levels.  It's not clear what to do with mixed operations due to its scoping rules; it might be best to error out for now, and get something working.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David A. Wheeler</dc:creator><pubDate>Fri, 31 Oct 2014 21:34:18 -0000</pubDate><guid>https://sourceforge.netea40027e61cf7ed4bf60c6219e4abc56a52c2c07</guid></item><item><title>Clojure modified by David A. Wheeler</title><link>https://sourceforge.net/p/readable/wiki/Clojure/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -24,8 +24,8 @@

 These look like the best options (if your display can handle them!):

-*   «x + 1» : Left/right-pointing double-angle quotation mark, U+AB/U+BB. These are very well-supported (e.g., they are used for French quotations and are in Latin-1), and in many cases are the easiest to enter. There is a risk of them being too similar to the comparison operators &amp;lt; and &amp;gt;, but this doesn't seem too bad.
-*   ⦃x + 1⦄ : Left/Right white curly bracket, U+2983/U+2984. These are nice-looking, they are similar to {}, and yet easily distinguished from them and other characters. However, almost all fonts do *not* support them.
+*   «x + 1» : Left/right-pointing double-angle quotation mark, U+AB/U+BB. These are very well-supported (e.g., they are used for French quotations and are in Latin-1), and in many cases are the easiest to enter. There is a risk of them being too similar to the comparison operators &amp;lt; and &amp;gt;, but this doesn't seem too bad.  Nested example: fact«n * «n - 1»» 
+*   ⦃x + 1⦄ : Left/Right white curly bracket, U+2983/U+2984. These are nice-looking, they are similar to {}, and yet easily distinguished from them and other characters. However, almost all fonts do *not* support them.  Nested example: fact⦃n * ⦃n - 1⦄⦄

 Alternatives:

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David A. Wheeler</dc:creator><pubDate>Fri, 31 Oct 2014 21:32:55 -0000</pubDate><guid>https://sourceforge.net07f61fd4727d7d38c6fedb88c634e02109c33c8d</guid></item><item><title>Clojure modified by David A. Wheeler</title><link>https://sourceforge.net/p/readable/wiki/Clojure/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -24,7 +24,7 @@

 These look like the best options (if your display can handle them!):

-*   «x + 1» : Left/right-pointing double-angle quotation mark, U+AB/U+BB. These are very well-supported (e.g., they are used for French quotations and are in Latin-1), and in many cases are the easiest to enter. However, do they too similar to the comparison operators &amp;lt; and &amp;gt;?
+*   «x + 1» : Left/right-pointing double-angle quotation mark, U+AB/U+BB. These are very well-supported (e.g., they are used for French quotations and are in Latin-1), and in many cases are the easiest to enter. There is a risk of them being too similar to the comparison operators &amp;lt; and &amp;gt;, but this doesn't seem too bad.
 *   ⦃x + 1⦄ : Left/Right white curly bracket, U+2983/U+2984. These are nice-looking, they are similar to {}, and yet easily distinguished from them and other characters. However, almost all fonts do *not* support them.

 Alternatives:
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David A. Wheeler</dc:creator><pubDate>Fri, 31 Oct 2014 21:30:53 -0000</pubDate><guid>https://sourceforge.net1365c7529b35bee12abb1a78f558b716152b8141</guid></item><item><title>Clojure modified by David A. Wheeler</title><link>https://sourceforge.net/p/readable/wiki/Clojure/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -1,7 +1,11 @@
+This page discusses some of the issues specific to Clojure.
+
 Infix pairing characters in Clojure
 ===================================

-Clojure already uses (), [], {}, #{}, #(), and &amp;lt;&amp;gt;.  Thus the options for a reader infix notation are #[] or a non-ASCII unicode pair.
+Clojure already uses (), [], {}, #{}, #(), and &amp;lt;&amp;gt;.  It would be possible to use {}, but this would be backwards-incompatible with existing Clojure code.
+
+Thus the more-likely options for a reader infix notation are #[] or a non-ASCII unicode pair.

 However, using non-ASCII characters might be relatively easy for them to support. Clojure normally loads source files in a way that forces them to be interpreted as UTF-8, which makes supporting Unicode much easier.  In particular, source file src/jvm/clojure/lang/Compiler.java routine "loadFile" has returns loading from "new InputStreamReader(f, RT.UTF8)". It's possible to do indirect loading where additional magic is necessary to force configuration of the encoding, as discussed here:
 https://stackoverflow.com/questions/1431008/enabling-utf-8-encoding-for-clojure-source-files
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David A. Wheeler</dc:creator><pubDate>Fri, 31 Oct 2014 21:29:49 -0000</pubDate><guid>https://sourceforge.netba274c04d95e0ccd4d04ac8d2a785029503f0cdc</guid></item><item><title>Clojure modified by David A. Wheeler</title><link>https://sourceforge.net/p/readable/wiki/Clojure/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -1,5 +1,5 @@
-
-=== Infix pairing characters in Clojure ===
+Infix pairing characters in Clojure
+===================================

 Clojure already uses (), [], {}, #{}, #(), and &amp;lt;&amp;gt;.  Thus the options for a reader infix notation are #[] or a non-ASCII unicode pair.

@@ -32,7 +32,22 @@
 *   《x + 1》 : Left/right double angle bracket, U+300a/U+300b. Chinese, so they are "full width" (and thus space odd with western letters).

-=== Other issues ===
+Unicode Input
+=============
+
+Using Unicode characters requires some input method.  A description of Unicode input is at: https://en.wikipedia.org/wiki/Unicode_input
+
+The following are for Windows, which in some ways is the hardest.
+
+On Windows many applications have application-specific mechanisms. Windows programs that use the RichEdit control (like WordPad) let you enter the hex digits followed by alt-x. So "a" "b" "alt-x" will create U+AB. Emacs and vim have other mechanisms.
+
+You can also hold down ALT, and while holding it down, type 0 followed by the DECIMAL value and release on the numeric keypad. This depends on the input language. So "Hold-ALT 0 1 7 1 Release-ALT" inserts the left, and "Hold-ALT 0 1 8 7 Release-ALT" inserts the right.  This works on laptops without numeric keypaids, just use the Fn key.
+
+The most general solution in Windows is to first set the registry key HKEY_CURRENT_USER\Control Panel\Input Method EnableHexNumpad string type (REG_SZ) to 1. Then reboot. Then you can type "ALT + hex-of-Unicode release-ALT" (only the + on the numeric keypad works). This also works on laptops without a numeric keypad too, just use the Fn key. That really should be the default; it's much faster and simpler.
+
+
+Other issues
+============

 There is a macro implementation of infix for Clojure here: https://github.com/tristan/clojure-infix  - like all macro solutions, it doesn't work well when defining macros themselves.  The disclaimer is damning: "I have updated the code so it runs on clojure 1.6 using leiningen to start the repl, but as I've not worked on this or even clojure since v1.1, I cannot guarantee the code makes any sense in the clojure 1.6 world, nor provide any support for it."

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David A. Wheeler</dc:creator><pubDate>Fri, 31 Oct 2014 21:27:42 -0000</pubDate><guid>https://sourceforge.net3736e11f2d926f63a37ecbb27a5a1e0794a1fa9c</guid></item><item><title>Clojure modified by David A. Wheeler</title><link>https://sourceforge.net/p/readable/wiki/Clojure/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -1,4 +1,38 @@
-Clojure already uses (), [], {}, #{}, and #().  Thus the options for infix notation are #[] or a non-ASCII unicode pair.
+
+=== Infix pairing characters in Clojure ===
+
+Clojure already uses (), [], {}, #{}, #(), and &amp;lt;&amp;gt;.  Thus the options for a reader infix notation are #[] or a non-ASCII unicode pair.
+
+However, using non-ASCII characters might be relatively easy for them to support. Clojure normally loads source files in a way that forces them to be interpreted as UTF-8, which makes supporting Unicode much easier.  In particular, source file src/jvm/clojure/lang/Compiler.java routine "loadFile" has returns loading from "new InputStreamReader(f, RT.UTF8)". It's possible to do indirect loading where additional magic is necessary to force configuration of the encoding, as discussed here:
+https://stackoverflow.com/questions/1431008/enabling-utf-8-encoding-for-clojure-source-files
+On non-Windows systems this should be enough.  Many Windows tools unfortunately assume that the system is using a non-standard local convention (like Windows-1252).  However, users can insert the UTF-8 BOM at the beginning of most such files, forcing them to be correctly interpreted (hex 0xEF 0xBB 0xBF); while Unicode says this should NOT be necessary, it can be used in many cases to deal with Windows' brokenness.  Wheeler has confirmed that vim quietly retains the UTF-8 BOM, and presumably most other tools do too.
+
+Second, if so, what Unicode pair would serve best? These pages presume to list pairing characters in Unicode:
+
+*   http://xahlee.info/comp/unicode_matching_brackets.html
+*   http://www.unicode.org/Public/UNIDATA/BidiBrackets.txt
+
+There are a lot of pairing characters, but there are issues with many:
+
+*   Many Chinese punctuation chars are full-width, which look odd when combined with the so-called half-width characters in Western fonts.
+*   Support for some of the mathematical characters in some fonts seems dicey. That said, it may be easier to get people to fix their fonts.
+*   Some characters are hard to distinguish from otehrs. For example, the "left/right angle bracket with dot" pair has such a tiny dot on some fonts that it would be missed.
+
+These look like the best options (if your display can handle them!):
+
+*   «x + 1» : Left/right-pointing double-angle quotation mark, U+AB/U+BB. These are very well-supported (e.g., they are used for French quotations and are in Latin-1), and in many cases are the easiest to enter. However, do they too similar to the comparison operators &amp;lt; and &amp;gt;?
+*   ⦃x + 1⦄ : Left/Right white curly bracket, U+2983/U+2984. These are nice-looking, they are similar to {}, and yet easily distinguished from them and other characters. However, almost all fonts do *not* support them.
+
+Alternatives:
+
+*   ⟪x + 1⟫ : Mathematical left/right double angle bracket, U+27EA/U+27EB. Look good, but may not be universally supported in fonts.
+*   ⟦x + 1⟧ : Mathematical left/right square bracket, U+27e6/U+27e7. Look good, but may not be universally supported in fonts.
+*   ⦑x + 1⦒ : Left/Right angle bracket with dot. U+2992/U+2993. Not universally supported in fonts. The dot is hard to see, so this is probably a bad choice.
+*   【x + 1】: Left/right black lenticular bracket, U+3010/U+3011. Chinese, so they are "full width" (and thus space odd with western letters).
+*   《x + 1》 : Left/right double angle bracket, U+300a/U+300b. Chinese, so they are "full width" (and thus space odd with western letters).
+
+
+=== Other issues ===

 There is a macro implementation of infix for Clojure here: https://github.com/tristan/clojure-infix  - like all macro solutions, it doesn't work well when defining macros themselves.  The disclaimer is damning: "I have updated the code so it runs on clojure 1.6 using leiningen to start the repl, but as I've not worked on this or even clojure since v1.1, I cannot guarantee the code makes any sense in the clojure 1.6 world, nor provide any support for it."

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David A. Wheeler</dc:creator><pubDate>Fri, 31 Oct 2014 21:23:15 -0000</pubDate><guid>https://sourceforge.net13371431d01ec3ac4f8fbceec6f6c62d2d4ac689</guid></item><item><title>Clojure modified by David A. Wheeler</title><link>https://sourceforge.net/p/readable/wiki/Clojure/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,6 +1,5 @@
 Clojure already uses (), [], {}, #{}, and #().  Thus the options for infix notation are #[] or a non-ASCII unicode pair.

-There is a macro implementation of infix for Clojure here: https://github.com/tristan/clojure-infix  - like all macro solutions, it doesn't work well when defining macros themselves.  This is updated for Clojure 1.6, but poorly tested; the author admits he has abandoned Clojure after version 1.1.
-
+There is a macro implementation of infix for Clojure here: https://github.com/tristan/clojure-infix  - like all macro solutions, it doesn't work well when defining macros themselves.  The disclaimer is damning: "I have updated the code so it runs on clojure 1.6 using leiningen to start the repl, but as I've not worked on this or even clojure since v1.1, I cannot guarantee the code makes any sense in the clojure 1.6 world, nor provide any support for it."

 Unfortunately, the Clojure BDFL Rich Hickey appears to be hostile to the idea of support infix, even though people want it: https://groups.google.com/forum/#!topic/clojure/2rMAejsJYZ4
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David A. Wheeler</dc:creator><pubDate>Fri, 31 Oct 2014 21:09:06 -0000</pubDate><guid>https://sourceforge.net79a9511cb5e5042cc11284f6daf9a0ab6ab7701f</guid></item><item><title>Clojure modified by David A. Wheeler</title><link>https://sourceforge.net/p/readable/wiki/Clojure/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Clojure already uses (), [], {}, #{}, and #().  Thus the options for infix notation are #[] or a non-ASCII unicode pair.&lt;/p&gt;
&lt;p&gt;There is a macro implementation of infix for Clojure here: &lt;a href="https://github.com/tristan/clojure-infix" rel="nofollow"&gt;https://github.com/tristan/clojure-infix&lt;/a&gt;  - like all macro solutions, it doesn't work well when defining macros themselves.  This is updated for Clojure 1.6, but poorly tested; the author admits he has abandoned Clojure after version 1.1.&lt;/p&gt;
&lt;p&gt;Unfortunately, the Clojure BDFL Rich Hickey appears to be hostile to the idea of support infix, even though people want it: &lt;a href="https://groups.google.com/forum/#!topic/clojure/2rMAejsJYZ4" rel="nofollow"&gt;https://groups.google.com/forum/#!topic/clojure/2rMAejsJYZ4&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David A. Wheeler</dc:creator><pubDate>Fri, 31 Oct 2014 21:07:42 -0000</pubDate><guid>https://sourceforge.net75ed3d07f6e2289550f5307550f36cf5e3ab7260</guid></item></channel></rss>