Activity

averytoad65

We got a logo now! Whipped up this cool little network of circles, because I thought it’d fit the project really nicely. Also I fixed a bug where every RPC in the project would get called if you called a single one. i.e. if you had the RPCs “UserJoinMessage”, “UserLeaveMessage” and “UserEmojiReact” and you called the RPC for “UserJoinMessage” it would actually trigger all 3 RPCs. That is now fixed, silly me. Also I have swapped a few more debug-prints for the DebugPrintln function. Yay! Happy coding and thanks for reading!

Attachment
Attachment
0
averytoad65

RPCs work! I repeat, they fully work! I have freaking done it! I am so happy with myself for managing to fix RPCs so quickly - only took me 24 minutes, huh. I have also made some changes to some not-so-relevant parts of the source code, like replacing lots of the aforementioned statements that I wrapped in “#if DEBUG” to use my DebugPrint/DebugPrintln functions. But, back to the main course, I managed to figure out a nasty bug in parsing RPCs that would cause the network thread to hang indefinitely because of an unhandled exceptions (thanks, Rider Debugger for pointing that out to me..)
And.. yeah! I guess it’s time to clean up some code, write the demo project and maybe look into more parameters? Who knows! What I know for sure is that I’m gonna blast Good Kid music now. Cheers!

Attachment
Attachment
0
averytoad65

Another day, another… four hours of work? Damn. I didn’t even realize. Alright, well, here’s what I spent my time doing today, and what I will continue to do because I want this project to freaking work.
So! I worked on a little demo project, because I planned on shipping an initial release of UdpClub soon. But there’s a slight issue with that, the app I want to make for my demo is a basic messaging app between multiple clients, only issue is that I want to include things like a welcome message when a user joins and some other stuff where an RPC with a parameter would be lovely. Only issue is… I can’t do that. For something as simple as a welcome message I just simply want to be able to call an RPC and have it invoke everywhere. Annoyingly, I was too lazy to implement that when my mind understood the awful code I wrote! Now I have to dive back in and debug it. And that’s what I’ve been doing! Well, ok, I did also work on the basic demo project, but who cares about that. Anyhow, during these four hours of debugging my code I have noticed how incredibly fragile the system is and how badly I want to remake it to be way clearer to debug and use, so, uh… RPC rewrite today? Maybe? Who knows. Though, today I will probably only get RPCs with one parameter working and like.. replace all my manual #if DEBUG /* print */ #endif statements with an abstraction, which I called “DebugPrint”. Anyways, that’s basically all. Let’s hope that I can get this resolved ASAP when I’m home and not bothered by school, the new NullReferenceException is definitely promising… Cheers!

Attachment
0
averytoad65

Not a lot of changes for right now, but that’s mainly, because I spent my time making an EXE for SWP so the ship doesn’t get rejected again.
But, I implemented a small feature.. loopbacks! A loopback lets you specify if the RPC Package should return to the sender once the client sends it to the server, this is useful so there is less confusion about if you should run the RPC function locally as well, or if the package comes from the server-side. It also has practical usages, but I can’t think of any examples off the top of my head.
Next up is (hopefully) documentation and cleanup of the existing RPC handling code. Let’s see how that goes.
Happy coding and thank you for reading!

Attachment
0
averytoad65

