Skip to content

Instantly share code, notes, and snippets.

Last active October 19, 2018 03:38
Show Gist options
  • Save cyanpencil/27db326bf6f9d2747297fa9b943eb65b to your computer and use it in GitHub Desktop.
Save cyanpencil/27db326bf6f9d2747297fa9b943eb65b to your computer and use it in GitHub Desktop.
Cyanpencil's GSOC 2018 Summary: Console Interface Improvements

Cyanpencil's GSOC 2018 Summary: Console Interface Improvements

Graph view of a switch statement


I had a lot of fun spending this summer coding for radare. I learned so many things, and had an amazing experience overall. I am very grateful to my mentors, Xvilka, Pancake and Maijin, they were always present and closely followed me during the entire summer.

My task was to improve some aspects of the terminal interface of radare2. Here you can find a more detailed description of the GSoC task. Unfortunately I didn't manage to complete all the subtasks listed in the project idea; However, I also took care of many things that were not included in the original task. There is still a huge amount of work to do: radare2 is still not very much user friendly, but it's definitely getting better with time.

Here's a list of my contributions to the project. All the pull requests mentioned below are already merged into the master branch.

Improvements of the graph drawing commands (ag*)

The commands for drawing graphs in radare2 (all those starting with ag) had a bit confusing syntax. Even when consulting the help (ag?), it was not exactly clear what graph a certain command would draw and how. I implemented a new syntax for those commands (ag<graph type><output format>) and made sure to support every type / format combination. Here's a list of the relevant pull requests:

UTF-8 support in canvas

RConsCanvas, radare2's own way of drawing complex interfaces in the terminal, had some glitches with UTF-8 characters because it didn't take into account the different byte-length of those special characters. Implementing the support for UTF-8 took quite a lot of time because it meant rewriting many things from scratch and because I had to keep intact the support for ANSI escape codes. But I'm pretty happy with the result, as now with UTF-8 we can create even more beautiful interfaces:

Here's a screen of the "panels" view with some comments in arabic and braille

List of relevant pull requests:

Autocompletion widget in visual offset prompt

Radare2 already had autocompletion in the visual offset prompt, which worked similarly to bash's autocompletion. My job was to make it more visually appealing by implementing something similar to the autocompletion inside (terminal) vim, where an interactive widget appears under the cursor. Here's the result:

A gif demonstrating the scrolling of the autocompletion widget while in visual offset prompt

List of relevant pull requests:

Other fixes / features

Here's a list of pull requests that are not related to the previous major features but were made to address issues that were urgent at that time:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment