Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
On a related note, what's a good editor

Well, of course emacs and vi! ;-)

for typing weird unicode characters that perl6 likes, such as double angle brackets ?

Probably the same as you use now. The double angle brackets are part of ISO-8859-1 and its supersets ISO-8859-15, and Windows-1252 (at positions 0xAB and 0xBB), ISO-8859-9 (at the same positions), ISO-8859-13 (also at 0xAB and 0xBB), and ISO-8859-16 (again at the same positions). Mac Roman has them at 0xC7 and 0xC8.

It's not so much an editor problem, but a keyboard layout problem.

The commonly used keyboard layouts don't even have mappings for all symbols in the ISO-8859-x series. Keyboard layouts were designed for people writing texts in one or a few local languages, on mechanical typewriters. Computer keyboards have largely copied those layouts. See https://en.wikipedia.org/wiki/Keyboard_layout for the big picture, and the keyboard layouts shown in https://de.wikipedia.org/wiki/Tastaturbelegung for a lot of European layouts.

Look at the classic US layout. It is good for ASCII, but nothing more. The UK layout has some french accented characters due to the french influences in old times. The extended variant adds some more.

The standard German layout used in Germany and Austria has umlauts (), the sharp s (), and dead keys for writing French and some other accented languages. But it lacks a key kombination for and , also used in French. There are two extended variants (T2 and T3) that are rarely used and practically not available printed or engraved in key caps. T2 is suitable for all latin-based official languages of europe, T3 adds support for minority languages.

Guess which layout is used in Switzerland. Right, they have their own layout, optimized for typing German, French, Italian and Romansh on a single keyboard. And you won't find the sharp s () on that keyboard, because Swiss german does not use it.

Hop through a few more layouts (QWERTZ, AZERTY, QWERTY) and you will see a mess of mappings. Layouts for a larger set of language, e.g. US-International are available, and even actually used (e.g. in the Netherlands). BTW: The US-International keyboard allows typing the double angle brackets.

But 10 Fingers and "only" about 100 keys make it hard to enter all of Unicode. Unicode currently (v10.0) has 139 scripts using 136755 characters, and there is still room for more. So even in future, keyboard layouts will suck if you need to type "exotic" characters. Perhaps even more than today.

People keep inventing new keyboard layouts, optimized for something, making them hardly useable for something else. There is no best keyboard layout for everything, like there is no best editor for everything.

Many people prefer coding using the US or the US-International keyboard, simply because most popular programming languages were designed to use the US keyboard.


There is a solution from the early days of C, using trigraphs instead of characters not available on all platforms and keyboards: http://codingfox.com/4-5-trigraph-characters-in-c-language/

Trigraph SequenceEqual character
??=#
??([
??)]
??/\
??<{
??>}
??!|
??^
??-~

This makes hello world look a little bit funny, but it is still readable:

??=include<stdio.h> int main() ??< printf("Hello??/nWorld"); return 0; ??>
#include<stdio.h> int main() { printf("Hello\nWorld"); return 0; }

I would expect that Perl6 has a similar feature to express "uncommon" Unicode characters by using replacement ASCII sequences. And of course, a little bit of searching ends at Unicode versus ASCII symbols.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^3: Small Perl 6 discoveries IV, hash access by afoken
in thread [Perl6] Perl 6 discoveries IV, hash access by holli

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (9)
    As of 2018-06-24 17:44 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?



      Results (126 votes). Check out past polls.

      Notices?