Unicode Operators cheatsheet, please!

2005-05-27 Thread Rob Kinyon
I would love to see a document (one per editor) that describes the
Unicode characters in use and how to make them. The Set implementation
in Pugs uses (at last count) 20 different Unicode characters as
operators.

While I'm sure these documents exist on the web somewhere, since P6 is
the first time most of us will be using these operators, it'd be nice
if P6 provided a nice cheatsheet for them.

Thanks,
Rob


Re: Unicode Operators cheatsheet, please!

2005-05-27 Thread Gaal Yahas
On Fri, May 27, 2005 at 10:29:39AM -0400, Rob Kinyon wrote:
> I would love to see a document (one per editor) that describes the
> Unicode characters in use and how to make them. The Set implementation
> in Pugs uses (at last count) 20 different Unicode characters as
> operators.

Good idea. A modest start is at docs/quickref/unicode .

-- 
Gaal Yahas <[EMAIL PROTECTED]>
http://gaal.livejournal.com/


Re: Unicode Operators cheatsheet, please!

2005-05-31 Thread Sam Vilain

Rob Kinyon wrote:

I would love to see a document (one per editor) that describes the
Unicode characters in use and how to make them. The Set implementation
in Pugs uses (at last count) 20 different Unicode characters as
operators.


I have updated the unicode quickref, and started a Perlmonks discussion node
for this to be explored - see http://www.perlmonks.org/index.pl?node_id=462246

Sam.


Re: Unicode Operators cheatsheet, please!

2005-06-01 Thread Rob Kinyon
xOn 5/31/05, Sam Vilain <[EMAIL PROTECTED]> wrote:
> Rob Kinyon wrote:
> > I would love to see a document (one per editor) that describes the
> > Unicode characters in use and how to make them. The Set implementation
> > in Pugs uses (at last count) 20 different Unicode characters as
> > operators.
> 
> I have updated the unicode quickref, and started a Perlmonks discussion node
> for this to be explored - see http://www.perlmonks.org/index.pl?node_id=462246

As I replied on Perlmonks, it would be more helpful if the Compose
keys were listed and not just the ASCII versions. Plus, a quick primer
on how to enable Unicode in your favorite editor. I don't know about
Emacs, but the Vim documentation on multibyte is difficult to work
with, at best.

Thanks,
Rob


[Patch] Re: Unicode Operators cheatsheet, please!

2005-06-02 Thread Kevin Puetz
Rob Kinyon wrote:

> xOn 5/31/05, Sam Vilain <[EMAIL PROTECTED]> wrote:
>> Rob Kinyon wrote:
>> > I would love to see a document (one per editor) that describes the
>> > Unicode characters in use and how to make them. The Set implementation
>> > in Pugs uses (at last count) 20 different Unicode characters as
>> > operators.
>> 
>> I have updated the unicode quickref, and started a Perlmonks discussion
>> node for this to be explored - see
>> http://www.perlmonks.org/index.pl?node_id=462246
> 
> As I replied on Perlmonks, it would be more helpful if the Compose
> keys were listed and not just the ASCII versions. Plus, a quick primer
> on how to enable Unicode in your favorite editor. I don't know about
> Emacs, but the Vim documentation on multibyte is difficult to work
> with, at best.

Well, :help digraph isn't particularly bad, though the included table only
covers latin-1. The canonical source is RFC1345. But I've attached a patch
for the set symbols that have them.

> Thanks,
> Rob
Index: docs/quickref/unicode
===
--- docs/quickref/unicode	(revision 4305)
+++ docs/quickref/unicode	(working copy)
@@ -21,6 +21,10 @@
 Note that the compose combinations here are an X11R6 standard, and do not
 necessarily correspond to the compose combinations available when you use your
 "compose" key.
+
+The digraphs used in vim come from "Character Mnemonics & Character Sets",
+RFC1345 (http://www.ietf.org/rfc/rfc1345.txt). After doing :set digraph,
+the digraph ^k A B may also be entered as A  B.
 
 Unicode ASCIIkey sequence
 charfallbackVimEmacs   Unix Compose Key combination
@@ -30,22 +34,22 @@
 ¥   Y   ^k Y e C-x 8 Y Compose Y =
 
 Set.pm operators (included for reference):
-≠   !=
-∩   *
-∪   +
+≠   !=  ^k ! =
+∩   *   ^k ( U
+∪   +   ^k ) U
 ∖   -
-⊂   <
-⊃   >
-⊆   <=
-⊇   >=
-⊄  !( $a < $b ) 
+⊂   <   ^k ( C
+⊃   >   ^k ) C
+⊆   <=  ^k ( _
+⊇   >=  ^k ) _
+⊄  !( $a < $b ) 
 ⊅  !( $a > $b )
 ⊈ !( $a <= $b )
 ⊉ !( $a >= $b )
-⊊   <
+⊊   <   
 ⊋   >
-∋/∍   $a.includes($b)
-∈/∊   $b.includes($a)
+∋/∍   $a.includes($b)   ^k ) -
+∈/∊   $b.includes($a)   ^k ( -
 ∌!$a.includes($b)
 ∉!$b.includes($a)
 
@@ -58,20 +62,20 @@
 
 So, these *might* be considered not too awful;
 
-×   *
-¬   !
+×   *   ^k * X
+¬   !   ^k N O
 ∕   /
 ≡  =:=
 ≔   :=
   ⩴ or ≝   ::=
-  ≈ or ≊~~
+  ≈ or ≊~~  ^k ? 2
 …  ...
-√  sqrt()
-∧   &&
-∨   ||
+√  sqrt()   ^k R T
+∧   &&  ^k A N
+∨   ||  ^k O R
 ∣   mod  (? bit of a stretch, perhaps)
-   ⌈$x⌉ceil($x)
-   ⌊$x⌋floor($x)
+   ⌈$x⌉ceil($x) ^k  7
+   ⌊$x⌋floor($x)^k 7  7
 
 
 However I think it is a BAD idea that the following unicode characters