Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-04 Thread Mikhail V
On 3 April 2017 at 19:55, Steve D'Aprano  wrote:

> I didn't see you calling out Rick for his prejudice against those who aren't
> American, his absurd belief that "most" people are satisfied with ASCII,

Hmm... that is interesting.
Everyone has some beliefs...
If I make a bit more on-topic question:
What is "satisfied" with ASCII, or what is
"we need Unicode", where and what for?
What is your "satisfaction" with Unicode?

For me it is a font, where images given
numbers, ok, then we need obviosly to
look at it,  e.g.  if you make a codec.

So you are just stating the fact that font files
store them in this order and a txt file in Notepad
will show them in correct order?
hmm... I just thought you have some idea,
e.g. what glyphs you adore esthetically
or find especially useful in your life.

Which of some 40 images that are needed for _you_
to represent speech and numbers, you find
IDK, appealing or annoying, or what?

In typesetting, I find annoying caps inculsion, too
little space between sentences and not so good separator
character design, some flaws in letter design.
For development purposes I would need some
glyphs for non-printable characters, ok
few glyphs more.

Tak zachem _nuzhen_ Unikod ?
Rasskazhi chto-nibud interesnoe.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-04 Thread cwrseckford
On Saturday, 1 April 2017 17:01:03 UTC+1, Steve D'Aprano  wrote:
> On Sat, 1 Apr 2017 12:17 pm, Rick Johnson wrote:
> 
> > Most people just quietly change the filename and move on
> 
> 
> There are over a billion people in China, almost a billion more in India,
> about 140 million people in Russia, nearly 130 million people in Japan, 250
> million in Indonesia, about 290 million native Arabic speakers, and even 9
> million speakers of Hebrew.
> 
> If you think that all these people, and hundreds of millions more, will
> just "quietly change the filename" to ASCII because you're too lazy,
> self-centred and arrogant to move on from 1963, then you truly are an
> example of the Ugly American.
> 

Try to get your cliches straight.  The "Ugly American" was the good guy, in 
contrast to the good-looking, smooth-talking State Department types who were 
the baddies.

But hey, experience tells us that anyone ugly must automatically be wicked, not 
so?

