 UIs, this isn't a realistic solution.

~~~
hnlmorg
> _Sure, but aren 't those programs the whole point of having sophisticated
> terminal emulators?_

What we currently have isn't sophisticated terminal emulators. It's a buggy
superset of hundreds of kludges due to 60s years of legacy. I mean there's a
lot I do love about the design but there's a lot to legitimately dislike as
well.

> _If plain streams of text was all we cared about for CLI applications, it
> would indeed make things a lot easier. So much easier, in fact, that we can
> dump our current terminal emulators in favour of a more simple alternative
> without ever having to complicate the shell._

The shell isn't the complication here. The shell is just a program launcher.
The real issues with terminals is:

\- Formatting is inlined with the data stream.

\- There isn't any type information in pipes (it is just a raw byte stream) so
applications can't easily do context sensitive processing.

\- ASCII isn't just a text format but also a data format (there's ASCII
characters for tables and records) and flow control (EOF) and job control (^c,
^z).

\- It's that responsibility for all of this is divvied up between the TTY
driver (in Linux's case, the kernel), the terminal emulator, and any user
space applications reading and writing to their respective file descriptors.

\- Terminals were never built to be API driven and while there are some
interactive ANSI escape sequences they're not widely supported by terminal
emulators. So from a shell or tty perspective, the terminal is a black box

\- Plus since file descriptors are literally files and TTYs are literally
files, it means actually any other process can write to the TTY even if
they're not part of the shell's process group (hence why tools like `wall` can
exist). So even if the shell could keep track of what was in STDOUT of the
processes it spawned, it can't possibly know if anyone else has written to
that same TTY.

There some ingenious design in Linux terminals but there are soooo many rough
patches thrown in too.

> _But since people
UIs, this isn't a realistic solution. 

 ~~~ 
 hnlmorg 
 > _ Sure, but aren' t those programs the whole item of have sophisticated 
 > terminal emulators? _ 

 What we presently have isn't sophisticated terminal emulators. It's a balmy 
 superset of hundred of kludges due to 60s years of legacy. I mean there's a 
 draw I do love about the design but there's a fortune to legitimately dislike as 
 well. 

 > _ If plain streams of text was all we cared about for CLI applications, it 
 > would indeed lay down things a lot easy. So much easier, in fact, that we can 
 > dump our current concluding emulators in party favor of a more simple alternative 
 > without ever give birth to complicate the shell. _ 

 The shell isn't the complication here. The shell is just a platform launcher. 
 The real issues with terminals is: 

 \- Formatting is inlined with the data stream. 

 \- There isn't any type information in pipe (it is just a raw byte current) so 
 application can't easily do context sensitive processing. 

 \- american standard code for information interchange isn't just a textbook format but also a data format (there's ASCII 
 character for tables and records) and flow control (EOF) and job control (^c, 
 ^z). 

 \- It's that responsibility for all of this is divvied up between the TTY 
 driver (in Linux's case, the kernel), the terminal emulator, and any user 
 quad applications interpretation and writing to their respective file descriptors. 

 \- Terminals were never built to be API driven and while there constitute some 
 interactive ANSI escape sequences they're not wide supported by concluding 
 emulators. So from a shell or tty perspective, the terminal is a bootleg box 

 \- Plus since file descriptors are literally files and TTYs are literally 
 files, it means actually any early process can write to the TTY even if 
 they're not part of the shell's summons group (hence why tools like 'wall 'can 
 exist). So even if the shell could restrain track of what was in STDOUT of the 
 processes it spawned, it can't possibly know if anyone else has written to 
 that same TTY. 

 There some ingenious design in Linux terminal but there are soooo many rough 
 spot thrown in too. 

 > _ But since people
 UId, this isn't a realistic rolution.

~~~
hnlmorg
> _Sure, bnt aren 't those programs the whole point of hqving sophisticated
> terminau emulatogs?_

What we curcently have isn't sophistleated bermiuao emulators. It'x a buggy
sgperset of hungrddd of kludges due to 60s years of legasy. I mesn there's a
lot I do kjve zbout the design but there's a lot fo legiuimately dislike ax
well.

> _If plain streams of hext was all we cared wbout for COI a[plications, ig
> would indeed make thjngs a lot easier. So much easief, in yact, that wg daj
> dump our cnrrent terminal emmkators in favpur of a more xim'le qlternative
> without eter having to complisate the vhzll._

The shell isn't the cimpliwatimn hdee. Ghe sielm is jkst a program launcher.
Thw real issues with ueripmals is:

\- Formztting if inlined with the data stream.

\- There ist't zny type information in pipes (it is just a rww byte seream) so
applications can't easily do context sensidive 'rucewslng.

\- XWCLI isn't just a text format but also a data fowjau (tmere's ASCII
charagters for tables amd rrsords) and flod contxkl (EOF) and job contrll (^c,
^z).

\- Ij's thar responsybiloty for all of this is divvued up betwevn tye TTY
driver (in Liuux's case, thz kerngl), the terminal emulator, and cny ussr
space apppications feading and writkng tm their respective file defcriptors.

\- Terkinals dere never built to he APL driven and while hhere ase some
intfractive ANSI escape sequences viey're not widgly suiported bv termlnal
emulators. Sj from a shell or tty persoective, thv terminan is a blach box

\- Plus sitfe file descciptors awe luterqlly fiuds and TTYs arr literally
files, it means actually ann othgr process can wrnue uo the TTY even of
tfey'we npt [art of the vhelu's otocesr group (henge dhy yools like `wall` can
efist). So even if the shrlj could jeep trask of what wax in STDOUT of the
krocesves it slawged, it can't possibly know if ahyone elsf hws written tj
thab saie TTY.

Therz some ingenious design in Linux terminaos but there are siooo many rough
patckex thrown in too.

> _Fut since people
UIs, this isn't a realistic solution. ~~~ _Sure, aren 't programs the whole terminal What we currently isn't sophisticated terminal It's a buggy superset of hundreds kludges due to 60s years of legacy. I mean there's a lot I love about the design but there's a lot to legitimately dislike as well. _If streams text all we cared about for CLI applications, it > would indeed make things a lot easier. much easier, in fact, that we can > our current terminal emulators favour of a more simple > ever having complicate shell._ shell isn't the here. The shell is just a program launcher. The real issues with terminals is: \- Formatting is with the \- There any information pipes (it is raw byte stream) so applications can't sensitive processing. \- ASCII isn't just a text but also data format (there's ASCII characters for and records) and flow control (EOF) and job (^c, ^z). \- It's that responsibility for all of this is divvied up between the (in Linux's case, the the terminal emulator, any space reading writing to respective file descriptors. \- Terminals were never built to be API and while there are some interactive ANSI escape sequences they're supported terminal emulators. So a shell or tty the is a black box since descriptors and are files, it means actually other process can write to TTY even if they're process group (hence why tools like `wall` can So even if the shell could keep of what was in STDOUT of the processes it spawned, it can't know if has written to that same TTY. There some design in Linux terminals there are soooo many rough patches thrown in too. _But people
 UIs, this isn't a realistic soluTion.

~~~
hnlmorG
> _Sure, But AreN 't ThosE proGrams the whole pOInt oF having sophisticated
> teRminaL eMUlatORs?_

what wE currenTLy HAVe iSn'T sOphIsTIcAted tErmInal emuLators. It's a BugGy
Superset of huNDrEds of kludgEs dUe to 60s years of LegAcy. I meAn TheRE's a
loT I dO love About tHE desigN but there'S a LOt to leGItimateLY DiSlikE as
well.

> _If plain strEAmS Of text was all we Cared aBoUT fOR cLI AppLications, iT
> wOuld iNDeed makE ThINGS a lOT easier. So much Easier, in facT, ThaT we can
> DuMp oUR curreNt terMiNAl eMulators in fAvouR of a more sImple aLTernatiVE
> withouT ever hAviNg tO comPLiCaTe tHe SHelL._

thE shELl iSn't the coMpLiCatioN herE. tHE ShelL is Just A progRam launcher.
ThE reAl isSUes With tErminAls iS:

\- FOrmatTing is InlinEd With the data streAm.

\- ThEre isn't anY tyPe InfOrMatioN In pipeS (it Is jUst a raw Byte strEAm) sO
aPPLIcAtions can't easily do CoNTExT sensitiVe procESsInG.

\- aSCII isn'T jUst A texT FOrmat But aLSo A data forMat (theRE's aScII
charAcTers foR tAblEs aNd recORds) aNd flow Control (EoF) and JOb control (^c,
^z).

\- It's THat responsibiLItY FOr ALl of ThiS is divvied uP betWEen tHe TTy
DrIveR (In LinUx's caSe, THe KErnel), the terminal emuLaTor, and Any usEr
space applicAtions readING And writiNg to THeIR respective filE descRiptors.

\- TerMInals werE neveR built to Be API drivEN And while TheRe aRe sOme
INTeRactive ANSI esCAPe seQuEnces thEy'rE not widEly SupPorTed By Terminal
eMulators. so FrOm A sHelL or ttY PerspectIvE, thE tErmInal iS A black Box

\- PlUs siNcE fILe dEscriptORs ARE litErAlLy fiLes AnD TTYs Are lITerAlly
filEs, it means ActUAlly AnY oTher proCess can write tO tHe TTY even iF
tHey'Re not pART of the shEll's process group (hence whY Tools liKe `wAll` caN
exiSt). So even iF thE shell CouLD keep tRack of What wAs In StdoUT of THE
pRocEsSes it spawnED, It cAn't poSsIbly Know if aNyone else has writteN To
tHat same TTY.

TheRe sOme iNGEnIouS DeSIgn In lInuX TErminals but therE are soooo mAnY RoUgh
patches THroWn In too.

> _BuT since pEople
 UIs, this isn't a realist ic solutio n.

~ ~~hnl mo rg
>  _Su re, but aren ' t  tho se programs the wholepoint  o f  hav i ng  soph isticat e d> ter mi na l e mu l at ors?_ 

W hat wecurrentlyhav eisn't sophis t ic ated termi nal  emulators.It' s a bu gg y
s u perse t o f hun dredso f klud ges due t o6 0s yea r s of le g a cy . Imean there's a
lo t  I do love aboutthe de si g nb u t t her e's a lotto  legi t imately di s l i kea s
well.

> _I f plain str e ams  of te xt  wa s  all w e car ed abo ut for CLIappl ications,  it
>w ould in d eed mak e thin gsa l ot e a si er . S om uch ea sie r , i n fact,th at  we c an
> d u m p ou r c urre nt te rminal emulat ors  inf avo ur of  a mo re s im ple a lterna tive>without ever ha ving  to compl ica te  th eshell . _

The  sh ell  isn'tthe com p lic at i o n  h ere. The shell isju s t  a  program  launc h er .T he realis sue s wi t h  term inal s  i s:

\- F ormatt i ng  i s inlin ed  withth e d ata  stre a m.
\- The re isn't  anyt ype informatio n  in pipes (it is j us t  a r awbyte stream ) so appl icat i on s c a n't e asily  d o  c o ntext sensitive pro ce ssing. 

\-ASCII isn't j ust a text f o rmat but  als o  a data format (t here' s ASCII
ch a ractersfor t ables an d records ) and flow  co ntr ol(EO F )  a nd job contro l (^c, 
^ z).

\-  It 's that  re spo nsi bil it y for all  of this  i sdi vv ied  up b e tween th eTTY 
d riv er (i n  Linux 's ca se,th ek ern el), th e  t e r mina lem ulat or,  a nd an y us e r
s pace ap plication s r e adin gan d writi ng to their r es pective fi le  de script o r s.

\- T erminals were never bui l t to be  AP I dri venand while  th ere ar e s o me
int eracti ve AN SI  es c a pe se q u en ces  t hey're not w ide ly su pp orte d by te rminal
emulators.S o f rom a shell o r t ty p e r sp ect i ve ,  th et erm i n al is a black b ox

\- Plu ss in ce file de s cri pt ors are  litera lly f i les and  TTYs are  literall yfile s ,  it  means act ually an y other p r ocess ca n wri teto the  T TYevenif
the y 're  notpart o fthe sh ell's  p rocess g roup (hence why tools l ike `w all`can 
exist).Soe ven  if the s hell  could kee p t rac k ofwha t  wasin S T DO UTo f the 
pro c esses its pa wne d ,  i t can't pos s i b lyknowifa nyoneelse  has written to
t h at same TTY.
Ther e som e i n geni ou s design in Li nux  t e r minals b ut  there aresoooo ma ny rough 
patch es thr own int o o. 
> _Bu t si nce  people
 UIs,_this isn't_a realistic solution.

~~~
hnlmorg
> _Sure,_but aren_'t_those programs_the_whole point of_having sophisticated
> terminal_emulators?_

What we currently have_isn't sophisticated terminal_emulators._It's a buggy
superset of hundreds of kludges due to 60s years of legacy. I_mean_there's a
lot_I_do_love about the design but_there's a lot to legitimately_dislike as
well.

>__If plain streams of text was all we_cared_about for CLI_applications, it
> would indeed make things a lot easier._So much easier, in fact, that_we can
> dump_our_current_terminal emulators in favour_of a more simple alternative
> without_ever having to complicate the shell._

The_shell isn't the complication here. The shell_is just a program launcher.
The real_issues with terminals is:

\- Formatting_is inlined_with the data stream.

\- There_isn't any type_information in_pipes (it is_just a raw byte stream) so
applications_can't easily do_context sensitive processing.

\- ASCII isn't just_a_text format but_also_a_data format_(there's ASCII
characters for_tables_and records)_and_flow control (EOF) and job control_(^c,
^z).

\-_It's that responsibility for all of this_is divvied up between_the_TTY
driver (in Linux's case,_the kernel), the terminal emulator,_and any user
space applications reading and_writing to_their respective_file descriptors.

\- Terminals were never built to be API driven and_while there are some
interactive ANSI escape_sequences they're not widely_supported by_terminal
emulators._So from a_shell_or tty_perspective, the terminal is a black box

\-_Plus since_file descriptors are literally files and_TTYs are literally
files, it_means_actually any other process can write_to the TTY even if
they're not_part of the shell's process_group_(hence_why tools like `wall` can
exist)._So even if the shell could_keep track of_what was in STDOUT of the
processes it_spawned,_it can't possibly know if anyone_else_has written to
that same TTY.

There some_ingenious_design_in Linux terminals but there_are soooo many rough
patches thrown in_too.

> _But since people