On 11. 2. 2016 5:26, Daniel Goldman wrote:
> On 2/10/2016 11:57 AM, David Macek wrote:
> 
>> Again, because 1) Cygwin programs are Windows
>> programs as well (they run on Windows, after all),
>> and 2) the domain of console programs is already
>> established in the first paragraph.
> 
> We can use whatever brief terms we please, as long as they:
> 
> - correspond with real-world things.
> - are clear to the reader.
> - if needed, are briefly defined or have examples.
> 
> "normal windows program" by itself, without clarification, fails those 
> criteria. I'm a windows programmer, and I don't know exactly what the phrase 
> means. The phrase is not in common usage.

This was followed up on in a new thread, so I'll react there instead.

>> I've realized that instead of trying to accommodate
>> every possible reader in the article, it could be better
>> to establish a baseline using references to Wikipedia.
>> If the reader doesn't know a term, they can read up on it.
> 
> I agree. Mention which technologies (eg, ncurses) are used where. Other than 
> perhaps brief mention of what the technology does (eg, TUI programming 
> library), it's up to the reader to read elsewhere.

I altered the page to mention those libraries.

>> I saw "curses", "ncurses" and "pdcurses" as interchangeable
>> in this context, so maybe that was the source of this
>> specific confusion.
> 
> Right, you had a misunderstanding. The terms are NOT interchangeable. 
> "pdcurses" and "ncurses" are both "curses" libraries. But they are different.
> 
> For the most part they share the same function calls, but the code needs to 
> written somewhat differently, especially related to various constants, for 
> one or the other.
> 
> And they are intended (to my understanding) for different purposes. ncurses 
> -> unix. pdcurses -> dos / windows. And I take it that ncurses -> msys2 
> though I have never seen this explicitly stated.
> 
> Again, given that msys2 is designed to support compiling programs to run 
> under windows, I don't understand why pdcurses is not built in.
>
>> I admit that I know little of the difference between ncurses
>> and pdcurses. I always thought they just implement the same APIs,
>> but are from different authors. I would disagree with the statement
>> that one is for Cygwin and other for Windows. Note that MSYS2 has
>> both `ncurses` and `mingw-w64-ncurses`, both of which should work
>> in their respective environments (didn't test myself).
> 
> You may be right that ncurses could be used for either cygwin or windows. 
> However, it's not my understanding. I have previously used ncurses under 
> windows, and it turned out pdcurses worked better in some ways. I would have 
> to do some research to be more specific. Does anyone else know the preferred 
> usage, and for what reason?

If the existence of Linux ncurses, Cygwin ncurses and mingw-w64-ncurses doesn't 
convince you that ncurses support all these platforms, how about 
<https://www.gnu.org/software/ncurses/#h3-portability>?

As for pdcurses, I can't find any evidence that it targets POSIX terminals, so 
the claim "pdcurses -> dos / windows" could be more or less true, if we forget 
about OS/2, X11 and SDL.

Pdcurses seems to be not included in the MSYS2 distribution for simple reasons 
-- it's pretty exotic and we already have ncurses, so it's not needed. If you 
put some work towards a mingw-w64-pdcurses package though, we could have it as 
well. I can provide help if needed.

>> They (curses programs) do use stdin, stdout and stderr.
>> See article or <https://en.wikipedia.org/wiki/ANSI_escape_code>.
> 
> I disagree. I stand by my statement that "curses programs do not normally use 
> stdin, stdout, or stderr", but am ready to be corrected and learn. However, 
> when I search the article you cite for "stdin", "stdout", "stderr", nothing 
> comes up.

The article is supposed to show the abilities of ANSI codes.

Anyway, try this. Run mintty and inside run `/usr/bin/mc | tee ~/foo`. In mc, 
enter a directory, open a dialog or whatever. Kill the mc process (for example 
using the Task manager). Close mintty and open a new one. Run `cat ~/foo`. The 
last state of mc's TUI should appear in the new mintty window.

Is this enough evidence that ncurses terminal manipulations are done through 
stdout? If not, consider how TUIs can possibly work over telnet or SSH.

> Are you a curses programmer? If yes, then why do you offer such irrelevant 
> evidence? If no, then why are you disputing?

I understand that claims about ncurses would be more convincing from a ncurses 
developer, but I don't need to know the ncurses API to have an idea about how 
it works with the terminal.

>> I took some parts of the text, but I'm not convinced of
>> the usefulness of mentioning all of it. It doesn't mean your
>> text will go to waste. I'm thinking maybe a separate,
>> developer-focused page on TUI/curses apps would be a good
>> place for it. What do you think?
> 
> I think it is a good idea, especially if it lists the uncertainties. You can 
> use as little or as much of my suggested text as you like, it's up to you. I 
> appreciate your volunteering. MSYS2 is very useful.

I'm still interested in putting the developer-focused TUI page up and I believe 
it would be useful to TUI programmers new to Windows. I can't put much time 
into it though and I don't think it's fair to ask you to write it. However, if 
you send a draft after we finish the disputes, I will review (and hopefully 
publish) it.

On 16. 2. 2016 22:39, Daniel Goldman wrote:
> I'm sorry, but to my knowledge curses programs do not "use the Win32 API
> under the hood". The metaphor (under the hood) suggests you have deep
> knowledge on the subject. I'm sorry, I see no evidence of that.
>
> I am a curses and C win32 api programmer, for many years, so I know a
> bit about these technologies. I don't see the overlap. Please provide me
> with specifics (not vague statements) of how "curses programs use the
> Win32 API under the hood". I'm willing to be educated, but my guess is
> you simply don't know what you are talking about.

Already answered by someone else in the other thread.

-- 
David Macek


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to