Will
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-03 Thread Rick Johnson
On Sunday, April 2, 2017 at 3:49:43 PM UTC-5, Gene Heskett wrote:
> On Sunday 02 April 2017 12:26:40 Steve D'Aprano wrote:
> > On Sun, 2 Apr 2017 04:41 pm, Terry Reedy wrote:
> > > On 4/1/2017 12:00 PM, Steve D'Aprano wrote:
> > > > 
> > > > example of the Ugly American.
> > > 
> > > As an American I resent your promotion and perpetuation
> > > of an ugly ethno-centric stereotype.
> >
> > I'm glad you didn't try to describe it as a *unfair* or
> > *unjustified* stereotype, because (let's face it) after
> > November 8th 2016, that simply wouldn't fly.
> 
> While I too detest that label, I will have to admit that I
> am one of the conservatives, believing our Constitution and
> Bill of Rights have been used as TP by the "establishment"
> over the last 65+ years, who enabled that surprise. 

Saying what you just said, in _this_ group at least, can
bring some nasty rebukes. And not because it is wrong, no,
but because the proggie-bots will accuse you of being (1) a
racist opining for the return of slavery, (2) a homophobic
who would throw people from rooftops, (3) a bigot, (4)
something else that is equally "bad", or (5) all of the
above.

Hopefully though, like me, you're undeterred by lies and
slander because your skin is thicker than that of the
average grape. As for me, i do not want america society to
return to 1950, no, i want to american _ideals_ to return to
July 4, 1776. And this time we would: "get it right". The
first order of business would be to re-write the
constitution in a manner that will remove the subtle
semantical errors that have caused so much trouble for these
last 200+ years. Starting with the Declaration of
Independence. 

(emphasis *MINE*!)

  "When in the course of human events, it becomes
  *NECESSARY* for one people to dissolve the political bands
  which have connected them with another, and to assume
  among the powers of the earth the *SEPARATE* and *EQUAL*
  station to which the laws of nature and of [the natural
  processes that] *ENTITLE* them, a decent respect to the
  [reputation] of [humankind] requires that they should
  declare the causes which impel them to the separation."
  
  "We hold these truths to be self-evident, that all
  [people] are created equal, that they are endowed by their
  [existence] with certain unalienable rights: that among
  these are life, liberty and the pursuit of happiness. --
  that to *SECURE* these rights, governments are instituted
  among [people], deriving their just powers from the
  *CONSENT* of the governed, -- That whenever any form of
  government becomes destructive of these ends, it is the
  *RIGHT* of the people to alter or to abolish it, and to
  institute new government, laying its foundation on such
  *PRINCIPLES* and organizing its powers in such *FORM*, as
  to them shall seem most likely to effect their safety and
  happiness."
  
  "Prudence, indeed, will dictate that governments long
  established should *NOT* be changed for _light_ and
  _transient_ causes; and accordingly, all experience hath
  shewn, that [humankind] are more disposed to suffer while
  evils are "sufferable", than to right themselves by
  abolishing the forms to which they are "accustomed". But
  when a *LNG* train of abuses and usurpations pursuing
  invariably the same [*GOALS* -- to achieve an absolute
  despotism --], it is their *RIGHT*, it is their *DUTY*, to
  throw off such government and to provide new guards for
  their future security. -- Such has been the patient
  sufferance of these [people]; and such is now the
  *NECESSITY* which constrains them to alter their former
  systems of government. The history of the present [United
  States Of America] is a history of repeated injuries and
  usurpations [-- and quite frankly, a charade of vile
  hypocrisy! --], all having in direct object the
  establishment of an absolute tyranny over these [people].
  To prove this, let facts be submitted to a candid world."

  [List of modern grievances snipped for bandwidth]
  

Simply removing all the misogynist references and
patriarchal terms is a good start. But what is important to
realize, is that, removing these mistakes does not undermine
the intent of this document, no, it merely broadens and
purifies that intent. The fact is, this document has caused
a social transformation that has reverberated around the
world.

(Rhetorically i ask...)

What _is_ "life, liberty, and the pursuit of happiness"? 

Is it merely the monotone words of a random child standing
on a random grade-school stage reenacting the events of our
forefathers for the sake of mere "cute spectacle"? Or is it
something more? -- I believe it be. -- I believe it to be
one of the most *PROFOUND* realizations of social justice
that the human mind has *EVER* conceived. A culmination of
many thousand years of trial and error, and the product of
much pain and suffering. The American Declaration Of
Independence marks an epoch in our collective human social
and intellectual evolu

Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-03 Thread Chris Angelico
On Tue, Apr 4, 2017 at 10:13 AM, Rick Johnson
 wrote:
> D'Aprano, are you still stewing because Donald J Trump
> spanked Hillary's jumbo sized bottom like an unruly
> stepchild? You poor widdle partisian hack. I almost feel
> sorry for you.
>
> [snip massively long political rant]

Alright, can the politics please be taken off list? I believe the
appropriate newsgroup for this drivel is comp.lang./dev/null.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-03 Thread Mark -

On Sunday, April 2, 2017 at 11:26:50 AM UTC-5, Steve D'Aprano wrote:


On Sun, 2 Apr 2017 04:41 pm, Terry Reedy wrote:


On 4/1/2017 12:00 PM, Steve D'Aprano wrote:


example of the Ugly American.


As an American I resent your promotion and perpetuation of an ugly
ethno-centric stereotype.


I'm glad you didn't try to describe it as a *unfair* or *unjustified*
stereotype, because (let's face it) after November 8th 2016, that
simply wouldn't fly.


D'Aprano, are you still stewing because Donald J Trump spanked




Hear hear


--
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-03 Thread Rick Johnson
On Sunday, April 2, 2017 at 11:26:50 AM UTC-5, Steve D'Aprano wrote:
> On Sun, 2 Apr 2017 04:41 pm, Terry Reedy wrote:
> > On 4/1/2017 12:00 PM, Steve D'Aprano wrote:
> > 
> > > example of the Ugly American.
> > 
> > As an American I resent your promotion and perpetuation of
> > an ugly ethno-centric stereotype.
> 
> I'm glad you didn't try to describe it as a *unfair* or
> *unjustified* stereotype, because (let's face it) after
> November 8th 2016, that simply wouldn't fly.

D'Aprano, are you still stewing because Donald J Trump
spanked Hillary's jumbo sized bottom like an unruly
stepchild? You poor widdle partisian hack. I almost feel
sorry for you.

Heck, Trump has to be the most crass and unstatesmanlike
candidate to ever run for the american presidency -- well,
certainly in my lifetime -- so it should have been the
surest win in history for Hillary (or should i say "HER-"?),
but even with the mainstream media planted firmly in her
pocket; Bill Clinton's endless charms; a grotesque
prosession of hollywood celebs, and Obama on the campaign
trail -- she folded like lawn chair! How pathetic. Not to
mention that the democratic party cheated Burnie Sanders. (i
wonder if he's "feelin' the burn"?)

Of course, in their hubris, the Dems put all their chips on
the same old tired "game of firsts" crapola, thinking the
emotional sleight of hand was enough to clinch them the
white house, but fortunately (for america), somebody at the
DNC forgot to tell the Dem leaders that america is getting
*SICK* and *TIRED* of the emotional games.

We only want two types of candidates now: (1) those who are
highly qualified non-partisans, or (2) those who will burn
the old orders to the ground! With Trump, we got the latter.
But as bad a Trump is, he's better than the "business as
usual" we get from Repuke-I-Cans and Demon-Rats.

But Steven, you're not even an american are you? Nope!
You're just another Brit with a stick jambed firmly up his
butt waddling around lecturing Americans about how terrible
we are, but have you ever stopped to consider your own
nation's horrendous history?

  TIP OF THE DAY: "Great Britain" is the imperialist empire
  previously known as "England".

Now sod-off to your local library so you can catch up on,
say, the last umpteen centuries of English tyranny and
global colonization. Oh, and, please note that people who
live in glass houses would be wise not to start a stone
throwing war. just FYI, old buddy. *wink*

> Not all Americans, perhaps not even a majority or a
> plurality, are Ugly Americans, but there are enough of them
> to screw it up for everyone else.

There are bad apples in every bunch; every nation; every
group. Stupidity and ignorance are ubiquitous traits and are
fairly evenly distributed around the globe. So enough with
America bashing already. We Americans are no more guilty of
hate and intolerance than any other nation or peoples on
this planet. Heck, we've only existed for just over 200
years, yet many polmics and media types would have the world
believe that hate and intolerance didn't exist in this
universe until July 4, 1776.

And when has _any_ reigning power in human history ever
acted in a 100% benevolent manner? Hmm? (At least, any one
that matters, that is). If we read our history books, we
would come to the conclusion that tyranny is the natural
order of our human society, and, more evidence of universal
laws in action. Therefore, only through perpetual conflict
can we keep tyranny at bay. For instance, it's not as if we
could tell ol' Henry the Eighth: "You know what Henry... you
can be a real horse's arse!" -- to which he would
"supposedly" reply -- "Indeed. I think i am. And uh, thank
you for the healthy criticism" -- NOT! It is more likely
that anyone who dared critize the king would win a free all-
expense-paid trip to the tower of London, a most horrific
place with a most notorious reputation for cruelty. But the
English had quite a knack for cruelty, eh Steven? Hmm,
remind me again, ol' boy, how many wives did King Henry the
VIII have executed for their "supposed" infidelity? Of
course, there are rumours that one of the executions did not
go as "cleanly" as planned. My observation is that the
botched nature of that execution was a feature, not a bug.
But depravity has been the SOP for centuries in "Merry ol'
England", eh chap?

> It's an ugly stereotype, not because it is a stereotype,
> but because it embodies a set of ugly attitudes and
> behaviours.

Your feeble attempts to legitimize your American bashing are
deplorable at best. For once in your life, Steven, admit
that you're filled with hate and apologize for it. If you
don't like America, fine, don't come here. Is that so
difficult for you? *WHO* we elect and *HOW* we live our
lives is none of your damned business. Personally, i don't
give a monkey's toss who your prime minister is, or what
your pompous Queen wishes to have dipped in gold and
encrusted with diamonds. Personally i think your whole
system of go

Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-03 Thread Rick Johnson
On Saturday, April 1, 2017 at 9:32:17 PM UTC-5, MRAB wrote:
> Sometimes he mentions MUDs, sometimes he mentions Pike, but at least he 
> doesn't rant.

I have not even _begun_ to rant. Yet...

-- 
https://mail.python.org/mailman/listinfo/python-list


OFF-TOPIC Bigotry on the list [was Re: Text-mode apps (Was :Who are the "spacists"?)]

2017-04-03 Thread Steve D'Aprano
On Mon, 3 Apr 2017 08:31 am, Terry Reedy wrote:

[...]
> I refrained because it would be off-topic and a diversion from my point:
> all bigotry is inappropriate here on this list, 

Indeed it is not appropriate. But calling out bigotry is not itself bigotry.

I hope you agree with that.

If not, that leaves you with some deeply Unfortunate Implications.

Suppose you are right, and merely calling out "Ranting Rick" for his bigoted
attitude makes me an anti-American bigot. Then by *you* calling *me* out
for bigotry, that makes you equally a bigot. And so the only way to avoid
being a bigot is... to do nothing in the face of bigotry.

I didn't see you calling out Rick for his prejudice against those who aren't
American, his absurd belief that "most" people are satisfied with ASCII, or
his claim that the rest of the world don't need file names in their native
languages because the "majority" (his word) of them are illiterate. Do you
think those attitudes should be left unchallenged?

(In fairness, Rick doesn't say that the *entire* rest of the world is mostly
illiterate. He only includes China, India, Russia, Japan, Indonesia,
Arab-speakers, and Israel. So a bit less than half the world.)


> including anti-Americanism.

When have I demonstrated prejudice against Americans merely for being
American?

I stand by my comment to Rick. It is *his behaviour and attitude* which
makes him an example of the stereotype, not the fact that he is an
American.

Of course all people are unique, and all stereotypes are incomplete. People
are not their stereotype, and I'm sure that Rick is a wonderful and unique
person in his own way. Perhaps he loves animals and donates his time to
working in shelters for the homeless.

But nevertheless people do behave in stereotypical ways, and we've seen Rick
do exactly that. Insensitive to cultural differences, dismissive of those
who aren't American, ignorant of everything outside of the borders of the
US, and arrogantly certain that the American way is not just the best way
but the only way. And *wilfully* so. This is not just an isolated incident
from Rick, a mere momentary lapse. He has been expressing these sorts of
attitudes for years.


> (I actually think raw bigoty is inappropriate everywhere.  While there
> are places to discuss the relative average beauty and niceness of
> various groups of people, this is not one of them.  Even comparisons of
> computer languages is not the main focus of this list.)

I'm not discussing the "relative average beauty and niceness of various
groups of people". That's absurd. I'm discussing the behaviour and
attitudes demonstrated by one specific individual.


[...]
> Yesterday, Chris Angelico, I believe it was, asked someone to stop
> including anti-Jew messages in posts here.  So I asked the same of you
> regarding your anti-American expression.

Can you really not tell the difference between criticism of an individual
American for the views he expresses, and a blanket attack on all Americans
merely for being American?



>> Not all Americans, perhaps not even a majority or a plurality, are Ugly
>> Americans, but there are enough of them to screw it up for everyone else.
> 
> Shall we discuss Ugly Australians, or whatever the appropriate epithet
> would be?

If one of them turns up and starts expressing those views, absolutely.


>> It's an ugly stereotype, not because it is a stereotype, but because it
>  > embodies a set of ugly attitudes and behaviours.
> 
> I am sure I have seen similar things written by various other people
> justifying their prejudices.

As have I. Are you judging *me* by *their* behaviour?



-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-02 Thread Terry Reedy

On 4/2/2017 12:26 PM, Steve D'Aprano wrote:

On Sun, 2 Apr 2017 04:41 pm, Terry Reedy wrote:


On 4/1/2017 12:00 PM, Steve D'Aprano wrote:


example of the Ugly American.


As an American I resent your promotion and perpetuation of an ugly
ethno-centric stereotype.


I'm glad you didn't try to describe it as a *unfair* or *unjustified*


I refrained because it would be off-topic and a diversion from my point: 
all bigotry is inappropriate here on this list, including anti-Americanism.


(I actually think raw bigoty is inappropriate everywhere.  While there 
are places to discuss the relative average beauty and niceness of 
various groups of people, this is not one of them.  Even comparisons of 
computer languages is not the main focus of this list.)



stereotype, because (let's face it) after November 8th 2016, that simply
wouldn't fly.


The 'Ugly American' meme is at least 60 years old.  National bigotry is 
as old as nations.


Yesterday, Chris Angelico, I believe it was, asked someone to stop 
including anti-Jew messages in posts here.  So I asked the same of you 
regarding your anti-American expression.



Not all Americans, perhaps not even a majority or a plurality, are Ugly
Americans, but there are enough of them to screw it up for everyone else.


Shall we discuss Ugly Australians, or whatever the appropriate epithet 
would be?



It's an ugly stereotype, not because it is a stereotype, but because it

> embodies a set of ugly attitudes and behaviours.

I am sure I have seen similar things written by various other people 
justifying their prejudices.



--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-02 Thread Gene Heskett
On Sunday 02 April 2017 12:26:40 Steve D'Aprano wrote:

> On Sun, 2 Apr 2017 04:41 pm, Terry Reedy wrote:
> > On 4/1/2017 12:00 PM, Steve D'Aprano wrote:
> >> example of the Ugly American.
> >
> > As an American I resent your promotion and perpetuation of an ugly
> > ethno-centric stereotype.
>
> I'm glad you didn't try to describe it as a *unfair* or *unjustified*
> stereotype, because (let's face it) after November 8th 2016, that
> simply wouldn't fly.

While I too detest that label, I will have to admit that I am one of the 
conservatives, believing our Constitution and Bill of Rights have been 
used as TP by the "establishment" over the last 65+ years, who enabled 
that surprise.

Wash., DC has been turned into a polluted swamp that needed drained and 
cleaned up, and the Donald was the only one that wasn't part of the same 
old, same old, bull crap establishment, and with enough money to run.

However, I'll be the first to admit I am less than impressed with his 
efforts vis-a-vis global warming. He, I suspect, will be a 1 term 
president unless he starts listening to the technical people's warnings.

I'd also make the prediction that the 2020 winner will _not_ be from the 
establishment. Maybe not even from the two party system. I am hoping 
that this will cause all (surviving) parties to do some navel gazing, 
and contemplating not how to enrich the constituent businesses they own 
under the table, but maybe, actually work for the common good. Taking 
money completely out of the equation would be one way, but you could 
hear the gored oxen that would wound fatally clear out to Pluto, without 
a radio.

Human avarice being what it is, whether I'll live long enough to see that 
happen isn't up to me. At 82, it doesn't look like near as big a chance 
as it did when I was 60.
>
> Not all Americans, perhaps not even a majority or a plurality, are
> Ugly Americans, but there are enough of them to screw it up for
> everyone else.
>
Generally, I try to stay out of the Ugly camp. Then I look in the mirror 
and know its hopeless. :(

[...]

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-02 Thread Steve D'Aprano
On Sun, 2 Apr 2017 04:41 pm, Terry Reedy wrote:

> On 4/1/2017 12:00 PM, Steve D'Aprano wrote:
> 
>> example of the Ugly American.
> 
> As an American I resent your promotion and perpetuation of an ugly
> ethno-centric stereotype.

I'm glad you didn't try to describe it as a *unfair* or *unjustified*
stereotype, because (let's face it) after November 8th 2016, that simply
wouldn't fly.

Not all Americans, perhaps not even a majority or a plurality, are Ugly
Americans, but there are enough of them to screw it up for everyone else.

It's an ugly stereotype, not because it is a stereotype, but because it
embodies a set of ugly attitudes and behaviours.



-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-02 Thread Chris Angelico
On Sun, Apr 2, 2017 at 9:12 PM, bartc  wrote:
> But people, when unrestrained, will /always/ want to do something that may
> not be practical. For example, why bother with the separate concepts
> 'filename' and 'file'; just have the file contents /as/ the filename! If
> there are no limits on how long a filename is or what characters it can
> have, then people will take advantage.
>

This is possible. It's called a "content-based file system", and it's
the basis of tools like git, for example. But it's not the entire
solution; you still need some way to tell a program which blob to
react to.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-02 Thread bartc

On 01/04/2017 22:35, Marko Rauhamaa wrote:

Chris Angelico :


there is no way within Python to have a string that can represent two
strings, which is what directory separators do.


Really? Try:

   >>> repr(("a", "b"))
   "('a', 'b')"

There! A string that represents two strings.

Note, however, that Python programs generally don't restrict themselves
to expressing objects via strings. There are even objects with no string
representation at all.

A pathname is a list of strings. Python could naturally express it as
just that:

  [ "usr", "bin", "python3" ]


I'm not really proposing any change to the status quo. What's done is
done. However, I do think it is awkward to ban one particular, very
common character while allowing all the rest.


Space is quite common as well, especially in titles of things chosen by 
non-technical users. That also needs special treatment.


There are quite a few other characters with special meanings that people 
might want to use. It's not just stroke.


But people, when unrestrained, will /always/ want to do something that 
may not be practical. For example, why bother with the separate concepts 
'filename' and 'file'; just have the file contents /as/ the filename! If 
there are no limits on how long a filename is or what characters it can 
have, then people will take advantage.


Or they will want to use the full path of one file, as the part of the 
filename of another; is each "/" a separator, or part of the embedded path?


Anyway, I'm sure out of the million unicode characters, there must be 
something that /looks/ like a stroke, but isn't a stroke. Just to add to 
the confusion.



--
bartc
--
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-02 Thread Marko Rauhamaa
Christian Gollwitzer :

> Am 01.04.17 um 19:38 schrieb Steve D'Aprano:
>> Next: convince keyboard manufacturers to move the caret from SHIFT-6
>> to a plain, unshifted key. Buggared if I'm going to hit shift every
>> time I want to use an absolute path...
>
> ...which is reality for a lot more people than you might think. On a
> German keyboard, / is Shift-7. Same for \ {} [] which require
> carpal-tunneling combinations with the right Alt key "Alt Gr".
> Especially bad are shortcutrs like Ctrl+\ which appear in some
> software.

Same with the Finnish keyboard. It's a crime against ergonomy. That's
why I have remapped my keyboard for my personal needs (languages,
programming).


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-02 Thread Christian Gollwitzer

Am 01.04.17 um 19:38 schrieb Steve D'Aprano:

^home^steve^document.txt


I'm sure I'd get used to it in a few years...

Next: convince keyboard manufacturers to move the caret from SHIFT-6 to a
plain, unshifted key. Buggared if I'm going to hit shift every time I want
to use an absolute path...


...which is reality for a lot more people than you might think. On a 
German keyboard, / is Shift-7. Same for \ {} [] which require 
carpal-tunneling combinations with the right Alt key "Alt Gr". 
Especially bad are shortcutrs like Ctrl+\ which appear in some software.


Christian

--
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-02 Thread Chris Angelico
On Sun, Apr 2, 2017 at 4:41 PM, Terry Reedy  wrote:
> On 4/1/2017 12:00 PM, Steve D'Aprano wrote:
>
>> example of the Ugly American.
>
>
> As an American I resent your promotion and perpetuation of an ugly
> ethno-centric stereotype.

There are ugly Americans and there are non-ugly Americans. Rick is a
prime example of the former.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Terry Reedy

On 4/1/2017 12:00 PM, Steve D'Aprano wrote:


example of the Ugly American.


As an American I resent your promotion and perpetuation of an ugly 
ethno-centric stereotype.


--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Steve D'Aprano
On Sun, 2 Apr 2017 12:42 pm, Rick Johnson wrote:

> On Saturday, April 1, 2017 at 9:18:14 PM UTC-5, Steve D'Aprano wrote:
> [...]
>> Even India has a literacy rate of 74%, which is not far off
>> the functional literacy rate in the US of 86%.
>>
>> http://www.huffingtonpost.com/2013/09/06/illiteracy-rate_n_3880355.html
> 
> And your source is the HuffPo? Seriously? 

No. My sources are the National Assessment of Adult Literacy, and the U.S.
Department of Education. HuffPo is just the middle man reporting the facts.

Hint: in the HuffPo article, you will see underlined phrases. These are
called "hyperlinks", or just "links", and clicking on some of them will
take you to the original source of the data.



>> The necessary encoding exists. Its called Unicode.
> 
> Great. Now let the evolutionary forces of the free market
> decide if it will live or die. Why do you feel compelled to
> intervene in this natural process?

I'm just as much a part of the "evolutionary forces of the free market" as
you. If you're allowed to complain about people using Unicode and loudly
rant about how its not necessary, I'm allowed to disagree.




-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Michael Torrie
On 04/01/2017 08:18 PM, Steve D'Aprano wrote:
>> And yet America continues to be emulated by 100% of the world.
> 
> Well, at least 100% of the world that you know of. Which isn't saying much.

I plonked RR a long time ago, but this little doozie requires a reply!
Having just traveled half way across the globe to two different
continents last month, I can say very clearly that those places do not
wish to or strive to emulate the US.  Especially lately with the
current, unprecedented level of belligerence emanating from its highest
office.  And certainly not in language... The countries I visited are
extremely proud of their languages and cultures.  Anyway, just wow.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Rick Johnson
On Saturday, April 1, 2017 at 9:18:14 PM UTC-5, Steve D'Aprano wrote:
[...]
> Even India has a literacy rate of 74%, which is not far off
> the functional literacy rate in the US of 86%.
>
> http://www.huffingtonpost.com/2013/09/06/illiteracy-rate_n_3880355.html

And your source is the HuffPo? Seriously? With that in mind,
i think i'll wander on over to the TIOBE index and gawk at
the python position for a while. Gawd knows that google
searches and spam hits are the only true test for judging
the worthiness of programming language.

> The necessary encoding exists. Its called Unicode.

Great. Now let the evolutionary forces of the free market
decide if it will live or die. Why do you feel compelled to
intervene in this natural process?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread MRAB

On 2017-04-02 02:38, Rick Johnson wrote:

On Saturday, April 1, 2017 at 3:08:20 PM UTC-5, Mikhail V wrote:

On 1 April 2017 at 06:38, Rick Johnson  wrote:
> On Thursday, March 30, 2017 at 9:14:54 AM UTC-5, Steve D'Aprano wrote:

> > - and making band names look ǨØØĻ and annoy old fuddy-
> > duddies.
>
> So now we've even included graffiti artists in our little
> "inclusivity project". My, my... we are so _not_ mean!

Lol :)  First we'll wait for Unicode version with table-
drawing character for all possible corner styles and line
weights, and monospaced legible Arabic for Chris' MUDs.


Urm, don't mention MUDs around Chris. That's like a dog
whistle to him. He could go on and on for hours yelping
about them. To be honest, between his MUD ramblings and his
incessant plugging of the Pike language, i don't know which
is worse @_@.

But we tolerate Chris.


[snip]

Sometimes he mentions MUDs, sometimes he mentions Pike, but at least he 
doesn't rant.


--
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Steve D'Aprano
On Sun, 2 Apr 2017 09:11 am, Rick Johnson wrote:

> The majority of the populations you reference are
> illiterate.

/face-palm

The majority of Chinese and Japanese are illiterate. Really?

Even India has a literacy rate of 74%, which is not far off the functional
literacy rate in the US of 86%.

http://www.huffingtonpost.com/2013/09/06/illiteracy-rate_n_3880355.html

(I know I'm comparing apples with oranges. But when 14% of the adult
population can *effectively* not read, despite being educated in the
wealthiest economy in the world, you don't get to point the finger at
other, poorer, countries and nations for their literacy problems.)


You're entitled to your own opinions, you're not entitled to your own facts.
Until you learn some actual facts, instead of the prejudices and self-
serving ignorance that you are currently operating on, your opinions are
based on fantasy, and you alternate between laughably obnoxious and just
obnoxious.


> Then create whatever encodings you so desire and then STFU about it.

The necessary encoding exists. Its called Unicode.


> Go request an audience from your beloved Queen Mother

My "beloved" Queen Mother? Oh dear, you really don't know me very well.

Besides, the old girl died in 2002.


> And yet America continues to be emulated by 100% of the world.

Well, at least 100% of the world that you know of. Which isn't saying much.



-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Rick Johnson
On Saturday, April 1, 2017 at 3:08:20 PM UTC-5, Mikhail V wrote:
> On 1 April 2017 at 06:38, Rick Johnson  wrote:
> > On Thursday, March 30, 2017 at 9:14:54 AM UTC-5, Steve D'Aprano wrote:
>
> > > - and making band names look ǨØØĻ and annoy old fuddy-
> > > duddies.
> >
> > So now we've even included graffiti artists in our little
> > "inclusivity project". My, my... we are so _not_ mean!
>
> Lol :)  First we'll wait for Unicode version with table-
> drawing character for all possible corner styles and line
> weights, and monospaced legible Arabic for Chris' MUDs.

Urm, don't mention MUDs around Chris. That's like a dog
whistle to him. He could go on and on for hours yelping
about them. To be honest, between his MUD ramblings and his
incessant plugging of the Pike language, i don't know which
is worse @_@.

But we tolerate Chris.

In fact, noticing that Pike is statically typed, i'm
beginning to wonder if Chris may have poured pike oil in
GvR's ear thereby convincing him to introduce type-hints.

Whaddaya got next Chris, braces?

But the more i think about it, the more i realize the _true_
culprit of this type-hints conundrum may just be the Go
language. Sure, Ruby was the "classic foe", however, Ruby
was never a _real_ threat to Python. And not because Ruby
was an inferior language, but because Ruby did not
outshine Python. For both of their natural lives, Ruby and
Python have existed in their own little nitches, and so,
neither became an existential threat to the other. But then,
Google's pet language named "Go" arrived on the scene, and
now we had a statically typed compiled language with many of
the sugary syntactical features and intuitive structural
architecture of Python scripts. Go is basically an evolution
of Python, and when Guido first noticed Go he became
intimidated and then frightened, and so, hastily decided he
had to compete with it. And since he knew that true static
typing would be impossible in Python, he made the compromise
of implementing "type-hints". And so, now the entire
community has been saddled with this type-hints mess, just
because a few of his peers at Google-plex decided to give
Go, well, a go.

Our emotions can be powerful opponents. Sometimes, so
powerful, that even the wise cannot control them. Of course,
this is the same man who proudly claimed (when asked in an
interview if he would take a flight in a aeroplane that was
controlled by a dynamic language such as Python), "Yes!". Of
course, with the caveat that he would be allowed to "write
all the code himself".

But what kind person would make such a foolish claim?

And whether this loose thinking was a matter of overwhelming
emotions or just pure stupidity, has been hotly debated by
many people in community ever since. But, as for me, i don't
think the man is stupid -- no, the Python language stands as
a testament to his intellectual prowess -- however, my
observations have led me to believe that he's unable to
control his emotions. In fact, he is a man ruled by
emotions. His famously foolish and braggadocious claim
exposes a deeply inflated sense of his own abilities brought
to the surface by powerful feelings of superiority over
others. He believes himself infallible. Could this be a
result of malignant narcissism? Megalomania? Possibly all
the above sprinkled lightly with sadistic tendencious? Who
knows...

I'm not sure if our dear leader has conceded to the foolish
nature of his famous "Python Drone Idea", but what i am sure
of, is that the existence of type-hints is evidence of his
emotions (once again!) overriding his rational mind and
causing him to make a poor decision.

Last time it was pride.

This time it is jealously.

What will it be next time?

He is a man who is unable to be humble in the reality of his
own accomplishments, and unable to concede that his
intellectual powers are merely that of a mortal. Powers that
are subject to fallibility and stubborn headedness. Powers
that cannot reach full potential unless they are
supplemented by a strong and open community.

This realization is for me, and many in this fine community,
both sad and terrifying. It is as though we are witnessing a
beloved relative slowly drift away into the clutches of
dementia. Racked with horrific pain and dehumanized by the
embarrassing bouts of incontinence. And we are powerless to
do anything to stop it. And although we'd rather hold our
noses and look away, we cannot. It is a strange irony that
we are forced by a "sense of duty" to become unwilling
spectators to this downward spiral.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Mikhail V
On 2 April 2017 at 02:01, Chris Angelico  wrote:
> On Sun, Apr 2, 2017 at 9:25 AM, Mikhail V  wrote:
>> On 2 April 2017 at 00:22, Chris Angelico  wrote:
>>> On Sun, Apr 2, 2017 at 8:16 AM, Mikhail V  wrote:
 For multiple-alphabet rendering I will use some
 custom text format, e.g. with tags
  ... , and for latin
 ... and etc.

 Simple and effective.
>>>
>>> For multi-alphabet rendering, I would rather use an even simpler
>>> format: Remove the tags and use a consistent encoding.
>>
>> No, flat encoding would not be simpler, it would be simpler only and only
>> if you take a text with several alphabets, and mix the data randomly.
>> In real situation, data chunks that use different glyph sets for
>> representation are not mixed in a random manner.
>> Also for different processing purposes tagged structure will be way
>> more effective, e.g. if I want to extract all chunks in alphabet A
>> in a single list with strings, or use advanced search, etc.
>
> https://github.com/Rosuav/LetItTrans/blob/master/25%20languages.srt
>
> Not exactly random, but that's a single file, a single document, using
> characters from several different scripts. And this is far from the
> only case of this sort of thing happening.
>

So you propose that I automatically convert this content
to tagged format? Heh, no thanks, and this does not
refer to the above discussed problem.
If you will make a publishing layout of multi-lingual
document, you will have to do that manually anyway.
(however e.g. in Adobe InDesign there is automatical
assistance for this task, which tries to guess the language of chunks)

So this speaks merely against spawning of such content
than towards unicode.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Chris Angelico
On Sun, Apr 2, 2017 at 9:25 AM, Mikhail V  wrote:
> On 2 April 2017 at 00:22, Chris Angelico  wrote:
>> On Sun, Apr 2, 2017 at 8:16 AM, Mikhail V  wrote:
>>> For multiple-alphabet rendering I will use some
>>> custom text format, e.g. with tags
>>>  ... , and for latin
>>> ... and etc.
>>>
>>> Simple and effective.
>>
>> For multi-alphabet rendering, I would rather use an even simpler
>> format: Remove the tags and use a consistent encoding.
>
> No, flat encoding would not be simpler, it would be simpler only and only
> if you take a text with several alphabets, and mix the data randomly.
> In real situation, data chunks that use different glyph sets for
> representation are not mixed in a random manner.
> Also for different processing purposes tagged structure will be way
> more effective, e.g. if I want to extract all chunks in alphabet A
> in a single list with strings, or use advanced search, etc.

https://github.com/Rosuav/LetItTrans/blob/master/25%20languages.srt

Not exactly random, but that's a single file, a single document, using
characters from several different scripts. And this is far from the
only case of this sort of thing happening.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Mikhail V
On 2 April 2017 at 00:22, Chris Angelico  wrote:
> On Sun, Apr 2, 2017 at 8:16 AM, Mikhail V  wrote:
>> For multiple-alphabet rendering I will use some
>> custom text format, e.g. with tags
>>  ... , and for latin
>> ... and etc.
>>
>> Simple and effective.
>
> For multi-alphabet rendering, I would rather use an even simpler
> format: Remove the tags and use a consistent encoding.

No, flat encoding would not be simpler, it would be simpler only and only
if you take a text with several alphabets, and mix the data randomly.
In real situation, data chunks that use different glyph sets for
representation are not mixed in a random manner.
Also for different processing purposes tagged structure will be way
more effective, e.g. if I want to extract all chunks in alphabet A
in a single list with strings, or use advanced search, etc.

>
> Have you ever actually *used* a system of tagged encodings? It is an
> abomination.

Not with such encodings (exept my own experiments), but in some sense,
I use it every day, e.g. in rich text format (Word, InDesign), you
have bold text or
italics text - in internal representation it is like tagged text, and
adresses different glyph sets. Yes those are [probably] unicode values,
but the application deals with those tags at rendering and copy-pasting.
IOW such applications technically could cope with encodings
in similar manner without problems.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Rick Johnson
On Saturday, April 1, 2017 at 11:01:03 AM UTC-5, Steve D'Aprano wrote:
> On Sat, 1 Apr 2017 12:17 pm, Rick Johnson wrote:
> 
> > Most people just quietly change the filename and move on
> 
> There are over a billion people in China, almost a billion
> more in India, about 140 million people in Russia, nearly
> 130 million people in Japan, 250 million in Indonesia,
> about 290 million native Arabic speakers, and even 9
> million speakers of Hebrew.  If you think that all these
> people, and hundreds of millions more, will just "quietly
> change the filename"

The majority of the populations you reference are
illiterate. Have you ever seen the endless slums in India?

> To say nothing of the hundreds of millions who use Latin
> character sets that ASCII cannot handle, including around
> 65 million British.  Open your eyes, there is a whole world
> past the borders of your insular, close-minded little
> country.

Then create whatever encodings you so desire and then STFU
about it. Why are you whining to me? Contrary to your
beliefs, America does not exist to satisfy the whims of non-
americans. If you are British, then America does not exist
for you. Go request an audience from your beloved Queen
Mother; and if she's too busy, perhaps Mother Mary will
entertain you; and if she's too busy,  there is always Sir
Paul McCartney to sing you a lullaby. And since he's not
toting around that one legged girl anymore, he probably has
quite a bit of free time, even for someone as unimportant as
you.

When i find myself in times of trouble,
Mother ASK-EEE comes to me,
Speaking codes of pragmatism, 
let it be
And when the broken hearted people,
Living in the world agree,
There will be an answer -> "ASS-KEE"
For though they may be parted
There is still a chance that they will see
There will be an answer -> "ASK__EEE"
ASS-KEE, ASS-KEE, Oh ASS-KEE, ASS-KEE
There will be an answer -> "ASS-KEE"
 
Hey, Steve!
Don't be so sad,
We'll take a bad encoding, 
And make it bettuh!

Because we're 'mericans. 

And failure is not an option.

> 95% of the world is not American, 

And yet America continues to be emulated by 100% of the
world. A small country that has hardly existed for a few
hundred years, has not only created a social transformation
that has reverberanted around the world, we continue to define
popular culture. If you hate us so much, then why do you try
so much to emulate us?

> and there are millions of Americans who want to use non-
> ASCII characters in their file names, even non-Latin
> characters.

Great. More reason for you to create your beloved encoding
so you can become their hero. Perhaps you can convince a
remote island tribe to worship you as god.

> You talk about a fraction of that 5%, the tiny minority who
> care only about ASCII, and describe them as "most people".

Most people don't even know what Unicode and ASCII are, and
even if you had the time to educate them, they could care
less. I'm talking about technical folk, not idiots off the
street; i'm talking about people who write software and
advanced users of technical softwares; not some drooling
twit who downloaded the latest version of angry birds from
the apple store.

> That demonstrates the smallness of your world-view and the
> enormity of your ignorance. Wake up. The world is not
> Smallville USA, it never has been, and never will be.
> Either adapt, or get out of the way of those who have.

I am more than willing to provide whatever features the
_majority_ of my clients request, but what i am not willing
to do, is expend my labor capital on your pet social justice
project that caters to large concentrations of illiterates
and non-technical folk. *YOU* may ascribe to the religion of
imperialism, but i do not; if i am to ascribe to any
religion, that religion would be pragmatism. And even if we
cull the geographic Set you provided to include only the
literates of that Set, it would simply be impractical for
small or even medium sized developers to devote the time
needed to cater to all those foreign markets.

Does that mean i don't care about these people -- no. 

Does that mean i look down on these people -- no. 

It just means that my time is very important to me. 

And for you to suggest that those who do not support your
pet "inclusivity project" are intolerant (or whatever
pejorative you want to use), well, that discloses more about
your personality than does it mine. So let the bright lads
in those counties rise up and provide their own people with
great localized products. My market includes the entire
Western culture; spanning multiple continents and even some
of the more advanced areas of the undeveloped nations you
mentioned. That's a large enough market to make billions.
Why should i take anymore?

Sheesh. Out of one side your face you people whine because
major american corporations like Mcdonalds and Coca-Cola
have invaded just about every market on the face of the
e

Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Chris Angelico
On Sun, Apr 2, 2017 at 8:16 AM, Mikhail V  wrote:
> For multiple-alphabet rendering I will use some
> custom text format, e.g. with tags
>  ... , and for latin
> ... and etc.
>
> Simple and effective.

For multi-alphabet rendering, I would rather use an even simpler
format: Remove the tags and use a consistent encoding.

Oh right, that's what Unicode is.

Have you ever actually *used* a system of tagged encodings? It is an
abomination.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Mikhail V
On 1 April 2017 at 18:00, Steve D'Aprano  wrote:
> On Sat, 1 Apr 2017 12:17 pm, Rick Johnson wrote:
>
>> Most people just quietly change the filename and move on
>
>
> There are over a billion people in China, almost a billion more in India,
> about 140 million people in Russia, nearly 130 million people in Japan, 250
> million in Indonesia, about 290 million native Arabic speakers, and even 9
> million speakers of Hebrew.
>

Well, this is obvious, different characters in different
parts of the world, ministries of education, etc.
But will the sky fall if people name files using
latin letters? Look, I am Russian, nothing to do
with Ugly American :)
At my work I quietly change all filenames to translit.
This is for _simplification_ of all automation processes and
some other purposes. It makes my work with digital
materials seamless and as a positive side-effect makes
it easier for external service-providers to avoid
different surprises.
So it is _not_ in the first place because some software
cope badly with unicode, but because it is natural
and logical to use same glyphs for any language
(but strangely, many have difficulties with understanding
this, well.. the time has not come yet, let's wait few
hundreds years more)

BTW, why do you think people in China do not
want to use latin letters? I suppose there are a lot
of haters for those bizarre systems among natives
and indeed, many people stay illiterate simply
because it is too hard to learn and many
have problems reading those.

Let's go back in Europe, e.g. in Germany there were
many movements against those silly spelling rules and
many younger people ignore those in informal writing,
e.g. they write 'were' intead of 'wäre', 'fur' instead of 'für'
and do not capitalise nouns, and they are damn right about it.

So this all is just your personal view on the problem.

This reminds me of one anecdote:
A Pole and a Russian talk about languages:
Russian: our language is better, we have more
letters in our alphabet!
Pole: no, ours is better - we have more grammatical
cases!

Also I never install any language packages with software
and use only english versions, anyway most tutorials
will be in english and one can't force developers to
make turorials with screenshots for all languages.
And english UI looks for me always better and more intuitive.

> One of the excellent ways the PUAs have been used is by
> medieval researchers. They have been collecting the various
> special characters used by medieval scribes, and by private
> agreement putting them into a PUA area where special
> purpose software can use it. That way they can determine
> which of the thousands of special characters used by
> medieval monks are actually significant enough to graduate
> to genuine Unicode characters, and which are best handled
> some other way.

Now I don't see who wrote this ^ initially. Suppose Steve?
So IMO this is not an 'exellent' way. If I want to
make e.g. analysis of Voynich manuscript, I'll do
following: extract/draw glyphs and encode them,
say with integers 0..26.
And all rendering and analysis will be performed on
those integers.
For multiple-alphabet rendering I will use some
custom text format, e.g. with tags
 ... , and for latin
... and etc.

Simple and effective.


Mikhail
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Chris Angelico
On Sun, Apr 2, 2017 at 7:49 AM, Stefan Ram  wrote:
> Chris Angelico  writes:
>>Yes it can; however, there is no way within Python to have a string
>>that can represent two strings, which is what directory separators do.
>
>   To represent two strings, /internally/ ("within Python"),
>   a straightforward way would be a list of two strings.
>
>   If one wants to represent this list /as a single string/,
>   one can use any serialization of this list, for example,
>   using JSON.
>
>   (I have not read the whole thread, so I might have missed
>   some context here. I am just responding to what is quoted
>   above.)

The context is a file name, in which you need something that a user
can input which is capable of representing path components that
contain arbitrary characters. Currently, a Unix path always interprets
a slash as a directory separator, so there's no way to have a slash in
a file or directory name. If you want to have *every* component
capable of containing *any* character, you either need a string to be
able to represent two strings, or you need some sort of escaping
mechanism.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Chris Angelico
On Sun, Apr 2, 2017 at 7:35 AM, Marko Rauhamaa  wrote:
> Chris Angelico :
>
>> there is no way within Python to have a string that can represent two
>> strings, which is what directory separators do.
>
> Really? Try:
>
>>>> repr(("a", "b"))
>"('a', 'b')"
>
> There! A string that represents two strings.

In the arbitrary sense that you can encode anything in any way and
then treat it as a string, yes, of course you can devise a system that
lets you represent two strings. But you were talking about the nature
of the string literal in Python, and what you have here is not a
string literal - it's a tuple. You do NOT want to allow file names to
be arbitrary code, nor even "something acceptable by
ast.literal_eval"; they should be simple strings. Otherwise, there's
no point even having them - just use file reference numbers (eg
inodes) instead, and force people to select them from a GUI menu every
time they want to work with a file.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Mikhail V
On 1 April 2017 at 22:57, Chris Angelico  wrote:
> On Sun, Apr 2, 2017 at 6:07 AM, Mikhail V  wrote:
>> On 1 April 2017 at 06:38, Rick Johnson  wrote:
>>> On Thursday, March 30, 2017 at 9:14:54 AM UTC-5, Steve D'Aprano wrote:
>>
 - and making band names look ǨØØĻ and annoy old fuddy-
 duddies.
>>>
>>> So now we've even included graffiti artists in our little
>>> "inclusivity project". My, my... we are so _not_ mean!
>>
>> Lol :)  First we'll wait for Unicode version with
>> table-drawing character for all possible corner styles
>> and line weights, and monospaced legible Arabic for
>> Chris' MUDs.
>
> Not sure what you mean by monospaced, given that Arabic is RTL anyway.
> I mean, when your code is capable of handling all the oddities of
> mixed LTR and RTL text, variable-width characters are almost trivially
> easy to handle. (And yes, I do indeed handle them just fine.)

Monospaced text = each glyph appears in a constant-width
box (the whole thread is about this). Nothing to do with writing
direction.
Both Windows and Linux default console renders monospaced
text only. Unless you use something else, which can render
both monospaced and proportional text, Arabic is
not adequatly presentable there. Eg alef's width is ca 0,2 sheen's width.
So one gets piles of poo instead of normal Arabic text in console.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Marko Rauhamaa
Chris Angelico :

> there is no way within Python to have a string that can represent two
> strings, which is what directory separators do.

Really? Try:

   >>> repr(("a", "b"))
   "('a', 'b')"

There! A string that represents two strings.

Note, however, that Python programs generally don't restrict themselves
to expressing objects via strings. There are even objects with no string
representation at all.

A pathname is a list of strings. Python could naturally express it as
just that:

  [ "usr", "bin", "python3" ]


I'm not really proposing any change to the status quo. What's done is
done. However, I do think it is awkward to ban one particular, very
common character while allowing all the rest.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Chris Angelico
On Sun, Apr 2, 2017 at 7:06 AM, Marko Rauhamaa  wrote:
> Chris Angelico :
>
>> On Sun, Apr 2, 2017 at 6:47 AM, Marko Rauhamaa  wrote:
>>> A far more convenient escaping scheme could have been devised for
>>> pathnames.
>>
>> Definitely. We should treat file names like domain names. "Bücher.ch"
>> gets represented internally as "xn--bcher-kva.ch". That would solve
>> all the problems, and there's no way that it could create more.
>
> Note that Python can express any text string, including one with a quote
> character. I don't know if Python's escaping scheme is creating more
> problems than it is solving.

Yes it can; however, there is no way within Python to have a string
that can represent two strings, which is what directory separators do.
Ultimately, all you really get by referencing Python's string literals
is an escaping system: "\\" for a backslash, and then you can use "\?"
for various special symbols to change their meaning.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Marko Rauhamaa
Chris Angelico :

> On Sun, Apr 2, 2017 at 6:47 AM, Marko Rauhamaa  wrote:
>> A far more convenient escaping scheme could have been devised for
>> pathnames.
>
> Definitely. We should treat file names like domain names. "Bücher.ch"
> gets represented internally as "xn--bcher-kva.ch". That would solve
> all the problems, and there's no way that it could create more.

Note that Python can express any text string, including one with a quote
character. I don't know if Python's escaping scheme is creating more
problems than it is solving.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Chris Angelico
On Sun, Apr 2, 2017 at 6:47 AM, Marko Rauhamaa  wrote:
> You are stuck with the axiom that pathname and its representation are
> one and the same thing.
>
> URI's make the distinction clear. Say you wanted to express a resource
>
>päätyö/2
>
> as part of a URI. URIs are to contain a subset of ASCII only so an
> encoding scheme has been devised. That resource is expressed like this:
>
>p%c3%a4%c3%a4ty%c3%b6%2f2
>
> A far more convenient escaping scheme could have been devised for
> pathnames.

Definitely. We should treat file names like domain names. "Bücher.ch"
gets represented internally as "xn--bcher-kva.ch". That would solve
all the problems, and there's no way that it could create more.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Chris Angelico
On Sun, Apr 2, 2017 at 6:07 AM, Mikhail V  wrote:
> On 1 April 2017 at 06:38, Rick Johnson  wrote:
>> On Thursday, March 30, 2017 at 9:14:54 AM UTC-5, Steve D'Aprano wrote:
>
>>> - and making band names look ǨØØĻ and annoy old fuddy-
>>> duddies.
>>
>> So now we've even included graffiti artists in our little
>> "inclusivity project". My, my... we are so _not_ mean!
>
> Lol :)  First we'll wait for Unicode version with
> table-drawing character for all possible corner styles
> and line weights, and monospaced legible Arabic for
> Chris' MUDs.

Not sure what you mean by monospaced, given that Arabic is RTL anyway.
I mean, when your code is capable of handling all the oddities of
mixed LTR and RTL text, variable-width characters are almost trivially
easy to handle. (And yes, I do indeed handle them just fine.)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Marko Rauhamaa
Steve D'Aprano :

> But if I could borrow Guido's time machine, I'd go back and convince
> the file system people to use ^ as the record separator, rather than
> slash or backslash or colon. Caret is *much* less likely to be useful
> in file names than forward slash (often used for dates) or colon, or
> even backslash.

You are stuck with the axiom that pathname and its representation are
one and the same thing.

URI's make the distinction clear. Say you wanted to express a resource

   päätyö/2

as part of a URI. URIs are to contain a subset of ASCII only so an
encoding scheme has been devised. That resource is expressed like this:

   p%c3%a4%c3%a4ty%c3%b6%2f2

A far more convenient escaping scheme could have been devised for
pathnames.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Mikhail V
On 1 April 2017 at 06:38, Rick Johnson  wrote:
> On Thursday, March 30, 2017 at 9:14:54 AM UTC-5, Steve D'Aprano wrote:

>> - and making band names look ǨØØĻ and annoy old fuddy-
>> duddies.
>
> So now we've even included graffiti artists in our little
> "inclusivity project". My, my... we are so _not_ mean!

Lol :)  First we'll wait for Unicode version with
table-drawing character for all possible corner styles
and line weights, and monospaced legible Arabic for
Chris' MUDs.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread MRAB

On 2017-04-01 17:43, Marko Rauhamaa wrote:

Steve D'Aprano :


Open your eyes, there is a whole world past the borders of your insular,
close-minded little country. 95% of the world is not American, and there
are millions of Americans who want to use non-ASCII characters in their
file names, even non-Latin characters.


It would be nice to be able to use a / in my file names. Funny enough,
I'm allowed to use a zillion unprintable characters in my file names but
no slashes allowed.

Example:

   results-Q2/2017.json



Try this instead:

results-Q2∕2017.json

:-)

(It's U+2215 "DIVISION SLASH").
--
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread eryk sun
On Sat, Apr 1, 2017 at 5:38 PM, Steve D'Aprano
 wrote:
> Or, for Windows, I suppose a dozen or so more characters:
>
> https://support.office.com/en-us/article/Invalid-characters-in-file-or-folder-names-or-invalid-
> file-types-in-OneDrive-for-Business-64883A5D-228E-48F5-B3D2-EB39E07630FA

It's more than a dozen reserved characters. If we're strictly
following the file-system runtime library conventions, then all ASCII
control characters (0-31) are reserved as well as pipe; the path
separators slash, backslash, and colon (named streams); and the
wildcard characters asterisk, question mark, less than, greater than,
and double quote.

Except for backslash, which is reserved by the object manager, these
reservations are imposed by the FsRtl, and in theory I think a custom
file system *could* ignore this. This would require using the \\?\
prefix and, in some cases, it would also require applications to use
the native NT API in order to avoid DOS conventions. It would also
need some private escape sequence to tell the file system, for
example, that an asterisk in a directory listing filter isn't supposed
to be a wildcard. These constraints would be too cumbersome,
confusing, and unworkable in general, so the system's use would
probably need to be restricted to a specific set of applications or an
NT subsystem that can hide the implementation details.

For a real-world example, the Linux subsystem in Windows 10 (WSL)
stores the POSIX namespace files that it creates using regular files
in a hidden folder in the user's profile. It has to escape characters
that are reserved:

$ touch 'test*?<>":\|.txt'

C:\>dir /b %localappdata%\lxss\home\%username%\test*
test#002A#003F#003C#003E#0022#003A#005C#007C.txt
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Tim Chase
On 2017-04-01 19:43, Marko Rauhamaa wrote:
> It would be nice to be able to use a / in my file names. Funny
> enough, I'm allowed to use a zillion unprintable characters in my
> file names but no slashes allowed.
> 
> Example:
> 
>results-Q2/2017.json

You can:

  $ touch $(/usr/bin/printf "results-Q2\u22152017.")


Now, whether one would find it *prudent*, that's another matter. ;-)

-tkc





-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Tim Chase
On 2017-04-02 03:09, Steve D'Aprano wrote:
> *Whatever* record separator you choose to use, whether it is
> slash / or backslash \ or colon : or Ctrl-^ RS or U+113A HANGUL
> CHOSEONG SIOS-PHIEUPH, you can't *also* use it as a non-record
> separator.

Well, one could use 0x1C (FS=File Separator) which at least has the
semantic meaning and would be far less likely to be desired in
file-names.

That said, I'm not sure I want to try and enter 0x1C every time I
intend to compose a complex path.  But that's an interface problem,
right? ;-)

-tkc



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Steve D'Aprano
On Sun, 2 Apr 2017 03:18 am, Alain Ketterlin wrote:

> Marko Rauhamaa  writes:
> 
>> It would be nice to be able to use a / in my file names. Funny enough,
>> I'm allowed to use a zillion unprintable characters in my file names but
>> no slashes allowed.
>>
>> Example:
>>
>>results-Q2/2017.json
> 
> Use U+2215 (DIVISION SLASH).

That is *deliciously* evil. I like it.
 
> I have tried this once. "Next time you're fired/dead" (and less pleasant
> variants) was the only comment I got from people I shared files with.

:-)

