hecto: Change Log
Status
I am currently rewriting hecto. Find the progress of the rewrite below. While the rewrite is in progress, you can still enjoy the 2019 version. The following list shows you which chapters are already 🌐 published, or still 🏗️ in progress or even ⏳ still in To Do. All pages are subject to change until the whole thing is done. I just like to tinker with ‘em.
- 🌐 Introduction
- 🌐 Chapter 1: Setup
- 🌐 Chapter 2: Entering Raw Mode
- 🏗️ Chapter 3: Raw Input and Output
- 🏗️ Chapter 4: A Text Viewer
- ⏳ Chapter 5: A Text Editor
- ⏳ Chapter 6: Search
- ⏳ Chapter 7: Syntax Highlighting
- 🌐 Appendices
- 🌐 Change Log
This page was last updated 2 weeks ago.
2024 Version Change Log
The tutorial overall
- Moved to new blogging platform and therefore a new design.
- Fixed weird formatting issues with arbitrary newlines, broken links or bullet lists in the middle of nowhere.
- Added snazzy new screenshots.
- Switched from showing the diff and asking the reader to implement the change to showing the challenge and asking the reader to implement it.
- Ended each chapter with a wrap up that summarises the learnings and efforts so far.
- Changed the wording and phrasing in many places to move closer to the tone of the original tutorial, to honour the original work that went into it.
- Introduced this change log.
- Removed quick links and added the table of contents to the top of every page.
Introduction
- Finally attributed Paige Ruten, the author of the original C tutorial, by name.
- Moved the license, attribution and some prose to the appendix.
- Made it clearer who this tutorial is for and what to expect, and cut down on the prose here.
- Linked pound by Kofi Otuo, which is the same idea, but newer than my 2019 edition, and less verbose.
Chapter 1: Setup
- Removed some setup information. No need to repeat what’s written already on the Rust page.
- Started with compiling “by hand” before we move over to using
cargo
. - Explained the files
cargo
produces. - Moved the explanation on how to build production releases from later chapters to this one.
- Expanded a lot on build targets and build artefacts
- Corrected some instances where in the past I claimed Rust would be doing certain things when it was Cargo doing the work. Credit where credit is due.
- Introduced the Rust Playground as supporting material.
Chapter 2: Entering Raw Mode
- Renamed this chapter from „Reading User Input“ to the same name of the original tutorial, since it now contains more details about raw mode than before.
- Took over more in depth information about escape sequences from the original tutorial.
- Investigated Raw Mode in more detail.
- Expanded upon dependency management with cargo, linked the documentation about feature flags.
- Expanded on what the Cargo.lock is for.
- Explained Results more thoroughly, to build a useful metaphor for understanding.
- Removed bitwise operations from the code and only mentioned it. If you need to do bitwise operations, you’re in too deep, and likely not a Rust beginner.
Chapter 3: Raw Input and Output
- In the original I wrongly claimed Clippy was a Windows 95 feature, when in reality it was an Office 97 feature. Sorry.
- Brought over more under the hood terminal magic explanations from the original.
- Extended opinions about idiomatic code, clean code, code smells and refactorings.
- Extended explanations around types, both in general and in Rust.
- Explained pointers in more detail.
- Greatly expanded the explanations around traits.
- Extended explanations around overflow and type casting
- Added my own views on documentation.
- Explained how to document things in Rust.
- Made the distinction between a
Cursor
, aPoint
and aPointer
clearer.
Chapter 4
- Restructured the approach to make it work / make it right / make it fast iteratively.
- Explained str and String in more detail
- Explained Unicode, UTF-8 and encodings in more detail
- Added explanations around Memory Management
- Expanded the explanations for Options vs Results
- Added explanations about how Iterators work
- Made a clearer distinction between a Line (in the document) and a Row (on the screen)
- Made a clearer distinction between the Terminal, a View and the Document.
- Added a section on emergent architecture and YAGNI
Appendices
- Rewrote the section about diffs to be GitHub specific.
- Expanded the section on how to act when stuck and how to reach me.
- Added more ideas on how to extend
hecto
. - Described how to contribute to
hecto
. - Ported and adapted text on how to use
git
throughout the tutorial from the original. - Described my changes to the original tutorial in more detail, to better comply with the license of Paige’s work.
- Moved credits, musings around the name, motivation and other prose here.
- Explained the name
hecto
for those who don’t see the connection tokilo
. - Added acknowledgements which also mention contributors to the 2019 version of
hecto
.
hecto
- Now works on Windows (untested, though).
- Disables raw mode even on most crashes instead of leaving the user with a broken terminal.
2019 Version
This post is part of the tutorial hecto: Build Your Own Text Editor in Rust. Find more information, especially around licensing and credits, here. This post was last updated 2 weeks ago.