Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.

Re: Apocalypse 12

by jonadab (Parson)
on Apr 16, 2004 at 20:30 UTC ( [id://345855]=note: print w/replies, xml ) Need Help??

in reply to Apocalypse 12

Very cool, thanks for the heads up. I guess I know what I'm going to be doing tonight :-)

update: Ack!...

class Dog is Mammal; has Limb @.paws; method walk () { .paws».move() }

Umm, I have some questions here...

  1. What on earth is that character? A "right-pointing double angle quotation mark", eh? Wow, that's a mouthful... and here I was thinking weird non-ASCII quotation marks were a Microsoft Word foible.
  2. How do we pronounce it? update: still looking for an answer to this question
  3. Why is there a character in the basic syntax of the core language that can't be typed on a standard-issue us-ascii keyboard? What am I missing here?
  4. How are we supposed to type it? Can we just type >> and have it work, or are we going to have to find a way to insert that character? (I know, in Emacs I can bind a key combination to it, but what about posting code on web fora, usenet, and so forth?)update: A12 does answer this, just not until page 19.
  5. How are we supposed to do stuff with code containing this character, such as copy and paste it between applications, store it in files, and so on?. Oddly, this stuff seems to work for me using Emacs 21 on Mandrake 9.2, even storing on a FAT32 filesystem. I'm still a little concerned about cross-platform support for this, though.
  6. Am I overreacting? Can someone reassure me about this and explain how it's okay? I guess it's not _so_ bad, considering we can just type >>

The only keyboard I've seen where I can type the non-ASCII character in question is the DEC keyboard used with the VT510, which has a Compose key. On that keyboard, I can construct the character by typing compose then > then > -- but that's three strokes, which makes it at least as bad as a trigraph operator, and in any case the VMS system in question doesn't have Perl installed (or much else). I can use copy and paste from A12 into Emacs and thus bind a key to insert the character when I'm working in Emacs, but I won't be able to easily use it in other situations, e.g., when I'm discussing it on Perlmonks using Mozilla. This is ultimately a minor annoyance, since parallel dispatch isn't something I anticipate using very often (update umm, but some of the other uses are more important), but nevertheless I reserve the right to not like it. IfSince it turns out that >> will work, I'll be much happier doing it that way.

On a side note, Page 19 says...

But there is, of course, a hyper version [of the identity operator]: @a »=:=« @b

Yeesh. Typed on a standard keyboard, that's a heptagraph operator. Wow. I thought the Perl-is-line-noise people were annoying NOW. Wait till they get a load of this!

;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print

Replies are listed 'Best First'.
Re: Re: Apocalypse 12
by hardburn (Abbot) on Apr 19, 2004 at 13:14 UTC

    Look at Apocalypse 3. There's just not enough characters in the ASCII set for all the operators people want to use. IIRC, '>>' will work.

    : () { :|:& };:

    Note: All code is untested, unless otherwise stated

Re: Re: Apocalypse 12
by TwistedGreen (Sexton) on Apr 22, 2004 at 12:10 UTC
    It is an ASCII character, so there should be no problems with cross-platform compatibility. It's the "right-pointing double angle quotation mark," character code 0xBB. Which means type 0187 on your numeric keypad while holding ALT.

    » » » » »

    640k is enough for anybody.
      There are only 128 ASCII characters, of which the first 32 and the last one are non-printable. The ASCII characters range from chr 0x00 to chr 0x7F. That does not include chr 0xBB. A right pointed double angle quotation mark, on code point 0xBB is included in the ISO 8859-1 font set (and possibly other ISO 8859-x font sets), but as such, there are cross-platform compatibility issues.

      Heck, there are even cross-platform compatibility issues if you stick to ASCII. Not all the world is ASCII.


        Heck, there are even cross-platform compatibility issues if you stick to ASCII. Not all the world is ASCII.

        Enough of the computer world supports ASCII that it's reasonable to use any printable character from the ASCII set. Platforms that don't use ASCII natively should have translation utilities for it by now, surely. Now, if you write code that changes case by adding and subtracting or similar schenanighans, then of course that's another matter, but just using a printable ASCII character is a fairly portable thing. (By "printable", I mean from decimal 32 up through decimal 126. The control characters are more likely causes of trouble.)

        ;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print
      It is an ASCII character


      It definitely isn't an ASCII character. ASCII is only seven bits wide, and never included none o'them wierd "foreign" characters :-).

      You will however find it in ISO 8859 (aka ISO Latin 1).


        ASCII isn't necessarely 7 bits wide. There are 128 different characters, so you could encode them using just 7 bits. But that's pretty unusual, especially nowadays, given that bytes are typically 8 bits wide. Common ways of encoding ASCII characters use bytes, with either the high bit being 0, or by using one of the bits as a parity bit - to be able to do some error detection.

        Also, ISO 8859 is a class of character sets, all supersets of ASCII, having the code points 0x80 - 0x9F undefined and the highest code point being 0xFF. But there are various mappings of the code points 0xA0 - 0XFF to characters; one of those mappings (for Western European languages) being ISO 8859-1, and only that one is known as ISO Latin-1. It's in many countries that used ISO 8859-1 superceeded by ISO 8859-15, which includes a € sign. But there are other mappings part of ISO 8859 as well.


        Well, it is included in the extended ASCII table, though I don't know what that means internationally. The 'A' in ASCII does mean American, after all.

        640k is enough for anybody.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://345855]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-05-26 12:57 GMT
Find Nodes?
    Voting Booth?

    No recent polls found