∕home∕steve∕document


I'm sure you deserved everything they did to you :-)





-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Steve D'Aprano
On Sun, 2 Apr 2017 03:08 am, Marko Rauhamaa wrote:

> Chris Angelico :
> 
>> On Sun, Apr 2, 2017 at 2:43 AM, Marko Rauhamaa  wrote:
>>> It would be nice to be able to use a / in my file names. Funny
>>> enough, I'm allowed to use a zillion unprintable characters in my
>>> file names but no slashes allowed.
>>>
>>> Example:
>>>
>>>results-Q2/2017.json
>>
>> But how do you distinguish between that file, and a file called
>> 2017.json in a subdirectory called results-Q2?
> 
> When there's a will, there's a way:
> 
>  * Show a folder icon for a directory and a file icon for a file.

I'm blind, and need a text reader. How do I see your folder icon?

Or more importantly, how do I *input* your folder icon?

Or I'm using a text-only interface, because I'm SSH'ed into the computer
over a 2400 baud modem going through a noisy line.


>  * Do it URI style: path/to/results-Q2%2F2017.json

Wait, I see no slash in the file name. How am I supposed to tell my mum to
open the file "results-Q2/2017.json" when it doesn't display the slash? Do
I have to memorise the hex code for / in some obscure system?

How do I distinguish between results-Q2%2F2017.json and results-Q2/2017.json
if the later displays like the former?


