12 ms·
Infrequently Asked Questions in Comp.lang.c (1999)
- archfrog 3y agoI don't want to be toxic but why make a function to cast a char to an int? I was astounded when I briefly skimmed through the list. I hope this is not curriculum in education.
- xhainingx 3y agoIt's not. The whole thing is a joke.
- deleted 3y ago[deleted]
- chihuahua 3y agoI got the impression that the entire document is meant as a joke.
- MobiusHorizons 3y agoUnambiguously so if you click to any of the footnotes.
- Kamq 3y agoI don't see the one you're talking to on a brief skim, but there are several functions that deal with processing a file character by character. They generally use ints because they need a way to signal end of file and you can't do that with any value of a byte.
- tpoacher 3y agoAre the "[a]" footnotes also meant to be "subtly wrong" for shits and giggles? Footnote 1.5 for instance sounds completely wrong, as if the author is mixing up definition for declaration, and initialisation for definition: declaration: lets the compiler know the existence of a symbol and its type, without allocating memory for it yet or assign a value. Either of those can happen in a different compilation unit and linked after after the compilation stage. e.g. extern int bar; definition: arguably a poor choice of name, but this is the point at which a definitive space in memory is reserved for this variable. If no previous declaration for this symbol has taken place, the symbol is also declared as above too. The value in the newly allocated memory is effectively garbage, since it has not been initialised at yhis step. E.g. int bar; initialisation: the assigning of contents into the memory portion that has been allocated for that symbol. bar = 5; simultaneous declaration, definition, and initialisation in a single step: int bar = 5;
- tragomaskhalos 3y agoA good reminder that there were a lot of smartarses on usenet.
- NoZebra120vClip 3y agoYes, like that snopes guy who cut his troll teeth on Usenet!
- awestroke 3y agoAfter reading through this, I'm not sure if it's a list of jokes or real information? For example: > long ints can be entered using hexadecimal notation; for instance, > long int foo = 07; How is this a good example of hexadecimal input?
- torstenvl 3y agoMost of them are inside jokes that aren't very funny. Most of them are indeed frequently asked, but by people who are a bit obstinate or otherwise don't fit the mold that old timers thought newbies should fit. As a result, the responses are often intentionally dismissive and unhelpful. EDIT: It occurs to me that comp.lang.c was the 80s-90s version of Stack Overflow. So at least they're comparatively funnier than the SO responses they'd elicit today.
- bluetomcat 3y agoOn SO, any of these answers would be downvoted to death by people not recognising them as jokes at all. Language lawyer types would cite the part of the standard that classifies this as UB in the blink of an eye. It’s a different world we’re living in.
- torstenvl 3y agoOn SO these questions would get downvoted to death and the newbie would be admonished for breaking the site guidelines. 1.1: How do you decide which integer type to use? Closed as opinion based. 1.3: If I write the code int i, j; can I assume that (&i + 1) == &j? Please provide a minimal, complete and verifiable example. Etc.
- bluedino 3y agoIt was better than StackOverflow in a lot of ways. Sure, it wasn't useful as a searchable database of questions, but the FAQ was very useful if you could spend time to wade through it, and any zero-effort posters were either flamed to oblivion or simply ignored. I remember asking a couple stupid questions and directed to the documentation. To this day, at work I will suggest "let's see what the manual says", while troubleshooting and get a funny look and eve pushback after I find the answer.
- raverbashing 3y agoGreat joke list. Though sometimes reality beats fiction > 1.6: I finally figured out the syntax for declaring pointers to functions, but now how do I initialize one? > With the assignment operator Well what did you expect right?!
- spacedcowboy 3y agoGiven how opaque the syntax is, expecting to have to use a screwdriver isn’t that weird…
- herdcall 3y agoThese don't look like "stupid questions" at all, but the disdainful smart aleck responders do look stupid. What a sad, toxic group of people.
- compiler-guy 3y agoIt’s a joke list of silly things. Not serious at all.
- deleted 3y ago[deleted]
- kichimi 3y agoWhy is it toxic?
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- eska 3y agoProgrammer humor is so shit, man..
- not_your_vase 3y ago> Comes to a website that's very well known to be mostly frequented by programmers > Complains about the content that tries to appeal to programmers sigh
- zh3 3y agoSome great in-jokes there (hands up who gets the EBCDIC one). More seriously, a lot of the discussions about "undefined behaviour" seem to be aimed at the kind of code that no experienced engineer would write anyway. Until there's a language that's proved formally correct, every language is going to have "undefined" behaviour (though some languages - especially more modern ones - cover more cases/make it harder for less experienced users to blow their foot [or worse, someone elses] off).
- kmeisthax 3y agoHalf of it is code no engineer would write and the other half of it occupies 30% of any sufficiently old C codebase. And usually the only way you find out that your clever new optimization is going to break the latter is to write a lot of the former.
- ukuina 3y agoObligatory reference to http://vanilla-js.com http://vanilla-js.com