Live data from Hacker News

Edit is now open source

devblogs.microsoft.com

141–150 of 191 posts

Re: Edit is now open source

#141
post #105
post #53

Hey all! I made this! I really hope you like it and if you don't, please open an issue: https://github.com/microsoft/edit To respond to some of the questions or those parts I personally find interesting: The custom TUI library is so that I can write a plugin model around a C ABI. Existing TUI frameworks that I found and were popular usually didn't map well to plain C. Others were just too large. The arena allocator e…

Can you say more about the chain of trust issue? Does Rust also not have that problem? Or are you using mrustc to bootstrap rustc?

Indeed, we have our own bootstrapped Rust toolchain internally. I think this has to do with (legal) certifications, but I'm not entirely sure about that.

Re: Edit is now open source

#142
post #53

Hey all! I made this! I really hope you like it and if you don't, please open an issue: https://github.com/microsoft/edit To respond to some of the questions or those parts I personally find interesting: The custom TUI library is so that I can write a plugin model around a C ABI. Existing TUI frameworks that I found and were popular usually didn't map well to plain C. Others were just too large. The arena allocator e…

I wonder if you used GitHub Copilot or some other LLM-based code generation tool to write any of the code. If not, that's a lot of code to write from scratch while presumably under pressure to ship, and I'm impressed.

Re: Edit is now open source

#143
The new Microsoft Edit is good. It's not as good as EDIT.COM, but it gets the job done.

A couple of peeves: it lacks word count (which would be very useful), and there is no way to escape to shell (which would render it more usable for light scripting tasks).

I don't mind it too much, but I dislike how it hijacks the selected terminal font in Windows Terminal, how you can't hit Esc to close the menus in a Linux terminal, and how not all functions can be accessed using the keyboard with direct shortcuts.

For example, to change which file you're editing, you have to select View > Focus Statusbar, press the left arrow, hit Enter to select the list of edited files, select the file you want to switch to, and press enter. I wonder why there's no shortcut for that, which would be a common use case.

For a side project, it's very nice all around. If these issues were to be fixed, it would be a perfectly adequate editor.

Then the only feature missing would be an embedded Lisp interpreter used for automation and extensibility. :)

Edit: It has no telemetry, right?

Re: Edit is now open source

#144

Earlier quoted context omitted.

That just feels like scope creep. Notepad would also be neat with some better keybinding support, plugins, lsp, ... - but then it wouldn't be notepad, and theres countless not notepads out there. Tools like nano (well, pico) exist to provide a reliable and always available minimum feature set. If you expand it, then you end up with something that is neither the minimum nor capable enough to sensibly compete with full…

Well, Notepad is introducing AI support which already feels like scope creep to me… https://support.microsoft.com/en-us/windows/enhance-your-wri...

They already introduced it. It's been there for some months.

Re: Edit is now open source

#145

Earlier quoted context omitted.

Maybe something like https://www.codecentric.de/en/knowledge-hub/blog/plug-in-arc... ? Webassembly is the binary spec for the web. But now everyone is using that because it's portable and lightweight. The idea is you can create plugin using any language that compiles into webassembly. C, Rust, Pascal, Go, C++. Compile once and it should work in Windows, Linux and Mac. No need to compile to multiple architecture. Perf…

And I guess forcing FFI for plugins is going to be a headache for many plugin authors.

What I imagined is that people could load runtimes like node.js as a plugin itself in order to then load plugins written in non-native languages (JavaScript, Lua, etc.; node.js being an extreme example). I wonder if WASM could also be one such "adapter plugin"?

But plugins are still a long way off. Until then, I updated the issue to include your suggestion (thank you for it!): https://github.com/microsoft/edit/issues/17

Re: Edit is now open source

#146
post #88

Earlier quoted context omitted.