>  * Do it C style: path/to/results-Q2\/2017.json

That can't be right. The file name is supposed to be results-Q2/2017.json,
not results-Q2V2017.json.

You're deliberately trying to make things hard for my dear ole mum, aren't
you? You know she doesn't wear her glasses when reading file names.


>  * Do it Python style: [ "path", "to", "results-Q2/2017.json" ]

You got the path wrong. The directory portion is a single directory called
literally:

["path", "to",

(ending with a space, and don't ask me who named this directory, but they
are legal characters so you have to expect them to be used...) and the
filename portion is actually 

"results-Q2/2017.json" ]

so you actually have to write:

['["path", "to", ', '"results-Q2/2017.json" ]']

My dear ole mum just had a stroke trying to understand that, I hope you're
happy now. You brute.


>  * Do it Lisp style: (path to results-Q2/2017.json)
> 
> I'm sure you can come up with several other workable solutions.

You left the prefix "un" out of that adjective.

But all joking aside, of course you can create a complex, fragile, hard to
use system for escaping the record separator character in file names. Do
you imagine that you're the first person who thought of that?

But what does it buy you? *One more character*.

Or, for Windows, I suppose a dozen or so more characters:

https://support.office.com/en-us/article/Invalid-characters-in-file-or-folder-names-or-invalid-file-types-in-OneDrive-for-Business-64883A5D-228E-48F5-B3D2-EB39E07630FA

Either way, you're creating a world of pain for your users, for buggar all
extra benefit.

But if I could borrow Guido's time machine, I'd go back and convince the
file system people to use ^ as the record separator, rather than slash or
backslash or colon. Caret is *much* less likely to be useful in file names
than forward slash (often used for dates) or colon, or even backslash.

^home^steve^document.txt


I'm sure I'd get used to it in a few years... 

Next: convince keyboard manufacturers to move the caret from SHIFT-6 to a
plain, unshifted key. Buggared if I'm going to hit shift every time I want
to use an absolute path...



-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Alain Ketterlin
Marko Rauhamaa  writes:

> It would be nice to be able to use a / in my file names. Funny enough,
> I'm allowed to use a zillion unprintable characters in my file names but
> no slashes allowed.
>
> Example:
>
>results-Q2/2017.json

Use U+2215 (DIVISION SLASH).

I have tried this once. "Next time you're fired/dead" (and less pleasant
variants) was the only comment I got from people I shared files with.

-- Alain.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread eryk sun
On Sat, Apr 1, 2017 at 4:55 PM, Chris Angelico  wrote:
> On Sun, Apr 2, 2017 at 2:43 AM, Marko Rauhamaa  wrote:
>> Steve D'Aprano :
>>
>>> Open your eyes, there is a whole world past the borders of your insular,
>>> close-minded little country. 95% of the world is not American, and there
>>> are millions of Americans who want to use non-ASCII characters in their
>>> file names, even non-Latin characters.
>>
>> It would be nice to be able to use a / in my file names. Funny enough,
>> I'm allowed to use a zillion unprintable characters in my file names but
>> no slashes allowed.
>>
>> Example:
>>
>>results-Q2/2017.json
>
> But how do you distinguish between that file, and a file called
> 2017.json in a subdirectory called results-Q2?

You could use a PUA code or the replacement character (U+FFFD) as an
escape code. I don't think this is possible in Linux or Unix in
general because I think POSIX mandates that '/' is reserved. It *may*
be possible in Windows if you're creating a custom file system and can
get away with requiring users to use \\?\ paths in this case. The
system parses the path up to the volume device, so that part cannot
use backslash. Beyond that, path parsing is up to file-system device
that manages the volume. If the volume is mounted in the object
namespace, then the whole path, including the device name, can use
forward slash, since that's just a normal name character to the object
manager. For example, you can create a device named "My/Device".
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Marko Rauhamaa
Chris Angelico :

> On Sun, Apr 2, 2017 at 2:43 AM, Marko Rauhamaa  wrote:
>> It would be nice to be able to use a / in my file names. Funny
>> enough, I'm allowed to use a zillion unprintable characters in my
>> file names but no slashes allowed.
>>
>> Example:
>>
>>results-Q2/2017.json
>
> But how do you distinguish between that file, and a file called
> 2017.json in a subdirectory called results-Q2?

When there's a will, there's a way:

 * Show a folder icon for a directory and a file icon for a file.

 * Do it URI style: path/to/results-Q2%2F2017.json

 * Do it C style: path/to/results-Q2\/2017.json

 * Do it Python style: [ "path", "to", "results-Q2/2017.json" ]

 * Do it Lisp style: (path to results-Q2/2017.json)

I'm sure you can come up with several other workable solutions.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Steve D'Aprano
On Sun, 2 Apr 2017 02:43 am, Marko Rauhamaa wrote:

> Steve D'Aprano :
> 
>> Open your eyes, there is a whole world past the borders of your insular,
>> close-minded little country. 95% of the world is not American, and there
>> are millions of Americans who want to use non-ASCII characters in their
>> file names, even non-Latin characters.
> 
> It would be nice to be able to use a / in my file names. 

Yes it would. Obviously the solution is to use colons as the path separator,
like in Classic Mac OS (and a few others).

And then, as sure as water is wet, you'll complain that you want to use : in
your file names.

*Whatever* record separator you choose to use, whether it is slash / or
backslash \ or colon : or Ctrl-^ RS or U+113A HANGUL CHOSEONG SIOS-PHIEUPH,
you can't *also* use it as a non-record separator.

I suppose one might invent an escaping scheme, so that you can escape the
record separator, and another escaping scheme so you can escape the escape
and prevent it from escaping the record separator. That would work.

But it's complex and error prone and people will get it wrong, and the
people who designed the Unix file system didn't think the extra complexity
was worth the benefit. If you disagree, feel free to design your own file
system, and if people prefer yours, they'll use it.

Its not just Unix. As far as I know, *no* file system, from any operating
system, has bothered to introduce an escape character so that file names
can include the path record separator. Not Unix, not Windows, not OS X, not
classic Mac OS, not Solaris.



-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Chris Angelico
On Sun, Apr 2, 2017 at 2:43 AM, Marko Rauhamaa  wrote:
> Steve D'Aprano :
>
>> Open your eyes, there is a whole world past the borders of your insular,
>> close-minded little country. 95% of the world is not American, and there
>> are millions of Americans who want to use non-ASCII characters in their
>> file names, even non-Latin characters.
>
> It would be nice to be able to use a / in my file names. Funny enough,
> I'm allowed to use a zillion unprintable characters in my file names but
> no slashes allowed.
>
> Example:
>
>results-Q2/2017.json

But how do you distinguish between that file, and a file called
2017.json in a subdirectory called results-Q2?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Marko Rauhamaa
Steve D'Aprano :

> Open your eyes, there is a whole world past the borders of your insular,
> close-minded little country. 95% of the world is not American, and there
> are millions of Americans who want to use non-ASCII characters in their
> file names, even non-Latin characters.

It would be nice to be able to use a / in my file names. Funny enough,
I'm allowed to use a zillion unprintable characters in my file names but
no slashes allowed.

Example:

   results-Q2/2017.json


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-01 Thread Steve D'Aprano
On Sat, 1 Apr 2017 12:17 pm, Rick Johnson wrote:

> Most people just quietly change the filename and move on


There are over a billion people in China, almost a billion more in India,
about 140 million people in Russia, nearly 130 million people in Japan, 250
million in Indonesia, about 290 million native Arabic speakers, and even 9
million speakers of Hebrew.

If you think that all these people, and hundreds of millions more, will
just "quietly change the filename" to ASCII because you're too lazy,
self-centred and arrogant to move on from 1963, then you truly are an
example of the Ugly American.

To say nothing of the hundreds of millions who use Latin character sets that
ASCII cannot handle, including around 65 million British.

Open your eyes, there is a whole world past the borders of your insular,
close-minded little country. 95% of the world is not American, and there
are millions of Americans who want to use non-ASCII characters in their
file names, even non-Latin characters.

You talk about a fraction of that 5%, the tiny minority who care only about
ASCII, and describe them as "most people". That demonstrates the smallness
of your world-view and the enormity of your ignorance. Wake up. The world
is not Smallville USA, it never has been, and never will be.

Either adapt, or get out of the way of those who have.



-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-31 Thread Chris Angelico
On Sat, Apr 1, 2017 at 3:38 PM, Rick Johnson
 wrote:
>> - distinguishing between different letters of the alphabet,
>> like dotted-i and dotless-ı (or ı and ı-with-a-dot, if you
>> prefer), or a and å;
>
> Sounds like the "encoding in question" could use a few more
> glyphs.

How many glyphs do you think you need?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-31 Thread Rick Johnson
On Thursday, March 30, 2017 at 9:14:54 AM UTC-5, Steve D'Aprano wrote:
> On Thu, 30 Mar 2017 03:21 pm, Rick Johnson wrote:
>
> > On Sunday, March 26, 2017 at 2:53:49 PM UTC-5, Chris Angelico wrote:
> >> On Mon, Mar 27, 2017 at 6:25 AM, Mikhail V  wrote:
> >> > On 26 March 2017 at 20:10, Steve D'Aprano 
> >> > wrote:
> >> >> On Mon, 27 Mar 2017 03:57 am, Mikhail V wrote:

> Don't be silly. You don't have to be fluent in a language
> in order for your program to support users who are. All you
> have to do is not stop them from using their own native
> language by forcing them to use ASCII and nothing but
> ASCII.  Of course, if you want to *localise* your UI to
> their language, then you need somebody to translate error
> messages, menus, window titles, etc. I'll grant that's not
> always an easy job.

And thats my point. Unicode may allow my French girlfriend
Zoe to spell her name using chars that are familiar to her,
but Unicode is not a langauge translator. Zoe can still
intuit her name in ASCII, but if she's unable to read
English, Unicode is of no help to her.

> But aren't you lucky, you speak one of a handful of lingua
> francas in the world, so the chances are your users will be
> pathetically grateful if all you do is let them type in
> their own language. Actual UI localisation is a bonus.

A bonus for the foreign user, perhaps, but an onerous for
the developer.

> Now you're just being absurd. Supporting diacritics doesn't
> mean you are responsible for teaching your users what
> they're for. They already know. That's why they want to use
> them.
>
> Diacritics are for:
>
> - distinguishing between words which look the same, but
> have different pronunciation;

I wonder how those poor English readers manage without
syntactical clues? it boggles the mind.

> - distinguishing between different letters of the alphabet,
> like dotted-i and dotless-ı (or ı and ı-with-a-dot, if you
> prefer), or a and å;

Sounds like the "encoding in question" could use a few more
glyphs.

> - distinguishing between words which look and sound the
> same but mean something different;

Oh, you mean like mean people? "In a pale attempt to protect
the homestead, the owner smacked an intruder in the face with
a large metal pail only to become pale as sheet when the
intruder was unaffected by the assault. Do you think the
owner's actions were beyond the pale? Or do all other
options pale by comparison?"

> - and making band names look ǨØØĻ and annoy old fuddy-
> duddies.

So now we've even included graffiti artists in our little
"inclusivity project". My, my... we are so _not_ mean!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-31 Thread Rick Johnson
On Thursday, March 30, 2017 at 2:58:53 AM UTC-5, Steven D'Aprano wrote:
> On Wed, 29 Mar 2017 20:53:35 -0700, Rick Johnson wrote:
>
> > On Sunday, March 26, 2017 at 1:21:18 PM UTC-5, Chris Angelico wrote:
> >> On Mon, Mar 27, 2017 at 4:43 AM, Steve D'Aprano 
> >>  wrote:

[...]

> > You place a lot of faith in the supposed "immutability of
> > Unicode code points", but a lot people have placed a lot
> > of faith in many past and current encoding systems, only
> > to be bamboozled by the gatekeepers some time later.
>
> So far, Unicode has kept that promise not to move or rename
> code points.

Promises are not worth the paper they are written on -- unless
you have them officially notarize, then they might be worth
"something".

> They haven't done so even when they've made embarrassing
> mistakes, like giving characters the completely wrong name.

So they're screw-ups, but at least they're "honest screwups"?
MmmKay. Got it.

> That makes Unicode more stable than ASCII, which has gone
> through a number of incompatible changes since the very
> first version back in 1963 (I think it was 63?).

Why does every comparison of Unicode end with some cheap jab
at ASCII? It brings back horrible memories of Obama blaming
Bush for everything. I mean, sure, Bush was a total idiot
and he trampled the constitution with his Tony Lama's on
more than one occasion, but after the hundred-thousandth
time of hearing Obama decry "Hey, but Bush did it -- WAH!",
it starts to get really old, really fast. At some point,
both Obama and Unicode have to put their big boy pants on
and take responsibility for their own mistakes and short
comings. And with the Trump election and the Brexit
referendum, we can see that Obama took it on the shorts.

> To put it another way:
>
> Unicode character Д (U+0414 CYRILLIC CAPITAL LETTER DE) is
> no more likely to change to another character than ASCII
> character 0x41 is likely to change from "A" to "Z".
> Trusting the stability of Unicode is a pretty safe bet.

I don't understand how that argument supports your beloved
Unicode over ASCII?

> > And so, although Unicode was created to solve the endless
> > compatibility problems between multiple archaic encoding
> > systems, the designers thought it necessary to add a
> > "custom space" that will keep the incompatibilities on
> > life support.
>
> No, that's not how it works. The PUAs really are for
> *PRIVATE* use. If your in-house application wants some
> dedicated, custom characters (say, for your company logo),
> there are three ways you can do it, starting from the
> dumbest:
>
> - pick some existing code point that you think nobody will
> ever use, like "Q" say, and turn that into your logo;
>
> - pick some *currently* unused code point, and hope that it
> will not become used;
>
> - pick a code point from the PUA which is permanently
> reserved for private use by private agreement.
>
> You can't expect other people's applications to treat that
> code point as your logo (or whatever special purpose you
> give it), but that's okay, you couldn't expect that in any
> case.

The problem is, as has always been the case with encodings,
is that some random dev will create a so-called "private"
code point, and others, liking what they see, will adopt the
same code point into their own projects. And after enough of
these "emulations" occur, you've created a new unofficial de
facto standard. And we're all back to square one again.

Another possibility, and one that this community is all to
familiar with, is that the Unicode gatekeepers could
intentionally isolate themselves from the user base and
withdraw into their ivory towers, thereby creating a large
swath of disillusioned folks who look to the PUA for their
collective salvation. And again, we are back to square one.

It could be that the PUA is to Unicode what type-hints are
to Python. Something to think about...

> One of the excellent ways the PUAs have been used is by
> medieval researchers. They have been collecting the various
> special characters used by medieval scribes, and by private
> agreement putting them into a PUA area where special
> purpose software can use it. That way they can determine
> which of the thousands of special characters used by
> medieval monks are actually significant enough to graduate
> to genuine Unicode characters, and which are best handled
> some other way.

And what if the gatekeepers refuse to graduate those special
chars? And what if, in response, the natives become
restless? A revolt. That's what! And their liberty will be
found not in the new lands, but in the PUA.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-31 Thread Chris Angelico
On Sat, Apr 1, 2017 at 12:17 PM, Rick Johnson
 wrote:
> On Thursday, March 30, 2017 at 12:43:59 AM UTC-5, Chris Angelico wrote:
>> Except that it doesn't actually take very much work to call
>> on someone else's library, which is what you get when you
>> use Unicode properly. (At least, assuming you're using a
>> decent language like Python, which comes with Unicode
>> libraries, and a decent GUI toolkit if you're going that
>> way.)
>
> Really. Since when does Python come with a "decent GUI kit"?

I didn't say it came with one; I said you should use (a) a decent
language, and (b) a decent GUI toolkit. Both do exist, but with
Python, the best GUI toolkits are installed with pip rather than being
part of the standard library.

>> Nope. I can't speak Mandarin, but I can make absolutely
>> sure that all my programs can accept Chinese characters. A
>> friend of mine sent me an audio file with a name that
>> included some Chinese, and I was able to handle it no
>> problem.
>
> Most people just quietly change the filename and move on,
> but if you want to spend the extra time worrying about every
> foreign charactor, you certainly have that right. But you
> don't have a right to lecture everyone else about your new
> found religion.

I suppose you'd be okay with all file names being upper-case 8.3
format, and that anyone who wants mixed case and/or longer names
should have no right to lecture people either.

>> > The only justification required is the bottom line. If your
>> > products generate profit, then you're doing something
>> > right. Besides, you don't need _everyone_ on the planet to
>> > buy your product to be a success. Unlike the business
>> > practices of Apple, we would be wise to leave plenty of
>> > room for others to enter the market. Competition is good
>> > for everyone. Monopolies are evil.
>>
>> Riight. What's the "bottom line" for open source
>> software? How do you measure whether your product is
>> generating a profit or not?
>
> Easy. You count the number of active community members. You
> also closely observe the "community health tends" over time.
> Having a small community today is not necessarily a bad
> thing if the community is healthy and growing. OTOH, a large
> unhealthy community today could be a ghost town tomorrow.
> Biologist refer to that phenomenon as extinction. Which is
> neither good nor profitable.
>
> Rectangular sheets of paper with dead presidents printed on
> them are not the only source of profits. Crowd sourcing can
> be quite a profitable enterprise even in the absence of
> money -- that is, *IF*, and only *IF* -- you invest the time
> required to lower barriers of entry and foster participation
> from diverse external sources. Social homogeny and
> intellectual isolation lead to collective oblivion.

I think you need to define the bottom line with something more stable
than a greased roller skating rink.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-31 Thread Rick Johnson
On Thursday, March 30, 2017 at 12:43:59 AM UTC-5, Chris Angelico wrote:
> Except that it doesn't actually take very much work to call
> on someone else's library, which is what you get when you
> use Unicode properly. (At least, assuming you're using a
> decent language like Python, which comes with Unicode
> libraries, and a decent GUI toolkit if you're going that
> way.)

Really. Since when does Python come with a "decent GUI kit"?

> Nope. I can't speak Mandarin, but I can make absolutely
> sure that all my programs can accept Chinese characters. A
> friend of mine sent me an audio file with a name that
> included some Chinese, and I was able to handle it no
> problem.

Most people just quietly change the filename and move on,
but if you want to spend the extra time worrying about every
foreign charactor, you certainly have that right. But you
don't have a right to lecture everyone else about your new
found religion.

