Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "compiling wtf"
-
At an interview, the first round was an online coding round. Two questions, one easy one hard, 90 minutes, easy peasy.
I solved the hard one first.
A bit of good logic, followed MVC pattern, all done. Worked flawlessly.
Submitted code. Online compiler threw up an internal error citing java is an invalid command(jdk not found).
Called the invigilators. What I heard next, I couldn't believe this shit.
"We're not responsible for any errors you may be having. Figure it out yourself"
I was like WTF dude. This is not even a compilation or runtime error!
After a heated discussion, I made him look at the code.
Him - what is all this classes and all? Why haven't you written everything inside the main function?
Me - those are model classes. Those are different helper functions. That is a recursive function to avoid 5 for loops and use divide and conquer. Ever heard of OOP? what kind of person writes a 300 line program inside one function?
Him - no no we write it like that only. Correct this.
Me - I fit everything inside the main function. Still the same error, java not installed. Called the idiot to have a look at it.
Him - yeah your code is wrong.
Me - may I know what's wrong with it? Can you fix it please?
Him - no no we aren't allowed to see the code (he had already read it twice. It was compiling and running perfectly, locally) .
Yeah you solved only 1 problem, you were supposed to solve 2.
Me - yes because the rest of the time I had the pleasure of your company. (It isn't everyday that I see talking buffoons.)11 -
WTF MICROSOFT.
I was Compiling app on windows 10, just gone for few mins to grab a coffee and then i saw blue screen with
Updating Windows.
Nobody ask you to do it. You piece of shit.
And that's not all, it even restarted without my permission.
Seriously Fuck you Microsoft7 -
Why is java called java?
Because by the end of the day you'll need a strong cup of coffee to retain your will to live.1 -
>compiling a toolchain for my phone
>compiling gcc
>segfault
wtf, i have like 8GB RAM and 32GB Swap on an SSD
>rerun make w/o clean
>continues, no segfault
ok?
>segfault a few minutes later
FUCK
rinse and repeat like 30 times
why10 -
I was finishing compiling the linux kernel in tty mode for a school project in the subway cuz the class was over and it was not finished. A guy came to me and said : I used to do that, but on a Mac. Then he left. I was like : wtf do you think I'm doing? You don't compile the linux kernel on a fucking Mac. And why would you mention it was a Mac anyway?I guess he just did ls -al on his Mac in tty.6
-
Avoid ACPICA if at all possible. It's one garbage tier cluster fuck of bad design, horrible documentation and downright misleading and wrong code
It's meant to consist of an ASL compiler, disassembler, debugger, dumper, various user space utitilies and a kernel resident OSPM implementation *if* you can figure out what belongs to what. Even just compiling this pile of trash is a mystery in itself. Think you need the source files in source/common? EEEEH, wrong. Well, at least partially since most of them seem to be for the user space stuff..? Other ones *are* needed on the other hand. At least the disassembler and/or debugger and/or dumper components seem to reference them. Not that I could figure out how to compile those anyways. The real path to your goal seems to be to ignore a seemingly arbitrary subset of source and header files until your linker stops complaining
There's also a bunch of configuration defines, some of which *you* define, some defined *for* you, based on again others. Of course most of them do stupid shit. Enabling the debugger automatically enables debug logging. Enabling the disassembler force enables debug allocation tracking... What?
The code itself isn't of much help either. Looking in "os_specific/service_layers" you find what looks to be reference implementations of acpica functions in certain os' like windows and unix. Of course I had a look because AcpiOsReadMemory is supposed to read physical memory and I don't know how I would even implement that. But hey, osunixxf.c (xf for interface... of course) should tell me. I'll let you see for yourself in the attached image. Apparently it does fuck all and just returns AE_OK. No error, no logging, no nothing. Just ok. As you can imagine, AcpiOsWriteMemory doesn't do much more either.
...okay so maybe physical memory accesses aren't actually used and these functions are some sort of relic from past times? Nope! They are absolutely necessary for doing low level device interaction. WTF. So finally I went to the linux source and checked how *they* implemented them, and just as I thought, these functions are anything but no-ops...
...So for what fucking reason do these stupid interface implementations even exist but to purposefully mislead you?? They aren't used for fucking anything! As far as I know Windows doesn't even *use* ACPICA and Linux have their own fork with working implementations... They just sit there, just to tell you how to NOT do it
So that's some of my thoughts about ACPICA. Note that I haven't even used it as a library yet, I just got it to compile and link and it already fucked with me this much.
There's also so much more I didn't mention like that you *have* to modify the acpica source in order to get your own platform header working (else #error) eventhough the docs explicitely instruct you not too but you get the point
Don't use ACPICA if you don't have to. Save your sanity for something that's worth it -
What the fuck is this piece of shit called Ubuntu? I was writing an automation tool on my local PC (ArchLinux) in c++ 17 (c++1z or whatever). Finished it today. Working and compiling so everything is fine. Went to my server, git clone, make.
Okay some errors because I havent installed my networking libs yet. So I installed them.
Make.
Error because I was using a c++ feature only available in c++ 17. But wtf. I told g++ I wanted to compile with c++ 17 support. I mean... On arch it compiled fine. On centOS it at least told me that it doesn't know c++1z (it was some really old centOS). BUT JUST TELLING ME ITS BECAUSE I SUCK AT PROGRAMMING?? THAT IS SO NOT OKAY. MY CODE IS LEGIT ISO C++ 17. FUCK UBUNTU. Installing Arch on my server now because I can't handle this shit anymore...16 -
So, yesterday I finally understood the "it's compiling madness"...
I'm working as a web developer and I needed some c executable to run from the back end to convert files.
Unfortunately, you have to compile this library on your own, there's no way to just download the executable...
It took 45 minutes, and that's without counting the download of visual Studio, cloning multiple gits etc...
I'm so happy to just be able to press F5, sometime not even that is necessary....
So yeah, I guess I'll just watch another episode of hell's kitchen every time I need to compile this piece of crap....1