satyrn

joined 7 months ago
[–] satyrn@lemmy.world 6 points 7 months ago* (last edited 7 months ago)

The binary editing is there in case a file of yours gets corrupted or if you just want to see the insides of a given file in a human readable way. I used to use windows and one of the things that got me into programming was the realization that all files were simply data on the inside, something I explored using windows notepad. As for gedit, I was previously using leafpad and so the binary editing is meant to be a step up from leafpad's inability to show data, not gedit's capable escape sequence system.

[–] satyrn@lemmy.world 6 points 7 months ago

Primarily, I wanted to make a simple notepad editor, not a hex editor. Binary editing is a feature, but not the main purpose. Many other text editors use escape characters to mimic the way that hex editors edit text, and while this is a very rational solution, I wanted a simple but elegant solution that would allow full control while not adding in a lot of overhead, and I came up with this one. Every character is still distinguishable for the most part, but the main purpose was always to display it as legible text rather than hexadecimal.

[–] satyrn@lemmy.world 9 points 7 months ago

This was mainly because I don't know C++ but I do know C.

Outside of that, I generally sway more towards gtk apps then qt apps and I use Budgie, so it fits in with my desktop better. Gtk also seems to be more widely used than Qt on linux. And Qt seems to delegate more of its functionality to standalone libraries, which means more dependency tracking which I am very opposed to, whereas Gtk packages one library that encompasses most of the libraries functionality (although I don't know enough about qt to be sure if this is the case).

[–] satyrn@lemmy.world 14 points 7 months ago* (last edited 7 months ago) (1 children)

The main thing is that gtk3 is a little more stable and available for now. Gtk deprecates tons of functions seemingly at random, and I don't want to have to constantly re-code my project as they deprecate things. As for availability, Gtk3 is shipped everywhere as 3.24 rather than different distros having different versions, gtksourceview4 is shipped on older distributions then gtksourceview5 (meaning more compatibility), and if I ever wanted to port to other operating systems Gtk4 would be much harder than 3. Finally, before the starting Janus I was under the impression that no gtk4 apps could be themed, but I have since learned that that is not the case. Knowing what I do now, once they iron out more of the kinks I will definitely port to gtk4, but first I want to make sure everything works well.

As for binary editing, I took a very different approach to other editors. Most either convert the binary data to a code page (very confusing and nearly impossible to edit) or use escape characters, which is not a bad solution by any means but looks increasingly worse with the entropy of the data. I eventually came up with this approach, which I think maintains the simplicity of a notepad editor while allowing the functionality I meant to include.

 

For the past few months I have been working on a simple windows notepad like text editor. It's nothing special, but when I first switched to linux I looked around and it took me a while to find leafpad. Unlike leafpad however, Janus uses gtk3, a much more modern toolkit then gtk2, it can display and modify binary data, and it can highlight code syntax for most popular languages. Feel free to check it out on the github.