Why Rust over a compiled .NET lang? (e.g. C#)

Pretty much exclusively binary size. Even with AOT C# is still too large. Otherwise, I wouldn't have minded using it. I believe SIMD is a requirement for writing a performant editor, but outside of that, it really doesn't need to be a language like C or Rust.

Is there any context in which .NET runtime wouldn't be available on Windows (even if an older version, e.g. 4.x)? Because when you can rely on that and thus you don't need to do AOT, the .exe size for C# would likely be an order of magnitude smaller.

Re: Edit is now open source

#147
post #106

> While it is relatively simple to learn the magic exit incantation, it’s certainly not a coincidence that this often turns up as a stumbling block for new and old programmers. What’s even simpler is changing the awful defaults and adding the menu to make this a non-issue at a tiny fraction of the time it would take to write a new editor. > we decided that we wanted a modeless editor for Windows (versus a modal edito…

New users accidentally end up in the wrong mode because they press the wrong key, and then get stuck because they don't know what a "mode" is.

There's really no reason for a basic lightweight text editor to have modes. If you as a power user want one, Vim can be installed as needed.

Re: Edit is now open source

#148

I have to say, I really miss MS-DOS TUI apps like edit, the qbasic editor, and xtree-gold. The linux-terminal based ones just seem a bit off in comparison. Maybe it's mouse and keyboard support in terminals (shift-enter support, anyone?) aren't great? People have different aesthetics? I don't know... Next stop: VS-EDIT would be pretty cool :) (This with LSPs)

DOS was the golden age for TUI apps because its ultimate API was both simple and powerful: direct video memory access in text mode. So you just get a linear chunk of memory where each character on screen corresponds to two bytes: one for the glyph, one for foreground/background color (4 bits each). For input you had some BIOS helper interrupts, but then again it was easy enough to read scancodes directly (and they were standardized on PC).

So you can handle any key or key combo however you want, and you can put any characters anywhere you want without weird corner cases like autoscrolling.

Re: Edit is now open source

#149
post #129
post #127

Earlier quoted context omitted.

What led you to say that the author did not have users' interests at heart? What led you to imply that there's something wrong with reimplementing something or having fun or whatever it is you disliked you so much? What leads you think that a person working on something delivered with Windows 11 deserves less respect than a person working on a less used system? Or, do you consider what you said neutral, well argued c…

What led you to continue to misrepresent... everything? Why did you make up a point about a person deserving respect and pass it as my thought? Could you not come up with a more coherent difference between those two situations yourself? Why are you asking a question about the motivation if you don't even understand "whatever" it is I disliked? Why did you make up the implication that rejects having fun? Why are you m…

I didn't intentionally misrepresent your comment, but I am open to having misunderstood it. Also, me answering with questions didn't help.

> > So, why not have fun learning something new, writing most things myself? I definitely learned tons working on this, which I can now use in other projects as well. > > Because presumably you should have been doing it mostly for the benefit of Windows users, and wasting time because it’s a fun personal learning exercise means those users would suffer getting an underpowered app

Would you care to elaborate on what intention you understood the author to have, which aspect of author's work you deemed as a waste of time, and why do you think the resulting app is underpowered for Windows 11 users?

I would also be interested in what mismatch you saw in my expectations as regards your original comment and a professional app.

I realise that we got off on a bad foot, but, if you care to, we can try and restart the conversation.

Re: Edit is now open source

#150
post #53

Hey all! I made this! I really hope you like it and if you don't, please open an issue: https://github.com/microsoft/edit To respond to some of the questions or those parts I personally find interesting: The custom TUI library is so that I can write a plugin model around a C ABI. Existing TUI frameworks that I found and were popular usually didn't map well to plain C. Others were just too large. The arena allocator e…

I wonder if you used GitHub Copilot or some other LLM-based code generation tool to write any of the code. If not, that's a lot of code to write from scratch while presumably under pressure to ship, and I'm impressed.

I did use Copilot a lot, just not its edit/agent modes. I found that they perform quite poorly on this type of project. What I use primarily is its autocompletion - it genuinely cured my RSI - and sometimes the chat to ask a couple questions.

What you expressed is a sentiment I've seen in quite a few places now. I think people would be shocked to learn how much time I spent on just the editing model (= cursor movement and similar behavior that's unique to this editor = a small part of the app) VS everything else. It's really not all that difficult to write a few FFI abstractions, or a UI framework, compared to that. "Pressure to ship" is definitely true, but it's not like Microsoft is holding a gun to my chest, telling me to complete the editor in 2 months flat. I also consider it important to not neglect one's own progress at becoming more experienced. How would one do that if not by challenging oneself with learning new things, right? Basically, I think I struck a balance that was... "alright".

Post reply on HN