Sometimes, as we pat our self-righteous selves on the back,
we forget that our incessant proselytizing for the "religion
of inclusivity" is only helping multi-national corporations
attain evermore market share (...somewhere, in a corporate
penthouse perched high above the peasants who scurry below,
a CEO dons a most devilish grin...). The iPhone has come to
dominate every market in the world. And in some ways (being
a revolutionary device and all) this is good, however there
are downsides to this complete and total domination. Indeed,
the iPhone customer has become something of a bedazzled
twit, lusting after whatever superficial marking ploys are
pulled from Jobs' decomposing arse. What does this have to
do with coders, you ask? Well, we are merely pawns in a
greater game...

> >> [ ] Uses no diacritical marks
> >
> > Why is it my responsibility to encode my text with
> > pronunciation tutorials? Are we adults here or what?
> >
> >> [ ] Writes all text top-to-bottom, left-to-right
> >
> > Not my problem. Learn the King's English or go wait for
> > extinction to arrive.
>
> And these two cement your parochialism thoroughly in
> everyone's minds. "Pronunciation tutorials", eh? Sure. Tell
> that to everyone who speaks Spanish, Turkish, Norwegian,
> German, or Vietnamese, all of which use diacritical marks
> to distinguish between letters. English is the weird
> language in that it uses letter pairs instead of adorned
> letters (eg "ch" and "sh" instead of "ç" and "ş").

Well, it seems the designers of English knew a thing or two
about time machines long before GvR did. Hmm, that makes
wonder if ol' GvR ever worked at a patent office...?

> Also, which king are you referring to, exactly? Whose
> English do you speak?

Only "right-proper English", old chap. ;-)

> > The only justification required is the bottom line. If your
> > products generate profit, then you're doing something
> > right. Besides, you don't need _everyone_ on the planet to
> > buy your product to be a success. Unlike the business
> > practices of Apple, we would be wise to leave plenty of
> > room for others to enter the market. Competition is good
> > for everyone. Monopolies are evil.
>
> Riight. What's the "bottom line" for open source
> software? How do you measure whether your product is
> generating a profit or not?

Easy. You count the number of active community members. You
also closely observe the "community health tends" over time.
Having a small community today is not necessarily a bad
thing if the community is healthy and growing. OTOH, a large
unhealthy community today could be a ghost town tomorrow.
Biologist refer to that phenomenon as extinction. Which is
neither good nor profitable.

Rectangular sheets of paper with dead presidents printed on
them are not the only source of profits. Crowd sourcing can
be quite a profitable enterprise even in the absence of
money -- that is, *IF*, and only *IF* -- you invest the time
required to lower barriers of entry and foster participation
from diverse external sources. Social homogeny and
intellectual isolation lead to collective oblivion.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-30 Thread Rhodri James

On 30/03/17 16:57, Mikhail V wrote:

Steve, it is not bad to want to spell your name using spelling which
was taught you in the school. But it is bad to stay in illusion that there
is something good in using accents.


*plonk*

--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-30 Thread Mikhail V
On 30 March 2017 at 16:14, Steve D'Aprano  wrote:
> On Thu, 30 Mar 2017 03:21 pm, Rick Johnson wrote:
>
>> On Sunday, March 26, 2017 at 2:53:49 PM UTC-5, Chris Angelico wrote:
>>> On Mon, Mar 27, 2017 at 6:25 AM, Mikhail V  wrote:
>>> > On 26 March 2017 at 20:10, Steve D'Aprano 
>>> > wrote:

>>> [ ] Uses no diacritical marks
>>
>> Why is it my responsibiliy to encode my text with
>> pronuciation tutorials? Are we adults here or what?
>
> Now you're just being absurd. Supporting diacritics doesn't mean you are
> responsible for teaching your users what they're for. They already know.
> That's why they want to use them.
>
> Diacritics are for:
>
> - distinguishing between words which look the same, but have
>   different pronunciation;
>
> - distinguishing between different letters of the alphabet, like
>   dotted-i and dotless-ı (or ı and ı-with-a-dot, if you prefer),
>   or a and å;
>
> - distinguishing between words which look and sound the same but
>   mean something different;
>
> - and making band names look ǨØØĻ and annoy old fuddy-duddies.
>

Steve, it is not bad to want to spell your name using spelling which
was taught you in the school. But it is bad to stay in illusion that there
is something good in using accents. As said it _is_ selfish to force
people to use e.g. umlauts and noun Capitalisations in German.
It is an big obstacle for reading and burdle for typing.
Initially it has nothing to do with people's choice, it is politics only.
I can speak and write German fluently, so I know how much
better would it be without those odd spelling rules.

So don't mix the spoken language and writing system - spoken
language will never be extinct, but most writing systems will be obsolete
and should be obsolete (you can call me bigot again ;-)

Some other interesting aspects: if I localise a software in Russian
language and use Cyrillic letters, english speakers will not be able
to read _anything_, and if I'll use Latin letters instead, then
non-russian users
will be at least able to read something, so if you know some Russian
spoken language it will be much more help for you.

Concrete software example - lets say I make an IDE.
It is far more important to give the users mechanisms to customize
the glyphs (e.g. edit math signs) than supporting Unicode.
And therefore it is much more important to make those font
format definitions transparent, non-bloated and easily editable.
Where is it all?


Mikhail
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-30 Thread Michael Torrie
On 03/30/2017 08:14 AM, Steve D'Aprano wrote:
>> Why is it my responsibiliy to encode my text with
>> pronuciation tutorials? Are we adults here or what?
>
> Now you're just being absurd. 

Ahh yes, good old RR with his reductio ad absurdum fallacies when he's
lost the argument.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-30 Thread Chris Angelico
On Fri, Mar 31, 2017 at 1:16 AM, Steve D'Aprano
 wrote:
> On Fri, 31 Mar 2017 12:25 am, Mikhail V wrote:
>
>> Call me a bigot
>
> Okay. You're a bigot.

+1 QOTD

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-30 Thread Steve D'Aprano
On Fri, 31 Mar 2017 12:25 am, Mikhail V wrote:

> Call me a bigot

Okay. You're a bigot.


-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-30 Thread Steve D'Aprano
On Thu, 30 Mar 2017 03:21 pm, Rick Johnson wrote:

> On Sunday, March 26, 2017 at 2:53:49 PM UTC-5, Chris Angelico wrote:
>> On Mon, Mar 27, 2017 at 6:25 AM, Mikhail V  wrote:
>> > On 26 March 2017 at 20:10, Steve D'Aprano 
>> > wrote:
>> >> On Mon, 27 Mar 2017 03:57 am, Mikhail V wrote:
> 
>> I generally find that when people say that Unicode doesn't
>> solve their problems and they need to roll their own, it's
>> usually one of two possibilities:  1) "Their problems" are
>> all about simplicity. They don't want to have to deal with
>> all the complexities of real-world text, so they
>> arbitrarily restrict things.
> 
> There are only so many hours in the day Chris. Not every
> progammer has the time to cater to every selfish desire of
> every potential client.

Oh, you're one of *those* coders. The ones who believe that if they
personally don't need something, nobody needs it.

Listen, I'm 100% in favour of the open source model. I think that coders who
scratch their own itch is a great way to produce some really fantastic
software. Look at the Linux kernel, and think about how that has evolved
from Linus Torvalds scratching his own itch.

It can also produce some real garbage too, usually from the kind of coder
whose answer to everything is "you don't need to do that".

But whatever, its a free country. If you don't want to support a subset of
your potential users, or customers, that's entirely up to you.

The honest truth is that most software ends up languishing in obscurity,
only used by a relative handful of people, so its quite unlikely that
you'll every have any users wanting support for Old Persian or Ogham.

But if you have any users at all, there's a good chance they'll want to
write their name correctly even if they are called Zöe, or include the
trademarked name of their Awesome™ product, or write the name of that hot
new metal band THЯДSHËR, or use emoji, or to refer to ¢ and °F
temperatures.

You might call it "selfish" for somebody to want to spell their name
correctly, or write in their native language, but selfish or not if you
don't give your users the features they want, they are unlikely to use your
software. Outside of the Democratic People's Republic of Trumpistan, the
world is full of about seven billion people who don't have any interest in
your ASCII-only software. It's not 1970 any more, the world is connected.

And the brilliant thing about Unicode is that for a little bit of effort you
can support Zöe and her French girlfriends, and that Swedish metal band
with the umlauts, and the President's Russian backers, and once you've done
that, you get at least partial support for Hebrew and Chinese and Korean
and Vietnamese and a dozen different Indian languages, and even Old Persian
and Ogham, FOR FREE.

So if you're wanting to create "the best product you can", why *wouldn't*
you use Unicode?


> You try to create the best product you can, 
> but at the end of the process, there will always be 
> someone (or a group of someones) who are unhappy with the
> result.


[...]
>> [ ] Speaks English exclusively
> 
> Of course, your comment presupposing that every programmer
> is fluent in every natural language. Which is not only
> impractical, it's impossible.

Don't be silly. You don't have to be fluent in a language in order for your
program to support users who are. All you have to do is not stop them from
using their own native language by forcing them to use ASCII and nothing
but ASCII.

Of course, if you want to *localise* your UI to their language, then you
need somebody to translate error messages, menus, window titles, etc. I'll
grant that's not always an easy job.

But aren't you lucky, you speak one of a handful of lingua francas in the
world, so the chances are your users will be pathetically grateful if all
you do is let them type in their own language. Actual UI localisation is a
bonus.


>> [ ] Uses no diacritical marks
> 
> Why is it my responsibiliy to encode my text with
> pronuciation tutorials? Are we adults here or what?

Now you're just being absurd. Supporting diacritics doesn't mean you are
responsible for teaching your users what they're for. They already know.
That's why they want to use them.

Diacritics are for:

- distinguishing between words which look the same, but have 
  different pronunciation;

- distinguishing between different letters of the alphabet, like 
  dotted-i and dotless-ı (or ı and ı-with-a-dot, if you prefer), 
  or a and å;

- distinguishing between words which look and sound the same but
  mean something different;

- and making band names look ǨØØĻ and annoy old fuddy-duddies.


>> [ ] Writes all text top-to-bottom, left-to-right
> 
> Not my problem. Learn the King's English or go wait for
> extinction to arrive.

Which king?

Harald V speaks Norwegian, Felipe VI speaks Spanish, Hamad bin Isa speaks
whatever they speak in Bahrain (probably Arabic), Norodom Sihamoni speaks
Cambodian, Vajiralongkorn speaks Thai, Mswati III speaks Swazi, Ab

Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-30 Thread Mikhail V
On 30 March 2017 at 07:43, Chris Angelico  wrote:
> On Thu, Mar 30, 2017 at 3:21 PM, Rick Johnson
>  wrote:
>> On Sunday, March 26, 2017 at 2:53:49 PM UTC-5, Chris Angelico wrote:
>>> On Mon, Mar 27, 2017 at 6:25 AM, Mikhail V  wrote:
>>> > On 26 March 2017 at 20:10, Steve D'Aprano  
>>> > wrote:
>>> >> On Mon, 27 Mar 2017 03:57 am, Mikhail V wrote:
>>

>>> """
>>> I, the undersigned, acknowledge that my program is
>>> intentionally excluding everyone who does not fit the
>>> following requirements: [choose all applicable]
>>>
>>> [ ] Speaks English exclusively
>>
>> Of course, your comment presupposing that every programmer
>> is fluent in every natural language. Which is not only
>> impractical, it's impossible.
>
> Nope. I can't speak Mandarin, but I can make absolutely sure that all
> my programs can accept Chinese characters. A friend of mine sent me an
> audio file with a name that included some Chinese, and I was able to
> handle it no problem.
>

Naming files is another point. Generally if I can't speak Mandarin,
I have no right to make support for it since I know nothing about this
language nor do I know their symbols.

>>> [ ] Uses no diacritical marks
>>
>> Why is it my responsibiliy to encode my text with
>> pronuciation tutorials? Are we adults here or what?
>>
>>> [ ] Writes all text top-to-bottom, left-to-right
>>
>> Not my problem. Learn the King's English or go wait for
>> extinction to arrive.
>
> And these two cement your parochialism thoroughly in everyone's minds.
> "Pronunciation tutorials", eh? Sure. Tell that to everyone who speaks
> Spanish, Turkish, Norwegian, German, or Vietnamese, all of which use
> diacritical marks to distinguish between letters. English is the weird
> language in that it uses letter pairs instead of adorned letters (eg
> "ch" and "sh" instead of "ç" and "ş").

Because "Pronunciation tutorials" is one of rare excuses to use those
special characters at all. Now do you know how many phonetical
systems linguist have invented over past 200 years? Will you find
all them in Unicode? And why you need them today, if you can
learn pronunciation by audio tutorials?

And letter pair usage is not for fun there, I think we've discussed this
some time ago on python-ideas, it is merely a political problem,
since every 'king' in each land suddenly thinks that he is a genius
typographer and adds few custom characters to Latin after he realizes
that there is no sense in forcing everyone to use some outdated system,
or even rolls his own bizzare system (e.g. Hangul).

>> What don't you add these:
>>
>> [ ] Has the ability to read and comprehend at a high
>> school level.
>> [ ] Has functioning visual receptors.
>> [ ] Has a functioning brain.
>> [ ] Is not currently in a vegetative state
>
> Nah. If I did, I'd have to say "[ ] Is not trolling python-list" as well.

Call me a bigot, but I would say:
[x]  people, become adult finally and stop playing with your funny
hieroglyphs, use Latin set, and concentrate on real problems.

If I produce an arcade game or an IDE, would it lose much if
I don't include Unicode support? I personally would not do it
even in the fear of punishment.


Mikhail
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-29 Thread Chris Angelico
On Thu, Mar 30, 2017 at 3:21 PM, Rick Johnson
 wrote:
> On Sunday, March 26, 2017 at 2:53:49 PM UTC-5, Chris Angelico wrote:
>> On Mon, Mar 27, 2017 at 6:25 AM, Mikhail V  wrote:
>> > On 26 March 2017 at 20:10, Steve D'Aprano  
>> > wrote:
>> >> On Mon, 27 Mar 2017 03:57 am, Mikhail V wrote:
>
>> I generally find that when people say that Unicode doesn't
>> solve their problems and they need to roll their own, it's
>> usually one of two possibilities:  1) "Their problems" are
>> all about simplicity. They don't want to have to deal with
>> all the complexities of real-world text, so they
>> arbitrarily restrict things.
>
> There are only so many hours in the day Chris. Not every
> progammer has the time to cater to every selfish desire of
> every potential client. You try to create the best product
> you can, but at the end of the process, there will always be
> someone (or a group of someones) who are unhappy with the
> result.

Except that it doesn't actually take very much work to call on someone
else's library, which is what you get when you use Unicode properly.
(At least, assuming you're using a decent language like Python, which
comes with Unicode libraries, and a decent GUI toolkit if you're going
that way.)

>> """
>> I, the undersigned, acknowledge that my program is
>> intentionally excluding everyone who does not fit the
>> following requirements: [choose all applicable]
>>
>> [ ] Speaks English exclusively
>
> Of course, your comment presupposing that every programmer
> is fluent in every natural language. Which is not only
> impractical, it's impossible.

Nope. I can't speak Mandarin, but I can make absolutely sure that all
my programs can accept Chinese characters. A friend of mine sent me an
audio file with a name that included some Chinese, and I was able to
handle it no problem.

>> [ ] Uses no diacritical marks
>
> Why is it my responsibiliy to encode my text with
> pronuciation tutorials? Are we adults here or what?
>
>> [ ] Writes all text top-to-bottom, left-to-right
>
> Not my problem. Learn the King's English or go wait for
> extinction to arrive.

And these two cement your parochialism thoroughly in everyone's minds.
"Pronunciation tutorials", eh? Sure. Tell that to everyone who speaks
Spanish, Turkish, Norwegian, German, or Vietnamese, all of which use
diacritical marks to distinguish between letters. English is the weird
language in that it uses letter pairs instead of adorned letters (eg
"ch" and "sh" instead of "ç" and "ş").

Also, which king are you referring to, exactly? Whose English do you speak?

> What don't you add these:
>
> [ ] Has the ability to read and comprehend at a high
> school level.
> [ ] Has functioning visual receptors.
> [ ] Has a functioning brain.
> [ ] Is not currently in a vegetative state

Nah. If I did, I'd have to say "[ ] Is not trolling python-list" as well.

>> Sure, there are good reasons to place restrictions on
>> people's text. But those restrictions are part of your
>> public API and UI. Acknowledge them. Own them. And justify
>> them.
>
> The only justifaction required is the bottom line. If your
> products generate profit, then you're doing something right.
> Besides, you don't need _everyone_ on the planet to buy your
> product to be a success. Unlike the business practices of
> Apple, we would be wise to leave plenty of room for others
> to enter the market. Competition is good for everyone.
> Monopolies are evil.

Riight. What's the "bottom line" for open source software? How do
you measure whether your product is generating a profit or not?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-29 Thread Rick Johnson
On Sunday, March 26, 2017 at 6:42:36 PM UTC-5, Mikhail V wrote: 
> And all text I currently read on my monitor are prerendered
> bitmaps, refined manually for frequently used sizes, and
> that is how it should be made. IOW there are much more
> important aspects than the ability to scale a text line
> from 600 px to 601 px wide, if you know what I mean.

LOL!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-29 Thread Rick Johnson
On Sunday, March 26, 2017 at 2:53:49 PM UTC-5, Chris Angelico wrote:
> On Mon, Mar 27, 2017 at 6:25 AM, Mikhail V  wrote:
> > On 26 March 2017 at 20:10, Steve D'Aprano  
> > wrote:
> >> On Mon, 27 Mar 2017 03:57 am, Mikhail V wrote:

> I generally find that when people say that Unicode doesn't
> solve their problems and they need to roll their own, it's
> usually one of two possibilities:  1) "Their problems" are
> all about simplicity. They don't want to have to deal with
> all the complexities of real-world text, so they
> arbitrarily restrict things.

There are only so many hours in the day Chris. Not every
progammer has the time to cater to every selfish desire of
every potential client. You try to create the best product
you can, but at the end of the process, there will always be
someone (or a group of someones) who are unhappy with the
result.

