No AI. Build ed (the standard text editor) in 100 lines of C
Hayyoth
0:00 / 0:00
No AI. Build ed (the standard text editor) in 100 lines of C
35 135 просмотров · 6 дн. назад
Hayyoth
12,4 тыс. подписчиков
35 135 просмотров · 6 дн. назад
ed text editor
"ed is the standard text editor"
Runs everywhere, even on a microwave
Created by Ken Thompson in 1971
Used to write early Unix versions.
Not TUI , pure CLI editor
line-oriented editor
Can be built using only C standard library
— no termios, curses, or TUI dependencies.
Present everywhere
Works headless:
runs via scripts/pipes without a human observer.
AI love ed
Evolution tree:
ed - sed - ex - vi - vim.
** Note that final code contains several bugs **
`lines` array has not been initialized (`{0}`).
`free lines` is missing the last line
`strncpy(filename, path, sizeof(filename) - 1);`
logic error when adding lines in 'a' (Append) mode.
** C is really difficult. **