Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?
-
@ixvedeusi Nah. It merely requires programmers to know what they are doing.
-
@Steve_The_Cynic said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
It merely requires programmers to know what they are doing.
... but doesn't tell them when they don't.
-
@izzion said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@Arantor said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@dkf I’m ill and thought I was being funny adding a real where I didn’t see one.
This is why you should never trust someone with a sick sense of humor.
And don't start any blasphemous rumours.
-
@ixvedeusi said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@Steve_The_Cynic said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
It merely requires programmers to know what they are doing.
... but doesn't tell them when they don't.
I would argue this is implicit in the “knowing what they are doing”. In that the compiler will do some basic sanity checking but you have no safety nets.
Thing is, very few of the JS programmers I know could handle C. Almost none of the PHP programmers I know, ditto. I personally was too much for the C life though I think I probably could if I cared to. Just never had a reason to care.
-
@Arantor said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
I think I probably could if I cared to.
I could do C. But that's about as high on the "things I want to do" list as "jumping in a super-sized blender powered by a V<N> from a supercar".
-
@Benjamin-Hall said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@Arantor said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
I think I probably could if I cared to.
I could do C. But that's about as high on the "things I want to do" list as "jumping in a super-sized blender powered by a V<N> from a supercar".
I did C in college for a class.
That was enough.
(More seriously, it did give me a passing familiarity with pointers, and it's helped me a bit in understanding how other languages handle data.)
-
@PotatoEngineer said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@Benjamin-Hall said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@Arantor said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
I think I probably could if I cared to.
I could do C. But that's about as high on the "things I want to do" list as "jumping in a super-sized blender powered by a V<N> from a supercar".
I did C in college for a class.
That was enough.
(More seriously, it did give me a passing familiarity with pointers, and it's helped me a bit in understanding how other languages handle data.)
That's about half of enough, usually. That C, and why, is what's needed. The why being, it won on portability.
-
@ixvedeusi As @Arantor says, mostly the programmers that know what they are doing don't need to be told.
The thing that worries me the most about modern "stuff"(1) is that it's a thinly-veiled, or more often just blatant, attempt at deskilling my chosen profession. I have the mad skillz, as it were, and the continual "learn to code" bulldinkey just ... annoys me.
Enough that my preferred way to express myself is no longer through the medium of code. No. I prefer to express myself by travelling to my local tattoo parlour and spending substantial sums on "ink". Like my little snake. Um. This little snake: https://i.imgur.com/obLJwp4.jpg
EDIT: footnote:
(1) A coded politeness.
-
@Steve_The_Cynic said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
"stuff"(1)
Did anyone else read that as a man page for a command-line utility called "stuff"?
-
@HardwareGeek well played. I salute you.
-
@HardwareGeek I initially read "deskilling" as "killing using a desk".
-
@Arantor said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@Steve_The_Cynic correct, the client library is indeed in C where the sorts of BS that infests JS absolutely doesn’t fly.
C is not a language based around hand-holding, or bondage and discipline. It is the winner of the fight to be the first significant stopping place above direct assembler. As such, it allows you to do really very unsafe things, and that's useful because you sometimes need that sort of capability. To a lot of modern programmers, this is horrifying: how could you break the abstractions!? But the problem with abstractions is that they don't always help, and instead can sometimes force the programmer into spending a lot of effort (both personally and computing time) on working around the abstractions; a classic example of that is excessive copying of memory objects because the model of allocation within stack frames demands it.
-
@dkf said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
C is not a language based around <...> bondage and discipline
But some amount of S&M is definitely present.
-
@Zecc said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@HardwareGeek I initially read "deskilling" as "killing using a desk".
That could work, too. Well, except that most desks are a bit too heavy and bulky to make good "hit people with it" weapons, and most office window frames are too small to make dropping the desk out of a window onto someone even remotely easy.
-
@dkf Re: breaking abstractions...
Let's not forget that most of the abstractions that are part of C are pretty thin, so you often don't need, as such, to break them.
-
@aitap said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@dkf said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
C is not a language based around <...> bondage and discipline
But some amount of S&M is definitely present.
Top Ten Things Overheard At The ANSI C Draft Committee Meetings:
(10) Sorry, but that's too useful. (9) Dammit, little-endian systems *are* more consistent! (8) I'm on the committee and I *still* don't know what the hell #pragma is for. (7) Well, it's an excellent idea, but it would make the compilers too hard to write. (6) Them bats is smart; they use radar. (5) All right, who's the wiseguy who stuck this trigraph stuff in here? (4) How many times do we have to tell you, "No prior art!" (3) Ha, ha, I can't believe they're actually going to adopt this sucker. (2) Thank you for your generous donation, Mr. Wirth. (1) Gee, I wish we hadn't backed down on 'noalias'.
-
@topspin said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
Gee, I wish we hadn't backed down on 'noalias'.
There is a
restrict
keyword though.
-
@Bulb that quote block is probably decades old. (Cue “ANSI”)
-
@Steve_The_Cynic said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@ixvedeusi Nah. It merely requires programmers to know what they are doing.
-
@Benjamin-Hall said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@Arantor said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
I think I probably could if I cared to.
I could do C. But that's about as high on the "things I want to do" list as "jumping in a super-sized blender powered by a V<N> from a supercar".
I did C++ for a few years. It's not that bad. In fact, I think I prefer working in C or C++ over JavaScript, because while all of them require you to not be an idiot, the C/C++ type of not being an idiot is more palatable to me than the JS type of not being an idiot.
Otoh, I earn my salary doing Java, for what that's worth. I've been looking into learning Rust though, seems like a fun enough language.
-
@Carnage it's gotten so much better post-C++11 than for C++98. Can't speak for C++20 though, might be a similiar improvement or just plain more complicated, but I'm blubbing here since I've had no chance to try it.
One day I'll leave all that shit behind for
HaskellRust.
-
@Carnage said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
I've been looking into learning Rust though, seems like a fun enough language.
It is, as long as you're ok with fighting an obnoxious pedant from time to time. Also requires you to know what you're doing but, unlike the other languages mentioned, if you don't (and aren't foolhardy enough to resort to
unsafe
) the compiler will sure as hell shout at you.I've left behind C++ for Rust for all my "recreational coding" and wish I could make that switch at work, too. Alas, at my current job that seems very unlikely at this time.
-
@ixvedeusi said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
It is, as long as you're ok with fighting an obnoxious pedant from time to time.
It's pretty much a requirement of being a member here, so...
-
@loopback0 The "pedantry is a virtue" attitude is one of the few good parts of this community.
-
@topspin said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
maybe without the obnoxious qualifier
It's certainly obnoxious from time to time
-
@topspin said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@loopback0 The "pedantry is a virtue" attitude is one of the few good parts of this community.
We view peNdantry as a virtue. Plain old boring pedantry is
-
@BernieTheBernie said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@Steve_The_Cynic said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@ixvedeusi Nah. It merely requires programmers to know what they are doing.
You missed an infinite number of
-
@topspin said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
maybe without the obnoxious qualifier
No. We used to have s for being a pedantic dickweed. Despite the number of such s I accumulated, I was denied an almost equal number for not being enough of a dickweed. "Obnoxious" is definitely a requirement.
-
@Carnage said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
I did C++ for a few years. It's not that bad. In fact, I think I prefer working in C or C++ over JavaScript, because while all of them require you to not be an idiot, the C/C++ type of not being an idiot is more palatable to me than the JS type of not being an idiot.
The problem is that JS provides an illusion of being far more idiot-tolerant than the others, but once you pass beyond its tolerance, it ultimately punishes you much harder.
Then again, my lasting memory of JS is from a weird hybrid server-side JS thing at a previous job, replete with environment-specific extension bindings, including GTK. My one source of amusement in that was that one young colleague(1) who got used to formatting messages in JS style (yes, I know it's idiomatic JS) as
"some textual message " + some_small_number
. When he tried that in C++, the compiler accepted it, but it didn't work so well...(1) An uncultured (...) who thought it was acceptable behaviour at table to cut meat with his fork held in a reverse grip, as if he was a movie nutjob trying to stab the steak.
-
@HardwareGeek I would say the obnoxious is absolutely enthusiastically encouraged, but the key is the part.
I also remember how we ended up calling it pendantry in the first and that still amuses.
-
@Steve_The_Cynic said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
"some textual message " + some_small_number
. When he tried that in C++, the compiler accepted it, but it didn't work so well...Extra fun if
some_small_number
>strlen("some textual message")
.(1) An uncultured (...) who thought it was acceptable behaviour at table to cut meat with his fork held in a reverse grip, as if he was a movie nutjob trying to stab the steak.
At first I read that as "... his knife held in a reverse grip..." and wondered how he'd manage to actually cut the meat that way. Then I read what you actually wrote and thought, "Hmm, I've probably done that on occasion — hopefully, very rare occasion." Now, for the next few days, I'm probably going to be consciously thinking about how I'm holding my fork while I'm eating. Thanks.
-
@HardwareGeek said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@Steve_The_Cynic said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
"some textual message " + some_small_number
. When he tried that in C++, the compiler accepted it, but it didn't work so well...Extra fun if
some_small_number
>strlen("some textual message")
.As I recall, the numbers in question were, indeed, small enough to avoid that particular explosion. Pity.
(1) An uncultured (...) who thought it was acceptable behaviour at table to cut meat with his fork held in a reverse grip, as if he was a movie nutjob trying to stab the steak.
At first I read that as "... his knife held in a reverse grip..." and wondered how he'd manage to actually cut the meat that way. Then I read what you actually wrote and thought, "Hmm, I've probably done that on occasion — hopefully, very rare occasion." Now, for the next few days, I'm probably going to be consciously thinking about how I'm holding my fork while I'm eating. Thanks.
You're welcome. I will admit that despite my mother's repeated instance to the contrary when I was a wee small laddie, I still sometimes use my fork upside down (with the curve the same way is if it is a spoon) because that works better when eating stuff like rice, but when I saw my colleague turn his fork the other way around and psycho-stab the meat with it, I was actually shocked. Not much, but not zero either.
-
@HardwareGeek said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@topspin said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
maybe without the obnoxious qualifier
No. We used to have s for being a pedantic dickweed. Despite the number of such s I accumulated, I was denied an almost equal number for not being enough of a dickweed. "Obnoxious" is definitely a requirement.
I find you plenty obnoxious, and a total dickweed, if it makes you feel any better.
-
@Steve_The_Cynic said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
You're welcome. I will admit that despite my mother's repeated instance to the contrary when I was a wee small laddie, I still sometimes use my fork upside down (with the curve the same way is if it is a spoon) because that works better when eating stuff like rice, but when I saw my colleague turn his fork the other way around and psycho-stab the meat with it, I was actually shocked. Not much, but not zero either.
I've never studied etiquette, but sometimes you hear things that make you go . Like the proper way to eat peas is to use your knife to shove them onto the round side of the fork.
-
@PleegWat said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
I've never studied etiquette, but sometimes you hear things that make you go . Like the proper way to eat peas is to use your knife to shove them onto the round side of the fork.
And the rest of us know how a spoon works.
-
@PleegWat said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@Steve_The_Cynic said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
You're welcome. I will admit that despite my mother's repeated instance to the contrary when I was a wee small laddie, I still sometimes use my fork upside down (with the curve the same way is if it is a spoon) because that works better when eating stuff like rice, but when I saw my colleague turn his fork the other way around and psycho-stab the meat with it, I was actually shocked. Not much, but not zero either.
I've never studied etiquette, but sometimes you hear things that make you go . Like the proper way to eat peas is to use your knife to shove them onto the round side of the fork.
This is easier to understand from the perspective of a bored king.
-
@dcon Then again there are also sensible bits. Like how your arms should not extend sideways beyond your shoulders at any time.
-
@PleegWat said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@dcon Then again there are also sensible bits. Like how your arms should not extend sideways beyond your shoulders at any time.
Wait. How am I supposed to wack the person next to me on the back of the head when he says something really stupid?
-
@dcon said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@PleegWat said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@dcon Then again there are also sensible bits. Like how your arms should not extend sideways beyond your shoulders at any time.
Wait. How am I supposed to wack the person next to me on the back of the head when he says something really stupid?
You couldn't do that anyway. He's inside your reach due to how close the chairs are together.
-
@PleegWat said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@dcon Then again there are also sensible bits. Like how your arms should not extend sideways beyond your shoulders at any time.
Also that's physically impossible, I just tried, I have to keep my arms in front of me in a very small envelope to prevent that. I am officially emending this to specify, your arms should not extend beyond your hands at any time.
-
@PleegWat said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
Like the proper way to eat peas is to use your knife to shove them onto the round side of the fork.
I eat my peas with honey;
I've done it all my life.
It makes the peas taste funny,
But it keeps them on the knife.This poem was recited on the February 2, 1944 broadcast of the radio program "It Pays to Be Ignorant." According to the Estate of Shel Silverstein and the archivists who oversee his literary works and manuscripts, Shel Silverstein did not write this poem.
-
@HardwareGeek said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@PleegWat said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
Like the proper way to eat peas is to use your knife to shove them onto the round side of the fork.
I eat my peas with honey;
I've done it all my life.
It makes the peas taste funny,
But it keeps them on the knife.This poem was recited on the February 2, 1944 broadcast of the radio program "It Pays to Be Ignorant." According to the Estate of Shel Silverstein and the archivists who oversee his literary works and manuscripts, Shel Silverstein did not write this poem.
I've seen this in print and with attribution, but sadly in a collection I no longer own or recall the name of, nor the attribution.
-
@Kamil-Podlesak said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
I suppose when it comes to foot guns, this is a howitzer.
I'd say that it's the special howitzer that was built to fire the W19 shell.
-
@PleegWat said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@dcon Then again there are also sensible bits. Like how your arms should not extend sideways beyond your shoulders at any time.
As an absolute limit, no(1), but you should avoid flailing your elbows so far out they hit the person next to you.
(1) Even if that's just because otherwise you wouldn't be able to reach the outermost set of cutlery for the first course of your formal dinner.
-
@PleegWat said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
Then again there are also sensible bits. Like how your arms should not extend sideways beyond your shoulders at any time.
The main thing is to not flap your arms like wings, assuming you don't want the person sitting next to you to have an excuse to do the same back to you.
-
@dkf well... consider specifically a Duke (duke). Seated next to a lesser martial noble (duke * earl), they are rather beholden to jab them a bit. But, this is not in fact an exception.
-
@PleegWat there's a fully accepted short clueslap driven with upward rotation of the hand and a rising elbow, but still around the shoulder. It retains the necessary arc. Also, it's a bit more effective at lifting the head clear of the neck for a moment, which helps the overall effect.
-
@PotatoEngineer said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
I did C in college for a class.
That was enough.
(More seriously, it did give me a passing familiarity with pointers, and it's helped me a bit in understanding how other languages handle data.)
I agree with the way they taught it to us. First you do machine language in binary, then in hexadecimals, then assembly, then C, then C++, then Java.
At each higher level, you appreciate how much easier it is. Plus, it gives you an idea of what's going on under the hood.
-
@Steve_The_Cynic said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
@ixvedeusi As @Arantor says, mostly the programmers that know what they are doing don't need to be told.
The thing that worries me the most about modern "stuff"(1) is that it's a thinly-veiled, or more often just blatant, attempt at deskilling my chosen profession. I have the mad skillz, as it were, and the continual "learn to code" bulldinkey just ... annoys me.
Enough that my preferred way to express myself is no longer through the medium of code. No. I prefer to express myself by travelling to my local tattoo parlour and spending substantial sums on "ink". Like my little snake. Um. This little snake: https://i.imgur.com/obLJwp4.jpg
EDIT: footnote:
(1) A coded politeness.A huge snake and a mask. It doesn't get any better than that.
-
@jinpa said in Is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ?:
I agree with the way they taught it to us. First you do machine language in binary, then in hexadecimals, then assembly, then C, then C++, then Java.
Some people may disagree with some steps in that progression.