ReadLine.Reboot vs. ReadLine vs. Latency’s ReadLine

📆

👤

Since we have released ReadLine.Reboot over a week ago, we have run a complete comparison between the original ReadLine made by tonerdo, the “enhanced” version of ReadLine made by Latency, and our reboot of the project, ReadLine.Reboot.

Let’s start by comparing the existing implementation of the features that are common to the three versions.

Implemented Features

We have placed the feature comparison table to the main page of our rebooted version of ReadLine. We’ll explain these implementations in detail.

Correctly Implemented

The features that are correctly implemented in all the three versions of ReadLine are:

This is astonishingly less, as we have a truckload of features either partially implemented by either the original ReadLine or Latency’s “enhanced” version, or malfunctioning in one of the ReadLine spinoffs, which we’ll explain in the next section below.

Malfunctioning Features in Latency’s ReadLine

Such features that go to the latter case are listed below:

Explanation

The last two keys will cause output corruption and the cursor to advance wrongly in Latency’s ReadLine, causing you to no longer know what you’re typing to the input. This is especially when it comes to shell-based applications, like Kernel Simulator which has several shells each doing their own job, like FTPShell, ZipShell, and so on.

The remaining keys are buggy in the same ReadLine, because they cause the cursor to move left, even if the line is at the starting position, which will eventually cause a crash if you pressed the same keys too much.

Investigation

Our examination showed that all the keys that are using Backspace() and MoveCursorLeft() are suffering from a bug where the function didn’t check the cursor to see if it’s at the beginning of the line. The Backspace() and the MoveCursorLeft() routine implementations have the int count as an argument to erase more than one character or move left more than once in one call. This is to make tab completion faster that Latency seemed to blindly merge to the fork without checking the functions extensively to see if they do what they’re supposed to do, but we, at the very least, thank the person that did it, cobbr, for their efforts, despite poor testing.

Partially Implemented

There are several key shortcuts that are partially implemented in ReadLine versions:

Word cutting

Word cutting/killing feature, CTRL + W, is partially implemented in both the original version of ReadLine and Latency’s ReadLine, because it doesn’t behave like Bash; it only wipes the characters until there is a space, which you’ll have to remove manually as it doesn’t wipe them automatically, which makes the feature rather cumbersome to use, especially when you’re in a rush.

On the other hand, this same feature works exactly like Bash on our ReadLine.Reboot. It detects whitespaces and wipes them out before wiping the entire word.

Send EOF

CTRL + J is used in Bash to accept the current line. In the original ReadLine and Latency’s ReadLine, they only append the new line character to the current line in Windows. It works as it’s supposed to in Linux.

However, in our rebooted version, we have fixed this so that it can behave like Enter on all platforms.

Down Arrow

This key is used to go to the next history entry to recall the commands that were called after the previous command. In the original ReadLine and the Latency version, when you press the down arrow key on the last history entry, it just clears the line.

On the other hand, in ReadLine.Reboot, pressing it will go to the current line with all the contents written prior to going to history.

TAB Character Insertion

Note: This applies to disabled autocompletion.

When you insert the TAB character in the original ReadLine and Latency’s ReadLine, it inserts actual tab character. However, doing so will result in the cursor being offset by the number of spaces the Tab character creates, depending on the position of the cursor.

In ReadLine.Reboot, the Tabs are treated as separate spaces, but we’ll eventually work on it as time permits.

New features as of ReadLine.Reboot 3.0.1

These features are not implemented in both tonerdo’s ReadLine and Latency’s ReadLine. We have made these keyboard shortcuts below:

You can look up their meanings on our home page.

NuGet Packaging

We’ll explain to you the state of packaging for NuGet for the three libraries, including ReadLine.Reboot. This section will describe about packaging state and packaging source.

The Original ReadLine

The original version of ReadLine can be freely obtained from NuGet.org, which makes it easier to use in your projects. The package is small and weighs only ~11 KB. However, it has no description and no icon.

Latency’s ReadLine

Although the description is added to the package, the package is still small, but slightly larger than the original one. The only gripe is that Latency hosted the .nupkg in the repository, making it a bit cumbersome to reference to in your project.

That means that you have to make a separate folder for your NuGet packages and add that to the NuGet sources in Visual Studio. This will render your project uncompilable unless you manually perform this step.

It also targets the EOL frameworks explicitly.

ReadLine.Reboot

This reboot is hosted on NuGet.org, and has a description and an icon. If you go to the NuGet gallery, you’ll observe that the contents of README.md is right in front of you.

The size is slightly larger.

Conclusion

We have concluded from the following analysis of the three libraries that the original version of ReadLine is working alright with minor hiccups, and that our reboot is using it as a base to improve the codebase and make it more resilient to edge cases.

Latency’s ReadLine is, however, buggy and unstable, due to the fact that you can’t even do basic functions reliably without having to restart your appliction everytime because of constant crashes caused by a shoddy implementation of the Backspace() function, which is very essential for any input program. Latency’s ReadLine is, as a result, the worst fork of ReadLine, both in implementation and in execution.

If you want full ReadLine experience, we recommend referencing ReadLine.Reboot in your project. We’re always working on improving it. You can demonstrate it using either the demo program that comes shipped with it, or build a bleeding-edge version of Kernel Simulator 0.0.22.0, which hopefully will come in the next five calendar days.

Enjoy!


Discover more from Aptivi

Subscribe to get the latest posts sent to your email.

Thoughts?

Responses

  1. […] did it fail? We stated in our announcement and the follow up post for ReadLine.Reboot that Latency’s ReadLine is not a good fork for various reasons, such as a […]

    Like

  2. TermRead released! – Aptivi Avatar

    […] ReadLine.Reboot was released around June 2022 as a project to catch up where the original lead developer of the original ReadLine library for .NET, Toni Solarin-Sodara, after several forks. These, however, have failed to finish the project with the complete implementation, such as in the case of Latency’s fork, which attempted – and failed – to maintain the project by making it an unimaginable mess that we’ve documented every single failure here and the comparison article. […]

    Like

Subscribe to our newsletter?

Subscribe today to get new articles instantly delivered to you!

Not now

Design a site like this with WordPress.com
Get started