News for hackers. Stuff that matters.
Re:eBPF on Windows by jiggawatts on Monday May 10, 2021 @04:14PM (#27110343)
"When in Rome, do as the Romans do."

I don't complain that Linux is hard to administer with PowerShell. I learned SSH and Bash.

The reverse does not seem to be true, Linux admins generally expect everything to work exactly the same in Windows as in Linux.

A negative effect of this is that Windows has many recent hires working on some of their teams with mostly Linux experience, and they're copying Linuxisms into Windows bug-for-bug. Even if it makes no sense in Windows.

A recent example that boiled my blood is that the new Windows Terminal emulates the incorrect "Clear-Host" behaviour of ancient Linux terminals. It doesn't clear the virtual terminal any more, just the current viewport. Before, it was a convenient way to reset the terminal's display state without resetting variables. NOW, it just deletes some of the display state, so if you scroll back you get scrambled garbage.

This is not a small thing: it's significantly impacting my workflow. I've seen garbage output, overwritten output, scrolling back accidentally corrupts the output completely, you name it. This is not a coding error, this is correctly copying a limitation of some terrible terminal from the 1960s nobody should give a shit about in 2021.

Worse: If you look back at the history of the debate around fixing this, as far back as the early 1990s there were Linux people advocating for fixing this! It's obviously broken.

Then: When the same debate came up in the Windows Terminal issue tracker, people making the same rational, logical arguments were shot down with: "We have to copy the standard."

Hint: There is no "standard". This is not an RFC. It's just what Linux does! Linux does this just because this is what some random MIT or Berkley student wrote in a hurry in the 1960s! If you make the argument that the majority of systems work some way or another, and that's a defacto standard... then Windows should win because it was used for the the vast majority of computing for many decades. Linux has taken over only recently, and only in some areas (Android and web servers).

Re:eBPF on Windows by DHowett on Monday May 10, 2021 @07:11PM (#27112046)
> A recent example that boiled my blood is that the new Windows Terminal emulates the incorrect "Clear-Host" behaviour of ancient Linux terminals.

Hi! I run the team who made this decision, and I flatly reject the characterization that these changes were made by "recent hires" who are "copying Linuxisms into Windows bug-for-bug."

The discussion you're referring to spans multiple threads, so I'm not certain the exact one you're referring to. I can, however, give some of my input:

1. We worked pretty hard to make sure that PowerShell's Clear-Host and CMD's "CLS", which operate on the entire scrollback buffer in the traditional console, are properly translated into a full buffer clear over SSH/in Terminal/etc.

2. Terminal fully supports CSI 3 J, a non-standard extension to the Erase in Display control sequence that clears the scrollback buffer. The handful of tools I am using that support "clear" actually seem to emit both "clear viewport" and "clear buffer." If you're using a version of clear that has been configured to NOT emit ED 3 (clear scrollback history) by default, that's simply not my team's fault. I've heard that you can use "clear -x" to affect your desired behavior.

It turns out that there being no true standard here plays to our advantage: we can support requests for all manner of clear, and trust that an application can be made to do the right thing. If you're using an application that can't be made to do the right thing per at least thirty other terminal emulators' designs--spanning more than just Windows and Linux, mind you--I apologize.

If you'd like to reopen that discussion here instead of on GitHub, you are more than welcome to.

Re:eBPF on Windows by jiggawatts on Monday May 10, 2021 @08:41PM (#27112801)
> Hi! I run the team who made this decision, and I flatly reject the characterization that these changes were made by "recent hires" who are "copying Linuxisms into Windows bug-for-bug."

Hi! I see Microsoft people on "docs.microsoft.com" use forward slashes now in examples that only work on Windows. So, there's that.

If I open the latest version of Windows Terminal, running PowerShell Core (not some Bash thing with some VTY codes or whatever) and I run "Clear-Host", I can scroll back and see content that wasn't cleared.

THIS BREAKS MY WORKFLOW. I used Clear-Host so I can run a command with pages out of output, and then I know that scrolling back will go back to that output only, not something that happened three hours ago but superficially looks identical.

If I do this with PowerShell 5.1 with the old Terminal, it works as expected. It works like it has for the last 40 years of DOS and Windows history.

PS: It's broken even worse in Visual Studio Code.

You guys outright abandoned your user base to pander to Linux users. On Windows. Linux users on Windows. That enormous, huge majority of your paying user base that is apparently more important that the hundreds of millions of people like me.

So yeah, you should reopen the issue and rethink your priorities...

Re:eBPF on Windows by RulerOf on Monday May 10, 2021 @09:33PM (#27113119)
>You guys outright abandoned you user base to pander to Linux users. On Windows. Linux users on Windows.

IMO they're going after developers using Macs. Linux (and Docker) runs better on Windows than it does on Mac OS. They're doing _something_ right.

Re:eBPF on Windows by jiggawatts on Tuesday May 11, 2021 @12:39AM (#27114271)
So you're saying that Linux developers on Macs are now Microsoft's target market?

Not Windows developers on Windows?

Re:eBPF on Windows by pjmlp on Tuesday May 11, 2021 @01:55AM (#27114693)
Basically it feels like going after the SV crowd coding with macs on starbucks.
Re:eBPF on Windows by jiggawatts on Tuesday May 11, 2021 @03:31AM (#27115286)
It feels like that Blizzard developer Wyatt Cheng that got on stage and asked the PC gamer crowd: "Do you guys not have phones?" https://www.youtube.com/watch?v=n5QRgpjfarY

The Windows Terminal guys are similar. "Do you have any plans at all to make this work for users of Windows?" "No."

Re:eBPF on Windows by pjmlp on Tuesday May 11, 2021 @04:47AM (#27115761)
I feel your pain, what used to be Visual Studio wizards are now CLI tools.

With luck you need to install VSCode and there is an extension to call said CLI.

Who needs VS designers or Blend for Windows UI development? Just recompile and run WinUI applications.

I really don't get it.

Re:eBPF on Windows by pjmlp on Monday May 10, 2021 @06:30PM (#27111677)
Those recent hires are also affecting how Visual Studio gets developed.

It is starting to become tiresome to get some CLI stuff instead of proper VS wizards.

Re:eBPF on Windows by jaywalk on Monday May 10, 2021 @04:25PM (#27110487)
Microsoft is getting really lazy with their new "PowerShell for everything" mantra. Many examples with Windows Server and even the Azure Portal. It's great to have the ability to do things with both a GUI and CLI, but then arbitrarily limiting things to one or the other (usually the CLI) gets incredibly annoying.
Re:eBPF on Windows by majkinetor on Monday May 10, 2021 @04:34PM (#27110572)
Lets limit GUI then :)
Re:eBPF on Windows by jaywalk on Monday May 10, 2021 @04:46PM (#27110722)
Ha, that's actually what I'm complaining about. So many things that can only be done via CLI and there's no way to even know they're possible without crawling through documentation or (more often) finding somebody's blog post or a StackOverflow answer.
Re:eBPF on Windows by majkinetor on Monday May 10, 2021 @04:50PM (#27110759)
PowerShell CLI is totally discoverable tho.