← Back to context

Comment by WalterBright

10 years ago

Here's one from the 1980s, which I still use and keep up to date:

https://github.com/DigitalMars/me

and translated to D:

https://github.com/DigitalMars/med

A trivial thing, but README.md for me says "Micro Emacs in D", where it should say "Micro Emacs in C" (the repo description on Github is correct though).

Still use for occasional quick edits instead of vi/notepad or for proper, longer development tasks?

  • It's my primary editor. I'm so used to it I don't even know what the commands are - I just watch my fingers do it.

    The first thing I do with a new system is port ME to it. I'll use vi to do what's necessary to get there (usually get ssh working so I can edit the files with ME on another machine).

    I've worked out how to do syntax highlighting on it, but never got around to doing it.

Thanks for sharing. Seeing a working emacs clone that compiles to a 66k executable is pretty awesome.

  • Another thing to like is it has no configuration files. This mattered a great deal in the DOS days because floppies were so slow! But even today, who wants to futz with such? If it needs configuring, I just tweak the code and recompile it.

    Back in the 80s, I handled configuration by having ME directly patch the ME executable. (This was a trick I learned from the old ADVENT Fortran game.) It was marvelously simple and bulletproof to do that.

    Unfortunately, programs that patched their own executables became huge no-nos as malware took off, and I had to abandon that.

    • I wrote quite a few DOS programs in the late 80's/early 90's that used ini files appended to the .exe as the configuration. All you had to do was run `copy prog.exe + config.ini program.exe` to build a single file that could be passed around without worrying about either a lost or changeable config file. Your code just needed to read its own exe header to figure out where to offset into it to pull out the ini contents after opening the file in read-only mode. It worked very well for apps where you didn't want users to mess with the config.

      1 reply →