Re: [dev] [edit] Introducing edit, a simple text editor

From: Sean MacLennan <seanm_AT_seanm.ca>
Date: Mon, 23 Oct 2023 20:07:40 -0400

On Tue, 24 Oct 2023 01:26:24 +0200
Arthur Jacquin <arthur_AT_jacquin.xyz> wrote:

> I'm interested in having a look at the code too, in case you want to
> share it ;)

No problem. See the README.md for a brief history of zedit. It is
probably too big to be suckless, even in its greatly reduced state.

Most of the cool stuff is gone... mostly because modern OSes don't need
it. It used to have a virtual memory system (saving to swap), extended
memory on DOS, optimized disk writes... the list goes on.

On DOS it had a cool border, the current line was highlighted, and it
dealt with CGA monitors.

It also started out with a gap page buffer scheme which was the rage at
the time. You created a gap in the middle of each page. The idea was
that inserts could use that gap.

However, profiling showed that a lot of cpu was being consumed to deal
with the gap. Most developers spend a LOT more time reading the code
than writing. So zedit is now optimized for reading.

Your usage of lines, although it takes more memory, is probably a good
thing these days. Might be a problem with files in the gigabyte range ;)

https://github.com/smaclennan/zedit

The buffer code is split out in its own buff directory.

Cheers,
   Sean
Received on Tue Oct 24 2023 - 02:07:40 CEST

This archive was generated by hypermail 2.3.0 : Tue Oct 24 2023 - 02:12:07 CEST