<div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Even getting colors is something that is totally dependant on what kind of terminal (yes, *terminal*) you have. </blockquote>
</div><div><br>Yes, that's exactly what I said. That's why doing it in
the language is the superior strategy - it allows you to have
per-console (no, not terminal) output.<br><br>Why is it a console? Because they're not all interactive. Terminals are two-way. Consoles aren't, necessarily.<br>
<br><br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Using
a window on a windowing system (such as Microsoft Windows or X-windows,
or whatever) means that you have a terminal program running, which do
the actual visualization.</blockquote>
</div><div><br>Yes. And they don't all use windows. Windows erl.exe,
for example, uses the DOS console. That isn't the same as using a
window - windows erl.exe will work in Windows 7's pure console mode,
for example.<br>
<br>The germane observation is that the language does not make any
guarantees about the user interface, and that as such anything which is
meant to be portable must be done in common ground.<br><br><br><br><br><br> </div><div class="im">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">*Erlang is in no way involved with this.*<br>
</blockquote></div><div><br>What? Erlang is the only common factor in
a group of undefined user interfaces. To suggest that erlang isn't
involved in its own input/output is silly.<br><br><br><br> <br><br></div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
However, almost all terminal programs have some way of controlling them, and thus cause visual effects. </blockquote></div><div><br>Not all of them. And each are different. Even so, you seem to be making my point for me.<br>
<br>
<br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The
exact way you get the terminal program to present the visual effects
you want is possibly unique for that terminal program. And it is still
totally outside of Erlang.</blockquote>
</div><div><br>Uh huh. Which is precisely why any formatting must be
done in Erlang, to ensure that nobody attempts to ape a set of visual
effects specific to one platform.<br><br><br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
All that being said, there is an ANSI standard, which many terminal programs implement, </blockquote></div><div><br>Neither
the modern Windows console nor the default Linux BASH environment honor
ANSI codes. The VT standard, which is not the same as ANSI codes,
would be a marginally better choice, but the reason that's actually a
bad choice was already discussed.<br>
<br><br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">which means that if your terminal program follows this standard, </blockquote>
</div><div><br>What terminal program do you believe is involved for
Windows users? Answers which aren't suitable outside Unix aren't
suitable period.<br><br><br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
the way to get the wanted effects are well known, and can probably be answered by a whole bunch of people reading this list.</blockquote></div><div><br>Yes.
Including me. But it's a bad strategy, so nobody will. There's a
reason HIPE tools don't get used much in production code. Things that
are tied to one platform are fundamentally broken.<br>
<br><br><br><br><br></div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">But
even so, we don't even know what kind of terminal the original posted
is using, so we can't even make a proper answer based on that standard,
because it might very well not be something that will work for him.</blockquote>
</div><div><br>Yes, that's exactly what I said.<br><br><br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sorry, but you uninformed reply really pissed me off. </blockquote>
</div><div><br>So much that you agreed with it, it seems. You haven't actually said anything that disagrees with me.<br><br><br><br> </div><div class="im"><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Uninformed people are not a problem. We all have to learn somehow, someway, at some point.</blockquote></div><div><br>Yes. We all do.<br><br><br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
But making totally bogus claims</blockquote></div><div><br>Such as?<br><br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
and trying to shoot down someone who gives a correct answer is just plain wrong. </blockquote>
</div><div><br>I haven't shot down someone who gives a correct answer.
I've shot down someone who gave a unix-specific answer when there are
better available approaches which are well known to people who are
willing to do the small amount of extra work it takes to keep a
portable language portable.<br>
<br>I haven't actually seen you point out anything I said which was
wrong. All you seem to want to do is repeat the things I said, come to
the conclusion I came to when saying "here's what you would do if you
were willing to limit yourself to Unix", then get all nasty in public.<br>
<br><br><br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">*First* you learn the topic, *then* you answer. Not the other way around.</blockquote>
</div><div><br>Yeah. <br><br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">And for some totally unkown reason (to me), you think that it is Erlang that should have the answer. Geez. </blockquote>
</div><div><br>Probably because of the things I've already explained
several times: it's the only common factor among a set of undefined
terminals, and I'm not willing to accept a naive, unix-only solution
from naive, unix-only people.<br>
<br><br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Maybe I should direct all the people on NetBSD-current here as well, when they pop this question.<br>
</blockquote></div><div><br>That's okay: I'm on that mailing list too.
Being on an operating system specific mailing list doesn't actually
teach you much about how to handle things in an operating-system
portable fashion, as a general rule of thumb.<br>
<br><br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">And, as a friendly gnome, </blockquote></div><div><br>
You seem to be confused about the nature of the word "friendly." <br>
<br><br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I'll provide the answer for when he really is using a terminal that is ANSI compliant:<br>
</blockquote></div><div><br>Wow, a repetition of the answer other
people already gave, including the person you're yelling at for not
giving answers. Bravo. By the way, those are actually VT codes, not
ANSI. ANSI requires escape bracket; CSI is only supported by the VT
terminal series.<br>
<br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I could go on for quite a while about this, but maybe you should read a manual instead?<br>
</blockquote></div><div><br>Yes, I'll get right on reading a manual
about the thing I already suggested. Because clearly I didn't know
about it, which is why I knew its correct name when you didn't. And
the fact that I've already panned it for important reasons, and
provided a portable alternative?<br>
<br>Really, dude, you shouldn't get that high up on your horse. It hurts worse when you fall.<br><br></div><div class="im"><div><br><br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
And this is still totally not related to Erlang, and you'd send the
same control sequence if your program was written in C, Perl, Haskell,
Lisp, Prolog, Assembler, Basic, Pascal, FORTRAN, Cobol, Snobol, Algol,
Dibol, Focal, Python, Java, or God knows what else, if your *terminal*
was ANSI compliant.</blockquote>
</div><div><br>Wow, you really don't understand the idea that requiring
terminal code scanning breaks three out of the four existing consoles,
do you?<br><br>This is the Unix specific part that isn't acceptable.
Your strategy would require people to log in over SSH or Telnet for
their stuff to work correctly. The windows shell wouldn't work. The
Dos shell wouldn't work. The stream Unix shell wouldn't work.<br>
<br>We get it: you really like the idea the rest of us already
discussed before you spoke up. No need to get all "omg i'm so right
and you need to read a book" about it. Turns out you aren't as far out
ahead as you think you are. At least read enough of the manual you're
talking about to know the name of the coding scheme you're trying to
discuss. <br>
<br><br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">If
that shouldn't make it obvious to you that it is not related to the
language, but to the terminal, then I don't know what would.<br>
</blockquote></div><div><br>Yes, the scheme you have which is
unacceptably tied to a unix environment isn't about the language.
Wow. Bravo. By killing all but one terminal, you've made it a
terminal issue.<br><br>Any <i><u><b>acceptable portable solution</b></u></i>
cannot be required to support the things you expect to gain from a
telnet/ssh connection. That's why your solution is unacceptable. Any
solution which requires the support of an intermediary communications
application is fundamentally broken. You've broken anything that
doesn't work through a Unix terminal, then used that to justify calling
it a terminal problem.<br>
<br>But, for those of us who don't use Erlang through ssh/telnet, your
solution is not only broken, but introduces a ton of unnecessary noise
into the console which damages the language's fundamental usability.<br>
<br>That's why <u><i><b>a correct, console portable solution</b></i></u> cannot rely on third party intermediary tools which aren't even usually there.<br><br>Your
solution is a terminal solution, yes. But that doesn't mean the
problem is a terminal problem, and the fact that it isn't shows more
mature engineers who know what portability is why the solution you're
so bent out of shape about isn't adequate.<br>
<br>The funniest part is that a portable, language level solution would
probably rely on the strategy you're discussing for the Unix
interactive shell implementation. <br><br>No solution which cuts away
75% of the existing consoles is acceptable. Emitting VT protocol noise
because you're assuming a VT connection might maybe be there, ignorant
of how it affects (and potentially damages) existing systems, is the
hallmark of poor design.<br>
<br></div></div>If you choose to reply, please mediate your tone. I
don't like being talked down to by someone who doesn't understand that
they're playing catch-up.