philipp's blog

GPT vs Me

Take a look at the following text variants for my hecto tutorial:

First Draft

Welcome! This is a series of blog posts that shows you how to build a text editor in Rust.

It's a re-implementation of antirez' kilo in Rust, and a remix of Paige Ruten's tutorial for the same thing in C.It’s somewhere around 1000 lines of Rust in a few files with a few dependencies, and it implements all the basic features you expect in a minimal editor, as well as syntax highlighting and a search feature.

These posts walk you through building the editor and learning Rust in multiple small steps. For the first steps, you’ll add, change, or remove a few lines of code. Most steps, you’ll be able to observe the changes you made by compiling and running the program immediately afterwards. Once you’ve built up a solid understanding of Rust, you’ll get a description of what to solve next and have the opportunity to try it out before you compare it to my own take on the solution.

I wrote this tutorial coming from a different corner of the engineering world, to obtain a deep understanding of Rust. If you’re in a similar situation, this tutorial is for you.

I explain each step along the way, sometimes in a lot of detail, and definitely not always Rust-related. Feel free to skim or skip the prose, as the main point of this is that you are going to build a text editor from scratch while learning Rust! Anything you learn along the way is a bonus, and there’s plenty to learn just from typing in the changes to the code and observing the results.

See the appendices for more information on the tutorial itself (including what to do if you get stuck, and where to get help).

If you’re ready to begin, then go to chapter 1!

Second Draft

Hey, there! I'm super excited to share this series of blog posts that will teach you how to build your very own text editor in Rust.

This project is inspired by antirez's kilo text editor and Paige Ruten's tutorial on creating one in C. It's not too long, coming in at around 1000 lines of Rust code, and it packs in all the essential features you'd expect in a minimal editor, like syntax highlighting and a search function.

As we go through these posts, we'll be building the editor and learning Rust together, step by step. In the beginning, we'll start with small changes, like adding, changing, or removing a few lines of code. As we progress, you'll be able to see the changes you've made by compiling and running the program right away.

Once you've got a good grasp of Rust, I'll give you a brief overview of what we need to tackle next, and you can try it out before checking out my own take on the solution.

I wrote this tutorial because I wanted to gain a deeper understanding of Rust, coming from a different field of engineering. If you're in a similar boat, this tutorial is perfect for you.

I'll be explaining each step along the way, sometimes in great detail (not always Rust-related, though). Feel free to skim or skip the text if you want to focus on the code. The main goal here is for you to build a text editor from scratch while learning Rust. Anything else you pick up along the way is a bonus!

Check out the appendices for more info on the tutorial, including what to do if you get stuck and where to find help.

If you're ready to dive in, head over to Chapter 1!

The Reveal

Which one do you like better?

The first one was written by me. The second one was done by a GPT LLM based on my text, with minor tweaks from me.

Please let me know what you think.