Tumgik
#frequently questioned answers
kremlin · 8 months
Note
How DOES the C preprocessor create two generations of completely asinine programmers??
oh man hahah oh maaan. ok, this won't be very approachable.
i don't recall what point i was trying to make with the whole "two generations" part but ill take this opportunity to justifiably hate on the preprocessor, holy fuck the amount of damage it has caused on software is immeasurable, if you ever thought computer programmers were smart people on principle...
the cpp:
Tumblr media Tumblr media Tumblr media
there are like forty preprocessor directives, and they all inject a truly mind-boggling amount of vicious design problems and have done so for longer than ive been alive. there really only ever needed to be one: #include , if only to save you the trouble of manually having to copy header files in full & paste them at the top of your code. and christ almighty, we couldn't even get that right. C (c89) has way, waaaay fewer keywords than any other language. theres like 30, and half of those aren't ever used, have no meaning or impact in the 21st century (shit like "register" and "auto"). and C programmers still fail to understand all of them properly, specifically "static" (used in a global context) which marks some symbol as inelligible to be touched externally (e.g. you can't use "extern" to access it). the whole fucking point of static is to make #include'd headers rational, to have a clear seperation between external, intended-to-be-accessed API symbols, and internal, opaque shit. nobody bothers. it's all there, out in the open, if you #include something, you get all of it, and brother, this is only the beginning, you also get all of its preprocessor garbage.
this is where the hell begins:
#if #else
hey, do these look familiar? we already fucking have if/else. do you know what is hard to understand? perfectly minimally written if/else logic, in long functions. do you know what is nearly impossible to understand? poorly written if/else rats nests (which is what you find 99% of the time). do you know what is completely impossible to understand? that same poorly-written procedural if/else rat's nest code that itself is is subject to another higher-order if/else logic.
it's important to remember that the cpp is a glorified search/replace. in all it's terrifying glory it fucking looks to be turing complete, hell, im sure the C++ preprocessor is turing complete, the irony of this shouldn't be lost on you. if you have some long if/else logic you're trying to understand, that itself is is subject to cpp #if/#else, the logical step would be to run the cpp and get the output pure C and work from there, do you know how to do that? you open the gcc or llvm/clang man page, and your tty session's mem usage quadruples. great job idiot. trying figuring out how to do that in the following eight thousand pages. and even if you do, you're going to be running the #includes, and your output "pure C" file (bereft of cpp logic) is going to be like 40k lines. lol.
the worst is yet to come:
#define #ifdef #ifndef (<- WTF) #undef you can define shit. you can define "anything". you can pick a name, whatever, and you can "define it". full stop. "#define foo". or, you can give it a value: "#define foo 1". and of course, you can define it as a function: "#define foo(x) return x". wow. xzibit would be proud. you dog, we heard you wanted to kill yourself, so we put a programming language in your programming language.
the function-defines are pretty lol purely in concept. when you find them in the wild, they will always look something like this:
#define foo(x,y) \ (((x << y)) * (x))
i've seen up to seven parens in a row. why? because since cpp is, again, just a fucking find&replace, you never think about operator precedence and that leads to hilarious antipaterns like the classic
#define min(x,y) a < b ? a : b
which will just stick "a < b ? a: b" ternary statement wherever min(.. is used. just raw text replacement. it never works. you always get bitten by operator precedence.
the absolute worst is just the bare defines:
#define NO_ASN1 #define POSIX_SUPPORTED #define NO_POSIX
etc. etc. how could this be worse? first of all, what the fuck are any of these things. did they exist before? they do now. what are they defined as? probably just "1" internally, but that isn't the point, the philosophy here is the problem. back in reality, in C, you can't just do something like "x = 0;" out of nowhere, because you've never declared x. you've never given it a type. similar, you can't read its value, you'll get a similar compiler error. but cpp macros just suddenly exist, until they suddenly don't. ifdef? ifndef? (if not defined). no matter what, every permutation of these will have a "valid answer" and will run without problem. let me demonstrate how this fucks things up.
do you remember "heartbleed" ? the "big" openssl vulnerability ? probably about a decade ago now. i'm choosing this one specifically, since, for some reason, it was the first in an annoying trend for vulns to be given catchy nicknames, slick websites, logos, cable news coverage, etc. even though it was only a moderate vulnerability in the grand scheme of things...
(holy shit, libssl has had huge numbers of remote root vulns in the past, which is way fucking worse, heartbleed only gave you a random sampling of a tiny bit of internal memory, only after heavy ticking -- and nowadays, god, some of the chinese bluetooth shit would make your eyeballs explode if you saw it; a popular bt RF PHY chip can be hijacked and somehow made to rewrite some uefi ROMs and even, i think, the microcode on some intel chips)
anyways, heartbleed, yeah, so it's a great example since you could blame it two-fold on the cpp. it involved a generic bounds-checking failure, buf underflow, standard shit, but that wasn't due to carelessness (don't get me wrong, libssl is some of the worst code in existence) but because the flawed cpp logic resulted in code that:
A.) was de-facto worthless in definition B.) a combination of code supporting ancient crap. i'm older than most of you, and heartbleed happened early in my undergrad. the related legacy support code in question hadn't been relevant since clinton was in office.
to summarize, it had to do with DTLS heartbeats. DTLS involves handling TLS (or SSLv3, as it was then, in the 90s) only over UDP. that is how old we're talking. and this code was compiled into libssl in the early 2010s -- when TLS had been the standard for a while. TLS (unlike SSLv3 & predecessors) runs over TCP only. having "DTLS heartbeat support in TLS does not make sense by definition. it is like drawing a triangle on a piece of paper whose angles don't add up to 180.
how the fuck did that happen? the preprocessor.
why the fuck was code from last century ending up compiled in? who else but!! the fucking preprocessor. some shit like:
#ifndef TCP_SUPPORT <some crap related to UDP heartbeats> #endif ... #ifndef NO_UDP_ONLY <some TCP specific crap> #endif
the header responsible for defining these macros wasn't included, so the answer to BOTH of these "if not defined" blocks is true! because they were never defined!! do you see?
you don't have to trust my worldview on this. have you ever tried to compile some code that uses autoconf/automake as a build system? do you know what every single person i've spoken to refers to these as? autohell, for automatic hell. autohell lives and dies on cpp macros, and you can see firsthand how well that works. almost all my C code has the following compile process:
"$ make". done. Makefile length: 20 lines.
the worst i've ever deviated was having a configure script (probably 40 lines) that had to be rune before make. what about autohell? jesus, these days most autohell-cursed code does all their shit in a huge meta-wrapper bash script (autogen.sh), but short of that, if you decode the forty fucking page INSTALL doc, you end up with:
$ automake (fails, some shit like "AUTOMAKE_1.13 or higher is required) $ autoconf (fails, some shit like "AUTOMCONF_1.12 or lower is required) $ aclocal (fails, ???) $ libtoolize (doesn't fail, but screws up the tree in a way that not even a `make clean` fixes $ ???????? (pull hair out, google) $ autoreconf -i (the magic word) $ ./configure (takes eighty minutes and generates GBs of intermediaries) $ make (runs in 2 seconds)
in conclusion: roflcopter
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ disclaimer | private policy | unsubscribe
160 notes · View notes
dontfuckmylifewtf · 2 years
Text
No matter how weird the questions are that Neil Gaiman gets (or for the matter we see because he answered them), I would like to remind everyone, that having around 80.000 asks in your inbox gives you a lot to choose from.
Meaning, that Neil Gaiman probably actively chooses from these 80.000 questions what he answers.
So for the love of god, stop bullying the people asking "cringe" questions. They probably didn't expect to get an answer anyways, and Neil chose to answer them.
5K notes · View notes
sweetgaleria · 1 year
Text
Help a college student graduate by answering a survey!!
Hey!! Are you over 18 and in the miraculous fandom? Then this is for you!!
Hi everyone, this is my last semester of uni, and one of my final projects to be able to graduate is to write a scientific paper. I'm writing an article about adult fans of children's animation, specifically Miraculous Ladybug. My goal is to understand what makes adults (like us) want to join fandoms centered around shows aimed primarily at children, and to do that I'd love to hear directly from the source! The survey takes around 10 minutes to answer, it's 100% anonymous and it would help me immensely!
>>Click here for the survey<<
I need at least 30 people to answer, but honestly the more the merrier! I've also made a little thank you gif at the end, so if you see it let me know! If you have any questions feel free to send me an ask, as well!
Please reblog so it can reach more people! Thank you so much!
828 notes · View notes
sergle · 6 months
Note
please elaborate on the though about stealing a dog post
okay hear me out. and this is for small rural towns specifically. you know when you see that someone has a dog tied out in their yard (unfenced yard) (cute dog) (alone) and it's like a little puppy. and or. clearly a dog that is not meant to be a Yard Dog. like it's a pretty dog of a breed that's like, this is some long-haired fluffy breed of Something that is so not a keep-outside kind of dog. or just a really sweet dog that clearly needs more attention. you know. you know. and do you know when you're like. I could just take that dog....... my city now...... this could just be my dog now...............
201 notes · View notes
brinconvenient · 1 year
Text
How to Have ADHD
1) Be walking around
2) Think or say “Oh, when I sit down at the computer, I should [do thing that involves being on a computer/look up thing I’m curious about/send message that I need to send]!”
3) sit down at computer
4) Absolutely do not do thing in Step 2. Forget that you EVER had a thought resembling Step 2. Do many other things instead on the computer.
5) Stand up and walk away from computer
6) Go to Step 2.
536 notes · View notes
brother-emperors · 3 months
Note
hi!! i’m a classics major and am so entranced by your art and how you interact with history and literature, it really inspires me and expands my brain all the time. SO spicy.
anyways, I was wondering if you’d be comfortable talking a bit about your degree (s) and how they’ve influenced your artistic/critical analytical processes??
oh man, I have exactly zero degrees. like a true jester, I went to a trade art school, so I don't even have an art related degree, I've got a certification of surviving hell completion
the way art and history interact for me is that a lot of it circles back to trying to find ways to talk about something. history doesn't necessarily repeat, but it often rhymes, haunts, and cannibalizes. some eras of history are equal parts history and a stage, and a stage serves as a place to say something without necessarily having to be in it. the bossism politics of the philippines rhymes with the faction politics of the late republic more often than it doesn't. watching the marcoses crawl back into power was like watching the medici return to florence. duterte said he was like julius caesar crossing the rubicon, and over 6,000 were murdered under his regime. somethings are the same.
a lot of it feels like a puzzle, and I like it when pieces come together. more often than not, there's something current going on that prompts me to look back into history for something comparable, either as a stage, or just to feel like I'm not losing my mind, that other people had to deal with this shit too.
I was a teenager when the original assassin's creed games were coming out, and I used to go to libraries with other fans and we'd just sit in the non fiction sections and read everything that was on a shelf, and then go outside or whatever and start talking about where the games diverged from history and try to figure out what the next game would do based on whatever we learned. and I just kind of. kept doing that even when I stopped playing the games because the story sucked ass, but because there's already a second intersection of fiction working along side historical analysis, it unlocks a bunch of other stuff in the back of my mind while I take notes on something.
the gore you read in the thebaid reminds me a lot of imperial chines torture literature, and now we've got imperial horror and while we've moved out of the ancient Mediterranean but it's a whole body of work that I'm now looking at while thinking about rome, and somewhere in there, I'll probably find some literary theme that's cool and I'll start researching whether or not someone's examined like. the renaissance from that lens. what does the gore mean. what happens when history unfairly maligns and scapegoats someone. what happens when a foundational sacrifice goes wrong.
one of the most gut wrenching things I ever read was about how rome took any record of spartacus' words and buried it, and now I spend too much time thinking about what words we put in the mouths of dead people.
78 notes · View notes
strangegutz · 4 months
Note
How do you sell the dolls? I’m not asking where or about pricing, but how do you prevent getting attached and wanting to keep them? That’s what I struggle with. I’d love to sell my creations, but after a while of working on them I get so attached. Do you ever experience this, and if so what do you do to prevent it? Thanks in advance, and have a wonderful day.
(If you don’t ever deal with this/don’t have advice feel free to ignore this of course)
This is a good question! I think a good thing to do is make sure you're making stuff for yourself occasionally. It won't cure the urge to keep other things you've made, but itll help a bit. And sometimes, after keeping something on a shelf for a while, you might decide it's time to move it on. I think that making a handful of dolls with the same general concept, take my witch cats for example, you could convince yourself to just keep your favorite and sell the rest. There's also asking the question, "do I want this forever, or did I just spend a lot of time with it and am used to it being around" which gets easier to answer (either way!) the more things you make, in my opinion.
I'm a little weird with how I create dolls that makes it kinda easy for me to sell them (this isn't advice but just what goes on with me) The things that are fun for me to make are not usually the things I care to keep. There's something very satisfying about making a cute pink creature with a frilly dress full of texture, but it's not something I care to put on my shelf. Kinda like having the fun of building a Lego set then not knowing what to do with it after. You'll notice I make a lot of cutesy or fanciful dolls, like kitties, rabbits, lemon slices, but I keep things like giant spider women and a rat that looks like Siouxsie Sioux.
There's also the weird problem I have, where knowing that I made something makes me like it less, but that's just my own hang up haha
Maybe as you go, you can find something that's fun for you to make and explore, but doesn't spin your gears in the way more personal projects can?
68 notes · View notes
koboldfactory · 5 months
Note
Do the kobolds have a union?
Yes the kobolds have a union
Yes it’s very strong
Yes I have been asked this like 2 dozen times lol
80 notes · View notes
Text
my last brain cell at any given moment:
140 notes · View notes
saturncoyote · 4 months
Text
Tumblr media
Epic new pinned post with cool new info on it btw
42 notes · View notes
kremlin · 8 months
Note
could you explain for the "it makes the game go faster" idiots like myself what a GPU actually is? what's up with those multi thousand dollar "workstation" ones?
ya, ya. i will try and keep this one as approachable as possible
starting from raw reality. so, you have probably dealt with a graphics card before, right, stick in it, connects to motherboard, ass end sticks out of case & has display connectors, your vga/hdmi/displayport/whatever. clearly, it is providing pixel information to your monitor. before trying to figure out what's going on there, let's see what that entails. these are not really simple devices, the best way i can think to explain them would start with "why can't this be handled by a normal cpu"
a bog standard 1080p monitor has a resolution of 1920x1080 pixels, each comprised of 3 bytes (for red, blue, & green), which are updated 60 times a second:
Tumblr media
~3 gigs a second is sort of a lot. on the higher end, with a 4k monitor updating 144 times a second:
Tumblr media
17 gigs a second is definitely a lot. so this would be a good "first clue" there is some specialized hardware handling that throughput unrelated the cpu. the gpu. this would make sense, since your cpu is wholly unfit for dealing with this. if you've ever tried to play some computer game, with fancy 3D graphics, without any kind of video acceleration (e.g. without any kind of gpu [1]) you'd quickly see this, it'd run pretty slowly and bog down the rest of your system, the same way having a constantly-running program that is copying around 3-17GB/s in ram
it's worth remembering that displays operate isochronously -- they need to be fed pixel data at specific, very tight time timings. your monitor does not buffer pixel information, whatever goes down the wire is displayed immediately. not only do you have to transmit pixel data in realtime, you have to also send accompanying control data (e.g. data that bookends the pixel data, that says "oh this is the end of the frame", "this is the begining of the frame, etc", "i'm changing resolutions", etc) within very narrow timing tolerances otherwise the display won't work at all
3-17GB/s may not be a lot in the context of something like a bulk transfer, but it is a lot in an isochronous context, from the perspective of the cpu -- these transfers can't occur opportunistically when a core is idle, they have to occur now, and any core that is assigned to transmit pixel data has stop and drop whatever its doing immediately, switch contexts, and do the transfer. this sort of constant pre-empting would really hamstring the performance of everything else running, like your userspace programs, the kernel, etc.
so for a long list of reasons, there has to be some kind of special hardware doing this job. gpu.
instead of calculating every pixel value manually, the cpu just needs to give a high-level geometric overview of what it wants rendered, and does this with vertices. a vertex is very simple, it's just a point in 3D space, for example (5,2,3). just like a coordinate grid on paper with an extra dimension. with just a few vertices, you can have models like this:
Tumblr media
where each dot at the intersection of lines in the above image, would be a vertex. gpus essentially handle huge number of vertices.
in the context of, like, a 3D video game, you have to render these vertex-based models conditionally. you're viewing it at some distance, at some angle, and the model is lit from some light source, and has perhaps some shadows cast across it, etc -- all of this requires a huge amount of vertex math that has to be calculated within the same timeframes as i described before -- and that is what a gpu is doing, taking a vertex-defined 3D environment, and running this large amount of computation in parallel. unlike your cpu which may only have, idk, 4-32 execution cores, your gpu has thousands -- they're nowhere near as featureful as your cpu cores, they can only do very specific simple math with vertices, but there's a ton of them, and they run alongside each other.
so that is what a gpu "does", in as few words as i can write
the things in the post you're referring to (V100/A100/H100 tensor "gpus") are called gpus because they are also periperal hardware that does a specific kind of math, massively, in parallel, they are just designed and fabricated by the same companies that make gpus so they're called gpus (annoyingly). they don't have any video output, and would probably be pretty bad at doing that kind of work. regular gpus excel at calculating vertices, tensor gpus operate on tensors, which are like matrixes, but with arbitrary numbers of dimensions. try not to think about it visually. they also use a weirder float. they're used for things like "artificial intelligence", training LLMs and whatever, but also for real things, like scientific weather/economy/particle models or simulations
they're very expensive because they cost the same, if not more, than what it cost to design & fabricate regular video gpus, but with a trillionth of the customer base. for every ten million rat gamers that will buy a gpu there is going to be one business buying one A100 or whatever.
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ disclaimer | private policy | unsubscribe
166 notes · View notes
logictxt · 5 months
Note
Can you give us the option to hug Rigel & Vega <3
(/SILLY)
I see the tone tag but you're not the first (or probably the last) to ask me this!!
short silly answer to your ask specifically: you're stuck with hugging your display X)
long less silly answer about this type of questions in general: aster is done and won't get new features, only some tweaks and quality of life stuff at most. additionally hugging/kissing/giving items just doesn't fit with my vision of them being like Actual virtual assistants in a fish out of water scenario. i was told before that other ukagaka have those features and I just. Do Not Care (not mad), as Aster isn't other ukagaka
22 notes · View notes
iris-jaxx665 · 4 months
Note
is your family aware of your collar, and its meaning?
as i answer this im sitting next to my brother, and His submissive just left for work.
my foster dad took me rope shopping when i lived with that family so i could practice my knots.
my contract hangs proudly in a frame in our home.
i call my Mate by all of His titles when i speak to Him, and i rarely speak His name to anyone else.
my entire family was at my wedding. right here:
Tumblr media Tumblr media Tumblr media
that is my family. my husband, and my brother. thats all the family i have.
and now, my brother has His own little Mate. He calls her His Vixen, and i call her Bunny. and this being our first holiday all together in our newest home, we’re all very proud and glad to welcome her to our family!
14 notes · View notes
queenlucythevaliant · 8 months
Text
I hereby declare the US postal service my eternal enemy
22 notes · View notes
theoldaeroplane · 6 months
Text
(pawing through the Hallmark cards) (muttering) where's the "i scored over my dr's diagnostic criteria for PTSD" section?
15 notes · View notes
throttlegainwell · 5 months
Text
Since I've been talking about so many heavy fics lately, figured I'd share a fun, porny Jancy WIP snippet:
[Rated E]
“Really?” His eyebrows were up somewhere near his hairline, running north to Canada, practically. This hadn’t happened a lot before, but to say it was a first would be generous. Did she get like this every time? Her shrug was quick, simple, unapologetic. “I like what I like.” “You like… that? Me… that fast?” “Take the compliment,” she said, slipping him tongue probably to shut him up. He fell into it, just a bit, always easily tugged down with the force of Nancy’s ardor. It was hard not to mirror her ministrations, given where his fingers were; harder still not to be a little pleased at the gasp that escaped her, only to be swallowed up by his patient mouth. But he squirmed, all the same, getting kind of desperate to lose the pants before he fused with them permanently. The patience only covered so much. The sound of their lips parting—the unflattering grunt that he couldn’t quite smother, that wet smacking suck—was enough to wake him up a little, enough to pull his hand back, to move them to her hips to encourage her back a bit. She took the hint, her eyes bright and fixed on him as he lifted his hips to shuck his pants and underwear, somehow, around Nancy. He couldn’t quite hold back a whine at the feeling, thoroughly unerotic and, honestly, pretty gross. He probably shouldn’t even have been sitting on her bed. “You’re sure… this works for you?” A vague gesture at the mess he’d made of himself was all he needed to get his point across, but it still lit up his face with something not quite embarrassment. Maybe embarrassment at not being as embarrassed as he probably should have been. Was that too convoluted for a guy whose brain was only just reclaiming its blood supply?
10 notes · View notes