zadjii
zadjii on Hacker News
LSH feels like it's being massively undersold here. The `grammars/` directory of helix is something like 183MB. That would be a non-starter for a lot of use cases for edit (which is already only 167kB). tree-sitter might be more powerful, but this is more than good enough, and it is orders of magnitude smaller.
I'd love to read a longer blog post that details how y'all compared existing implementations and came to the conclusion that writing your own was the best path here. This kind of attention to craftmanship is something I feel like we're desperately missing these days in software.
You're most welcome! Working on it to help serve the whole developer ecosystem has been the delight of my career :)
Y'know, I spent a week investigating doing something similar with the Windows Terminal about 18 months ago:
https://github.com/microsoft/terminal/issues/16495#issuecomm...There's even more under the "Updates archive" expando in that post.
It was a pretty compelling prototype. But after I played with Polyglot Notebooks[1], I pretty much just abandoned that experiment. There's a _lot_ of UI that needs to be written to build a notebook-like experience. But the Polyglot notebooks took care of that by just converting the commandline backend to a jupyter kernel.
I've been writing more and more script-like experiments in those ever since. Just seems so much more natural to have a big-ol doc full of notes, that just so happens to also have play buttons to Do The Thing.
[1]: https://marketplace.visualstudio.com/items?itemName=ms-dotne...
It's shipped with Windows since Windows 11. Updates come via the Store (since that's a lot faster than OS updates), but it's definitely preinstalled these days
No love for Windows Terminal? I know that linux has a much richer terminal ecosystem, but WT ranks a lot higher than a wide breadth of terminal emulators on linux now. Could anyone have imagined that 10 years ago?
Low key: Loop is actually great. I think it's the first thing I've used that's captured the dream of what Google Wave wanted to be
What complaints do you have with the Windows Terminal specifically? I can get having issues with CMD or PowerShell - they're very non-unix-y. But WT itself is probably one of the most feature-complete terminal emulators out there these days. I'd love to know what you think it's missing
Yedit actually was written by a Microsoft employee :P
It had some problems however with handling unicode (iirc). Basically, shipping yedit would have required a huge re-write of its underlying text buffer. In the end the discussions we had with Malcom concluded that just writing a new one was probably easier and more maintainable in the long run.
who would have guessed that we're all lurkers here too :P Hacker News isn't just for linux stans - Windows devs like to hang out here too
That is _technically_ correct (the best kind). There's some plumbing between conhost and Terminal we need to clean up before we can add it to Terminal too. We've got a branch ready, we've just got to merge a whole stack of PRs first before we can get there.
Has been for like, five years now ;)
We shipped it (the Terminal) with the first versions of Windows 11. I don't think the "default terminal" feature defaulted to the new Terminal in the first win11 builds, but it should now. And you can always pick whichever terminal you want as the default terminal
Conhost and Terminal share quite a lot of code in fact. The text buffer, the renderer, the VT sequence parser - all that's the same codebase. That allows bugfixes and improvements to the the Terminal to also flow back to the vintage console (for people who still use that)
Posted by
zadjii on Monday July 01, 2024 @12:11PM
from the github.com dept.
This is a great write up, thanks for sharing. I had never heard of these before, and would usually be totally against a subscription based product like that. But the idea of totally bypassing their "drm" for 1/60th the cost? Much more intriguing
Thanks :)
I'd say waking up today to all this... negativity? was kinda a bummer. We've been working hard on something that people (myself included) have been asking for _for years_.
Like, obviously, it's not perfect out of the gate. That's fine! It was a haul enough to ship this in any form. Now that it's out there, we can make more and more improvements. One step at a time.
Sometimes, I just need a break from the internet I guess.
Happy to have the feedback! Most of those I've already fixed internally, there's just a 3-4 week delay between me checking in, and it flowing to Insiders.
For the other few things I missed: Very happy for the feedback! I've filed bugs and those'll be the first things I look at come Monday morning.
There are security implications for running elevated processes connected to unelevated console/terminal windows. "New window" mode avoids those security concerns. A secure-by-default posture seemed prudent.
I live by a one step at a time philosophy. It's better to make some incremental progress here, now, and open the door for future progress in this space too. Just like the Terminal - what we're putting out here in the first versions is just the first thing we feel comfortable with people using. We've got lots of ideas for more things to add, just, one step at a time :)
To answer the original question: I've been at MSFT like, 8 years now? And this is probably the third serious attempt my team has made at Sudo for Windows. (I think I heard of a couple other attempts in my tenure as well). After the last attempt, my mantra had always been "this is impossible to actually ship".
It's a tricky feature to ship, cause it is ultimately something that can be used as an escalation of privilege vector. Like, that's the entire idea. And there are a lot of people who (very rightly) get the ick when you say "we want to add this thing which can be used as an EoP to the OS image".
So, it's kinda hard to believe that after four years of thinking it was impossible, we actually managed to get it out the door.
Maybe for Windows 2025 we can work with the UAC folks to get something like that. I'm still shocked to this day that we managed to ship this at all. One step at a time :)
Yea, that's a limitation of UAC at this point, and probably not one we can avoid. The "Show details" dropdown on the dialog does however show the commandline you requested, so at least that's one way of making sure it's the thing you ran
Yep, that's basically the entire diagram. The information that's passed is basically just the commandline, env vars, and a handle to the console of the unelevated sudo's console. Once it's got a handle to the console, the elevated sudo can spawn the target app attached to the original console, rather than a new one. Simple as that!
> This looks like one of those KPI fulfilling projects
It actually wasn't. This has been one of the top community requests for the Windows Command Line for years. Literally, for like, the entire 8 years I've been here, we've been talking about if there was a way to do Sudo for Windows.
This was done because it makes developers happy, plain and simple. If that's a KPI, then that's the one we're optimizing for.
Thanks? But sudo
* isn't a 88 line PowerShell script, it's a 1800 LOC Rust binary
* isn't a NT kernel feature, it's a usermode executable
* was made by (in my opinion) a perfectly decent engineer. That may be thinking too highly of myself though.
Thanks! I think the team we're on has a very clear focus on making developers happy. Like, we're all ourselves, developers, so a lot of it is very self-serving. Anything we can do to make our own lives better is probably going to be a good thing for a lot of other developers too.
gsudo is great! It's got a lot of features for power users, it's got a great community, and I can't recommend it highly enough. There's room here for us to be better together - Sudo for Windows can cover a number of in-box scenarios, with OS-side support for things like GPO, event logging, etc. But then for power users who need access to some of the wilder features of gsudo (running as TrustedInstaller?), that's always available too.