> 2) Unicode _would_ solve their problems, they just don't
> realize it.  So if you're rolling your own text display
> system, you should start by making a signed declaration:
> 
> """
> I, the undersigned, acknowledge that my program is
> intentionally excluding everyone who does not fit the
> following requirements: [choose all applicable]
> 
> [ ] Speaks English exclusively

Of course, your comment presupposing that every programmer
is fluent in every natural language. Which is not only
impractical, it's impossible.

> [ ] Uses no diacritical marks

Why is it my responsibiliy to encode my text with
pronuciation tutorials? Are we adults here or what?

> [ ] Writes all text top-to-bottom, left-to-right

Not my problem. Learn the King's English or go wait for
extinction to arrive.

> [ ] Uses only characters from the Basic Multilingual Plane
> [ ] Uses only characters from this codepage: 
> [ ] Uses a monospaced font
> [ ] Uses a proportionally-spaced font
> [ ] Uses this font: _
> [ ] Uses a mouse
> [ ] Uses a keyboard
> [ ] Other: ___
> (use additional pages if required)

What don't you add these: 

[ ] Has the ability to read and comprehend at a high 
school level.
[ ] Has functioning visual receptors.
[ ] Has a functioning brain.
[ ] Is not currently in a vegetative state

> Sure, there are good reasons to place restrictions on
> people's text. But those restrictions are part of your
> public API and UI. Acknowledge them. Own them. And justify
> them.

The only justifaction required is the bottom line. If your
products generate profit, then you're doing something right.
Besides, you don't need _everyone_ on the planet to buy your
product to be a success. Unlike the business practices of
Apple, we would be wise to leave plenty of room for others
to enter the market. Competition is good for everyone.
Monopolies are evil.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-29 Thread Rick Johnson
On Sunday, March 26, 2017 at 1:21:18 PM UTC-5, Chris Angelico wrote:
> On Mon, Mar 27, 2017 at 4:43 AM, Steve D'Aprano
>  wrote:

> [...] So, for instance, Eryk Sun commented that my rounded
> box example didn't render correctly in all fonts - but in
> the future, a new version of those fonts could be released,
> adding support for those characters. We *know* that the
> code points I used are permanently and irrevocably
> allocated to the purposes I used them for, so we can all be
> confident that they'll be used correctly if at all.

You place a lot of faith in the supposed "immutability of
Unicode code points", but a lot people have placed a lot of
faith in many past and current encoding systems, only to be
bamboozled by the gatekeepers some time later.

> > That's not quite right. Unicode includes 137000 or so
> > Private Use Characters, which anyone can define for their
> > own purposes, "by private agreement". There's an
> > unofficial registry of such private use characters here:

And so, although Unicode was created to solve the endless
compatibility problems between multiple archaic encoding
systems, the designers thought it necessary to add a "custom
space" that will keep the incompatibilities on life support.
Smart. *REALLY* smart. And people _wonder_ why Dylan was a
disgruntled laureate...
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Tim Chase
On 2017-03-27 02:37, Chris Angelico wrote:
> > In DOS, (I don't remember if in all versions or only some)
> > one could do all this and this opens very rich possibilities for
> > approximating of objects with tiles. The only limitations
> > that one uses 255 tiles, but even this enables to build
> > whole 'worlds' and state of the art apps. So I would call this
> > pseudographics and not few sticks and corner tiles
> > (which I cannot even define and upload easily).  
> 
> Yeah; if my memory serves me, this was an IBM BIOS feature, so all
> versions of DOS would be equally able to do it. But it's basically a
> form of tile graphics, not text. 

It was a function of the EGA/VGA card (maybe CGA? Though I think
that might have been limited to the upper 128 chars while the lower
128 were fixed), not the IBM BIOS.  But yes, there were font-editors
for the EGA/VGA fonts and, once set, they'd appear even in things
like WordPerfect, QuattroPro, Lotus, or Turbo Pascal.  All the rage
back in my 286-wolfenstein3d-playing-turbopascal-programming days. ;-)

-tkc


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Mikhail V
On 26 March 2017 at 21:53, Chris Angelico  wrote:
> On Mon, Mar 27, 2017 at 6:25 AM, Mikhail V  wrote:
>> On 26 March 2017 at 20:10, Steve D'Aprano  wrote:
>>> On Mon, 27 Mar 2017 03:57 am, Mikhail V wrote:
>>>
>>> [...]
>> And more important: can one use binary (bitmap) fonts in default modern
>> linux console? If yes, can one patch them with custom tiles at
>> the application start?
>
> If you really need something completely custom, it's not text any
> more.

 Obvious fact, but if I need e.g. rounded corners in table drawing
 characters? Or I just want to fix some characters which look especially
 ugly? Create a new TTF? No, thanks, this would be worst nightmare to
 do without a special tool (which have prices with several zeros, otherwise
 just don't work and can even break things system-wide)
>>>
>>> Don't be silly. It took me ten seconds on Google to find this:
>>>
>>> https://birdfont.org/
>>>
>>
>> It takes you ten seconds to Google, and what if I ask you
>> to take, say Courier New font TTF file (which includes not only
>> vector information but all that is responsible for bitmap
>> rendering, subpixeling, etc), then edit one character (and
>> all corresponding information for subpixeling),
>> then compile it as a new font, then install it on Win,
>> without that making any conflicts, and without _any_
>> further glitches or changes in other characters, and no such
>> things across all applications.
>> If you'd try that, and you will succeed, _then_ I will publicly admit
>> that I was silly.
>>
>> And paying even 50$ for correcting one glyph... well
>> probably I'll do it if one gives guarantee that all above
>> will work.
>
> See previous comments about font substitution. Create a font with just
> one character in it. Use that font in your application. Voila! No
> changes to any other applications (because they'll still be using the
> original font), and no changes to any other characters.

Good tip, I'll try that. Though still one need an app, even
for one character, and it'll need fallback setup on each
computer I use.
Dont get it wrong, I don't say it is impossible. There are
guys that have figured out such things and I've read once
something about hacking bitmap and subpixeling
information directly in the font file, but I was not
stubborn enough to learn that.


> Is it that decades of typographical research is incorrect, or that the
> designers of this font just sucked? You're pretty unambiguous in your
> description that you are "correcting" a glyph. Not adapting it to your
> own purposes - you're correcting something that's fundamentally wrong
> in someone else's font. Impressive.

Call it "modify for own purpose" if it sounds better.
In Courier, the brackets are too small, tilde char is too
much like hyphen, some other minor things.
And Courier New bold is best readable (for me ;) font on Win
 so I don't want another font, which has better brackets,
but less readable. And as said, if possible I avoid
monospaced font where possible, so this means
that probably I'll need to modfy some other fonts too.


 And for own standalone app, I would not use any TTF or
 anything vector-based font, since why?
>>>
>>> Right, because your users will *love* to see their native language displayed
>>> in a crappy bitmapped font with jagged or blurry edges.
>>>
>>
>> I am working on text rendering algorithms an have prototyped
>> several bitmap-based text rendering algorithms,
>> both managed and prerendered approaches, and there
>> is _nothing_ jagged or [incorrectly] blurred there, when
>> one knows what he's doing of course.
>> So it would be _very_ hard to catch me on incompetence
>> here, but you can try, and feel free to do it :
>
> Sure. Render me two characters on a half-meter-wide 1920x1080 screen.
> I'll choose the exact size dynamically, at run-time, in response to
> the amount of chrome I have on the window. Make sure the two
> characters look perfect whether I make this a tiny marker on the
> screen, or make it completely fill the entire monitor.
> [...]
> Even if high-DPI displays *do* prevail, you still have to render
> text at a wide variety of pixel sizes.

Seems like you are jumping from one corner case to another.
In general, if you want huge letters or some design tasks
(e.g. huge letters for a print) you can use vector paths.
But remember that a photo or a bitmap texture will not
become new information if you convert each pixel to a vector square, or
circle.  It is only question of scalability.

Concentrate on these points:
- Restrict the case to display only
- Making one letter fill half of a monitor, or rotating it arbitrary,
has little to do with reading text on a monitor in real situation.
- Your understanding of "look perfect" and relation with
information cognition (e.g. a retro game upscaled with
integer scaler versus a remake of this game made completely
with higher resolution sprites - will you say
that the latter feels

Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread eryk sun
On Sun, Mar 26, 2017 at 6:57 PM, Chris Angelico  wrote:
>
> In actual UCS-2, surrogates are entirely disallowed; in UTF-16, they *must* be
> correctly paired.

Strictly-speaking UCS-2 disallows codes that aren't defined by the
standard, but the kernel couldn't be that restrictive. Unicode was a
moving target in the period that NT was developed (1988-93). The
object manager simply allows any 16-bit code in object names, except
its path separator, backslash. Since a UNICODE_STRING is counted, even
NUL is allowed in object names. But that's uncommon and should be
avoided since the user-mode API uses null-terminated strings.

The file-system runtime library further restricts this by reserving
NUL, ASCII control codes, forward slash, pipe, and the wildcard
characters asterisk, question mark, double quote, less than, and
greater than. The rules are loosened for NTFS named streams, which
only reserve NUL, forward slash, and backslash.

>> Windows file systems are also UCS-2. For the most part it's not an
>> issue since the source of text and filenames will be valid UTF-16.
>
> I'm actually not sure on that one. Poking around on both Stack
> Overflow and MSDN suggests that NTFS does actually use UTF-16, which
> implies that lone surrogates should be errors, but I haven't proven
> this. In any case, file system encoding is relatively immaterial; it's
> file system *API* encoding that matters, and that means the
> CreateFileW function and its friends:

Sure, the file system itself can use any encoding, but Microsoft use a
permissive UCS-2 in its file systems. The API uses 16-bit WCHARs, and
except for a relatively small set of codes (assuming it uses the
FsRtl), the system generally doesn't care about the values. Let's
review the major actors.

CreateFile uses the runtime library in ntdll.dll to fill in an
OBJECT_ATTRIBUTES [1] with a UNICODE_STRING [2]. This is where the
current-directory handle is set as the attributes RootDirectory handle
for relative paths; where slash is replaced with backslash; and where
weird MS-DOS rules are applied, such as DOS device names and trimming
trailing spaces. Once it has a native object attributes record, it
calls the real system call NtCreateFile [3]. In kernel mode this in
turn calls the I/O manager function IoCreateFile [4], which creates an
open packet and calls the object manger function ObOpenObjectByName.

Now it's time for path parsing. In the normal case the system
traverses several object directories and object symbolic links before
finally arriving at an I/O device (e.g. \??\C: => \Global??\C: =>
\Device\HarddiskVolume2). Parsing the rest of the path is in the hands
of the I/O manager via the Device object's ParseProcedure. The I/O
manager creates a File object and an I/O request packet (IRP) for the
major function IRP_MJ_CREATE [5] and calls the driver for the device
stack via IoCallDriver [6]. If the device is a volume that's managed
by a file-system driver (e.g. ntfs.sys), the file-system parses the
remaining path to open or create the directory/file/stream and
complete the IRP. The object manager creates a handle for the File
object in the handle table of the calling process, and this handle
value is finally passed back to the caller.

[1]: https://msdn.microsoft.com/en-us/library/ff557749
[2]: https://msdn.microsoft.com/en-us/library/ff564879
[3]: https://msdn.microsoft.com/en-us/library/ff566424
[4]: https://msdn.microsoft.com/en-us/library/ff548418
[5]: https://msdn.microsoft.com/en-us/library/ff548630
[6]: https://msdn.microsoft.com/en-us/library/ff548336

The object manager only cares about its path separator, backslash,
until it arrives at an object type that it doesn't manage, such as a
Device object. If a file system uses the FsRtl, then the remaining
path is subject to Windows file-system rules. It would be ill-advised
to diverge from these rules.

> I *think* it's the naive (and very common) hybrid of UCS-2 and UTF-16

It's just the way the system evolved over time. UTF-16 wasn't
standardized until 1996 circa NT 4.0. Windows started integrating it
around NT 5 (Windows 2000), primarily for the GUI controls in the
windowing system that directly affect text processing for most
applications. It was good enough to leave most of the lower layers of
the system passively naive when it comes to UTF-16.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Chris Angelico
On Mon, Mar 27, 2017 at 6:25 AM, Mikhail V  wrote:
> On 26 March 2017 at 20:10, Steve D'Aprano  wrote:
>> On Mon, 27 Mar 2017 03:57 am, Mikhail V wrote:
>>
>> [...]
> And more important: can one use binary (bitmap) fonts in default modern
> linux console? If yes, can one patch them with custom tiles at
> the application start?

 If you really need something completely custom, it's not text any
 more.
>>>
>>> Obvious fact, but if I need e.g. rounded corners in table drawing
>>> characters? Or I just want to fix some characters which look especially
>>> ugly? Create a new TTF? No, thanks, this would be worst nightmare to
>>> do without a special tool (which have prices with several zeros, otherwise
>>> just don't work and can even break things system-wide)
>>
>> Don't be silly. It took me ten seconds on Google to find this:
>>
>> https://birdfont.org/
>>
>
> It takes you ten seconds to Google, and what if I ask you
> to take, say Courier New font TTF file (which includes not only
> vector information but all that is responsible for bitmap
> rendering, subpixeling, etc), then edit one character (and
> all corresponding information for subpixeling),
> then compile it as a new font, then install it on Win,
> without that making any conflicts, and without _any_
> further glitches or changes in other characters, and no such
> things across all applications.
> If you'd try that, and you will succeed, _then_ I will publicly admit
> that I was silly.
>
> And paying even 50$ for correcting one glyph... well
> probably I'll do it if one gives guarantee that all above
> will work.

See previous comments about font substitution. Create a font with just
one character in it. Use that font in your application. Voila! No
changes to any other applications (because they'll still be using the
original font), and no changes to any other characters.

However, I'm impressed that you found a bug in a well-used font.

http://www.catb.org/esr/faqs/smart-questions.html#idm46227256017920

Is it that decades of typographical research is incorrect, or that the
designers of this font just sucked? You're pretty unambiguous in your
description that you are "correcting" a glyph. Not adapting it to your
own purposes - you're correcting something that's fundamentally wrong
in someone else's font. Impressive.

>> Why? Because you think you know better than the thousands of professionals
>> who have worked with text formats for decades?
>
> Sounds provocative, but yes, in some cases I know what I am
> doing ;-).
> But that is not because professionals does not know,
> there are many other aspects which come in play here.
> It depends on the use case, Unicode solves only some
> problems.
> I was talking only about _my own_ usage, it
> will be obviously incompatible e.g. for copy-pasting
> between othr apps.
> There are benefits to store language-specific values (+ their glyphs)
> in separate stacks.
> Anyway this discussion will require concrete
> examples and much deeper investigation.

I generally find that when people say that Unicode doesn't solve their
problems and they need to roll their own, it's usually one of two
possibilities:

1) "Their problems" are all about simplicity. They don't want to have
to deal with all the complexities of real-world text, so they
arbitrarily restrict things.
2) Unicode _would_ solve their problems, they just don't realize it.

So if you're rolling your own text display system, you should start by
making a signed declaration:

"""
I, the undersigned, acknowledge that my program is intentionally
excluding everyone who does not fit the following requirements:
[choose all applicable]

[ ] Speaks English exclusively
[ ] Uses no diacritical marks
[ ] Writes all text top-to-bottom, left-to-right
[ ] Uses only characters from the Basic Multilingual Plane
[ ] Uses only characters from this codepage: 
[ ] Uses a monospaced font
[ ] Uses a proportionally-spaced font
[ ] Uses this font: _
[ ] Uses a mouse
[ ] Uses a keyboard
[ ] Other: ___
(use additional pages if required)

