Isn't the relatively large binary just because it's written in Golang? Go executables each ship their own copy of the Go runtime. That alone accounts for a big chunk of small programs like this.
Nano also links against ncurses, which is about as big as the compressed tarball for micro. I'm looking at the dependency closures of each right now in nix-tree[1], and micro's closure's total size is 15.04 MiB while nano's is 12.78 MiB-- not really "orders of magnitude" (as a sibling commenter suggests) when you look at it like that.
Admittedly, nano's dependencies (`file` and `ncurses`, on my system) are likely to ship as part of the "base system" of any Linux distro anyway; the real size it adds to any distro is negligible. But there's no indication to me that micro is meaningfully "bloated", as the meme goes; it seems like what is required to run it is reasonable and comparable to other tools that serve the same purpose.
There is also dte[1]. It hits exactly the same notch and offers an extremely lean editor with Unicode support, CUA key bindings and much more. It has replaced nano as my terminal editor.
Micro is a great editor to replace stuff like nano. I think it would be a bad replacement for edit though, edit is very barebones, and micro is very "upgradeable" through lua. It also handles large files quite well also
Geniunely curious, how projects like these get approved in an org at the scale of Microsoft? Is this like a side project by some devs or part of some product roadmap? How did they convince the leadership to spend time on this?
As they explained, they needed a text editor that works in a command line (for Windows Core server installs), works across SSH (because for a while now Windows included an SSH Server so you can completely manage it through SSH), and can be used by non-vi-experienced Windows administrators (i.e. a modeless editor).
Each group needs to do something and they come up with the ideas. Sometimes it is driven by various leaders, e.g. “use copilot”. Sometimes it is an idea from some hackerdayz event which gets expanded. Sometimes this is driven in research units where you have a bunch of technical people twiddling their thumbs. Sometimes this is an idea that goes through deep analysis and multiple semesters before it gets funding.
Look at the amount of contributors here. This project was probably some strategic investment. It did not come to existence overnight.
The original edit.com, from around dos 6.22 (and later 7.0, ie. win95) was my first IDE. Well, I started with qbasic, so I was fairly familiar with it as it was similar (or same?), but when I started learning C/C++ with djgpp, I just continued using edit.com.
My "project file" was `e.bat` with `edit file1.cpp file2.cpp file3.cpp`, as it was one of the few editors that I knew that had a decent multi file support with easy switching (alt-1,2,3 ..). I still continue remapping editor keybindings to switch to files with alt/cmd-1,2,3,.. and try to have my "active set" as few of the first files in the editor
It wasn't a great code editor, as it didn't have syntax highlighting, and the indent behaviour wasn't super great (which is why in my early career had my indent was two spaces, as that was easy enough to do by hand, and wasn't too much like tab). But I felt very immediate with the code anyway.
I knew that many others used editors like `qedit`, but somehow they never clicked with me. The unixy editors didn't feel right in dos either.
Quickly trying this, it doesn't seem to switch buffers with the same keybindings, even if it does seem to support multiple buffers.
You should raise that as an issue. If things like that get in early enough, they get heard.
And it wasn't just similar. It was literally the same. EDIT.COM simply started QBASIC up with a special flag. One could just run QBASIC with the flag. As I said at https://news.ycombinator.com/item?id=44037509 , I actually did, just for kicks.
It may not have had syntax highlighting, but it did have syntax capitalization (for lack of a better term?). If you typed a line in all lowercase, after hitting enter it would automatically uppercase the reserved words. It wasn't much, but it helped
I remember using edlin a lot in my early computing days. It was murder to learn but once you knew how to wield it, it was excellent. I don’t know why I was forced to learn that but I needed it for something and stuck to it the entire time I used DOS for anything. And people were in awe when you used it while they watched. “What the hell was that!?”
First of all, an empty list of dependencies! I am sold!
It works great. I can't believe the did a whole TUI just for this, with a dialogs a file browser. I want to use for a project of mine, I wonder how easy it is. If someone involve in the project is here, why not use Ratatui?
Code quality is top notch, can only say one thing:
Literally no deps except for a few dev-deps that make testing easier. That's a reasonable thing for something that you ship as a fundamental tool to be used by administrators as part of an OS like windows. Take a look for lhecker's [1] responses for more info on the not invented here stuff.
About a month ago I heard Microsoft had their own Linux distribution to help Microsoft Windows users feel more at home. From memory, it was a rather simple GNOME setup. Nothing special.
I am surprised Micrsooft didnt use the opportunity to create a micrsoft specific Linux distro that replaces bash with powershell, or Edit with vim, nano and other choices as well as .NET and Visual Studio Code by developer installs.
Micrsoft could have used this as their default WSL install.
It may not have won the war against typical distro like Ubuntu or Debian but it could have gained a percentage and be a common choice for Windows users - and there are a lot of Windows users!
Microsoft cannot dominate the Linux kernel but it can gain control in userland. Imagine if they gained traction with their applications being installed by default in popular distributions.
This Microsoft Edit is available for Linux, like Powershell is and others. If they had played their cards right -- perhaps -- 10 years ago, their distribution could have been in the top 5 today, all because many windows users use it as their WSL.
Giant companies (like M$) can inject their fingerprints into my personal space. Now, we just need Micrsooft Edit to have Co-Pilot on by default...
I strongly suspect in time Microsoft will move to Linux, at least with things like Windows Server and embedded Windows. Then a gradual change for Windows desktop, or a sort of Windows Legacy vs Windows "Linux Workstation" desktop options. Linux kernel + some sort of 'super' WINE and a fallback tightly integrated Windows classic on a VM for certain programs.
Only problem is that the NT kernel in many ways is much better than the Linux kernel design wise (for example, the NT kernel can handle a total GPU driver crash and restore itself, which I think Linux would really struggle with - same with a lot of other drivers).
But Windows is increasingly a liability not an asset for Microsoft, especially in the server space. Their main revenue stream is Azure & Office 365 which is growing at double digits still, with Windows license growth flat.
At a minimum I'd expect a Linux based version of Windows Server and some sort of Workstation version of Windows, based on Linux.
> I strongly suspect in time Microsoft will move to Linux, at least with things like Windows Server and embedded Windows.
You may not understand how important Microsoft considers backwards compatibility. Switching to a Linux kernel would eliminate all of that, and that is simply not an option for Microsoft.
The Linux kernel is missing a lot of esoteric things that the NT kernel has and that people use a lot, as well.
Windows as we use the word today (any variant) will not ever switch to a Linux kernel.
I do hope one day that Microsoft put a proper GUI on Linux though, no X, no Wayland, but something smarter and better than those. Probably also not likely to happen but I’d love to see it if they could do it well.
The reason why WSL is a thing is because developers in corps needed a way to run Linux. IT support and techs doesn't know anything about Linux typically and don't want to deal with supporting it. WSL fixes this problem.
Most developers don't want to use Linux at all. Many developers don't even really know how to user a terminal and rely on GUI tools.
> Most developers don't want to use Linux at all. Many developers don't even really know how to user a terminal and rely on GUI tools.
First of all, I disagree with this comment.
However, lets assume you are right.. that the average "Windows Developer" has little to zero skills in GNU/Linux.
If that is the case, it proves my point EVEN MORE that Micrsofot missed out creating a Microsoft Linux Distro... designed to have Powershell, Visual Studio Code, Edit, and potentially Edge, SQL Server, etc.
It would still be Linux but keeping to what they know in Windows -- and would have given Microsoft more power in the linux world.
> Most developers don't want to use Linux at all.
I don't know if this is necessarily true. Many of the develops I know prefer GUI applications to cli tooling, which I can get behind. That has nothing to do with Linux vs Windows though.
But my struggles with Windows are plentiful and the same goes for all my colleagues. I have a hard time believing that we are the outliers and not the rule.
I would venture a guess that the name recognition helps them. No developer wants to install a distro they’ve never heard of, but they do want to install Ubuntu. If WSL supports Ubuntu then they can cash in on that.
>About a month ago I heard Microsoft had their own Linux distribution to help Microsoft Windows users feel more at home. From memory, it was a rather simple GNOME setup. Nothing special.
You're confusing Microsoft's first-party Linux distro Azure Linux (nee CBL-Mariner) that is intended as a regular MS-supported OS for containers, VMs, servers, etc, with various Windows-like skins for Linux DEs that people have made for years.
> You think Microsoft maintains an entire secret distro just for Windows people to feel 'at home'.
Sorry I dont understand the point you are making.
I did not suggest they had a "secret distro"
I am suggesting they could have claimed a share of dominance in the Linux Distro as the default WSL distro.
>Microsoft cannot dominate the Linux kernel but it can gain control in userland. Imagine if they gained traction with their applications being installed by default in popular distributions.
Yes, but how do they make money by doing this.
Unlike the socialist hiveminds that end up being behind the distros. Microsoft has salaries and bills to pay.
As far as I've always seen, everyone loves to leech on Microsoft's free stuff but nobody wants to pay for a product.
I do not claim to be a business expert but I dont think their success comes from just their Windows Operating System. Well, I would say the success for Windows is not about the profit but the control of users. If the majority are on Windows, they are unlikly to change habit to what they are familar with.
Besdies, for new PC/Laptops come bundled with Windows, Microsoft has made an agreement made with various retailers to come with Windows (Home edition) preinstalled. So in some ways, Windows is free for the User unless they pay for Professional edition, or whatever is offered today.
Of course, the average user will create a microsoft account to complete the install. :-)
Besides the Windows OS -- it is really the Services they provide.. Azure, Office365, SQL Server, PowerBI, etc. I would say THIS is where a lot of the money comes from... business willing to pay for them!
I work for Companies that are willing to PAY for these things - all for "Support"
If something goes wrong.. raise it with Microsoft. Even if I know what the problem is, it is all about the ticketing system. Throw it to Microsoft and carry on.
Despite the above, Microsoft also have "Free" software. They have started to Open Source many of their software.. allowing Linux support as well as Windows. Visual Studio Code, SQL Server, Powershell, etc.
It comes back to my point. When they presented WSL - they could have provided a "MS Linux" Distro, all promoted as "ease for Windows users" and if it became a popular distro, would have pushed micrsoft to have more control in userland... which would have alienated most Windows users away from Ubuntu, etc.
Like Windows, it is a method to keeping your userbase to rely on what they know overall.
This is just a "because I wanted to" project. And I get that; done a lot of those myself just to understand what the hell was going on. But the rewrite of turbo vision into FPC and compiling to half a dozen targets has been around for 20 years. Turbo vision is probably the best text mode windowing library in existence. The cool fun kicks in when you can map a whole text screen to an array like so:
var
Screen: Array[1..80,1..25] Of Byte Absolute $B800; // or something like that as i recall
What turbo vision brought to the game was movable, (non) modal windows. Basically a lot of rewriting that array in a loop. Pretty snappy. I made a shitload of money with that library.
Well, I don't have the rights to bundle anything with windows, nor would I want to. All you'd need is a thin player to reproduce a TUI screen if done in FPC, and it wouldn't be limited to Windows. All I'm suggesting is we tend to have some recency prejudice in our development, even when it costs more time/money than it should. I'm sure I've done the same over the years.
Arrays in TP were laid out in row-major order, and each character was represented by two bytes, one denoting the character itself and the other the attributes (foreground/background color and blinking). So, even better, array[1..25, 1..80] of packed record ch: char; attr: byte end absolute $B800:0000.
Replace $B800 with $B000 for monochrome text display (mode 7), e.g., on the Hercules.
My first company out of uni was a company that sold a tv advertising application written in dos. It did all the reports, put together spot advert packages, measuring reach and frequency, cost per point, etc. Used Neilsen ratings for data. The company at the time paid commissions along with salary to programmers. The app still lives on in windows, but I've been out of that game for decades. Written in TP for dos, then Delphi for windows.
I remember you could use it in a batch file to script some kinds of editing by piping the keypresses in from stdin. Sort of a replacement for a subset of sed or awk.
I haven't tried but this should be possible with vi too. Whether that is deeply cursed is another question.
1. By the author - https://news.ycombinator.com/item?id=44034961 2. Ubuntu Publication - https://news.ycombinator.com/item?id=44306892
And this post.
--
1: https://micro-editor.github.io/
`edit` doesn't even support syntax highlighting (atleast, out of the box when I tried it).
The trick is doing it while keeping the binary size small, so tree sitter is not an option.
Nano also links against ncurses, which is about as big as the compressed tarball for micro. I'm looking at the dependency closures of each right now in nix-tree[1], and micro's closure's total size is 15.04 MiB while nano's is 12.78 MiB-- not really "orders of magnitude" (as a sibling commenter suggests) when you look at it like that.
Admittedly, nano's dependencies (`file` and `ncurses`, on my system) are likely to ship as part of the "base system" of any Linux distro anyway; the real size it adds to any distro is negligible. But there's no indication to me that micro is meaningfully "bloated", as the meme goes; it seems like what is required to run it is reasonable and comparable to other tools that serve the same purpose.
--
1: See: https://github.com/utdemir/nix-tree ; Try `nix run nixpkgs#nix-tree -- $(nix build --no-link --json nixpkgs#nano | jq -r .[0].outputs.out)`
[1]: https://craigbarnes.gitlab.io/dte/
Look at the amount of contributors here. This project was probably some strategic investment. It did not come to existence overnight.
My "project file" was `e.bat` with `edit file1.cpp file2.cpp file3.cpp`, as it was one of the few editors that I knew that had a decent multi file support with easy switching (alt-1,2,3 ..). I still continue remapping editor keybindings to switch to files with alt/cmd-1,2,3,.. and try to have my "active set" as few of the first files in the editor
It wasn't a great code editor, as it didn't have syntax highlighting, and the indent behaviour wasn't super great (which is why in my early career had my indent was two spaces, as that was easy enough to do by hand, and wasn't too much like tab). But I felt very immediate with the code anyway.
I knew that many others used editors like `qedit`, but somehow they never clicked with me. The unixy editors didn't feel right in dos either.
Quickly trying this, it doesn't seem to switch buffers with the same keybindings, even if it does seem to support multiple buffers.
And it wasn't just similar. It was literally the same. EDIT.COM simply started QBASIC up with a special flag. One could just run QBASIC with the flag. As I said at https://news.ycombinator.com/item?id=44037509 , I actually did, just for kicks.
First of all, an empty list of dependencies! I am sold! It works great. I can't believe the did a whole TUI just for this, with a dialogs a file browser. I want to use for a project of mine, I wonder how easy it is. If someone involve in the project is here, why not use Ratatui?
Code quality is top notch, can only say one thing:
Bravo!
[1]: https://news.ycombinator.com/threads?id=lhecker
I am surprised Micrsooft didnt use the opportunity to create a micrsoft specific Linux distro that replaces bash with powershell, or Edit with vim, nano and other choices as well as .NET and Visual Studio Code by developer installs.
Micrsoft could have used this as their default WSL install.
It may not have won the war against typical distro like Ubuntu or Debian but it could have gained a percentage and be a common choice for Windows users - and there are a lot of Windows users!
Microsoft cannot dominate the Linux kernel but it can gain control in userland. Imagine if they gained traction with their applications being installed by default in popular distributions.
This Microsoft Edit is available for Linux, like Powershell is and others. If they had played their cards right -- perhaps -- 10 years ago, their distribution could have been in the top 5 today, all because many windows users use it as their WSL.
Giant companies (like M$) can inject their fingerprints into my personal space. Now, we just need Micrsooft Edit to have Co-Pilot on by default...
Only problem is that the NT kernel in many ways is much better than the Linux kernel design wise (for example, the NT kernel can handle a total GPU driver crash and restore itself, which I think Linux would really struggle with - same with a lot of other drivers).
But Windows is increasingly a liability not an asset for Microsoft, especially in the server space. Their main revenue stream is Azure & Office 365 which is growing at double digits still, with Windows license growth flat.
At a minimum I'd expect a Linux based version of Windows Server and some sort of Workstation version of Windows, based on Linux.
You may not understand how important Microsoft considers backwards compatibility. Switching to a Linux kernel would eliminate all of that, and that is simply not an option for Microsoft.
The Linux kernel is missing a lot of esoteric things that the NT kernel has and that people use a lot, as well.
Windows as we use the word today (any variant) will not ever switch to a Linux kernel.
I do hope one day that Microsoft put a proper GUI on Linux though, no X, no Wayland, but something smarter and better than those. Probably also not likely to happen but I’d love to see it if they could do it well.
Dead Comment
Most developers don't want to use Linux at all. Many developers don't even really know how to user a terminal and rely on GUI tools.
First of all, I disagree with this comment.
However, lets assume you are right.. that the average "Windows Developer" has little to zero skills in GNU/Linux.
If that is the case, it proves my point EVEN MORE that Micrsofot missed out creating a Microsoft Linux Distro... designed to have Powershell, Visual Studio Code, Edit, and potentially Edge, SQL Server, etc.
It would still be Linux but keeping to what they know in Windows -- and would have given Microsoft more power in the linux world.
Fortunately, Linux users can also avail themselves of a graphical interface as well.
The last one didn’t do so hot, they named it “Xenix”
On the other hand, according to AT&T, Xenix accounted for about half of the worldwide Unix licenses in the late 1980s.
You're confusing Microsoft's first-party Linux distro Azure Linux (nee CBL-Mariner) that is intended as a regular MS-supported OS for containers, VMs, servers, etc, with various Windows-like skins for Linux DEs that people have made for years.
Sorry I dont understand the point you are making.
I did not suggest they had a "secret distro" I am suggesting they could have claimed a share of dominance in the Linux Distro as the default WSL distro.
Yes, but how do they make money by doing this.
Unlike the socialist hiveminds that end up being behind the distros. Microsoft has salaries and bills to pay.
As far as I've always seen, everyone loves to leech on Microsoft's free stuff but nobody wants to pay for a product.
Besdies, for new PC/Laptops come bundled with Windows, Microsoft has made an agreement made with various retailers to come with Windows (Home edition) preinstalled. So in some ways, Windows is free for the User unless they pay for Professional edition, or whatever is offered today.
Of course, the average user will create a microsoft account to complete the install. :-)
Besides the Windows OS -- it is really the Services they provide.. Azure, Office365, SQL Server, PowerBI, etc. I would say THIS is where a lot of the money comes from... business willing to pay for them!
I work for Companies that are willing to PAY for these things - all for "Support"
If something goes wrong.. raise it with Microsoft. Even if I know what the problem is, it is all about the ticketing system. Throw it to Microsoft and carry on.
Despite the above, Microsoft also have "Free" software. They have started to Open Source many of their software.. allowing Linux support as well as Windows. Visual Studio Code, SQL Server, Powershell, etc.
It comes back to my point. When they presented WSL - they could have provided a "MS Linux" Distro, all promoted as "ease for Windows users" and if it became a popular distro, would have pushed micrsoft to have more control in userland... which would have alienated most Windows users away from Ubuntu, etc.
Like Windows, it is a method to keeping your userbase to rely on what they know overall.
What turbo vision brought to the game was movable, (non) modal windows. Basically a lot of rewriting that array in a loop. Pretty snappy. I made a shitload of money with that library.
https://github.com/magiblot/tvision
It's not. They needed a small TUI editor that was bundled with Windows and worked over ssh.
https://news.ycombinator.com/item?id=44034961
Arrays in TP were laid out in row-major order, and each character was represented by two bytes, one denoting the character itself and the other the attributes (foreground/background color and blinking). So, even better, array[1..25, 1..80] of packed record ch: char; attr: byte end absolute $B800:0000.
Replace $B800 with $B000 for monochrome text display (mode 7), e.g., on the Hercules.
So good.
[0]: https://charm.sh/
I remember you could use it in a batch file to script some kinds of editing by piping the keypresses in from stdin. Sort of a replacement for a subset of sed or awk.
I haven't tried but this should be possible with vi too. Whether that is deeply cursed is another question.