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 - "heap"
-
assignment: use winAPI to create a "virus" that put itself in autorun and does nothing.
me, a curious student: does the assignment and adds a heap corruption code just as a joke.
after sending the assignment to the teacher I realized that I have sent the real virus.
result: teacher comes next lesson without a computer and stares at me silently and viciously.
we'll see what happens next
any idea on what's going on in his head?28 -
The time my Java EE technology stack disappointed me most was when I noticed some embarrassing OutOfMemoryError in the log of a server which was already in production. When I analyzed the garbage collector logs I got really scared seeing the heap usage was constantly increasing. After some days of debugging I discovered that the terrible memory leak was caused by a bug inside one of the Java EE core libraries (Jersey Client), while parsing a stupid XML response. The library was shipped with the application server, so it couldn't be replaced (unless installing a different server). I rewrote my code using the Restlet Client API and the memory leak disapperead. What a terrible week!2
-
Someone on a C++ learning and help discord wanted to know why the following was causing issues.
char * get_some_data() {
char buffer[1000];
init_buffer(&buffer[0]);
return &buffer[0];
}
I told them they were returning a pointer to a stack allocated memory region. They were confused, didn't know what I was talking about.
I pointed them to two pretty decently written and succinct articles, the first about stack vs. heap, and the second describing the theory of ownership and lifetimes. I instructed to give them a read, and to try to understand them as best as possible, and to ping me with any questions. Then I promised to explain their exact issue.
Silence for maybe five minutes. They disregard the articles, post other code saying "maybe it's because of this...". I quickly pointed them back at their original code (the above) and said this is 100% an issue you're facing. "Have you read the articles?"
"Nope" they said, "I just skimmed through them, can you tell me what's wrong with my code?"
Someone else chimed in and said "you need to just use malloc()." In a C++ room, no less.
I said "@OtherGuy please don't blindly instruct people to allocate memory on the heap if they do not understand what the heap is. They need to understand the concepts and the problems before learning how C++ approaches the solution."
I was quickly PM'd by one of the server's mods and told that I was being unhelpful and that I needed to reconsider my tone.
Fuck this industry. I'm getting so sick of it.26 -
Overheard guy on the bus: "...but I don't understand where variables go in memory."
It took 100% of my will power to not pop over the seat like some muppet to sing song about stacks and heaps.6 -
Trash, trash, trash.
Who the fuck writes this shit?
Who the fuck lets these trash should-be-junior devs roll their own crypto? and then approves it?
The garbage heap of a feature (signing for all apis) doesn't follow Ruby standards, doesn't follow codebase conventions, has `// this is bridge` style comments (and no documentation), and it requires consumer devs to do unnecessary work to integrate it, and on top of all this: it leaks end-user data. on all apis. in plaintext.
Fucking hell.8 -
that's quite accurate :) ofc there are exceptions (looking at you two naughty bois, metaspace and off-heap allocations!), but it's true for the most of it :)5
-
Another fucking twat asking for a responsive html email when they are targeting outlook. IT USES THAT HEAP IF SHIT WORD AS A RENDERING ENGINE WHAT THE FUCK AM I SUPPOSED TO DO WITH THAT! It's bad enough having to code them up using fucking tables and spacer gifs. Why do IT people stick religiously to Microsoft heap of shit applications... Oh I know it's because they are so fucking shit that it needs a full time twat just to get them through the fucking day. Fuck Microsoft. I guess you can sense I'm having a bad day, especially when my broadband decides to pack in, on and off all fucking day and the support twat puts me on hold then fucks off. FML14
-
Wooh! I implemented a heap.... that only took... 5 hours...
I am so screwed for my interview next week..... :(33 -
(Best read while listening to AEnima by Tool, loudly)
Dear Current Workplace,
Fuck you, for the reasons enumerated below.
Fuck your enterprise grey blue offices, the stifling warm air of a hundreds of bodies and sub par "development laptops".
Fuck your shitty carbonated water machines which were a cost saving measure over decent drinkable water.
Fuck your fake "flexi time", "you can do home office whenever you want" bullshit. You're still inviting me to mandatory meetings at 09:00 regularly.
Fuck your shitty, in house, third part IT provider sister company. They're the worst of all worlds. If it was in company, we'd get to give out to them, if it was an external company we'd fire them. And yes, when I quit I will quote the dumpster fire that is our corporate VPN as a major factor.
Fuck your cheery, bland, enterprise communication. Words coming under the corporate letterhead seem to lose all association with meaning. Agile, communication, open are things you write and profess to respect, but it seems your totally lack understanding of their meaning.
Fuck your client driven development. Sometime you actually have to fix the foundations before you can actually add new features. And fuck you management who keep on asking "why are there so many bugs and why is it always taking longer to deliver new releases". Because of you, you fucknuts, Because you can't say "NO" to the customer. Because you never listen to your own experienced developers.
Fuck your bullshit "code quality is important to us" line. If it's so important, then let us fix the heap of shit you're selling so that it works like a quasi functional program.
Fuck you development environment which has 250 projects in a single VS solution. Which takes 5mins plus to compile on a quad core i7 with 32 gb of ram.
Fuck this bullshit ball of mud "architecture". I spend most of my time trying to figure out where the logic should go and the rest of the time writing converters between different components. All because 7 years ago some idiot "architect" made a decision that they didn't have to live with.
Actually, fuck that guy in particular. Yeah, that guy who was the responsible architect for the project for 4 years and not once opened the solution to look a the code.
Fuck the manual testing of every business process. Manual setup of the entities takes 10mins plus and then when you run, boom either no message or some bullshit error code.
Fuck the antiquated technology choices which cause loads of bugs and slow down development. Fuck you for forcing me to do manual tests of another developers code at 20:00 on a Friday night because we can't get our act together to do this automatically.
Fuck you for making sure it's very clear I'm never going to be anything but a code monkey in this structure. Managers are brought in from outside.
Fuck you for being surprised that it's hard to hire competent developers in this second rate, overpriced town. It's hard to hire anywhere but this bland shithole would have anyone with half a clue running away at top speed.
Fuck you for valuing long hours and loyalty over actual performance. That one guy who everyone hated and was totally incompetent couldn't even get himself fired. He had to quit.
Fuck you for your mediocrity.
Fuck you for being the only employer for my skill-set in the region; paying just well enough that changing jobs locally doesn't make sense, but badly enough that it's difficult to move.
Fuck you for being the stable "safe" option so that any move is "risky".
Fuck your mediocrity.
Fuck you for being something I think about when I'm not at work. Not only is it shit from 9 to 5 you manage to suck the joy out of everything else in my life as well?
Fuck you for making me feel like a worse developer every day I work here. Fuck you for making every day feel like a personal and professional failure. Fuck you for making me seriously leave a career I love for something, anything else.
Fuck you for making the most I can hope for when I get up in the morning is to just make it until the night.6 -
I could bitch about XSLT again, as that was certainly painful, but that’s less about learning a skill and more about understanding someone else’s mental diarrhea, so let me pick something else.
My most painful learning experience was probably pointers, but not pointers in the usual sense of `char *ptr` in C and how they’re totally confusing at first. I mean, it was that too, but in addition it was how I had absolutely none of the background needed to understand them, not having any learning material (nor guidance), nor even a typical compiler to tell me what i was doing wrong — and on top of all of that, only being able to run code on a device that would crash/halt/freak out whenever i made a mistake. It was an absolute nightmare.
Here’s the story:
Someone gave me the game RACE for my TI-83 calculator, but it turned out to be an unlocked version, which means I could edit it and see the code. I discovered this later on by accident while trying to play it during class, and when I looked at it, all I saw was incomprehensible garbage. I closed it, and the game no longer worked. Looking back I must have changed something, but then I thought it was just magic. It took me a long time to get curious enough to look at it again.
But in the meantime, I ended up played with these “programs” a little, and made some really simple ones, and later some somewhat complex ones. So the next time I opened RACE again I kind of understood what it was doing.
Moving on, I spent a year learning TI-Basic, and eventually reached the limit of what it could do. Along the way, I learned that all of the really amazing games/utilities that were incredibly fast, had greyscale graphics, lowercase text, no runtime indicator, etc. were written in “Assembly,” so naturally I wanted to use that, too.
I had no idea what it was, but it was the obvious next step for me, so I started teaching myself. It was z80 Assembly, and there was practically no documents, resources, nothing helpful online.
I found the specs, and a few terrible docs and other sources, but with only one year of programming experience, I didn’t really understand what they were telling me. This was before stackoverflow, etc., too, so what little help I found was mostly from forum posts, IRC (mostly got ignored or made fun of), and reading other people’s source when I could find it. And usually that was less than clear.
And here’s where we dive into the specifics. Starting with so little experience, and in TI-Basic of all things, meant I had zero understanding of pointers, memory and addresses, the stack, heap, data structures, interrupts, clocks, etc. I had mastered everything TI-Basic offered, which astoundingly included arrays and matrices (six of each), but it hid everything else except basic logic and flow control. (No, there weren’t even functions; it has labels and goto.) It has 27 numeric variables (A-Z and theta, can store either float or complex numbers), 8 Lists (numeric arrays), 6 matricies (2d numeric arrays), 10 strings, and a few other things like “equations” and literal bitmap pictures.
Soo… I went from knowing only that to learning pointers. And pointer math. And data structures. And pointers to pointers, and the stack, and function calls, and all that goodness. And remember, I was learning and writing all of this in plain Assembly, in notepad (or on paper at school), not in C or C++ with a teacher, a textbook, SO, and an intelligent compiler with its incredibly helpful type checking and warnings. Just raw trial and error. I learned what I could from whatever cryptic sources I could find (and understand) online, and applied it.
But actually using what I learned? If a pointer was wrong, it resulted in unexpected behavior, memory corruption, freezes, etc. I didn’t have a debugger, an emulator, etc. I had notepad, the barebones compiler, and my calculator.
Also, iterating meant changing my code, recompiling, factory resetting my calculator (removing the battery for 30+ sec) because bugs usually froze it or corrupted something, then transferring the new program over, and finally running it. It was soo slowwwww. But I made steady progress.
Painful learning experience? Check.
Pointer hell? Absolutely.4 -
Switched to DuckDuckGo, because Google thought it would be nice, to ban the Proxy IP of our company (because you know, many requests) from searching and putting us behind these captcha monstrosities. I don't want to captcha myself out of every query I have for goddamn 2 minutes with slow ass fading images.
Turns out, I like their service even more.9 -
The lead dev left the company two weeks ago. His last hurrah involved committing a bunch of complicated code into our API. The code he writes is generally overly coupled but this particular code is INSANE.
It is so coupled that the tests for it almost mock the entire application end to end. I only found this heap of garbage when the deployment tests were hung after I made a simple change in a totally unrelated file. THEY DIDNT FAIL. JEST GOT INTO A STATE WHERE IT CANT CONCLUDE AND HAS NO ERROR MESSAGES. We are taking about entirely different parts of the code. As far apart in the code as it can get. It took six hours of playing Sherlock Holmes to figure out what was breaking.
He got the most junior developer to approve the garbage PR as well.26 -
Boss: Any idea why ColleagueX's code might be blowing out the memory?
Me (internal): Cos he's a fucking retard who can't code for shit, doesn't listen when I tell him to do stuff properly because he's fucking lazy, has no idea what stack and heap are, uses goto everywhere, doesn't know how to debug, doesn't write any unit tests, and generally WASTES MY FUCKING TIME!
Me (external): Probably a memory leak. I'll take a look.2 -
University Final Viva for OOP with C++
(Yeah, that first line is a rant in itself for the likes of me and Mr. Torvalds)
Assistant Professor:
Tell me a few "functions" in C++ STL algorithm header
Me:
*starts off with the first one that came to my mind*
sort()
AP: Huh? a I'm asking the Algorithms in C++ STL
Me: Yes, this is one of them Ma'am.
She looked at me as if I told her that I'm dating her daughter. It became clear she doesn't know about it and she'll gladly deduct my marks for getting it wrong. So I explained how Sort() is a hybrid of quicksort, heap sort and insertion sort. (Read about it an hour ago while doing a competitive programming question)
AP: Tell me the ones we did in class.
I haven't attended those classes, so I just told her the ones I knew.
After a couple more infuriating questions, which themselves sounded right from a book published in the 90's, she gave me 10/15.
This is what's wrong with India's Education system, even the teachers know only the stuff mentioned in the course hand-outs. Forget brownie points, you get screwed over by the teachers for actually knowing stuff and using it.8 -
I AM TIRED
warning: this rant is going to be full of negativity , CAPS, and cursing.
People always think and they always write that programming is an analytical profession. IF YOU CANNOT THINK IN AN ANALYTICAL WAY THIS JOB IS NOT FOR YOU! But the reality could not be farther from the truth.
A LOT of people in this field whether they're technical people or otherwise, just lack any kind of reasoning or "ANALYTICAL" thinking skills. If anything, a lot of of them are delusional and/or they just care about looking COOL. "Because programming is like getting paid to solve puzzles" *insert stupid retarded laugh here*.
A lot of devs out there just read a book or two and read a Medium article by another wannabe, now think they're hot shit. They know what they're doing. They're the gods of "clean" and "modular" design and all companies should be in AWE of their skills paralleled only by those of deities!
Everyone out there and their Neanderthal ancestor from start-up founders to developers think they're the next Google/Amazon/Facebook/*insert fancy shitty tech company*.
Founder? THEY WANT TO MOVE FAST AND GET TO MARKET FAST WITH STUPID DEADLINES! even if it's not necessary. Why? BECAUSE YOU INFERIOR DEVELOPER HAVE NOT READ THE STUPID HOT PILE OF GARBAGE I READ ONLINE BY THE POEPLE I BLINDLY COPY! "IF YOU'RE NOT EMBARRASSED BY THE FIRST VERSION OF YOU APP, YOU DID SOMETHING WRONG" - someone at Amazon.
Well you delusional brainless piece of stupidity, YOU ARE NOT AMAZON. THE FIRST VERSION THAT THIS AMAZON FOUNDER IS EMBARRASSED ABOUT IS WHAT YOU JERK OFF TO AT NIGHT! IT IS WHAT YOU DREAM ABOUT HAVING!
And oh let's not forget the tech stacks that make absolutely no fucking sense and are just a pile of glue and abstraction levels on top of abstraction levels that are being used everywhere. Why? BECAUSE GOOGLE DOES IT THAT WAY DUH!! And when Google (or any other fancy shit company) changes it, the old shitty tech stack that by some miracle you got to work and everyone is writing in, is now all of a sudden OBSOLETE! IT IS OLD. NO ONE IS WRITING SHIT IN THAT ANYMORE!
And oh my god do I get a PTSD every time I hear a stupid fucker saying shit like "clean architecture" "clean shit" "best practice". Because I have yet to see someone whose sentences HAVE TO HAVE one of these words in them, that actually writes anything decent. They say this shit because of some garbage article they read online and in reality when you look at their code it is hot heap of horseshit after eating something rancid. NOTHING IS CLEAN ABOUT IT. NOTHING IS DONE RIGHT. AND OH GOD IF THAT PERSON WAS YOUR TECH MANAGER AND YOU HAVE TO LISTEN TO THEM RUNNING THEIR SHITHOLE ABOUT HOW YOUR SIMPLE CODE IS "NOT CLEAN". And when you think that there might be a valid reason to why they're doing things that way, you get an answer of someone in an interview who's been asked about something they don't know, but they're trying to BS their way to sounding smart and knowledgable. 0 logic 0 reason 0 brain.
Let me give you a couple of examples from my unfortunate encounters in the land of the delusional.
I was working at this start up which is fairly successful and there was this guy responsible for developing the front-end of their website using ReactJS and they're using Redux (WHOSE SOLE PURPOSE IS TO ELIMINATE PASSING ATTRIBUTES FOR THE PURPOSE OF PASSING THEM DOWN THE COMPONENT HIERARCHY AGIAN). This guy kept ranting about their quality and their shit every single time we had a conversation about the code while I was getting to know everything. Also keep in mind he was the one who decided to use Redux. Low and behold there was this component which has THIRTY MOTHERFUCKING SEVEN PROPERTIES WHOSE SOLE PURPOSE IS BE PASSED DOWN AGAIN LIKE 3 TO 4 TIMES!.
This stupid shit kept telling me to write code in a "functional" style. AND ALL HE KNOWS ABOUT FUNCTIONAL PROGRAMMING IS USING MAP, FILTER, REDUCE! And says shit like "WE DONT NEED UNIT TESTS BECAUSE FUNCTIONAL PROGRAMMING HAS NO ERRORS!" Later on I found that he read a book about functional programming in JS and now he fucking thinks he knows what functional programming is! Oh I forgot to mention that the body of his "maps" is like 70 fucking lines of code!
Another fin-tech company I worked at had a quote from Machiavelli's The Prince on EACH FUCKING DESK:
"There is nothing more difficult to take in hand, more perilous to conduct, or more uncertain in its success, than to take the lead in the introduction of a new order of things."
MOTHERFUCKER! NEW ORDER OF THINGS? THERE 10 OTHER COMPANIES DOING THE SAME SHIT ALREADY!
And the one that got on my nerves as a space lover. Is a quote from Kennedy's speech about going to the moon in the 60s "We choose to go to the moon and do the hard things ..."
YOU FUCKING DELUSIONAL CUNT! YOU THINK BUILDING YOUR SHITTY COPY PASTED START UP IS COMPARABLE TO GOING TO THE MOON IN THE 60S?
I am just tired of all those fuckers.13 -
Java dev here. I rewrote an app and replaced a system call to ssh with a modern jaxrs post for uploading a file and (new) some additional data.
I even used a stream.
1 hour in production, first client doesn't get his file. Log says OutOfMemoryError: heap.
Me: wtf? I already use streams.
Looking at the Jersey library. Docs say nothing. An issue from 2013 says: oh if you silly don't use the Apache httpclient addon, we disable chunking and buffer the whole body, because our tests fail with the jdk included http client otherwise.
Me: meh.
No warning in the logs. Thank you soooooo much! Who could have known?4 -
The Return of Mr. Gitmaster:
So there is this colleague I already ranted about several times. After my previous team lead had confronted him about not doing much work, there was some irritation because he showed not up at work, but it turned out the external training he did was just a week earlier. Then he was ill a week, another week vacation so we didn't see him much. Not that his pre- or absence makes much difference to our repo: When his and my team lead looked at his commits of the past three months they found like the one copy-pasted HTML-form that wouldn't even show.
Fast forward to now, where we have a new team lead and we were going to lunch with Mr. gitmaster. So we got some more hero stories from the great work he was doing in the previous company. How he was graphically monitoring the heap fragmentation that stupid glibc was causing to their search engine, and how much better it became with tcmalloc.
I still don't understand how he bridges that cognitive dissonance from all the superior tech knowledge he displays to not actually writing any code at all. Not that I would not have experienced some states of feeling low, in paralysis unable to write a single line of code... but he seems so full of confidence, always commenting how trivial and easy all these tasks would be, as if it's all so lightyears below his abilities. Maybe he should just become a manager - but not mine. -
Microtransactions are ruining the AAA gaming industry. I have always liked a good fighting game. So I looked at Street Fighter 6. Base game is $60, better version is more, bestest version is way more. Plus from reading reviews the fucking game is riddled with microtransactions.
What happened to buying a fucking game and not feeling like you got ripped off? When you bought the fucking game you got the whole fucking game.
I am disgusted with what these big names are doing. Ruining a once less sketchy industry.
I have even seen games that start out good. Then after a few patches they introduce the microtransaction bullshit. The Conan games are like that. The main complaint is adding this bullshit for base game items.
I wonder how they think this is good for their player base. They just fired the dude at Unity over trying to fuck over customers. Of course the company cannot be trusted so a lot of bigger labels are jumping ship to other engines.
What kinda pisses me off is I will try and find a decent game on Steam and look and look and all I find is garbage. How did Steam turn into such a trash heap? I won't touch an EA game (which is where that CEO from Unity came from). It is too bad because I really liked Mass Effect.
tldr - gaming has turned into shit.8 -
I think this a perfect anecdote of where tech is going nowadays:
I moved my bowels on one of those high-tech Japanese toilets: it allowed you to control the seat temperature, cleaned your butt with spray (with an additional "ladies" mode), had several modes of flushing (1, 2, and "eco"), automatically lifted and closed the lid, played some music for you, had a remote controller for you to flush your shit at a distance.
But, guess what, IT DIDN'T FLUSH SHIT. It pathetically trying to flush my shit with 1000 different kinds of puny jets and draining modes but my heap of shit always bounced back because its flush was so weak that it couldn't push it.
I don't care if the seat warmer went out of control and burned my ass or if the butt cleaning jet didn't reach my anus,
JUST DO WHAT YOU'RE SUPPOSED TO DO AND FLUSH MY SHIT.5 -
Hello everyone!
This is a kinda follow up to my previous rant:
https://devrant.com/rants/1442655/...
So, it’s been a week since I started the internship. I am kinda lost to be honest.
The first day was awesome, but I have been going downhill since then. I make so stupid mistakes and it seems like I always think different than my mentor/employer (me making mistakes). Then he corrects me and I have to rewrite the code which I had to spend hours to think and get working. 😕😕
As @RantSomeWhere said, the guy is actually nice and still appreciates me and helps me all the time. I am really thankful for that. 🙂
As @plant99 said, I do have to be working a lot to try and meet the tasks that I am given. The employer does tell me to not over work but I still do if I have to, to get the thing done. I don’t feel nice if I don’t finish the work. So I do spend up to 12 hours (not continuously) on it at times. 😅
The code base… oh my god!! It is so bad (to me). Don’t get me wrong, we use the linting and auto formatting tools, but I can’t get over the 2 space tabs in C++ code. It makes me feel like I am not looking at code but at paragraphs of mumbo jumbo stuff. 😭😭
Oh and yes, it is confirmed. I HATE FRONTEND WORK! Especially when languages like JS and C++ are used in combination and interact with each other. 😨😨😱😱
Don’t get me wrong, I don’t hate JS or frontend, but I hate doing it myself. So not my cup of tea. Kudos to those who actually do it! 😎👏🏻🎊
Overall, I guess, it is going decently. I feel so scared at times, consumed by the fear, that my code will be wrong and he’ll be disappointed in me. Yea I know that I shouldn’t be upset with how others feel. But it does make me sad when I disappoint my mentor (who is still rooting for me). 🙁
I am hoping to get better over time. This is definitely a great experience for me because my code has never been judged before. I have always been the “king of code” in my college/social circle. 🤭🤭
Honestly, this is actually humbling. I guess I definitely needed this 😅😅. And as they say, you don’t improve by being the top. You improve by leaping forward, ending up at the bottom of the heap of the next level, and growing up from there. 😅
Oh and I also realized - remunerative benefits are DEFINITELY motivating 😂😂😂😂
And the 5 days work also definitely makes me MUCH more excited for the weekends 😆😆😂😂
Thanks everyone for cheering, motivating, and giving me advise.
@oudalally I definitely found your advise quite helpful 😁😁😊😊
PS: ooh this my biggest rant/story yet! Yiiipppeeeeeee 😁😁😊😊7 -
Pixel 4 has had to restrict brightness and refresh rate to make up for the smaller battery capacity compared to pixel 3.
So you get a phone advertised as 90hz refresh rate, but does 60 most of the time and only hits 90 when the screen is at a specific brightness.
The max brightness had to be capped at about half of what a similar Samsung can do. Deep inside the kernel there is a disabled high brightness mode, meaning without root access and some hacks, you can’t even get the phone it hit its physical maximum. Leading users to complain about the phone screen being too dark.
What a heap of utter shit.
Source:
https://arstechnica.com/gadgets/...2 -
Rant:
I am at work, some one says to me this system we are working on is multi threaded. I tell the no its not multi threaded and in this context. Things cannot happen concurrently. Its a single core arm 7tdmi. Arguments ensue abot the difference between multithread multitasking an multiprocessing. I proceed to explain this is a multitasking interrupt driven system. With no context switching or memory segmentation so one heap for all tasks cause thats how we have it configured and there is only one core. So there is no way the error he just described could possibly happen. Then he tells me im wrong but refuses to even look at the processor manual and rejects the Wikipedia entry for multithreading. So I plan on calling off so i can just have the next two weeks off while he trys to figure out why two things ar happening at once on this system. He deserves all the frustration that is to follow.1 -
I am working on an open source game project, and the most common way to draw things is using a class named ManagedSurface. The class is otherwise awesome, but it has a method called getBasePtr(x, y), which gives you a pointer to the requested coordinates. Fair enough (this is C++ without STL by the way).
But WHY THE HELL CAN I REQUEST ANY POINTER THAT I WANT, EVEN IF IT'S OUTSIDE THE SURFACE? Other cointainers have sanity checks, asserts and such, and the surface KEEPS TRACK OF IT'S WIDTH AND HEIGHT.
WAS IT SO FUCKING HARD TO ADD assert(x <= w); assert(y <= h);???
I spent 3 days on valgrind trying to find a heap corruption that manifested at random points in the code.
FUUUUCK!
On the bright side, I learned how to use valgrind (which is awesomely awesome).4 -
I found this on a wiki with Haskell Humor... it's interesting...
How to Shoot Your Self in the Foot With Haskell: Putting the unsafe in unsafePerformIO!
You shoot the gun, but the bullet gets trapped in the IO monad.
Couldn't match expected type 'Deer' against inferred type 'Foot'.
While compiling your program the compiler produces a type error long enough to overflow a kernel buffer, overwrite the trigger control register and shoot you in the foot.
After trying to decipher the type errors from the compiler, your head explodes.
After you've finally found a way to circumvent the type system and shoot yourself in the foot, Oleg appears out of nothing and shoots you in the foot for coming up with it before him.
You shoot the gun but nothing happens (Haskell is pure, after all).
Your foot is fine, until you try to walk on it, at which point it becomes mangled.
You have a shootFoot function which you've proven correct. QuickCheck validates it for arbitrary you-like values. It will be evaluated only when you end up at the hospital. You hope this doesn't come to pass, as it actually returns a bullet-ridden copy of yourself and you don't want to be garbage-collected.
foreign import ccall "shootparts.h shootfoot" shoot_foot :: Gun -> Programmer -> IO ()
shootSelfInFoot = unsafePerformIO . shoot . foot $ self -- Shoot self in foot 0 or more times depending on evaluation order
No instance for (Target Foot)
arising from use of `shoot' at SelfInflictedInjury.hs:1:0
Possible fix: add an instance declaration for (Target Foot)
In the expression: shoot foot
You go to shoot yourself in the foot but the bullet is in the ST monad and the gun is in the IO monad, so you can't.
You ask Haskell to shoot you in the foot but by the rules of lazy evaluation you don't need the result yet so it doesn't happen.
You decide to shoot yourself in the foot but get distracted devising a ballistics algebra and wondering if you can do the calculations in the type system.
You want to shoot yourself in the foot but realize there is no Gun datatype so use Arrows instead.
You shoot in the direction of your foot, but since you are inside the STM monad you can just retry until you figure out what to do.
You shoot yourself in the foot, but you are perfectly fine as long you just don't evaluate the foot.
You shoot yourself in the foot, but nothing happens unless you start walking.
Don't forget about memory consumption! If you don't look, the bullet causes heap overflow. If you look, the bullet causes stack overflow.
You *appear* to have deliberately shot yourself in the foot, and yet your program actually runs perfectly OK due to lazy evaluation. (So long as you remember to not look at your foot...)
You aim the gun at your foot, pull the trigger and remove the clip. When you look at your undamaged foot, the hammer clicks on an empty barrel.1 -
Many people here rant about the dependency hell (rightly so). I'm doing systems programming for quite some time now and it changed my view on what I consider a dependency.
When you build an application you usually have a system you target and some libraries you use that you consider dependencies.
So the system is basically also a dependency (which is abstracted away in the best case by a framework).
What many people forget are standard libraries and runtimes. Things like strlen, memcpy and so on are not available on many smaller systems but you can provide implementations of them easily. Things like malloc are much harder to provide. On some system there is no heap where you could dynamically allocate from so you have to add some static memory to your application and mimic malloc allocating chunks from this static memory. Sometimes you have a heap but you need to acquire the rights to use it first. malloc doesn't provide an interface for this. It just takes it. So you have to acquire the rights and bring them magically to malloc without the actual application code noticing. So even using only the C standard library or the POSIX API can be a hard to satisfy dependency on some systems. Things like the C++ standard library or the Go runtime are often completely unavailable or only rudimentary.
For those of you aiming to write highly portable embedded applications please keep in mind:
- anything except the bare language features is a dependency
- require small and highly abstracted interfaces, e.g. instead of malloc require a pointer and a size to be given to you application instead of your application taking it
- document your ABI well because that's what many people are porting against (and it makes it easier to interface with other languages)2 -
Just thought I'd share what I've been working on lately.
Heap: https://repl.it/@AmyShackles/Heap/...
Array: https://repl.it/@AmyShackles/...
Binary Tree: https://repl.it/@AmyShackles/...
(I'm so freaking tired.)6 -
Recently I launched the minimalistic online drawing app https://okso.app. I wanted it to be a place where people could do fast, ad-hoc, napkin-based-like explanations of any concept as if you are sitting with your friend and trying to explain him/her something during lunch. Don't ask me why it is needed, I was just experimenting.
So, the first concept I've tried to explain with sketches was the Data Structures. Without further ado, here is the interactive ✍🏻 https://okso.app/showcase/... showcase that you may play with.
Of course, not all data structures are covered. And of course, this is not comprehensive material, but rather a cheatsheet that would create visual hints and associations for the following data structures:
- Linked List
- Doubly Linked List
- Queue
- Stack
- Hash Table (with hash collision resolution)
- Tree (including the Binary Search Tree)
- Heap (including Mean Heap and Max Heap)
- Trie
- Graph
Each box on the sketch is clickable, so you may dig into the data structure you're interested. For example `Heap → Max Heap`, or `Heap → Min Heap`, or `Heap → Array Representation`.
The sketches are split into so-called Pages just to make it easier to grasp them, so the users stay focused on one concept at a time, they see the relationship between the concept, and thus, hopefully, they are not getting overwhelmed with seeing a lot of information at the same time on one drawing/page.
Each page has a link to the source-code examples that are implementing the data structure on JavaScript.
The full list you may find in the ✍🏻 https://okso.app/showcase/... showcase.
I hope you find this showcase useful and I hope it will be a good visual cheatsheet-like complement to your data structure knowledge.12 -
garbage collectors' lifestyle matters!
Ever eyeballed the abyss of your memory leaks? Shit, garbage collectors deserve a raise.
Unsung heroes, janitorialing thru that VM like a dung beetle, silently fucking up your perf so you can do that delicious spaghetti. Indiana-jonesing the fuck out of that memory trash can and euthanizing all that disgusting heap of pointers hanging, dangling, like... well, like garbage.
At the very least they're deterministic, unlike that Markov chain we all had the displeasure of fucking up. Amen? Amen! 🙌🏻
You gotta wonder, though, what goes through their nuggin. Do they reminisce about the potential of that half-ass-written class? Do they weep for the elegance of a forgotten function bottlenecking their job? Nah, probably just counting down the nanoseconds till their next full GC cycle. Aaah, like cold beer in Saturday barbecue.
So next time your program miraculously avoids a memory error, take a moment, put your hands up in the air and say a prayer to your garbage collector.
Silently covering for your fuckups2 -
For those of you who still refuse to accept that safety features in languages are useful and important:
https://daniel.haxx.se/blog/2023/...
The author of curl himself admits that this security flaw could have been prevented if he had used a memory safe language.
I‘m not blaming the author for making this mistake and I‘m not saying that curl should be rewritten in another language.
I just want to rub this in the faces of people who argue that "bugs are always the developer’s fault, therefore it’s perfectly fine to keep using unsafe languages"4 -
Do not touch Salesforce.
Especially Salesforce Marketing Cloud.
It is a fucking joke this product even exists. Buy Hubspot instead. Marketing Cloud is the single worst piece of software I have had to implement out of 4 years working in software and a lifetime working in tech.
Literally nothing works. You click a button and bam, nothing. The UI actively lies to the user. Nothing is guaranteed to work and support is some guy in India who shrugs his shoulders and walks away. Things will randomly break and warning messages are tiny, indecipherable babble that mean nothing.
If you are dev, walk away. If you are a potential customer, walk away. This company DESERVES a bad reputation for the absolute heap of dogshit that is Marketing Cloud.
The worst part is that it's likely going to affect my job and my career because of how fucking dogshit it is.
Fuck Salesforce in case the messaging isn't clear.5 -
Is it just me, or are web chatbots actually really annoying and way too intrusive. It's like "omg look guys we have a ChatBot, we can do really cool technical stuff!" If a ChatBot can't ease my oversized heap of depression, I do not want to talk to it.6
-
Senior tech rolls out updates last night... Breaks a whole heap of shit, guess who gets to fix them :|4
-
So I work in a web development company in my town and have been doing a while or heap of parallax sites for our clients. Now obviously when we do the designs we get them in and get them to play around with the site before we go ahead and push their new site out and make it live right.
Wellll who would of thought that a simple parallax site would be so hard to use for the general user??? Recently we have been getting the occasional call where the client is getting complaints about the site only being a big ole image or just one block of text. After investigating why their site was broken or why the users weren't able to see the whole site I came across no problems at all.
Today I got a call from the client who instructed me that after explaining to one of his own clients that he had to scroll down the page that everything was just fine!
I mean, what? How do you miss the big ole scroll bar on ya screen or even think to even attempt to scroll? Some people aye lmao2 -
I already wrote a rant about this yesterday, but since I'm a sysadmin trying to convert to dev.. I dunno, maybe it's not a bad idea to muddy the waters a bit and talk about why not to be a sysadmin.
Personally I think it's that the perceived barrier to entry is just too high, while it isn't. You don't need a huge Ceph cluster and massive servers when you're just starting out. Why overbuild an appliance like that if it's gonna start out at maybe 5 requests a minute?
Let's take an example - DNS servers! So there's been this guy on the bind-users mailing list asking how to set up a DNS server on 2 public servers, along with a website. Nothing special I guess - you can read the thread here: https://0x0.st/ZY-d. Aside from the question being quite confusing, there was advice to read RFC's, get a book, read the BIND ARM, etc etc. And the person to deny this? No one less than Stephane Bortzmeyer, one of the people who works for nic.fr (so he maintains the .fr TLD) and wrote some of those RFC's as part of the DNSOP working group in the IETF. As for valid reasons to set up a DNS server? Could just be to learn how the DNS works, or hell even for fun. As far as professional DNS servers go.. this (https://0x0.st/ZYo9) is the nugget that powers the K root server, one of the 13 root servers that power the root zone of the internet, aka the zone apex. 2 RJ45 connections, and a console connection. The reason why this is possible is the massive recursor networks that ISP's, Google DNS, Cloudflare DNS, Quad9, etc etc provide. Point is, you don't need huge infrastructure to run a server!
Or maybe your business needs email. How many thousands of emails per second are you gonna need to build your mail server against? How many millions will you need to store? If your business has 10 employees and all of those manage about 10k emails total.. well that's easy, 100k emails total. Per second? Hundreds of emails per second per employee? Haha, of course not. Maybe you'll see an email a minute at most. That is not to say that all email services are like this - it is true that ISP's who offer email to their customers, and especially providers like Microsoft and Google do need massive mail servers that can handle thousands of emails per second. But you are not Microsoft or Google. So yeah, focus on the parts of email that are actually hard.. and there is plenty.
Among sysadmins you have this distinction between "professional" sysadmins and homelabbers. I don't mind the distinction itself but I think both augment each other. If you've started out by jumping into a heap of legacy at an established company, you will have plenty of resources, immediately high complexity, and probably a clusterfuck right away. But you will have massive amounts of resources. If you start out with a homelab, you will have not many resources, small workloads, and something completely new for you to build and learn with. And when running a server like that, you'll probably find that the resources required are quite small, to provide you with your new services. My DHCP servers take 12MB memory each. My DNS servers hover around the 40MB mark. The mail server.. to be fair that one consumes around 150. But if you'd hear the people saying that you need huge servers.. omg you need at least a TB of RAM on your server and 72 cores, massive disks and Ceph!1!
No you don't. All that does is scaring people away and creating a toxic environment for everyone. Stop it.1 -
How important is understanding heap vs stack memory allocation?
Who knows--I'm a python developer after all.
Also I completed by first alife simulation. Took me from 7 pm yesterday to 10.30am this morning.
Feels good. I'm at the part of familiarity with the language that my thoughts are pretty much directly parsed and translated into code, without any effort.
Alife's just for the standard math shitposting though. Was fun regardless.20 -
0 bytes of heap allocated per cycle! Figuring out the Unity profiler actually helped me improve my C# optimization. <33
-
So we’ve taken over from a project team that disbanded... read: “cut their contracts because fuck this, I can earn more working for better people”.
Me and one other guy have been tasked with saving this heap of shit.
Obviously the project guys left saying “it’s nearly done, just this one feature”. Because cut contracts are easier to deal with if “everything is almost done”.
We jump on and find that’s not the case at all... this thing, is a beast, a big old stats analysis program... so we’re like “cool, let’s see what’s going o...OH MY GOD”.
The “recalculation” function was core to this POS. The contractors had done it in C# through entity framework... it took 24 hours to run, over a reasonably small data set that was due to double every 2-5 years.
So... here’s the deal, it ran over night.... then failed. And no cunt had noticed. Entity framework “can’t commit because I’m muddled up as fuck, did you really just put the whole db in EF in memory to work with it?” Exception.
Que 6 months of me and my lead doing the job properly.
Anyway, the failure: I ended up in Hospital again with a Crohn’s flare up... about 5 months in.
Fuckall to do with all this nonsense I just wanted to tell a story. it was an interesting/fun project to fix and my lead was a legend... so happy days.
Similar story, different set of contracted devs... they’d been defining requirements with the business users using the term “Risk” which the business users knew as a group of risks.
The domain model had been written RiskGroup<>— -
This shit is fascinating, especially reading about the variations in function of the various brodmann areas:
https://en.wikipedia.org/wiki/...
My favorite schizo-interpretation of this is "your head is full of bees."
i.e. brodmann area 10, which is thought to be responsible for memory recall strategies (basically an adaptive memory allocator and heap) has about 250 million neurons in a pinprick of a volume.
A bee has about 1 million neurons.
In otherwords: the part of your brain that decides how memory is managed has only the equivalent brainpower of 250 bees, lol.
Obviously a simplification-to-the-level-of-absurdity but it's fun to intentionally interpret something to the level of distortion.11 -
bubble sort
promotion sort
quick sort
school sort
heap sort
hr sort
merge sort
sex sort
selection sort5 -
So a team at on-site sent a OOM(Out of Memory) issue in our morning.
Everyone analysed the issue as being code issue since we were bringing too much data into the runtime process. The analysis was done on the heap dumps. The number of records reported by user were 1k. At the end of the day it turns the number of records were actually 100k+.
Why do people jump.to conclusions without thinking about the obvious. :-(1 -
Had a 5 hour call today, where we wanted to set up a system from one of our subcontractors in our own environment. Struggled forever to get the backend up and running.
Turns out that some dependencies were hardcoded as local file URLs...
No, our linux machine does not have C:\Users\<username> 🙄 -
Renaming a file is just too difficult for this piece of shit software.
Fixing bugs? Fuck no.
Fixing crashes? Fuck no.
Fixing the unnavigable IDE settings? Fuck no.
The IntelliJ platform is a bloated piece of shit at every level.
JetBrains cannot produce software that isn't held together by duct tape.
I can't name a single item of software they've ever produced that isn't a bloated piece of shit.
Even if you are prepared to waste a lot of time trying to file a bug report – which they usually just ignore or pretend not to be reproducible – you have to use another in-house heap of shit called YouTrack.
Have you tried using this piece of trash that masquerades as a bug tracker?
These people are fucking clinically insane.
While your IDE becomes unresponsive and crashes without warning, or your keyboard shortcuts just mysteriously stop working in the IDE, or indexing just stops working for no reason, why not check out their TikTok and Twitter accounts?
They've got an excellent PR team that knows how to polish a turd for public consumption, and to make money out of it.14 -
First day back at my old workplace and the guy who replaced me as storeman is going to put me in an early grave...
Literally all of the work I put in over the past year and a bit is gone...
Welp... Let's hope I can get a higher up position soon so I can fix this shit heap .-. -
Just had a class where we had to write a heap adding algorithm in Java to reduce rounding error for x amount of floats being added together
After an hour of writing code with no testing anything I finished. Ran the JUnit tests provided by the teacher and it passed all the tests!
Who says it can't work the first time?2 -
Heyo, it's me. That fool who always says shit about unity.(:
So.. i just got my first real hands-on down, and phew, i gotta say.. I overestimated that heap of bullshit.
It's not like there are basic concepts of gamedev, framebased ticking and stuff like that since before the fucking gameboy - nope - let's do shit different. More ... Shit. First, we invent something new. Lets call it "prefab". None of these fuckers is going to know what that shit is.
What next.. oh the new-keyword. That's bullshit, all languages use it. Lets make Instanciate(). That's the stuff.
On we go, scenes. Most shit is statically created beforehand and used by scripts glued to stuff. Hell that so neat actually. Creating materials beforehand and then we can just load em!(:
NOPE. yo bro your Material where u used one of those loading-methods is null. We ain't telling you whats wrong, cus you know.. Load() returning null is like completely normal, why throwing an exception?
Oh and btw, it needs to be in ./Resources/, but it wont make any difference.
So now you want to google your problem, eh? Forget it. The Forums only answer on stuff like "how to add 2 numbers in unity" and the guide shows you how you did it, but they say it works that way.
Dude holy shit, of course this is a buhuuu i don't know how to do shit rant because i feel like good 8-10 years of dev experience collected while not doing homework for school were for fucking nothing.:b
And i have to use it.
Subjective Opinion: Unity was made by crackheads.7 -
When 32 GB RAM is no longer enough...
:~$ ps -eo pid,pcpu,pmem,vsz,rss,args | grep java | sort -nrk3 | head -1
9071 117 74.6 34740516 24338652 java -Xms2g -Xmx24g -Xss40m -DuploadDir=. -jar webapp-runner-8.0.33.4.jar -AconnectionTimeout=3600000 --port 9000 heaphero.war7 -
I just built a TypeScript microservice and got a heap out of memory fatal error. What the actual fuck? Micro my ass7
-
Today, my manager received a brand new Macbook pro with all its cool features while I am still stuck using an old Macbook pro (mid 2012 model). I always complained him about performance issues and all he did was to approve an OS upgrade (to Sierra). How does that even enable me to be productive? I am already running applications at the peak of the machine limits. Sometimes, the JVM crashes and other time Node.js runs out of heap space.
The manager is not a programmer. All he really does is attend online meetings, track and report to management, and write emails. Ideally, he would need a Mac Air or perhaps a Windows machine. I still wonder how did the company management allowed this. He is simply misusing his privileges as a manager and I can do nothing about it.1 -
Company notebook be like:
"1 program still needs to close"
"-----------------------------------"
"(waiting for) Microsoft Outlook"
"Outlook is shutting down"
"-----------------------------------"
"To close the program that is preventing Windows from shutting down, click Cancel, and then close the program"
"-----------------------------------"
FORCE SHUTDOWN, YOU MOFO!3 -
I just recalled I once had to explain to my CTO what’s the difference between stack and heap memory
It baffled me a little bit, but contrary to what one might perhaps expect, this was a guy who was already making a living off of programming for about ten years selling his software to various clients, so he was clearly competent enough to create software that works, and he had in fact put this startup on its feet operationally with it already being profitable before outside investments were secured
And here I was with my theoretical CS knowledge making zero bucks before getting this job8 -
So today, my friend (who is younger) has returned from a programming competition hosted by the district. The language used was Pascal. Before the competition my friend had been pretty confident about his skills of using Free Pascal, but after that, he has been different.
He came back in tears. I asked him what was happening in the computer room.
- Turbo Pascal.
I was stunned for seconds. Who the heck in this 2019 still uses an ancient compiler dated from the 1990s for the DOS operating system? And yet the competition's computers had only it installed. I think nowadays everyone learning Pascal, at the very least, uses Free Pascal as the IDE. I could immediately imagine how restrictive and frustrating was programming on such that thing.
- I couldn't create... dynamic arrays... so I had to declare two 30 000-element arrays (which was required by the problem), but when compiling... it said... the maximum heap size was 64KB.
It wouldn't let me use "exit(result)" (to return a function's result) so I wasted many minutes replacing them with "<function name> := result; exit;".
And many more problems.
Raise your hand if you think this is ridiculous.7 -
I just missed our daily scrum because of Teams. Now, Microsoft in their infinite "wisdom" have decided to integrate Outlook calendar invites into Teams so any invitation shows up as a notification, looking like a red warning light as if something is seriously wrong. Then, when you click that notification you're lead astray, moving away from what you came there for. In my case, I'm only using Teams for online meetings, usually our daily scrum which is always located in the same chat room or whatever it's called. But once lost in the catacombs of Teams, it's just impossible to find my way back in this garbage heap of a UX. So instead, I tried to use the link in the recurrent calendar event for our daily scrums. This always used to work, but now it says "On hold". Teams is such a piece of junk, just like most M$ products nowadays. I've complained about Teams, Word and Outlook to my superiors, and suggested we'd replace them with better tools, but to no avail. They go like "We've paid a lot for these Microsoft licenses so we just have to continue using them". So, the logic is like...If we're paying for crap we're stuck with the crap. 🤔3
-
At work we develop for embedded systems. Using the heap can raise unknown effects sometimes. So we always try to avoid using it. To show our attitude regarding the heap we want to make T-Shirts like the No Ma'am shirts from Married... with Children but with No Heap instead of No Ma'am. Now we need a meaning of the acronym. Our currently idea is:
Nerdy
Opponents of
HEAP
E
Allocation
Practice
We do not find a good word for the E, we also aren't native speaker, thus we are not sure which synonym for word like based can be used in such context. So i want to ask if someone has a good idea or even a better idea for the whole acronym :)4 -
Why on Earth would a Performance Testing application such as JMeter have such a low Java heap space by default.. i mean wouldnt it make sence to set this as high as possible for a Performance Testing tool ? 😞3
-
Me writing articles: …so think of Brodal-Okasaki heap as a set of endofunctors mapping the N-dimensional Hilbert continuum, simple as that
Me talking on stage: how is babby formed4 -
Okay c/c++ megaminds, I have a question about how something is generally designed that I feel like is too broad for SO or to be effectively Googled (though my Google-Jitsu may just be a tad weak, idk)
Lets say I have, for example, a simple graphical interface system where each widget/ control may have child controls. We could store it as a simple list/ array/ vector/ whatever - say Widget.children
Now these children could be added with a function like addChild(Widget*). This function would accept widgets allocated both on the stack and on the heap... but only widgets allocated on the heap would need to be freed.
My question is: on the destructor of the parent widget, how would it free all of its child widgets, if some are on the stack and some are on the heap and we don't know which is which...
And my broader question is what's the general design for this sort of thing? Should all items just be heap allocated always? Should it never be the responsibility of the parent widget to free the child widgets?9 -
So in Ruby, everything is passed to functions by value. However, when you manipulate objects, you're actually manipulating references. A simple example:
```
a = [3]
b = a
c = a
b.push(2)
print a
print b
print c
# => [3, 2][3, 2][3, 2]
```
Here's a more complicated example from the problem I was solving:
```
table = Array.new(5) { Array.new() }
1.upto(5 - 1) do |i|
1.upto(5 - 1) do |j|
table[i] = table[j]
end
table[i] << rand(1..6)
end
```
I have been running around in circles this morning because I forgot that. This makes C++ for example, more clear than Ruby since C++ explicitly shows the intent to the programmer.5 -
Starting the Monday with a good old heap corruption in a c# project that uses only managed code.
Occurs on 2/3 PCs.
Today is going to productive :/ -
One of our integration solutions (via Webservices) had some issues. I had to switch on http logging to see what might be the issue.
On average, those logs are around 20MB when there is a bunch of traffic. But the solution brought a heap pf traffic through, those logs shot up to 1GB in size.
Had to delete the logs, since they took a million years to open, and told our vendors that the logs are not showing us anything 😅 I told no lies -
My job isn't stressful all the time. Sometimes I'm in meetings and I'm just bored. And sometimes I have a coke to drink. That's pretty nice.
But right now my app is breaking and I don't know why. It either corrupts the heap sometimes or breaks the execution engine sometimes or attempts to write pointers I don't control into protected memory sometimes. Can't reliably reproduce them. And every time I try to debug one it causes the other.
But I do have a Coke. -
Anyone got experience turning a Raspberry Pi 3+ into a mini Ubuntu server running Postgres and some other shit. Seems like a heap of steps and was it worth it? Looking for a little testing server travel buddy.10
-
YGGG IM SO CLOSE I CAN ALMOST TASTE IT.
Register allocation pretty much done: you can still juggle registers manually if you want, but you don't have to -- declaring a variable and using it as operand instead of a register is implicitly telling the compiler to handle it for you.
Whats more, spilling to stack is done automatically, keeping track of whether a value is or isnt required so its only done when absolutely necessary. And variables are handled differently depending on wheter they are input, output, or both, so we can eliminate making redundant copies in some cases.
Its a thing of beauty, defenestrating the difficult aspects of assembly, while still writting pure assembly... well, for the most part. There's some C-like sugar that's just too convenient for me not to include.
(x,y)=*F arg0,argN. This piece of shit is the distillation of my very profound meditations on fuckerous thoughtlessness, so let me break it down:
- (x,y)=; fuck you in the ass I can return as many values as I want. You dont need the parens if theres only a single return.
- *F args; some may have thought I was dereferencing a pointer but Im calling F and passing it arguments; the asterisk indicates I want to jump to a symbol rather than read its address or the value stored at it.
To the virtual machine, this is three instructions:
- bind x,y; overwrite these values with Fs output.
- pass arg0,argN; setup the damn parameters.
- call F; you know this one, so perform the deed.
Everything else is generated; these are macro-instructions with some logic attached to them, and theres a step in the compilation dedicated to walking the stupid program for the seventh fucking time that handles the expansion and optimization.
So whats left? Ah shit, classes. Disinfect and open wide mother fucker we're doing OOP without a condom.
Now, obviously, we have to sanitize a lot of what OOP stands for. In general, you can consider every textbook shit, so much so that wiping your ass with their pages would defeat the point of wiping your ass.
Lets say, for simplicity, that every program is a data transform (see: computation) broken down into a multitude of classes that represent the layout and quantity of memory required at different steps, plus the operations performed on said memory.
That is most if not all of the paradigm's merit right there. Everything else that I thought to have found use for was in the end nothing but deranged ways of deriving one thing from another. Telling you I want the size of this worth of space is such an act, and is indeed useful; telling you I want to utilize this as base for that when this itself cannot be directly used is theoretically a poorly worded and overly verbose bitch slap.
Plainly, fucktoys and abstract classes are a mistake, autocorrect these fucking misspelled testicle sax.
None of the remaining deeper lore, or rather sleazy fanfiction, that forms the larger cannon of object oriented as taught by my colleagues makes sufficient sense at this level for me to even consider dumping a steaming fat shit down it's execrable throat, and so I will spare you bearing witness to the inevitable forced coprophagia.
This is what we're left with: structures and procedures. Easy as gobblin pie.
Any F taking pointer-to-struc as it's first argument that is declared within the same namespace can be fetched by an instance of the structure in question. The sugar: x ->* F arg0,argN
Where ->* stands for failed abortion. No, the arrow by itself means fetch me a symbol; the asterisk wants to jump there. So fetch and do. We make it work for all symbols just to be dicks about it.
Anyway, invoking anything like this passes the caller to the callee. If you use the name of the struc rather than a pointer, you get it as a string. Because fuck you, I like Perl.
What else is there to discuss? My mind seems blank, but it is truly blank.
Allocating multitudes of structures, with same or different types, should be done in one go whenever possible. I know I want to do this, and I know whichever way we settle for has to be intuitive, else this entire project has failed.
So my version of new always takes an argument, dont you just love slurping diarrhea. If zero it means call malloc for this one, else it's an address where this instance is to be stored.
What's the big idea? Only the topmost instance in any given hierarchy will trigger an allocation. My compiler could easily perform this analysis because I am unemployed.
So where do you want it on the stack on the heap yyou want to reutilize any piece of ass, where buttocks stands for some adequately sized space in memory -- entirely within the realm of possibility. Furthermore, evicting shit you don't need and replacing it with something else.
Let me tell you, I will give your every object an allocator if you give the chance. I will -- nevermind. This is not for your orifices, porridges, oranges, morpheousness.
Walruses.16 -
Just completed a 24 hour hackathon at my school in which the 'best software' winner purely had mock ups of yet another mobile app and had no proof of concept. Meanwhile my team developed a scaling platform online that adapts to groups of user's trends to create optimal results.
I guess I keep misreading the definition of 'software' in the dictionary each morning. (RULE #8.2 - Software Engineers shall read the definition of the following phrases each morning excluding Saturday: software, heap, ego, scrum, algorithm, the documentation of C)4 -
!rant
Opend up my first website project, commits goes back to jan 24 2013 but i think i started coding this project around late 2011 (version 2).
Made with php and i found some interesting TODO's and other stuff, over 1k of handwritten css and right above 10k lines of PHP.
Index.php everywhere (no mod rewrite)
Everything in the www root.
By pixel css.
Thank god this is my own website and not for someone else, think i would be tourtured to death if someone had to maintain this heap of shit. To think of i probobly spent around 1000 hours on all iteration. -
Back in 2004-2005 when I was 2-3 years old, (I guess that, from this statement, the fact that I'm 15 rn can be inferred), I would sit on my dad's dinosaur computer. I don't remember brands and stuff, just Windows XP, Dial-up internet and the heap of CD-ROMs I had my parents buy me. They had all kinds of games, software, etc. It was a time when sharing that kind of stuff over the internet was, to say the least, impractical. It kind of makes me feel older than I am, looking at the cases full of those CDs, remnants of a past era. But what I consider my first actual exposure was in 2007, when I got my first laptop (netbook) and started diving in, exploring. It was the computer through which I learnt programming (My first lang was cpp), and the one that got me interested to dive deeper into the matter.
-
!Rant
So . . . for the first time ever I feel like I'm a part of something I genuinely care about. I'm a Unity3D VR developer, albeit for a small company, which has me in and out of VR constantly most days as I test things. Pretty cool right?
Well here's the thing. For me . . . what I do is trivial in meaning. I love what I do, don't get me wrong, but what's so good about what I do, is that I am a valued team member. My opinion is heard, I am given freedom to innovate, and most importantly I am allowed to create!
So what did I do today? I started building a UI framework for Unity3D, the beginning of which dynamically binds zenject signals to UI elements, like a button's onClick for example. If anyone here has worked with Unity3D you probably can attest to the festering heap of dogs vomit that is Unity UI....2 -
I think the Golang serialization API is utter garbage.
By convention it usually looks like this,
MarshalFormat() ([]byte,error)
UnmarshalFormat([]byte) error
This means that all serialization and deserialization is done on, heap allocated, in memory buffers ( technically also mmaped files, but thats not cross platform).
As the Go GC is ruthlessly optimized for minimum latency, this can potentially cause memory leaks in long running applications.
I think we need a new serialization API that looks more like
SerializeFormat(io.Writer) error
DeserializeFormat(io.Reader) error3 -
Why TF does nodejs just eats 100mb of ram away for a simple application with ONE websocket connection ? I've tried getting some heap snaps, memory allocation timelines and used memwatch-next, but to no result AT ALL! Since the heap stay small but the rss memory grows like there is no tomorrow.
-
It's nice that more and more languages are introducing async/await syntax, but by the example of Rust in particular I'm starting to wonder why we don't instead introduce this syntax for monads in general?
We could have a keyword (say, `bind`) which unwraps a value from any monad provided that the return value of the function is wrapped in the same monad. The ? operator does something a little similar, and I'll be intrigued whether it can actually be implemented for monads other than Result and Option once GATs are stabilized. In particular in the case of Rust, it would be possible to create a reference counting monad for heap-bound management of objects derived from references.9 -
The "Outline" view in VSCode is useless
It shows too many nodes too deep so it looks like a giant heap of everything7 -
Spent half an hour auditing my code coz there were Out of Memory errors
Decide to profile it, the top 3 highest heap hoggers were from StartApp :v -
Rust noob Q:
Given x a variable on the heap, e.g.
let x = String::from("Hello, devRant!");
Then, given some function that I didn't write (from a library) that takes ownership of its argument:
fn some_function(y: String) -> bool { ... }
How would you handle this situation:
if some_function(x) {
another_function(x); // not ok, because x has gone out of scope in the line before
}
Is it idiomatic to just clone() x in the first call? That seems bad practice, because it's the second (or some other additional) call that needs x. What should I be doing instead?8 -
I have a very basic question regarding strings in Java..I am not getting the clear explanation any where..
1. When the string is created with new operator, will it be stored only on heap or on both heap and string pool??
2. When I create a string like
s1="123";
s2=s1+"5";
What would happen at the second step??
a. will it put 1235 in the string literal pool??
b.Will it create a new string 5 in the literal pool??
please answer buddies.4 -
Android Studio is amazing until it freezes, then I immediately get pissed off and change my mind!!
I'm running a goddamn macbook that's less than a year old, has more than enough balls to handle it on top of it having an SSD. Besides my iOS emulator running with Android Studio I have nothing else open!!! Is AS's heap size set too small maybe?? I've been running linux for so lomg because I couldn't afford a Mac, and up until this point it's amazing!!! I just think AS likes to be a pile of shit sometimes.2 -
I need to tell you the story of my MOAB (Mother of all bugs).
I need to write some stuff in C (which i am fairly used to) and have a function that allocates memory for a Matrix on the heap. The matrix has a rows and columns property and an associated data array, so it looks like this
struct Matrix{
uint8_t rows;
uint8_t columns;
uint8_t data[];
}
I allocate rows*columns + 2 bytes of memory for it.
I also have a function to zero it out which does something like this
for(int i=0; i < rows*columns;i++){
data[i]=0;}
Let‘s come to the problem:
On my Mac the whole stuff works and passes all tests. We tried the code on a Linux machine and suddenly the code crashed in various places, sometimes a realloc got an invalid pointer, sometimes free got an invalid pointer and basically the code crashed at arbitrary points randomly.
I was confused af because did i really make THAT many errors?
I found out that all errors occured when testing my matrices so i looked more into it and observed it through the debugger.
Eventually i came to the function that zeroes out my matrix and it went unusually high and wondered if my matrix really was that big.
Then i saw it
The matrix wasn‘t initialised yet
It had arbitrary data that was previously in the heap.
It zeroed out a huge chunk of the heap space.
It literally wrote a zero to a shitload of addresses which invalidated many pointer.
You can imagine my facepalm2 -
After fixing content and workbox issues for 5 hours today in Sitecore, a hot trash heap of a CMS, I actually caught myself looking forward to using WordPress later. Yeah, I just said that, let that sink in.
Sitecore 8.1 is frustrating to say the least.1 -
GitHub is down. Unlucky client, guess I have a *really* good excuse not to push that scope-creeped heap of a new frontend. Because apparently 'those "small changes" you've made to the Sketch file are in fact entirely new uses of the data structures' wasn't good enough.
-
Practicing some random code interview questions while not busy.
Find top N values with MaxHeap in JS
Didn’t get it right in 1st try. Something wrong with the replace function. Then started getting busy...
At the end of the day, still didnt have a chance to fix it.
God damn it! It’s me. A frontend developer can’t write MaxHeap in JavaScript 🤦♂️ -
They tried to mark him, they even tried compacting him and his children, but this old generation instance is not going down without a fight. He’s in a big heap of trouble, and he’s running out of time. You better count your references, because this summer’s stop-the-world event will have you staying at work all night: Memory Leak: Production is in your code NOW
-
Completely fed up today, trying to investigate a memory leak using google chromes profiling tools, first of all all the "documentation" is well out of date so you have to pretty much guess your way through it.
Anyway i start to investigate and it looks like the JS Heap increases in size only after a garbage collection, surely this is the wrong way round or am i just being stupid2 -
Often when i see the annoying as hell t debug exceptionless let’s just bomb entirely but blazing fastness of c and c++ I feel like a nettard
I use c# for its immutable strings clean syntax and beautiful class markers that are redundant compared to c++ but ensure you tell after adding 1000 methods and total lack of all special characters to indicate reference and derreference and pretty lambda syntax... sure it’s lib poor but I get shit done goddamn it and can read my own code later
So why do I feel empty inside every time i run a ./configure and make under Linux like I’m missing some secret party where neat things are being done and want to sob like I do now
I am not a dotnettard even though 5.0 is an abomination in the eyes of man and god ! Even though Microsoft cooks up overcomplex framework technologies that make a wonderful language underused and make us all look like idiots that they then abandon into the scrap heap! We can’t help Linux users haven’t discovered how much nicer c# is and decided to implement it on their own and port their horrible undocumented ansi c bullshit can we ???? Oh god I feel
So hollow inside and betrayed ! Curse
You gates curse youuuu! Curse you for metro direct3d xna wpf then false promises of core ! May you have a special place in hell reserved for you and your cheap wallpaper shifting monitor paintings and a pool speaker that playeth not but bee jees and ac dc forever and ever amen !
Speaking of which do any c/c++ ides have anything that even begins to rival intellisense on Linux and don’t use some weird ass build system
Like cmake as their default ?
Oh sweet memories of time a while back when I already wrote this and still wasn’t getting then tail I deserved
Again4 -
Too many “helpful” people, as well as counselors, said the wrong things to me early on. These people https://loveawake.com/free-online-d... really do not understand the harm they heap upon the injured. I am convinced that our second marriage counselor was a cheater himself. He talked A LOT about himself, bragged about his education (narcissist), mentioned his stepkids often, and drove something that screamed midlife crisis (same as my cheating husband).
<p><img src="https://cdn.pixabay.com/photo/2016/..." width="880"></p>
Yeah, pretty sure he was a cheater living in a second marriage. Only saw that counselor twice, but I got the feeling his main purpose was to defend the guilty (when he wasn’t talking about himself). Kept saying we needed to make sure our children did not look at the cheating husband in a bad light. Huh? Had he not listened to anything we said? I had already told him of how I suffered from the Gaslighting (even though I didn’t know that term at the time).
My husband had convinced me, our children, extended family, and his coworkers that I was insane. I had been spinning in a state of confusion for the last six months of the affair, knowing he had to be cheating, but being made to question my sanity. Our two adult sons came to me repeatedly during the affair to scold me for my behavior during our 24 year marriage. I would just cry and didn’t know what to say to them. He never gaslighted our younger daughter directly, but he did lure her away from me, with movie dates, trips to concerts and theme parks. If I pressed to go, he would tell me things like, you don’t enjoy those things, or we can’t afford a third ticket, but you can take her instead of me if you like. Of course, I always backed down. He knew I would. Wow, he makes well into six figures, and I bought that?! Maybe I WAS crazy. It was as though he was playing single dad while still living with and sleeping with his wife. My daughter and I had always been close before this. And he would conduct horrible screaming fights right in front of her. I would stand there confused, because it felt like the heat level did not match the situation.
I had known this man most of my life, and I did not recognize him. To this day, I am angry with myself for withdrawing and not taking action sooner. I know that my relationship with my children will never, ever be the same. This selfish man destroyed the innocents, destroyed what had been a close-knit family. So yeah, that is what our cheating-man counselor should have been talking about. In our situation, the betrayed spouse needed reputation repair, not the cheater. The kids needed to see that I did not cause their father to stray. And I needed serious mental health counseling. I am still furious at that counselor. Waste of money. He owes us a $200 refund!1 -
Does the Go GC move heap-objects?
I found some articles that say it does, but in the sync package, there is the copyChecker type, which could only work if the GC never moves memory.6 -
I need to monitor the off heap memory of a spark on yarn application (executors, mostly) running in Java. Any tool/method that someone could suggest?
-
I wrote a small crate that does unsafe operations, please help me verify its soundness: https://github.com/lbfalvy/bound
(Also I think you'll like it, I'm solving a fairly abstract problem that's not possible in safe Rust)
It's essentially a struct that ties together a heap reference and a struct that's constructed from it. The main use case is to return lock guards derived from Arc<Mutex> but it's defined in a very abstract way intentionally because I'm using Marc from mappable-rc and async-std's RwLock and I didn't want this to depend on either crate.
It actually has no dependencies apart from STD (I think this one may be unavoidable) -
Any Elasticsearch gurus here? I have a box with too many young gen GCs (one per 2 or 3 seconds), and irregular, very long old gen GCs (One per several hours, taking around a minute and freeing about 2/3's of the old gen space) -- I was thinking changing the new gen ratio from 2/3 to something like 3/4 or 4/5.
However, after reading an elastic article about settings to never touch... I'm no longer so sure...
Only other option I was considering is going from CMS to G1GC to cut back on the old gen GC time... A minute long downtime for Elastic is rather problematic.
Any thoughts? The box is rather old - running Elastic 5.6 with 20 GBs of heap, 207 shards and 306k docs.2 -
Thought that it might be a good idea to ask this question here.
Im looking for a nice logging events service for a side project that is a b2b (so my clients got their own users). My targets are tracking users behavior/events/actions in the app while been able to shred the data that belongs to each customer. A great benefit would be having a solution that would allow me to export part of the data (in sql like way) so i could provide the users the option to download their users data as well.
Was thinking about mixpanel but i dont think they have any option to export the data via api. Heap analytics is also an interesting one, but their nice features are limited to corporates..
Any suggestions? Thanks!4 -
At old e-commerce job, some orders were coming through with most of the shipping info missing. The only info filled out was the State. When we looked at Heap, we could see the user was filling in those fields. There was both frontend and backend validation for required form data, so the user shouldn’t have been able to checkout without an address.
When I looked at the BE logic, I saw addresses were retrieved from our database by using a method called GetOrCreateDefaultAddress. When the website couldn’t find the address in the db, it created a new one where the only address field that was filled in was the state.
Unfortunately, this default address creation was happening after the submit button had been hit. There was no logic to validate the address this late in the checkout because the earlier form validation in the process should have caught this.
The orders did have email addresses, so customer service did have a way to contact the customer. I have no idea what happened to the user’s address. Was it never saved? Did it get caught up in a cron job to delete old users and addresses from the db??1 -
At what point has vscode's remote development gone from the best feature of the entire editor to barely functioning heap of shit?7
-
Dynamic/Dynamically is used WAY to much in programming. What part of programming is NOT dynamic?
https://dictionary.com/browse/...
Depending upon your interpretation of the definition it can just mean: moving parts. Programming is all about moving parts.
I see things like "dynamically allocated array". Wtf does that even mean? (I get it, most likely means on heap) Say it specifically: it was allocated on the stack or the heap.
Apparently some people are just more energetic in their programming...
It becoming a really overused buzzword...8 -
Dependability is a fundamental more modest than common expertise for bosses
New managers a significant part of the time feel that since they have been raised to the heap up they ought to know everything immediately. Truly, it anticipates that adventure should gain capacity with the association styles and approaches that turn out to be cruel for your social affair. Being flexible and being open to the bewildering will assist you with changing into a useful manager. A Roman scientist named NURS FPX 4000 Assessment 4 Analyzing a Current Health Care Problem or Issue Seneca is credited with saying, "Karma slants toward the coordinated." And while karma can earnestly play a consider life, all that verifiably pivots around orchestrating yourself for when incredible karma comes your bearing. Excellent affiliations do this by orchestrating themselves for an entrance through status and planning.
Plan for disappointment and goofs - it's really clever to expect them a lot early so you can lessen the effect. A SWOT assessment (Qualities, Shortcomings, Anticipated open doorways and Risks) is an important instrument for this. The more you plan for a social event the more useful it will be. Approach saves time by lessening blunders, forestalling re-work and shortening works out. And it in addition decreases pressure, which is overall something that would justify being thankful for! Other than being a NURS FPX 4010 Assessment 1 Collaboration and Leadership Reflection Video State financed School English educator, Kine is in this way the head of Ryan Search & Directing and facilitates Held Supervisor Pursue, Help and Drive New turn of events. His clients range different undertakings from Headway to Monetary Associations.
Whether an overwhelming event, network prosperity break or stock association disrupting impact, astounding occasions can emerge whenever. Being available to the unexpected assists you with finding sure results and make depend with your partners. One strategy for doing this is to remain mindful of vulnerability, where you proceed with like the circumstance is both customary and novel. This assists you with expanding your NURS FPX 4010 Assessment 3 Interdisciplinary Plan Proposal data affirmation and seek after the most ideal choice. ClickUp's Business Development Plan Configuration is an incredible contraption for planning the normal and the unforeseen!
Dependability is an essential limited scope ability for bosses to make. Supervisors should be ready to have authentic two-way discussions with specialists and should endeavor to get themselves when they are concealing reality or lying. Fair correspondences among supervisors and representatives can assist with fostering a positive work environment culture and can expect a fundamental part in the connection's prospering. While giving investigation, supervisors ought to convey NURS FPX 4020 Assessment 1 Enhancing Quality and Safety both the positive and negative parts of a representative's show. They ought to in addition have the decision to give obliging assessment and backing workers when essential. This correspondence style is as frequently as conceivable implied as moderate candor.
MORE
Instagram is a powerful tool for businesses
The best digital marketing agencies
Instagram is an amazing asset for businesses