Signed: ___
"""

Sure, there are good reasons to place restrictions on people's text.
But those restrictions are part of your public API and UI. Acknowledge
them. Own them. And justify them.

>>> And for own standalone app, I would not use any TTF or
>>> anything vector-based font, since why?
>>
>> Right, because your users will *love* to see their native language displayed
>> in a crappy bitmapped font with jagged or blurry edges.
>>
>
> I am working on text rendering algorithms an have prototyped
> several bitmap-based text rendering algorithms,
> both managed and prerendered approaches, and there
> is _nothing_ jagged or [incorrectly] blurred there, when
> one knows what he's doing of course.
> So it would be _very_ hard to catch me on incompetence
> here, but you can try, and feel free to do it :

Sure. Render me two characters on a half-meter-wide 1920x1080 screen.
I'll cho

Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Mikhail V
On 26 March 2017 at 20:10, Steve D'Aprano  wrote:
> On Mon, 27 Mar 2017 03:57 am, Mikhail V wrote:
>
> [...]
 And more important: can one use binary (bitmap) fonts in default modern
 linux console? If yes, can one patch them with custom tiles at
 the application start?
>>>
>>> If you really need something completely custom, it's not text any
>>> more.
>>
>> Obvious fact, but if I need e.g. rounded corners in table drawing
>> characters? Or I just want to fix some characters which look especially
>> ugly? Create a new TTF? No, thanks, this would be worst nightmare to
>> do without a special tool (which have prices with several zeros, otherwise
>> just don't work and can even break things system-wide)
>
> Don't be silly. It took me ten seconds on Google to find this:
>
> https://birdfont.org/
>

It takes you ten seconds to Google, and what if I ask you
to take, say Courier New font TTF file (which includes not only
vector information but all that is responsible for bitmap
rendering, subpixeling, etc), then edit one character (and
all corresponding information for subpixeling),
then compile it as a new font, then install it on Win,
without that making any conflicts, and without _any_
further glitches or changes in other characters, and no such
things across all applications.
If you'd try that, and you will succeed, _then_ I will publicly admit
that I was silly.

And paying even 50$ for correcting one glyph... well
probably I'll do it if one gives guarantee that all above
will work.

>
>>> More likely, you don't truly need something custom - what you need is
>>> a different subset of characters (maybe you need to mix Latin, Greek,
>>> and Hebrew letters, in order to show interlinear translation of the
>>> Bible). Instead of messing around with character sets, you can just
>>> use Unicode and have all of them available.
>>
>> If I was to deal with multiple language charsets in _my own_ rendering
>> app, I would still use discrete encoding for inner algorithms.
>> i.e. I would place separate charsets on separate code ranges.
>
> Why? Because you think you know better than the thousands of professionals
> who have worked with text formats for decades?

Sounds provocative, but yes, in some cases I know what I am
doing ;-).
But that is not because professionals does not know,
there are many other aspects which come in play here.
It depends on the use case, Unicode solves only some
problems.
I was talking only about _my own_ usage, it
will be obviously incompatible e.g. for copy-pasting
between othr apps.
There are benefits to store language-specific values (+ their glyphs)
in separate stacks.
Anyway this discussion will require concrete
examples and much deeper investigation.

>
>> And for own standalone app, I would not use any TTF or
>> anything vector-based font, since why?
>
> Right, because your users will *love* to see their native language displayed
> in a crappy bitmapped font with jagged or blurry edges.
>

I am working on text rendering algorithms an have prototyped
several bitmap-based text rendering algorithms,
both managed and prerendered approaches, and there
is _nothing_ jagged or [incorrectly] blurred there, when
one knows what he's doing of course.
So it would be _very_ hard to catch me on incompetence
here, but you can try, and feel free to do it :

FYI vector-based fonts were mainly motivated by print design.
Modern GPUs have capabilities for fast vector
glyph rendering, but it is not needed for screen rendering,
much less when higher DPI displays will prevale.

Mikhail
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Chris Angelico
On Mon, Mar 27, 2017 at 5:37 AM, eryk sun  wrote:
> On Sun, Mar 26, 2017 at 5:58 PM, Chris Angelico  wrote:
>>> The Windows console can render any character in the BMP, but it
>>> requires configuring font linking for fallback fonts. It's Windows, so
>>> of course the supported UTF format is UTF-16. The console's UTF-8
>>> support (codepage 65001) is too buggy to even consider using it.
>>
>> Is it actually UTF-16, or is it UCS-2?
>
> Pedantically speaking it's UCS-2. Console buffers aren't necessarily
> valid UTF-16, i.e. they can have lone surrogate codes or invalid
> surrogate pairs. The way a surrogate code gets rendered depends on the
> font. It could be an empty box, a box containing a question mark, or
> simply empty space. That applies even if it's a valid UTF-16 surrogate
> pair, so the console can't display non-BMP characters such as emojis.
> They can be copied to the clipboard and displayed in another program.

Exactly. So it's not supporting the entire Unicode range, but only the
BMP. That restricts its usability for anything other than simple text.

> Windows file systems are also UCS-2. For the most part it's not an
> issue since the source of text and filenames will be valid UTF-16.

I'm actually not sure on that one. Poking around on both Stack
Overflow and MSDN suggests that NTFS does actually use UTF-16, which
implies that lone surrogates should be errors, but I haven't proven
this. In any case, file system encoding is relatively immaterial; it's
file system *API* encoding that matters, and that means the
CreateFileW function and its friends:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/gg269344(v=exchg.10).aspx

My reading of this is that:

a) The API is defined in terms of the WCHAR type, a 16-bit code unit.
b) Limits are described in terms of "characters" (eg a max of 32767
for a path that starts "\\?\")
c) ???
d) Profit??

I *think* it's the naive (and very common) hybrid of UCS-2 and UTF-16
that says "surrogates are allowed anywhere, and you're allowed to
interpret pairs of them as UTF-16". But that's not a standard
encoding. In actual UCS-2, surrogates are entirely disallowed; in
UTF-16, they *must* be correctly paired.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread eryk sun
On Sun, Mar 26, 2017 at 5:49 PM, eryk sun  wrote:
> On Sun, Mar 26, 2017 at 5:29 PM, Chris Angelico  wrote:
>> Rounded corners?
>>
>> ╭─┬─╮
>> ├─┼─┤
>> ╰─┴─╯
>
> This prints fine in the Windows console with Consolas as the font, but
> the older Courier New and Lucida Console fonts lack glyphs for the
> rounded corners.

I configured Consolas as a fallback for Lucida Console, and now it
shows the rounded corners in the console, but it beats me why anyone
would do that instead of simply using Consolas.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread eryk sun
On Sun, Mar 26, 2017 at 5:58 PM, Chris Angelico  wrote:
>> The Windows console can render any character in the BMP, but it
>> requires configuring font linking for fallback fonts. It's Windows, so
>> of course the supported UTF format is UTF-16. The console's UTF-8
>> support (codepage 65001) is too buggy to even consider using it.
>
> Is it actually UTF-16, or is it UCS-2?

Pedantically speaking it's UCS-2. Console buffers aren't necessarily
valid UTF-16, i.e. they can have lone surrogate codes or invalid
surrogate pairs. The way a surrogate code gets rendered depends on the
font. It could be an empty box, a box containing a question mark, or
simply empty space. That applies even if it's a valid UTF-16 surrogate
pair, so the console can't display non-BMP characters such as emojis.
They can be copied to the clipboard and displayed in another program.

Windows file systems are also UCS-2. For the most part it's not an
issue since the source of text and filenames will be valid UTF-16.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Chris Angelico
On Mon, Mar 27, 2017 at 5:10 AM, Steve D'Aprano
 wrote:
>> And for own standalone app, I would not use any TTF or
>> anything vector-based font, since why?
>
> Right, because your users will *love* to see their native language displayed
> in a crappy bitmapped font with jagged or blurry edges.

Side point: I have spent many hours wrestling with VLC to try to get a
subtitles font that looks good for all the world's languages. My
current setup has Latin, Cyrillic, and Greek looking great, Hebrew and
Arabic looking adequate (I'm no expert so I don't know beyond that),
but Thai, Chinese, Japanese, and Korean characters have jagged edges.
Thanks guys. It's 2017 and we're still using bitmap fonts.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Chris Angelico
On Mon, Mar 27, 2017 at 4:43 AM, Steve D'Aprano
 wrote:
> On Mon, 27 Mar 2017 02:37 am, Chris Angelico wrote:
>
>> Just use Unicode. Everything else, these days, is a subset of Unicode
>> anyway. Unless you're stuck on the default Windows shell/terminal, you
>> should be able to use UTF-8 everywhere and have the entire Unicode
>> range available. For example, the IBM OEM box-drawing characters are
>> available in Code Page 437... or as Unicode code points in the U+25xx
>> range.
>
> You are absolutely correct in theory, but in practice the availability of
> glyphs in most fonts is only a tiny proportion of the Unicode range. And
> even when the glyphs are available, the quality often varies: for example,
> in all of the monospaced fonts I've looked at, the superscripts ¹²³ are a
> different size to ⁴⁵⁶⁷⁸⁹⁰, both vertically and horizontally. And I've come
> across a few fonts where the box drawing characters don't all line up.
>
> Don't misunderstand me: Unicode is a HUGE improvement over the Bad Old Days
> of dozens of incompatible character sets. But let's not pretend that it
> makes it *easy*.

Unicode makes it about as easy as it can possibly be, given the
diversity of human languages and their various needs, plus the reality
that nobody has infinite resources for creating fonts. The most
important thing is that you have a single universal specification that
governs the interpretation of text, which means you can aim for that
standard, and if a renderer doesn't match up to it, that's a bug that
can be fixed, not behaviour that has to be maintained for backward
compatibility. So, for instance, Eryk Sun commented that my rounded
box example didn't render correctly in all fonts - but in the future,
a new version of those fonts could be released, adding support for
those characters. We *know* that the code points I used are
permanently and irrevocably allocated to the purposes I used them for,
so we can all be confident that they'll be used correctly if at all.

>>> And more important: can one use binary (bitmap) fonts in default modern
>>> linux console? If yes, can one patch them with custom tiles at
>>> the application start?
>>
>> If you really need something completely custom, it's not text any
>> more.
>
> That's not quite right. Unicode includes 137000 or so Private Use
> Characters, which anyone can define for their own purposes, "by private
> agreement". There's an unofficial registry of such private use characters
> here:
>
> http://www.evertype.com/standards/csur/
>
> More info here:
>
> https://en.wikipedia.org/wiki/Private_Use_Areas

This is true, but at some point, it's not text any more. The PUAs are
great if you're working with non-standard forms of text (eg Klingon,
or Elvish), but aren't well suited to arbitrary graphics. You should
be able to copy and paste text from one application into another and
have it retain its meaning; the PUAs weaken this guarantee in that the
applications have to agree to coexist, but within that, the same
ability to copy and paste should hold. It sounds like Mikhail is
trying to warp the console into something pseudo-graphical like a
Roguelike game, but instead of designing the game around available
glyphs, wants to design the glyphs to suit the game - and at that
point, it's time to just go graphical, IMO.

>> More likely, you don't truly need something custom - what you need is
>> a different subset of characters (maybe you need to mix Latin, Greek,
>> and Hebrew letters, in order to show interlinear translation of the
>> Bible). Instead of messing around with character sets, you can just
>> use Unicode and have all of them available.
>
> Assuming you have a text widget which is capable of displaying LTR and RTL
> text, and support for all the glyphs you need.

This is true. Fortunately, some measure of this is available in all
the major GUI toolkits, although some applications need to have their
own handling too. But here's what it takes to have full Unicode
support in my MUD client:

1) Use GTK and Pango. That's the biggest part.
2) Due to the nature of MUDs, RTL text is still left-justified.
3) Due to the interaction of left-justified RTL text and indentation,
special handling is needed for lines that begin with spaces and/or
tabs and then an RTL character. (Solution: Prepend U+200E
LEFT-TO-RIGHT MARK.)
4) Individual lines may be painted in multiple colours, so the text
gets divided up and measured in pieces. I let Pango do the actual
measurements.

That's about it. Basically I just let Pango do all the heavy lifting;
if it says this text in this font takes up this many pixels, that's
how many pixels of width I allocate it. RTL? LTR? Mixed? No problem.
It'll do all that for me.

So yeah. Unicode isn't a panacea, and if you come from an ASCII-only
environment, Unicode will look hard - but it's making life far easier
than the alternatives would be.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Steve D'Aprano
On Mon, 27 Mar 2017 03:57 am, Mikhail V wrote:

[...]
>>> And more important: can one use binary (bitmap) fonts in default modern
>>> linux console? If yes, can one patch them with custom tiles at
>>> the application start?
>>
>> If you really need something completely custom, it's not text any
>> more.
> 
> Obvious fact, but if I need e.g. rounded corners in table drawing
> characters? Or I just want to fix some characters which look especially
> ugly? Create a new TTF? No, thanks, this would be worst nightmare to
> do without a special tool (which have prices with several zeros, otherwise
> just don't work and can even break things system-wide)

Don't be silly. It took me ten seconds on Google to find this:

https://birdfont.org/

It is no charge for an open source licence, or $5 USD for a commercial
licence. If that's too cheap, you can use FontCreator at just $79:

http://www.high-logic.com/font-editor/fontcreator.html



>> More likely, you don't truly need something custom - what you need is
>> a different subset of characters (maybe you need to mix Latin, Greek,
>> and Hebrew letters, in order to show interlinear translation of the
>> Bible). Instead of messing around with character sets, you can just
>> use Unicode and have all of them available.
> 
> If I was to deal with multiple language charsets in _my own_ rendering
> app, I would still use discrete encoding for inner algorithms.
> i.e. I would place separate charsets on separate code ranges.

Why? Because you think you know better than the thousands of professionals
who have worked with text formats for decades?


> And for own standalone app, I would not use any TTF or
> anything vector-based font, since why?

Right, because your users will *love* to see their native language displayed
in a crappy bitmapped font with jagged or blurry edges.



-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Chris Angelico
On Mon, Mar 27, 2017 at 4:38 AM, eryk sun  wrote:
> On Sun, Mar 26, 2017 at 3:37 PM, Chris Angelico  wrote:
>>
>> Just use Unicode. Everything else, these days, is a subset of Unicode
>> anyway. Unless you're stuck on the default Windows shell/terminal, you
>> should be able to use UTF-8 everywhere and have the entire Unicode
>> range available.
>
> The Windows console can render any character in the BMP, but it
> requires configuring font linking for fallback fonts. It's Windows, so
> of course the supported UTF format is UTF-16. The console's UTF-8
> support (codepage 65001) is too buggy to even consider using it.

Is it actually UTF-16, or is it UCS-2?

> I don't know why you mention the shell. It has nothing to do with
> this. But, for what it's worth, the cmd shell is a Unicode application
> and always has been. It use the console's wide-character API.

Because a lot of people on Windows don't understand the distinction,
and it's common to hear people talk about "cmd.exe" when they really
mean the graphical display. But I'm aware that pedantic correctness
separates them completely.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread eryk sun
On Sun, Mar 26, 2017 at 5:29 PM, Chris Angelico  wrote:
> Rounded corners?
>
> ╭─┬─╮
> ├─┼─┤
> ╰─┴─╯

This prints fine in the Windows console with Consolas as the font, but
the older Courier New and Lucida Console fonts lack glyphs for the
rounded corners.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Steve D'Aprano
On Mon, 27 Mar 2017 02:37 am, Chris Angelico wrote:

> On Mon, Mar 27, 2017 at 2:17 AM, Mikhail V  wrote:
 Why? IIRC I can do good pseudographics on linux only with extended
 unicode character sets, so yes it is possible, is that what you mean?
>>>
>>> No.  The same ASCII character set that was available in DOS is
>>> available in Linux without unicode.
>>
>> Ok, now I have read that one can change the encoding in the terminal
>> to get same table drawing characters (if one does not want to use
>> unicode).
> 
> Just use Unicode. Everything else, these days, is a subset of Unicode
> anyway. Unless you're stuck on the default Windows shell/terminal, you
> should be able to use UTF-8 everywhere and have the entire Unicode
> range available. For example, the IBM OEM box-drawing characters are
> available in Code Page 437... or as Unicode code points in the U+25xx
> range.

You are absolutely correct in theory, but in practice the availability of
glyphs in most fonts is only a tiny proportion of the Unicode range. And
even when the glyphs are available, the quality often varies: for example,
in all of the monospaced fonts I've looked at, the superscripts ¹²³ are a
different size to ⁴⁵⁶⁷⁸⁹⁰, both vertically and horizontally. And I've come
across a few fonts where the box drawing characters don't all line up.

Don't misunderstand me: Unicode is a HUGE improvement over the Bad Old Days
of dozens of incompatible character sets. But let's not pretend that it
makes it *easy*.



[...]
>> And more important: can one use binary (bitmap) fonts in default modern
>> linux console? If yes, can one patch them with custom tiles at
>> the application start?
> 
> If you really need something completely custom, it's not text any
> more. 

That's not quite right. Unicode includes 137000 or so Private Use
Characters, which anyone can define for their own purposes, "by private
agreement". There's an unofficial registry of such private use characters
here:

http://www.evertype.com/standards/csur/

More info here:

https://en.wikipedia.org/wiki/Private_Use_Areas



> For example, suppose you redefine all the character images, and 
> then someone copies and pastes into a web browser - can they search
> the web for the characters you're displaying, and will they mean the
> same things? If you've redefined images arbitrarily, they won't.
> 
> More likely, you don't truly need something custom - what you need is
> a different subset of characters (maybe you need to mix Latin, Greek,
> and Hebrew letters, in order to show interlinear translation of the
> Bible). Instead of messing around with character sets, you can just
> use Unicode and have all of them available.

Assuming you have a text widget which is capable of displaying LTR and RTL
text, and support for all the glyphs you need.




-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread eryk sun
On Sun, Mar 26, 2017 at 3:37 PM, Chris Angelico  wrote:
>
> Just use Unicode. Everything else, these days, is a subset of Unicode
> anyway. Unless you're stuck on the default Windows shell/terminal, you
> should be able to use UTF-8 everywhere and have the entire Unicode
> range available.

The Windows console can render any character in the BMP, but it
requires configuring font linking for fallback fonts. It's Windows, so
of course the supported UTF format is UTF-16. The console's UTF-8
support (codepage 65001) is too buggy to even consider using it.

I don't know why you mention the shell. It has nothing to do with
this. But, for what it's worth, the cmd shell is a Unicode application
and always has been. It use the console's wide-character API.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Chris Angelico
On Mon, Mar 27, 2017 at 3:57 AM, Mikhail V  wrote:
> On 26 March 2017 at 17:37, Chris Angelico  wrote:
>> On Mon, Mar 27, 2017 at 2:17 AM, Mikhail V  wrote:
> Why? IIRC I can do good pseudographics on linux only with extended
> unicode character sets, so yes it is possible, is that what you mean?

 No.  The same ASCII character set that was available in DOS is
 available in Linux without unicode.
>>>
>>> Ok, now I have read that one can change the encoding in the terminal
>>> to get same table drawing characters (if one does not want to use
>>> unicode).
>>
>> Just use Unicode. Everything else, these days, is a subset of Unicode
>> anyway. Unless you're stuck on the default Windows shell/terminal, you
>> should be able to use UTF-8 everywhere and have the entire Unicode
>> range available.
>
> Yes I am 'stuck' on Windows console, and I use it for what it is
> made for - running command line tools.

Not really stuck; even if you can't get off Windows, you should be
able to move off the ancient terminal that you get by default.

> On Win 7 and 10, I can see UTF-8 chars everywhere.
> To be precise, to see entire range of chars, you need a _font_
> in which someone have drawn those chars according to their
> understanding how those glyphs must look, nothing more.

Duh? If you want characters to display, you need a font yes...?

> No need to say, that even for text only, monospaced cannot
> represent them even close to satisfying, and for Arabic for example they
> look ass ugly in monospaced.
> IOW, even a console-like apps would use proportional fonts in the future.

Arabic text is written right-to-left. It's a lot more complicated than
just whether your font is monospaced or not, particularly when you mix
strongly-directional characters, weakly-directional characters,
non-directional characters, and explicit directionality markers. If
you mix RTL and LTR text, is the RTL text aligned to the right of the
page, or the left? There is a LOT more than just your font to take
care of here. If you want perfect handling of international text, you
basically need to use a Unicode-compliant text renderer - and
fortunately, most graphical engines these days come with exactly that.

>>> And more important: can one use binary (bitmap) fonts in default modern
>>> linux console? If yes, can one patch them with custom tiles at
>>> the application start?
>>
>> If you really need something completely custom, it's not text any
>> more.
>
> Obvious fact, but if I need e.g. rounded corners in table drawing
> characters? Or I just want to fix some characters which look especially ugly?
> Create a new TTF? No, thanks, this would be worst nightmare to
> do without a special tool (which have prices with several zeros, otherwise
> just don't work and can even break things system-wide)

Rounded corners?

╭─┬─╮
├─┼─┤
╰─┴─╯

A good font should show this as a rounded box with cross-lines through
it. The characters here are:

U+256D BOX DRAWINGS LIGHT ARC DOWN AND RIGHT
U+2500 BOX DRAWINGS LIGHT HORIZONTAL
U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
U+2500 BOX DRAWINGS LIGHT HORIZONTAL
U+256E BOX DRAWINGS LIGHT ARC DOWN AND LEFT
U+000A LINE FEED
U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT
U+2500 BOX DRAWINGS LIGHT HORIZONTAL
U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
U+2500 BOX DRAWINGS LIGHT HORIZONTAL
U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT
U+000A LINE FEED
U+2570 BOX DRAWINGS LIGHT ARC UP AND RIGHT
U+2500 BOX DRAWINGS LIGHT HORIZONTAL
U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL
U+2500 BOX DRAWINGS LIGHT HORIZONTAL
U+256F BOX DRAWINGS LIGHT ARC UP AND LEFT
U+000A LINE FEED

And if you think that some characters look ugly, you can create a font
with just those characters in it. Thanks to font substitution, your
font should be used for the characters it defines, but anything it
doesn't will fall back on some other font, so you don't have to create
representations for hundreds of thousands of Unicode characters.

>> More likely, you don't truly need something custom - what you need is
>> a different subset of characters (maybe you need to mix Latin, Greek,
>> and Hebrew letters, in order to show interlinear translation of the
>> Bible). Instead of messing around with character sets, you can just
>> use Unicode and have all of them available.
>
> If I was to deal with multiple language charsets in _my own_ rendering
> app, I would still use discrete encoding for inner algorithms.
> i.e. I would place separate charsets on separate code ranges.
> And for own standalone app, I would not use any TTF or
> anything vector-based font, since why?

Separate code ranges? You mean like allocating U+03xx to Greek, U+04xx
to Cyrillic (Russian and friends), U+06xx to Arabic, etc? Sounds like
a good plan

>> Yeah; if my memory serves me, this was an IBM BIOS feature, so all
>> versions of DOS would be equally able to do it. But it's basically a
>> form of tile graphics, not text. Given how easily graphical programs
>

Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Mikhail V
On 26 March 2017 at 17:37, Chris Angelico  wrote:
> On Mon, Mar 27, 2017 at 2:17 AM, Mikhail V  wrote:
 Why? IIRC I can do good pseudographics on linux only with extended
 unicode character sets, so yes it is possible, is that what you mean?
>>>
>>> No.  The same ASCII character set that was available in DOS is
>>> available in Linux without unicode.
>>
>> Ok, now I have read that one can change the encoding in the terminal
>> to get same table drawing characters (if one does not want to use
>> unicode).
>
> Just use Unicode. Everything else, these days, is a subset of Unicode
> anyway. Unless you're stuck on the default Windows shell/terminal, you
> should be able to use UTF-8 everywhere and have the entire Unicode
> range available.

Yes I am 'stuck' on Windows console, and I use it for what it is
made for - running command line tools.
On Win 7 and 10, I can see UTF-8 chars everywhere.
To be precise, to see entire range of chars, you need a _font_
in which someone have drawn those chars according to their
understanding how those glyphs must look, nothing more.

No need to say, that even for text only, monospaced cannot
represent them even close to satisfying, and for Arabic for example they
look ass ugly in monospaced.
IOW, even a console-like apps would use proportional fonts in the future.


>
>> But such a question: can one do it programmaticaly?
>
> Set everything to UTF-8 and you don't have to.
>
>> And more important: can one use binary (bitmap) fonts in default modern
>> linux console? If yes, can one patch them with custom tiles at
>> the application start?
>
> If you really need something completely custom, it's not text any
> more.

Obvious fact, but if I need e.g. rounded corners in table drawing
characters? Or I just want to fix some characters which look especially ugly?
Create a new TTF? No, thanks, this would be worst nightmare to
do without a special tool (which have prices with several zeros, otherwise
just don't work and can even break things system-wide)

>
> More likely, you don't truly need something custom - what you need is
> a different subset of characters (maybe you need to mix Latin, Greek,
> and Hebrew letters, in order to show interlinear translation of the
> Bible). Instead of messing around with character sets, you can just
> use Unicode and have all of them available.

If I was to deal with multiple language charsets in _my own_ rendering
app, I would still use discrete encoding for inner algorithms.
i.e. I would place separate charsets on separate code ranges.
And for own standalone app, I would not use any TTF or
anything vector-based font, since why?

>
>> In DOS, (I don't remember if in all versions or only some)
>> one could do all this and this opens very rich possibilities for
>> approximating of objects with tiles. The only limitations
>> that one uses 255 tiles, but even this enables to build
>> whole 'worlds' and state of the art apps. So I would call this
>> pseudographics and not few sticks and corner tiles
>> (which I cannot even define and upload easily).
>
> Yeah; if my memory serves me, this was an IBM BIOS feature, so all
> versions of DOS would be equally able to do it. But it's basically a
> form of tile graphics, not text. Given how easily graphical programs
> can be built these days, I would strongly recommend that, rather than
> abusing pseudo-text as pseudo-graphics. Pick up Tk or GTK or wxWindows
> or something, or build your app to run in a web browser, or something
> like that.

Exactly, that is why I do so, and even if one wants to play around
with console hacking, there is not so many documented
ways to do it. In Windows, I can manually select raster fonts,
so in pure theory, one could hack it with custom tiles, but
since it is much easier to use a graphical library today,
too few people are interested in it.

Mikhail
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Chris Angelico
On Mon, Mar 27, 2017 at 2:37 AM, Chris Angelico  wrote:
> Just use Unicode. Everything else, these days, is a subset of Unicode
> anyway.

(Caveat: There are a few counter-examples to my statement, but I very
much doubt that someone who's talking about PC OEM graphics is going
to be running into them.)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Chris Angelico
On Mon, Mar 27, 2017 at 2:17 AM, Mikhail V  wrote:
>>> Why? IIRC I can do good pseudographics on linux only with extended
>>> unicode character sets, so yes it is possible, is that what you mean?
>>
>> No.  The same ASCII character set that was available in DOS is
>> available in Linux without unicode.
>
> Ok, now I have read that one can change the encoding in the terminal
> to get same table drawing characters (if one does not want to use
> unicode).

Just use Unicode. Everything else, these days, is a subset of Unicode
anyway. Unless you're stuck on the default Windows shell/terminal, you
should be able to use UTF-8 everywhere and have the entire Unicode
range available. For example, the IBM OEM box-drawing characters are
available in Code Page 437... or as Unicode code points in the U+25xx
range.

> But such a question: can one do it programmaticaly?

Set everything to UTF-8 and you don't have to.

> And more important: can one use binary (bitmap) fonts in default modern
> linux console? If yes, can one patch them with custom tiles at
> the application start?

If you really need something completely custom, it's not text any
more. For example, suppose you redefine all the character images, and
then someone copies and pastes into a web browser - can they search
the web for the characters you're displaying, and will they mean the
same things? If you've redefined images arbitrarily, they won't.

More likely, you don't truly need something custom - what you need is
a different subset of characters (maybe you need to mix Latin, Greek,
and Hebrew letters, in order to show interlinear translation of the
Bible). Instead of messing around with character sets, you can just
use Unicode and have all of them available.

> In DOS, (I don't remember if in all versions or only some)
> one could do all this and this opens very rich possibilities for
> approximating of objects with tiles. The only limitations
> that one uses 255 tiles, but even this enables to build
> whole 'worlds' and state of the art apps. So I would call this
> pseudographics and not few sticks and corner tiles
> (which I cannot even define and upload easily).

Yeah; if my memory serves me, this was an IBM BIOS feature, so all
versions of DOS would be equally able to do it. But it's basically a
form of tile graphics, not text. Given how easily graphical programs
can be built these days, I would strongly recommend that, rather than
abusing pseudo-text as pseudo-graphics. Pick up Tk or GTK or wxWindows
or something, or build your app to run in a web browser, or something
like that.

If what you're doing really is text, just with custom images, you MAY
be able to ask your users to install a TTF or something. But I
wouldn't use a program that demands that I reconfigure my terminal.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Text-mode apps (Was :Who are the "spacists"?)

2017-03-26 Thread Mikhail V
On 26 March 2017 at 16:28, Wildman via Python-list
 wrote:
> On Sun, 26 Mar 2017 15:18:06 +0200, Mikhail V wrote:
>
>> On 26 March 2017 at 06:16, Wildman via Python-list
>>  wrote:
>>> On Tue, 21 Mar 2017 15:15:14 +0100, Mikhail V wrote:
>>>
 And on linux console, by default one does not even have good
 possibilities for text-mode pseudographics, it was more relevant
 in DOS where one had rich possibilities and programmable
 binary fonts.

 Mikhail
>>>
>>> Nonsense.
>>
>> Why? IIRC I can do good pseudographics on linux only with extended
>> unicode character sets, so yes it is possible, is that what you mean?
>
> No.  The same ASCII character set that was available in DOS is
> available in Linux without unicode.

Ok, now I have read that one can change the encoding in the terminal
to get same table drawing characters (if one does not want to use
unicode).
But such a question: can one do it programmaticaly?
And more important: can one use binary (bitmap) fonts in default modern
linux console? If yes, can one patch them with custom tiles at
the application start?
In DOS, (I don't remember if in all versions or only some)
one could do all this and this opens very rich possibilities for
approximating of objects with tiles. The only limitations
that one uses 255 tiles, but even this enables to build
whole 'worlds' and state of the art apps. So I would call this
pseudographics and not few sticks and corner tiles
(which I cannot even define and upload easily).
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Who are the "spacists"?

2017-03-26 Thread Wildman via Python-list
On Sun, 26 Mar 2017 15:18:06 +0200, Mikhail V wrote:

> On 26 March 2017 at 06:16, Wildman via Python-list
>  wrote:
>> On Tue, 21 Mar 2017 15:15:14 +0100, Mikhail V wrote:
>>
>>> And on linux console, by default one does not even have good
>>> possibilities for text-mode pseudographics, it was more relevant
>>> in DOS where one had rich possibilities and programmable
>>> binary fonts.
>>>
>>> Mikhail
>>
>> Nonsense.
> 
> Why? IIRC I can do good pseudographics on linux only with extended
> unicode character sets, so yes it is possible, is that what you mean?

No.  The same ASCII character set that was available in DOS is
available in Linux without unicode.

-- 
 GNU/Linux user #557453
The cow died so I don't need your bull!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Who are the "spacists"?

2017-03-26 Thread Mikhail V
On 26 March 2017 at 06:16, Wildman via Python-list
 wrote:
> On Tue, 21 Mar 2017 15:15:14 +0100, Mikhail V wrote:
>
>> And on linux console, by default one does not even have good
>> possibilities for text-mode pseudographics, it was more relevant
>> in DOS where one had rich possibilities and programmable
>> binary fonts.
>>
>> Mikhail
>
> Nonsense.

Why? IIRC I can do good pseudographics on linux only with extended
unicode character sets, so yes it is possible, is that what you mean?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Who are the "spacists"?

2017-03-25 Thread Wildman via Python-list
On Tue, 21 Mar 2017 15:15:14 +0100, Mikhail V wrote:

> And on linux console, by default one does not even have good
> possibilities for text-mode pseudographics, it was more relevant
> in DOS where one had rich possibilities and programmable
> binary fonts.
> 
> Mikhail

Nonsense.

-- 
 GNU/Linux user #557453
The cow died so I don't need your bull!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: PEOPLE! PLEASE! [ WAS: Re: Who are the "spacists"? ]

2017-03-25 Thread Mikhail V
On 26 March 2017 at 00:01, Michael Torrie  wrote:
> On 03/25/2017 01:40 PM, Gilmeh Serda wrote:
>>
 So Python supports both spaces and tabs for indentation.
>>
>> People!
>>
>> This is as far from normal conversation about Python as it gets!
>>
>> Keep this shit to yourselves, PLEASE!
>>
>> Using an editor worth the name, makes it a non issue (since it can
>> convert between one and the other, Eclipse/LiClipse comes to mind). Get
>> real, and think before you post/send!
>
> I agree, although this thread had pretty much died on its own before you
> posted to it. Our troll seems to have slunk off, having done his
> trolling.  Peace had returned it seemed.  Unless the mailing list mods
> finally banned the guy... either way I haven't seen any posts in a while.

Oh don't turn it into drama please, it was interesting discussion.
Sad is that many are more in sociology than technology.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: PEOPLE! PLEASE! [ WAS: Re: Who are the "spacists"? ]

2017-03-25 Thread Michael Torrie
On 03/25/2017 01:40 PM, Gilmeh Serda wrote:
> 
>>> So Python supports both spaces and tabs for indentation.
> 
> People!
> 
> This is as far from normal conversation about Python as it gets!
> 
> Keep this shit to yourselves, PLEASE!
> 
> Using an editor worth the name, makes it a non issue (since it can 
> convert between one and the other, Eclipse/LiClipse comes to mind). Get 
> real, and think before you post/send!

I agree, although this thread had pretty much died on its own before you
posted to it. Our troll seems to have slunk off, having done his
trolling.  Peace had returned it seemed.  Unless the mailing list mods
finally banned the guy... either way I haven't seen any posts in a while.

Also USENET has a long tradition of killfiles. And entire threads can be
muted on most clients, including e-mail clients. I recommend you and
everyone else use these tools.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: PEOPLE! PLEASE! [ WAS: Re: Who are the "spacists"? ]

2017-03-25 Thread Joel Goldstick
On Sat, Mar 25, 2017 at 3:40 PM, Gilmeh Serda
 wrote:
>
>>> So Python supports both spaces and tabs for indentation.
>
> People!
>
> This is as far from normal conversation about Python as it gets!
>
> Keep this shit to yourselves, PLEASE!
>
> Using an editor worth the name, makes it a non issue (since it can
> convert between one and the other, Eclipse/LiClipse comes to mind). Get
> real, and think before you post/send!
>
> --
> Gilmeh
> --
> https://mail.python.org/mailman/listinfo/python-list

+1


-- 
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Who are the "spacists"?

2017-03-25 Thread Ian Kelly
On Tue, Mar 21, 2017 at 7:28 PM, Ben Finney  wrote:
> Grant Edwards  writes:
>
>> Question: is it still successfull trolling if we all knew that was the
>> intent and are just playing along for the entertainment value?
>
> Yes, it creates more noise and drives away signal from people who don't
> want to be in a noisy environment. That is success for the troll.

+1. Arguing with trolls is like tic-tac-toe or global thermonuclear
war: the only way to win is not to play.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Who are the "spacists"?

2017-03-21 Thread Ben Finney
Grant Edwards  writes:

> Question: is it still successfull trolling if we all knew that was the
> intent and are just playing along for the entertainment value?

Yes, it creates more noise and drives away signal from people who don't
want to be in a noisy environment. That is success for the troll.

-- 
 \ “Pinky, are you pondering what I'm pondering?” “I think so, |
  `\  Brain, but isn't that why they invented tube socks?” —_Pinky |
_o__)   and The Brain_ |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Who are the "spacists"?

2017-03-21 Thread Mikhail V
On 21 March 2017 at 16:42, Michael Torrie  wrote:
> On 03/21/2017 08:15 AM, Mikhail V wrote:
>> Didn't want to say this, but you know it was quite predictable from
>> the beginning that
>> the arguments will end up somewhere in "linux console is the center of the
>> universe, e-macs is mother of all apps and monospaced text is peak of
>> human evolution".
>
> Knowing that, the honest question is: if you knew where this would all
> end up (in a heated argument), why did post your provocation in the
> first place?

That was a metaphor, it was predictable that arguments
will touch some retro aspects, but it was quite unpredictable
that till now I did not see good arguments for spaces, and
I was interested of course to see some technical aspects.

So one of mentioned points for spaces which I can count as
more or less real argument, that many web forms keep
converting tabs to spaces, when I paste code into them
and when I copy back into the editor, I need again to
convert them. This is not a good argument against
tabs but this is at least a *real* issue. Unlike other,
(not so logical or yet not supported) arguments.

Does it sound reasonable?
Why I ask? Well obviously because I and probably
many people want to know why cannot one make
sort of styleguide based on pros and cons.


Mikhail
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Who are the "spacists"?

2017-03-21 Thread Mikhail V
On 21 March 2017 at 22:40, Chris Angelico  wrote:
> On Wed, Mar 22, 2017 at 8:27 AM, Mikhail V  wrote:
>> I'd just tell one thing since I am a bit tired: if you wish,
>> take an advice: avoid *any* monospaced fonts as plague if you are
>> reading a lot of information, this includes coding.
>> Avoid *any* sepia color schemes as plague.
>> Avoid *any* sans-serif font. Get the most close
>> to Garamond or Perpetua font.
>>
>> For cases, where you *absolutely must* use monospaced
>> font, stick to Courier font (it is called "Courier 10 pitch" on Linux, if
>> you don't have it in the system, try to find it, it must be
>> in some true type font package).
>> As for editing executables I don't know what *exactly*
>> are you trying to do, what processes are involved,
>> so I can't advice much.
>> And don't worry if a zero does not look like a pusy,
>> but looks like a big O, this is irrelevant in most cases.
>>
>> Now if you follow this, then probably in some time you
>> will say: thanks, good man Mikhail.
>
> Thanks, good troll Mikhail. You started a nice thread, but your advice
> is now crystal clear for what it is: duff.
>

Youre welcome, good troll Chris  :)
And in this thread (apart this comment) you were reasonable, I am pleased.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Who are the "spacists"?

2017-03-21 Thread Chris Angelico
On Wed, Mar 22, 2017 at 8:27 AM, Mikhail V  wrote:
> I'd just tell one thing since I am a bit tired: if you wish,
> take an advice: avoid *any* monospaced fonts as plague if you are
> reading a lot of information, this includes coding.
> Avoid *any* sepia color schemes as plague.
> Avoid *any* sans-serif font. Get the most close
> to Garamond or Perpetua font.
>
> For cases, where you *absolutely must* use monospaced
> font, stick to Courier font (it is called "Courier 10 pitch" on Linux, if
> you don't have it in the system, try to find it, it must be
> in some true type font package).
> As for editing executables I don't know what *exactly*
> are you trying to do, what processes are involved,
> so I can't advice much.
> And don't worry if a zero does not look like a pusy,
> but looks like a big O, this is irrelevant in most cases.
>
> Now if you follow this, then probably in some time you
> will say: thanks, good man Mikhail.

Thanks, good troll Mikhail. You started a nice thread, but your advice
is now crystal clear for what it is: duff.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Who are the "spacists"?

2017-03-21 Thread Mikhail V
On 21 March 2017 at 17:41, Gene Heskett  wrote:
> On Tuesday 21 March 2017 11:04:58 Mikhail V wrote:
>
>> On 21 March 2017 at 15:49, Grant Edwards 
> wrote:
>> > On 2017-03-21, Mikhail V  wrote:
>> >
>> >> I don't know how to help, probably if there is an important
>> >> document which you want different people to read, just make plain
>> >> txt, or HTML table, Office document, PNG image, etc.  Or just use
>> >> spaces if it is for ASCII-art purposes.
>> >
>> > Well written code _is_ ASCII-art.
>>
>> Written code is ASCII-art only if you live in the Monospaced Kingdom,

>
> Whats wrong with Monospace (caps yours)? In case you've not heard the
> news, we (linux users, other platform unk, don't use them) have a font,
> called "hack" (announced several years ago) that is not only Monospaced
> but quite civilized to look at. I use it for editing any executable
> codes source language, and here in kmail too.
>

This was already discussed here what is wrong with monospaced,
but ok, since you question. Look, I know what is Hack font as
well a lot of other thing about fonts, since I work on fonts
and reading-related problems my whole life.
I'd just tell one thing since I am a bit tired: if you wish,
take an advice: avoid *any* monospaced fonts as plague if you are
reading a lot of information, this includes coding.
Avoid *any* sepia color schemes as plague.
Avoid *any* sans-serif font. Get the most close
to Garamond or Perpetua font.

For cases, where you *absolutely must* use monospaced
font, stick to Courier font (it is called "Courier 10 pitch" on Linux, if
you don't have it in the system, try to find it, it must be
in some true type font package).
As for editing executables I don't know what *exactly*
are you trying to do, what processes are involved,
so I can't advice much.
And don't worry if a zero does not look like a pusy,
but looks like a big O, this is irrelevant in most cases.

Now if you follow this, then probably in some time you
will say: thanks, good man Mikhail.
-- 
https://mail.python.org/mailman/listinfo/python-list


  1   2   3   >