Another hiatus has begun. I have had enough for now. Fuck QT and C++. Actually, you know what? It’s not even the fault of C++. It’s the fucking community. Pedagogically retarded community. So I will now focus mainly on actually learning fortress mode in “Dwarf Fortress” and maybe doing homework when I have the time and don’t feel like dealing with DF’s bullshit.
found moved to another Qt tutorial in the quest for a better tutor because Bucky is fucking useless at actually explaining properly. Well, the guy I am currently watching, VoidRealms, is not exactly better, but there are no more videos on thenewboston, anyway, so what does it matter?
Well, actually, it does matter, because someone said the bastard apparently has a memory leak in one of the programs he made in a video: In fact, I know it does, because I saw the memory go up by half-a-megabyte every time I opened a new dialog. This video contains a memory leak. Viewer discretion is advised.
Seriously, you fucking idiot: if you have a memory leak in your program, why the fuck would you use that program as an example for teaching purposes without actually pointing out that there is a memory leak about? This is not proper pedagogics or pedagogy or whatever the fuck you want to call it. Give me a break! *sigh*
Well, since the previous entry I wrote was about my trying Qt and being slightly discontent with it, I decided “well, fuck it. It’s not like I can’t give it a try.” I already have the thing installed, and I’ve tried making a little program already by following thenewboston’s second video in his short-ass tutorial series. Unfortunately, it didn’t go well, and I will document every step of the journey in this entry. All times follow the 24-hour system and use the timezone GMT +1.
Well, I can’t say I’m fucking surprised. I just tried to compile a program and it doesn’t work. Not that it’s surprising; I mean, for fuck’s sake, nothing can be easy, can it? It’s not like it was shown in thenewboston’s video that you could just install the library and the IDE and begin writing code immediately without setting anything else up, is it? Yes! Quite the fucking opposite, that’s exactly what is required! Why, where did I get the idea that I could just begin coding my test program without having issues just like the ones I was having with Visual Studio back in the day? Pfft! Such fucking gullibility!
What? What is that supposed to mean? “When executing step “Make””? Fuck off with that shit! Now, I actually did try to select a compiler, because I know that, after searching the Internet for solutions to this fucktarded problem, a compiler actually has to be selected in order for the fucking thing to work, apparently. But let’s take a look at the “Issues” tab, which is not very fucking visible, might I add:
I don’t think you understand the fucking gravity of the situation here, Qt. You see, I installed this fucking IDE with everything that was recommended, as far as I can recall. Never was it mentioned that I had to actually set the fucking compiler manually just to get the fucking program to compile properly in order that I simply be able to test a tiny widget, which is supposed to give me a good feeling about future projects compiling just fine! But no! Let’s just not fucking compile and rather complain about the situation! Fuck if I know how to set a fucking compiler! There are like fifty quattuorquinquagintillion executables in the MinGW folder! Take a look at this shit! Fucking look at it! LOOK AT IT!
Did you really think I was going to know what the fuck to do? I mean, fucking hell! What the hell do any of these executables do? I was going to say “what the fuck do half of these even do”, but then I remembered I don’t know what even just one of them does!
cpp.exe? What, is that how you… What? Why is it cpp.exe?
Why is there a c++.exe? I thought that wasn’t good filename etiquette?
cc.exe? Wow, calm your originality!
Why is it called g++? Because g is a letter which is known to be related to c? The guys back in the Roman days decided to make a letter similar to c because it was sometimes voiced during pronunciation, such as when the older Latin “Caius” became “Gaius”. Oddly, the abbreviation of “Gaius” was still “C.” because it used to be spelled with a “C” even though it was voiced. Wow, we’re getting historical! Let’s move away from this before I probably get even more historical and linguistic facts wrong.
I guess I’ll just lurk about the Internet until I find a solution to this horseshit.
Well, I found the solution myself just a minute afterwards. The problem was… I don’t even fucking know. Look, you can select your “kits” by the “Run” button in the lower left corner of the IDE. Apparently, I had the wrong kit selected. That, or it hadn’t set a kit before I changed it from 5.5 or whatever the fuck it was to a slightly older one. I don’t know what the hell happened, but the program runs now. Somehow.
Ah yes. I see what’s going on. I had the 64-bit kit selected. For some idiotic reason, that made me unable to compile the fucking thing. Way to go. Not that it’s an issue seeing how I have been dealing with 32-bit programs all the time, but that’s just annoying. So, it only took me but half-an-hour to figure it out, the majority of which was spent typing the first part of this entry. Good job, me. Let’s waste more time, shall we? Hey, that rhymed! Except it didn’t really because it’s out of rhythm. Nevermind.
Can we just stop with the 32-bit bullshit and move on to 64-bit full-time? That’d be great, because then we wouldn’t have to waste time on stupid cockshit like this. Thanks in advance, informational technology nerds and otherwise technically inclined turds unwilling to change your ways.
Fuck you. What the hell do you mean my findcrap.ui doesn’t exist? I have done everything identically to thenewboston’s videos on making the word searching program, and now you’re telling me the interface file, which exists, doesn’t exist? Get the fuck out of here with that fucking bullshit!
Guess what? The file is there, and it’s even being fucking included! Fucking blind cunt! What’s the point in having a fucking class system if it doesn’t fucking work? God damn fucking trashy garbage programming language! Yeah, that was a pleonasm. Fuck off!
I just forgot I forgot… omg… I just remembered I forgot to categorize and tag the last entry. Bullshit.
So, even though it wouldn’t compile because everything has to be a fucking cunt to work with, I decided to go along and at least try to add a text file to the… whatever the fuck it’s called. Fuck this fucking jargon. So, it goes like this:
First, I create the text file, which looks like this:
Then, I try adding it to the project or whatever like this:
Now, I select the file:
And then this happens, which thenewboston assures people is supposed to happen:
But then something which is supposedly not supposed to happen happens:
Yes. This fucking window keeps popping up after I first tell it to “Copy” on the first popup. After that, it’s supposed to allow me to copy the file to the project, but it decides to open the fucking file explorer instead for some fucking stupid and absolutely incomprehensible reason. I can’t add the file to the project because the IDE doesn’t work properly. How in the fuck am I supposed to be able to do anything when the fucking cunts at Qt are completely fucking useless and are unable to create even a basic popup system which works properly. This is a fucking disgrace! What fucking retard decided this would be a good idea? I haven’t touched any options in the slightest aside from testing the dark skin. Wow, you got that right, didn’t you, you fucking mongoloid people at Qt?
You know, there is a sense of not wanting to continue after such travesty. If I can’t even add a fucking file to my project without the fucktards at Qt confusing the file explorer with some other window that’s supposed to pop up, then I suppose there is no fucking helping it. So far, I have been tolerant of the fucking mess thrown in my face what with all the fucking includes and new notation I’m not used to, such as the arrow operator and actually somehow inadvertently working with pointers even though I don’t fucking get pointers. I understand what they do, but what the fuck is the… point?
NEVERMIND. I FIGURED IT OUT. Apparently, I was supposed to add the file to the folder in which the project files are supposed to be stored. Well, okay. It would have been nice if you would have fucking TOLD ME WHAT THE PROBLEM WAS. Seriously, there are three fucking folders and another one containing the fucking folders themselves. Could you not have given me a message instead of just opening the fucking file explorer over and over and over and over and over and over and over and over and over and over and over and over and over and over again? I thought you guys were developing a C++ library the use of which empowers users with the ability to create programs with graphical user interfaces, yet you fully fail to create a functional error message when it actually would have been nice to have one. Fucking amazing, you people.
The user interface is still refusing to be recognized. What the fuck? I’m getting sick of this already.
Yeah, I don’t understand what the fucking problem is. I have everything set up right, I’m certain, but my findcrap.ui file can’t be found for some idiotic inexplicable reason. I don’t know what the fuck you’re babbling about, compiler, but the file is definitely there. Maybe if you weren’t such a fucking blind cunt you’d be able to see that it is indeed there. Absolutely incredible.
I give up. There is no reason in continuing this futile and pointless journey which shouldn’t have been this fucking idiotically convoluted to begin with. I keep reading about makefiles or whatever the fuck they’re talking about, but I just don’t give a fuck. Fuck this fucking program and fuck Qt for making it the shitpile it is.
This is why I hate the console: ─────────────────────────────↴
Okay, in case it isn’t blatantly obvious, I really hate working with pseudo-UIs in the console, because it’s necessary to resize everything in order to get the spacing right so that it doesn’t look like a fucking mess.
You can say what you want; I’m not changing my mind. Really, the only way I was able to get this tiny fucking menu to work was by resizing the strings and let that get the spacing right instead of manually inserting spaces by using conditional statements and ridiculous workarounds.
It’s at times like these I wish I had access to some sort of library with user interface support which would allow me to focus on the code itself and consequently not have to worry about spraining my fucking anal walls in frustration as I attempt somehow to cobble together a functional table which would give the user a nice, ordered view over everything. Fuck! I can’t even English anymoar!
Contrary to what it might seem, I have looked up libraries with user interface support. I have mainly been taking a look at Qt, which, for some absolutely fucking retarded reason, is supposed to be pronounced like “cute” and not like “cue tea”, and I can’t say I am particularly fond of it, mainly because of the fact that it’s too shady for me. That’s “too shady for me” as in “too business-oriented for me”. Because of this, I have yet to be interested… What?
I don’t even know what I’m saying anymore. Of course I’m interested in a UI-capable library, but there don’t seem to be any worth the trouble at this stage.
Besides What the fuck would I make, anyway? You know what? It doesn’t seem like I know what I’m talking about at the fuck all, because I just ranted about not being able to focus on the logic aspect of my programs due to shitty table configurability in the console but two paragraphs ago!
I did manage to make the table at long last, but it took the resizing of the fucking strings like I said. It’s fucking ridiculous.
It’s done. I have implemented support for parentheses, including nested ones. Here’s a screenshot of some test strings:
Now that it apparently works, I’m going to stop there for a while before I maybe implement support for other stuff like exponents, including square roots, or any roots, for that matter, which really are just the same as x^(e/p), where x is the expression under the root, e is the power of the expression and p is the root. Now, I still don’t even know if the thing works with decimals, because one of the functions I use to convert the input, a string value, to actual numbers for the arithmetic function to work with only returns integer values. I’ll have to change that. In fact, I’ll try without changing that first:
Yup. Doesn’t work. You know, if it turns out I have to rework the whole fucking arithmetic function just to account for a few fucking decimal points, I’m going to be very fucking angry, indeed. That would be the ultimate slap to the face for being so fucking retarded as to not include that in the first place. Why I didn’t anyway is beyond me. I should have just made the fucking thing a fucking string-to-double instead of a fucking string-to-integer. Here I am sitting and developing a fucking calculator without the fucking foresight to include decimal support. Good fucking job, asshole.
Anyway, I’ll try doing that now. By that, I mean making the string-to-integer function return a fucking double value instead. I really
couldn’t can’t imagine why it should even matter, because the arithmetic function only cares about operators… unless I programmed it to only register numbers and operators and discard everything else. If so, why didn’t I just program in an if statement checking whether or not it’s an operator that’s being tested at the moment instead of causing myself massive asspain by differentiating between every fucking character in ASCII? Whatever. It’s not like I know this yet. Hopefully, it should be enough to return a double value.
[FIVE MINUTES LATER]
Well, I’ll be fucking damned. It actually wasn’t a pain in the ass for once. A few variable changes later, including adding the dot to the list of acceptable characters in the newly
changed upgraded string-to-double function, it seems everything works as it should, this time with double support! Ha! It’s a pun, because it supports both values 10^x and 10^-x this time around.
Well, for simpler expressions it works, at least. Perhaps I should try some more complicated expressions? And why do I keep insisting on writing “equations”? These are not equations!
[TWO-ISH MINUTES LATER]
Doesn’t work. Programming is fucking shit and I’m fucking sick of it. Fuck this fucking shi-
God dammit. More debugging… Why does everything I make break? Now I gotta go fix this broken piece of shit yet again!
… Unless the calculator is broken. You see, I have been matching my results with the built-in Windows 7 calculator (calc.exe), and it gave this result for the expression from which I got -2.9 as an answer:
Notice something odd? Well, I didn’t really pay attention as I was testing a few minutes ago until I plopped this very expression into semper-fidelis Symbolab. Well, actually, Symbolab also got it wrong, because this is the correct input. Unless I pasted the wrong one in. Regardless, I found the problem: calc.exe doesn’t like me pasting in expressions having decimal points in the form of periods as opposed to the actual commas I am supposed to use because my operating system is Norwegian, unless that’s just inherently a feature to calc.exe. Whatever the reason, notice that the number which should be 4.5 is actually 45 in the input as shown in the leftmost image above. Well, of course it’s going to be wrong if the fucking program won’t accept the input properly!
I am just going to assume the piece of shit works. I have had enough of debugging for one day. Thank fucking shit for the debugging feature of Code::Blocks where I can keep track of the variables, especially strings. Now, it’d be nice if the fuckers developing Code::Blocks would somehow make tracking vector values possible, but I don’t know how that works and who is responsible for this not being possible, so I’ll cut them some slack. Well, I would if their program wasn’t fucking dogshit as far as that one incident where I lost the functionality of my project goes.
Well, I have begun going back to work on the arithmetic solver calculator thingamabob I was ranting about last time. So far, I have not really had any problems getting it to solve parentheses nested within one another. I am using a recursive call to the function to get it to simplify the parentheses. It works something like this:
- Take an input. For example, 3*(4*2-4-(33/11)-5) is a viable input.
- The function checks for parentheses. In this case, there are parentheses involved. The way this works is that all other terms within parentheses inside the parentheses currently selected are being passed on as arguments for the recursive call to the function. I’m not really feeling verbose at the moment, so I’ll explain using the preformatted thing I did last post:
Take input and search for first parenthesis nest should there be are any. Found nest: (4*2-4-(33/11)-5) Call the function recursively and pass this in as an argument to simplify. Found nest: (33/11) No other nests found in third call to function. Begin solving nests: (33/11) = 3 The function who called the function will get 3 returned. That function will then solve its nest: (4*2-4-3-5) = -4 Return -4 to base function and solve: 3*-4 = -4 ... ... Wait, what?
You see, the way that I originally set up the function means it can’t really cope with negative factors very well. This means that it reads 3*-4 as “three times… what the fuck? Okay, skip that. Negative four. I’ll return negative four.” Because of this, I’ll have to work around this by restructuring the expression as -3*4, which would yield the same result. I actually should, and would, really, go back to the function and clean it up for the sake of making it a bit more efficient and easier to work with. However, considering the massive amount of asspain that was rendered upon me during the ten-fucking-hours-or-so I spent cobbling this fuckfest of a function together, I really just don’t want to go through any more clusterfucks of vectors and booleans and strings and complicated function calls using the difference between vector values as inputs, as well as converting strings to numerical values. It was a fucking nightmare. And, to top it all off, I looked up calculators on some website (maybe cplusplus.com) where everybody had these ultra-clean-looking calculator while I’m sitting here with my behemoth of vectors and all that shit!
Anyway, I gotta get back to working on fixing the problem with the negative factors and polishing it so that it actually works with more than just one nest of parentheses.