Hello again, an update on my whereabouts, I'm still working on the IRC client, and honest to goodness, I have ZERO idea how to implement the network code, like not only do I just not know how to code networking stuff anyways, I can barely understand how to properly implement the IRC protocol!
So I did a taboo, I made GPT make a test client for me. NOW BEFORE YOU GET THE PITCHFORKS, I am NOT using that code in production. I am instead using it as essentially a study guide, I want to see how it got things to work, rip those pieces out and see how to make them SECURE, then I will use that knowledge to continue to implement the IRC client, and hopefully later on, the IRC server.
Another issue I came across was handling asynchronous code well. I don't fully understand what makes async code "safe", beyond avoiding race conditions. I'm not very good at avoiding race conditions, but if I just keep all the code separate and only allow threads to communicate through a single struct or whatever, I think I could make it safe.
Maybe. It'll take time, testing, and lots of review, but hopefully it'll come together nicely.
I still need to figure out whether or not I want to migrate the TUI stuff to a separate thread and pass on input data that way, I am just worried about the possibility of TUI errors.
I need to find a way to cut off inputs after the buffer has reached a certain length (510 bytes). I think probably using raw mode could help with that.
I bet that has some issues that I am not recognizing right now though. It'll definitely be something that I have to figure out on the TUI branch though, can't integrate it into the network branch because that would be
topic branch mixing and that's bad for good version control (and who would I be if I ignored my own contributing rules?). Oh! BTW, if you are interested in helping me with this project, feel free to add a PR
here!
That's pretty much all from me today, so I'll be signing off
- Nadelio