… so I spent 3 hours implementing RPCs (Remote Procedure Calls), and boy oh boy… it’s a mess, like most things in this!
So, let’s dive into it, shall we?
At first I began with writing a RPC Attribute class, plain and simple, afterwards a small RPCManager to ensure that I can easily call RPCs from anywhere. Then followed a small RPC Package to make it easy for the server to communicate that the clients should execute a function, all well and good… Until it came to implementing how you’re supposed to run the function. Granted, I took the easy way out: only allow static methods. But I don’t want that to be the case forever, I want this to eventually run on object instances too, but that’s gonna take a bit for me to do. Probably past the time limit of this whole Flavortown thing, so, screw it. Anyways, so after implementing all that, I was met with an issue: RPCs weren’t registering. So, what did I mess up? Well I had the call to subscribe my RPC to the RPCManager in the RPCAttribute constructor, should work, right? Well, the developers of roslyn (the C# compiler) decided to throw me a giant “F**k you,” because the constructor for an Attribute is never called until you somehow reference the RPC via MethodInfo.GetCustomAttributes() and whatnot… suffice to say it took me a bit to figure out.
But, hey, I finally did it. Now you can register static functions are RPCs with a specific ID and you can easily call ‘em through the server, now all I have left to do is make the communication system with the RPCPacket work in a way that a client can request to execute a RPC to the server and then the server can spread that message to other clients.. and I should definitely get parameters working. But, I think first I’ll focus on cleaning up this steaming mess of redundant calls and whatnot, and heavy documentation, right now only god and I know what this code does, not very sustainable.

Anyhow, happy coding!

Attachment
1

Comments

sl4shed
sl4shed 11 days ago

seems interesting. keep up the work!

averytoad65

Shipped this project!

Hours: 2.98
Cookies: 🍪 32
Multiplier: 10.58 cookies/hr

The initial release of SWP is now live!
This release features, as the project acronym (Simple Writing Program) implies:

  • a user interface for editing text files
  • the ability to create files
  • the ability to open file(s)
  • the ability to save any file
  • keyboard shortcuts
  • a small help window stating the version and github repository of the project
  • a menu bar
averytoad65

The first release of SWP is live and you can download it now at https://github.com/averyocean65/swp/releases/tag/v1.0.0

The release features all the functionality shown off so far and then some! Since the last devlog I added line-wrapping and a save confirmation dialog that shows up when you close a tab. So happy that I can ship this project now. Happy coding!

Attachment
Attachment
Attachment
Attachment
Attachment
0
averytoad65

Changelog:

  • added keybinds for different actions (new file, opening files, saving file, closing file, cycling files)
  • added “about window”
  • added error dialog if file saving is cancelled
  • opening files now allows you to select multiple files
  • various other hotfixes
Attachment
Attachment
Attachment
0
averytoad65

Ok, so, first check-in on SWP.. I got a bit carried away and kinda implemented the whole thing in one commit… Bad idea? Yes! But, hey, here we are. Guess I’m not thinking too properly since I’m constantly anxious about my driving exam tomorrow - seriously, every time I think about it I feel my heart skip a beat and my back run cold. Anyhow, the fundementals of the editor are working, and all in a little over an hour and a half.. I’d say I’m quite impressed with myself. The code quality is certainly lacking, but that can be fixed up later on. For now, I’m going to rest before my heart actually explodes lol. Cheers!

Attachment
0
averytoad65

Another really short patchlog:

  • Moved Function classes to new package
  • Completely refactor FunctionPart system to make use of inheritance rather than one do-it-all class
  • Documented Misc class
  • Added Misc.combine(double a, double b, Operator operator)

Have a nice day and happy coding!

Attachment
Attachment
0
averytoad65

Short check-in: I added more stuff to functions and finally converted the library to use doubles in every class rather than floats. Hooray! Probably gonna ship this soon, so, hopes are up!

Attachment
Attachment
0
averytoad65

I wrote the world’s messiest codebase, but at least it compiles. Now I do have to take a break from programming because my right hand is starting to hurt from the excessive abuse of Rider shortcuts. I did a ton of stuff and honestly if you care about it, I’d just check the git commit history for today. Goodnight and thank you for reading, happy coding!

Attachment
0
averytoad65

Okay, so I made a few updates. First off, I extended the functionality of my Function class, particularly the “FunctionPart” record with the addition of “FunctionPartType,” which is an enum that determines how the x-variable is treated when sampling the value of a FunctionPart. Right now there’s a few modes for the “FunctionPartType” with more coming sometime, such as: Ln, Log, Sqrt, general root, and of course, no modifications. Along with these features I added new functions to “Misc” for taking custom roots outside of Sqrt and Cbrt, as well as a logarithm function that allows you to input a custom base. And last, but not least, I added a function to calculate the factorial value of a number, why? Just for fun! It’s nice to have these little functions sometimes, so why not add ‘em?
I also did a bit more, but I don’t really have the time to write about it all, especially because I feel like everybody is looking at my screen and I really don’t want anybody in real life to find my online username.

Anyhow! Next up I wanna refactor the entire library, because I noticed that Java seems to prefer doubles a lot more than floats. Why didn’t I use doubles from the get-go? Stubbornness, I’m used to using floats from previous projects and so I really didn’t wanna give up my old habits, but, putting float conversions everywhere is starting to get extremely annoying. So next devlog will probably be about a migration to a new system!

And that wraps it up, I think. I’m gonna go now. I hope that, whoever has read this, had a nice time seeing my progress. Have a good day and happy coding!

Attachment
Attachment
Attachment
0
averytoad65

gotta make this quick, sorry..

  • Added IPEndPoint to BasePackage
  • Added two new test packets to Test projects
  • Fucked up with the gitignore for packages and whatnot (gonna fix that immediately tmr)
  • Updated PackageHandler to include new functions for sending packets
  • update predicate for finding correct BasePackage constructor w/ correct new parameters and debugging stuff
  • more prolly

thanks for reading!

Attachment
Attachment
Attachment
1

Comments

averytoad65
averytoad65 22 days ago

ok so turns out that you can just clone the project and it will download NUnit automatically even without the packages dir, good to know! although I should probably also test this on my laptop to be 100% sure…

averytoad65

I feel like one of the best programmers of all time right now - my complex workaround for making a dynamic package library somehow worked on the first try! I managed to finally make it so you can easily initialize a UdpClientApp or UdpServerApp and send packages from it! And it just… works! As long as you make a registry for the packages which adds them to PackageHandler.Packages using PackageHandler.RegisterPacket(…) but that’s beside the point. What I mean to say is that, the fundemental principle of my application is done, a more simplistic way to send and parse data packets over a network. Can it be optimized? 100%. Will I optimize it? Perhaps, we’ll see how much time I have for that until I ship the project. For now though, I will happily enjoy this win and dance around like a silly goober to “Na Na Na (Na Na Na Na Na Na Na Na Na)” by My Chemical Romance. See ya, and thank you, you lovely individual, for reading this!

Oh, also, if you care to check out what I made and you can’t find the GitHub repo, you can find the project source code at: https://github.com/averyocean65/UdpClub/

Attachment
Attachment
0
averytoad65

Ok, I got bored of fractions and decided to start on implementing the function system. It may not be the most intuitive system, as you may see from the first screenshot, but I can tell you one thing. It freakin’ works! I am so happy to see that this system works first-try without a hitch, seriously! By the way, the third image shows the polynomial from the tests (graphed in GeoGebra). I am excited to see how I can implement this function system into some personal projects when I finish this library, speaking of which… where to next? Well, I’m honestly not sure, I thought about doing complex numbers, but I don’t know if I can faithfully implement them given that I know nothing about them except for (sqrt(-1) = i) and (i^2 = -1), oh and Euler’s expression (e^(pi*i) + 1 = 0). So that probably doesn’t suffice. I could definitely add some functions to my function class, like creating derivatives, making anti-derivatives, calculating integrals (would require anti-derivatives), finding spots where the function equals 0, limits, basically whatever algebra I was taught in my high school career. Though finding intersections for the x-axis would cause issues with trigonometric functions, hm. I guess I’ll have to figure it out later, for now, I’m celebrating because my function class works!

Attachment
Attachment
Attachment
0
averytoad65

Alright! I’ve managed to do quite a bit! First off, I started implementation of a device for the Apron runtime… the CPU! This is a core part of the project and I’m happy to be starting on it so early. Right now it doesn’t do much, though. You can dynamically allocate how many registers the CPU should have and read/write to them, but there’s still lots to be done. For example, I haven’t really started on the “execute_instruction” feature of the CPU and I’m just now realizing that I should probably make a general device class to comply with my usual OOP standards and in-case I want to add other components later on. Speaking of future-proofing, I made a integer-splitter class to make working with instructions much easier when I do get to writing the instruction-runner! Right now it can split a uint16_t and uint32_t into a collection of uint8_t variables. These are, strange as it may be, collected through the parameters rather than the return value, this is just so I can avoid working with arrays, because those have been a bit of a pain in previous attempts at this kind of project. Anyhow, speaking of instructions… I did a slight bit of documentation on how instructions should be parsed, just so I don’t create inconsistencies later on in the project lifespan. I suppose that is all for now, I got an English exam to severely panic over. See you later and thank you for reading!

Attachment
Attachment
Attachment
0
averytoad65

Got the basic instruction class working with a few sample instructions shown in the runtime main file. This is probably going to be one of the last devlogs I post today, since I wanna write some music before I go to bed. Thank you to whoever reads this, you’re awesome!

Attachment
Attachment
0
averytoad65

I got the basics of DLL communication working for my third project: “Apron.” Now I can begin working on the basics of the runtime, which reads machine code and executes functions based on it. Then I can write the assembly compiler and hopefully ship this project. Should be a fun project!

Attachment
Attachment
0
averytoad65

… so turns out the fix for the communication issue between the Client and Server was simply because the client was using the IP EndPoint used in “UdpClient.Receive(…)” to communicate messages, which apparently doesn’t work for sending stuff to the server - the more you know! Thanks C#.

Anyhow, the issue is fixed now using a simple if-else statement lol. Took me about 3 minutes to figure out.

I also worked on a package class as well as a PackageMap, I also took baby steps in creating the PackageHandler. Now, unfortunately, I am not sure how to build a modular system for building and identifying packets, so I’ll have to get back to my mental drawing board until something comes to mind.

Attachment
0
averytoad65

I added the equality function to my fraction class! Right now it throws an IllegalArgumentException when you don’t give it a fraction, but I hope to expand it to accept numerical inputs too, which will make the code in my fraction test class look just a bit nicer. Alongside this I also added my own float equality function, since I couldn’t find anything outside of the “==” operator, which I have been told is unreliable. Maybe I’m wrong though, who knows! I’ll definitely test using the regular operator soon.

Attachment
Attachment
0
averytoad65

I got all the basic arithmetic operations (addition, subtraction, multiplication and division) up and running alongside their respective unit tests and some extra functions like inversing a fraction, which actually came in really useful when doing division. I guess this goes to show how little I remember about fractions from school, since I had to look most of this stuff up lol. Guess that’s what I get for staying loyal to decimal numbers. Thanks for reading!

Attachment
0
averytoad65

Just in time! Managed to implement fraction simplification, which was actually quite a fun challenge. I managed to find an implementation of the GCD/HCF and LCM in my files from a previous project from computer science class, which actually gave me the inspiration to make this. I know this progress is quite insignificant and not worthy of a devlog, but screw it. See y’all later and thank you for reading!

Attachment
0
averytoad65

Okay, quick check-in that I’m typing in the midst of AP English. I wrote an extremely basic fraction class! It’s, as stated earlier, not complete at all since it doesn’t feature basic arithmetic operations yet as well as having no special features such as minimizing the fraction.
Hopefully I can get some of those basic functions up and unit tested within the hour. Guess we’ll see what the next 20 minutes bear.
Thank you for reading!

Attachment
0
averytoad65

Making a library with Maven was jarring to say the least. I had difficulty figuring out how to have my IntelliJ project compile into a Java library file. Luckily after some research and with help from the lovely JetBrains docs (https://docs.gradle.org/current/samples/sample_building_java_libraries.html) I was able to figure it all out.
Excuse me if this devlog is poorly written, I am tired and just want to go to bed so I cba to write something cohesive.

Goals for tomorrow: outside of working on my other project (UdpClub), I want to use the little free time I have at school to work on some fundamental classes for this project, such as a fraction class and maybe even the first steps of making a function framework to build and chart out things like polynomials.

Good night, everybody and happy coding!

Attachment
0
averytoad65

I finally got a basic framework running to send data between a server and client via the UDP protocol. I am extremely happy to see that I got it up and running from only an hour of work. Unfortunately there is a bug in the package handling, as the server and client should constantly send packages to each other, so I have to do some debugging to see what’s going wrong. Very strong start though! Hope I can get the Package and Package Manager classes implemented tomorrow if I manage to iron this bug out.

Attachment
0