5 ms·
I've heard stdout and stderr are extremely slow on Windows console. If you port Unix-like programs to Windows, lots of fprintf() can even come to be a bottlenec
by segfaultbuserr 8y ago
I've heard stdout and stderr are extremely slow on Windows console. If you port Unix-like programs to Windows, lots of fprintf() can even come to be a bottleneck, especially in debugging. Meanwhile macOS and Linux/BSD console can output thousands lines in the blink of an eye. Don't know if the new console is gonna solve that.
- mixmastamyk 8y agoIt draws to a VGA style character grid, like it was a DOS/VGA machine from the 80's. Oddly enough, Unix is older than that, and got it right (abstracted from hardware).
- oblio 8y agoIt's a mix of things. Some of them are legacy CP/M / MS-DOS carry-overs, some are strategic decisions. Windows was supposed to be user-friendly and everything would be done through the GUI. This not only de-emphasized CLIs, it was actively hostile to them. I believe that for a time trying to improve CLIs was frowned upon (I haven't worked at Microsoft, it's just based on a million blogs I read from Microsoft employees). Now that the cloud is the way to go, they're looking at this in a more holistic way, it seems.
- mixmastamyk 8y agoI like to call this the "Ballmer factor."
- int_19h 8y agoIt started a while ago, it just took off slowly. Powershell shipped in 2006, for example, and from there all products gradually started integrating with it for admin tasks. Windows Server 2012 already had a command-line-only mode.
- segfaultbuserr 8y ago> Oddly enough, Unix is older than that, and got it right. Perhaps it has something to do with Unix tty. Unix systems are mainframes or servers, the tty subsystem only cares about transmitting the text and control sequences, the actual rendering is done by a CRT terminal at a remote location. Meanwhile, the DOS family was designed for microcomputers and PCs, the text output is tightly-coupled with the system and hardware, including how to draw them. The Windows XP console can even switch to the genuine VGA textmode as used by DOS by pressing Control+Enter. I guess the Unix tty allowed flexibility. It doesn't matter if someone reimplemented it using VGA textmode, or 2D accelerated framebuffer (modern Linux kernel), fancy 3D OpenGL stack (kmscon, but sadly the project is dead), or a cairo-based graphical interface. Meanwhile, Microsoft haven't continue to develop and modernize the console subsystem in a long time (clarify: at least in 8 years of Windows XP era, until recently).
- zadjii 8y ago> Meanwhile, Microsoft haven't continue to develop and modernize the console subsystem in a long time. That's just provably false. We've been hard at work on the console for the last 4 years, culminating in today's Terminal announcement. See https://devblogs.microsoft.com/commandline/ https://devblogs.microsoft.com/commandline/ for a few examples of things we've been doing for the last few years. One in particular: Last year we added support for a pty-like interface in Windows with [ConPty](https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/ https://devblogs.microsoft.com/commandline/windows-command-l...)
- mixmastamyk 8y agoWhen you stop work for ~20 years, then get crackin' for a few it understandably takes a while for the news to get out. May not be obvious if you're 25.
- naikrovek 8y agoIt's not a secret. People need to do a minimum amount of homework before they spout off online.
- fulafel 8y agoWindows did come with a vt100 terminal too fairly early on. Possibly apps could have used it by registering a serial driver? https://guidebookgallery.org/pics/gui/applications/networking/terminal/win31.png https://guidebookgallery.org/pics/gui/applications/networkin...
- segfaultbuserr 8y agoCool. I should try it some day...
- zadjii 8y agoWe used to have ANSI.SYS, though that was removed long before I started at the company. We do however have a pretty solid VT100+ implementation nowadays. Case in point, it'd be pretty hard to run anything in the Windows Subsystem for Linux without a complete VT implementation.
- zadjii 8y agoThe new Terminal actually does _crazy_ well. The vintage console on windows, conhost.exe, uses GDI to draw to the window. Unfortunately, GDI is CPU-bound, so drawing the screen actually slows down our processing of the text. With the Windows Terminal, we've switched to a DX/DWrite based renderer, which no longer uses the CPU to draw text, and moves it to the GPU. Our preliminary testing has a insane perf improvement for applications writing lots of text, something like 10x faster :)
- segfaultbuserr 8y agoExcellent, well done! Developers never need to worry about running cat for a big file or using print() for lots of text again.
- bloopernova 8y agoIs there a place to download the new Terminal to try it out? (Thank you for responding to so many comments on this thread!)
- zadjii 8y agoNot quite yet - when the first preview builds are available, they'll be in the Microsoft Store. Also stay tuned for Rajesh Jha's keynote later today, with our official announcement. It'll have some other relevant information I don't think any of the articles have mentioned quite yet :P
- Schlaefer 8y agoCan you link the session, please?
- zadjii 8y agoI believe this https://mybuild.techcommunity.microsoft.com/home#top-anchor https://mybuild.techcommunity.microsoft.com/home#top-anchor is the link, but I honestly don't know. It's live now, and I think Windows is up soon, though I don't know where in the keynote we are.