3 ms·
Makes me wonder - with Notepad rapidly evolving into WordPad v2, and no default "just render bytes as text" solution in modern Windows to replace it, maybe ther
by TeMPOraL 8mo ago
Makes me wonder - with Notepad rapidly evolving into WordPad v2, and no default "just render bytes as text" solution in modern Windows to replace it, maybe there's still a way to hack one together on the go, just from pieces laying around in every default installation? I mean, rundll32.exe is a thing.
All I really need is a basic text box with a scroll bar, and a way to feed it with bytes from a file.
To make it a well-defined challenge: the task is to find a way to create a basic notepad - a multi-line textbox that supports scrolling, and can be fed bytes from a file to render as text directly. Additionally, this must be achievable through simple means - simple enough to memorize - and must work on standard Windows 11 installation, with no extra dependencies to procure. Solution can be e.g. something I can type from memory into "Run" (Win+R) box, but could also be a short list of GUI steps (e.g. open some program, click on "Help", drag file to help box).
- eurleif 8mo agoIf you're ok with a TUI instead of a GUI, Microsoft's documentation says the `edit` command is still around in Windows 11 (I don't have a Windows 11 machine handy to verify this): https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/edit https://learn.microsoft.com/en-us/windows-server/administrat...
- TeMPOraL 8mo agoHuh. I was going to say, last time I saw this was 20+ years ago, and I forgot it exists - but I must be remembering something else. It seems `edit` is a new thing, if I'm to believe https://learn.microsoft.com/en-us/windows/edit/ https://learn.microsoft.com/en-us/windows/edit/ I can confirm it exists on my Windows 11 machine, and I didn't install it specifically, though it's definitely not a base install (upgraded from Windows 10, and plenty of dev tooling installed over the years). Still, it fits the bill (+/- GUI, but I didn't consider TUI at all). Thanks!
- eurleif 8mo agoThe documentation doesn't make this entirely clear, but I think these are two separate things: the original `edit` command which is built into Windows 11 (and has been built into prior Windows releases), and a replacement written in Rust that can optionally be installed. Note that my link is dated 2023, whereas Wikipedia says that Microsoft Edit was first released in 2025: https://en.wikipedia.org/wiki/MS-DOS_Editor https://en.wikipedia.org/wiki/MS-DOS_Editor
- einr 8mo agoThe old EDIT never shipped with any 64-bit Windows IIRC, since it was a 16-bit MS-DOS application. I believe 32-bit Windows 10 has it..? As someone who (mercifully) only occasionally has to touch Windows machines, I keep forgetting this, and then when I try to do stuff I’m flabbergasted that the operating system does not include a terminal text editor. (In a fit of pure desperation I even typed EDLIN into the Command Prompt — no go ;) That was the case with Win11 about a year ago; if they finally started shipping EDIT64 then hey, that’s one positive recent change in Windows I suppose.
- TeMPOraL 8mo agoWell, there was a workaround (that I only learned today) for creating new files: copy con file_to_edit.txt Type text, end with CTRL+Z. Don't make any typos. That's what web search told me, but then looking at the remarks in docs for `copy`[0], I have to wonder if this works now, and if it would've worked back then: copy prefix.txt+con+suffix.txt output.txt If it does, then combined with some clever use of `find`, `findstr` or `for` (whichever was available back then), you could probably get something that's half-way between EDIT.COM and a line editor. (`more` would come in handy here, but AIUI, there's no way to run it non-interactively in cmd.exe? Don't have a Windows machine handy to check it right now.) -- [0] - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/copy#remarks https://learn.microsoft.com/en-us/windows-server/administrat...
- einr 8mo agocopy prefix.txt+con+suffix.txt output.txt This does indeed work in proper MS-DOS. Congratulations for figuring out probably the single most masochistic way of accomplishing text editing ;)
- al_borland 8mo agoDave Plummer vibe coded one on his YouTube channel a couple months ago. Normally I wouldn’t share someone vibe coding something, but since he wrote the Task Manager, Zip Folders, and other such core Windows features back in the day, it hits different. https://youtu.be/bmBd39OwvWg https://youtu.be/bmBd39OwvWg
- TeMPOraL 8mo agoAmazing, thanks for sharing! This kind of vibe-coding I'm happy to watch.