WTF Bites
-
@Applied-Mediocrity said in WTF Bites:
I propose the IIndisposable interface:
I propose the
IIIIIAmStillEmperor
interface.Pretty sure someone somewhere has a crash-handler
IGiveUp
interface.I always like
or die
, too bad it's from Intercal.
-
@Polygeekery said in WTF Bites:
@TimeBandit said in WTF Bites:
@Polygeekery said in WTF Bites:
I don't know enough about web development to know how something that retarded could happen
Have you met today's web developers?
Yes. But the ones that I know do not require velcro shoes.
I've met a few that had to wear helmets for walking, in case they tried to both breathe and walk at the same time. Or forgot to stop to breathe once in a while.
-
@Applied-Mediocrity said in WTF Bites:
I propose the IIndisposable interface:
I propose the
IIIIIAmStillEmperor
interface.Pretty sure someone somewhere has a crash-handler
IGiveUp
interface.I always like
or die
, too bad it's from Intercal.Doesn't Perl do that, too?
-
@topspin Perl, Raku, and PHP are the
succeed or die
languages; Intercal is thePLEASE DO GIVE UP
language (compiler error: excessive politeness).
-
No idea why
createProductsTagsStatus
exists or isn't an enum, but I think it's probably a mistake that it can be "TagsCreatedNotCreated". Not that it affects anything because AFAICT it's a write-only field.Breakpoint code?
-
@Polygeekery said in WTF Bites:
@TimeBandit said in WTF Bites:
@Polygeekery said in WTF Bites:
I don't know enough about web development to know how something that retarded could happen
Have you met today's web developers?
Yes. But the ones that I know do not require velcro shoes.
I've met a few that had to wear helmets for walking, in career they tried to both breathe and walk at the same time. Or forgot to stop to breathe once in a while.
This seems like a problem that will eventually resolve itself. Point them towards water and help out the eventual.
Man, this is an absolute counterpoint to my last post. The duality of man summed up in two posts.
-
-
@Applied-Mediocrity said in WTF Bites:
I propose the IIndisposable interface:
I propose the
IIIIIAmStillEmperor
interface.Pretty sure someone somewhere has a crash-handler
IGiveUp
interface.I always like
or die
, too bad it's from Intercal.Doesn't Perl do that, too?
Yup. Fun fact, that's the only (low-level) way to throw an exception.
-
@LaoC
die
is the Perl's name for what other languages callthrow
. But you don't have to use it with the short-circuitingor
, that's just a common idiom.
-
No idea why
createProductsTagsStatus
exists or isn't an enum, but I think it's probably a mistake that it can be "TagsCreatedNotCreated". Not that it affects anything because AFAICT it's a write-only field.Only thing to beware of there is whether this is a class that gets serialised out as JSON (or something like that). If so, that field might be visible externally despite not appearing to be.
But should be an
enum
.
-
@LaoC
die
is the Perl's name for what other languages callthrow
. But you don't have to use it with the short-circuitingor
, that's just a common idiom.throw
impliescatch
. I don't expectdie
to have acatch
equivalent, and AFAIK in PHP it doesn't.
-
@PleegWat it's Perl. You really think they don't have some horrible hack to catch the
die
in outer scope and cancel it?(I looked it up. It's even more horrible than I thought, but it's very much possible.)
-
@Applied-Mediocrity said in WTF Bites:
I propose the IIndisposable interface:
I propose the
IIIIIAmStillEmperor
interface.Pretty sure someone somewhere has a crash-handler
IGiveUp
interface.I always like
or die
, too bad it's from Intercal.Hmm...given the source...does it short circuit?
-
I looked it up. It's even more horrible than I thought, but it's very much possible.
Hmm, it uses
eval
to catch thedie
. That is horrible, but not more horrible than I imagined. I figured they'd start a new interpreter process or something.
-
@topspin this is just 1 method, and it doesn't work in every case. There are at least 3 other ways, each worse than the last.
-
There are at least 3 other ways, each worse than the last.
That's more like it!
-
@Applied-Mediocrity said in WTF Bites:
I propose the IIndisposable interface:
I propose the
IIIIIAmStillEmperor
interface.Pretty sure someone somewhere has a crash-handler
IGiveUp
interface.I always like
or die
, too bad it's from Intercal.Doesn't Perl do that, too?
Perl, Intercal, same thing.
-
No magic numbers here, folks:
-
No magic numbers here, folks:
Yay, a fixed-size array for a path! Finally, someone guaranteed that all paths will have the correct number of parts.
-
-
@error I am looking forward for an update aftre a requirement change. Something like
final int FOUR = 5;
-
@BernieTheBernie Meanwhile, I recall code having a magic number 288 for the number of files in a directory (no more, no less). In a later release, it became 1440.
-
The constant DBSOURCE no longer exists (nor is there any db connection left to speak of) but its comment lives on!
Of course. How else are you going to pass that automated check in rule that says there must be a comment for every function? No one has perfected that AI to ensure the comment is actually correct.
-
@HardwareGeek said in WTF Bites:
"Recyclable" plastics and stuff that might, theoretically, be recyclable, but it's not economically practical, so they'll actually end up in the landfill even if you put them in the recycling waste stream.
You mean, like this:
-
@dcon I'm somewhat amused that the last option isn't something like "pressurized vessels" or "gas tanks" or something similarly generic. It's specifically propane tanks. Butane gas tank? Nah, go right ahead.
-
@dcon no egg cartons?! They’re basically paper, so they go in the paper trash here.
A few others are also puzzling.
-
no egg cartons?! They’re basically paper, so they go in the paper trash here.
I burn them outside to drive away mosquitos.
It burns slowly like incense.Reuse is as good as recycling.
Edit: INB4 there's mosquitos in
-
@TimeBandit said in WTF Bites:
there's mosquitos in
Weird name for something the size of an RC helicopter.
-
@topspin this is just 1 method, and it doesn't work in every case. There are at least 3 other ways, each worse than the last.
It does work in every case and as far as I can tell it is the only method. Even though perl's motto is TIMTOWTDI.
Hmm, it uses
eval
to catch thedie
. That is horrible, but not more horrible than I imagined.It's just a keyword. And no, it is not a string eval. Or rather, a string eval also catches exceptions, but if you just want to catch exceptions, you use the block eval, so there is no extra round of substitution and parsing.
-
@dcon no egg cartons?! They’re basically paper, so they go in the paper trash here.
A few others are also puzzling.They are paper, but apparently it's paper recycled so many times, or maybe with some additives or something so that it does not recycle well any more.
-
@topspin this is just 1 method, and it doesn't work in every case. There are at least 3 other ways, each worse than the last.
It does work in every case and as far as I can tell it is the only method. Even though perl's motto is TIMTOWTDI.
These SO answers disagree. Something about signal handlers, dunno, I don't speak swine.
-
@Gustav I disagree with your claim that they disagree.
Well, sort of, if you set
$SIG{__DIE__}
toexit 127
so thedie
statement aborts the process outright instead of throwing an exception. But for throwing and catching exceptions,die
+eval
is the only mechanism.
-
@Bulb one of those guys also suggests monkey-patching a custom
die
into the library on import.
-
-
-
custom
die
into the libraryIt's Colonel Mustard, with the candlestick, in the library.
-
@dcon I'm somewhat amused that the last option isn't something like "pressurized vessels" or "gas tanks" or something similarly generic. It's specifically propane tanks. Butane gas tank? Nah, go right ahead.
They don't assume TDWTF11
Airlines do forbid pressurized vessels and they're the so they don't take your bicycle with even slightly inflated tires because pressure
-
scratch that, I'm too thick to hit "edit"
-
@Bulb one of those guys also suggests monkey-patching a custom
die
into the library on import.Yeah, to get around people fucking with
__DIE__
handlers. That's almost like complaining (or suggesting workarounds for) that yourcatch
won't work if the library callsSystem.exit()
.Edit: the documentation for
$SIG{__DIE__}
not only warns it may get the parser into an inconsistent state, it also saysHaving to even think about the $^S variable in your exception handlers is simply wrong. $SIG{DIE} as currently implemented invites grievous and difficult to track down errors. Avoid it and use an "END{}" or CORE::GLOBAL::die override instead.
-
@dcon I'm somewhat amused that the last option isn't something like "pressurized vessels" or "gas tanks" or something similarly generic. It's specifically propane tanks. Butane gas tank? Nah, go right ahead.
Remember that yanks have overloaded “gas” to mean almost exclusively “liquid,” so they get very confused when it comes to describing an actual gas. I’m told they refer to LPG as “propane” specifically, which, while silly, is nowhere near as funny as the “liquid gas gas” I had hoped for.
-
This post is deleted!
-
“liquid gas gas” I had hoped for
Filed under: different
No, that’s the exact same pendant. You don’t even get a “nice try.”
-
This post is deleted!
-
@dcon no egg cartons?! They’re basically paper, so they go in the paper trash here.
A few others are also puzzling.Eh, it's the closest they'll get to acknowledging that most recycling is a scam.
-
I’m told they refer to LPG as “propane” specifically
In this font at least, LP looks like a coffee mug. I approve.
-
@TimeBandit said in WTF Bites:
Weird name for something the size of an RC helicopter.
is not
I've heard of Saskatchewan. Nice try tho.
-
Looks like it got to KY and then went back to China and is now in Alaska.
-
@dcon Welcome to the delivery distortion field.
-
@HardwareGeek said in WTF Bites:
@dcon Welcome to the delivery distortion field.
You can ship out anytime you want, but you'll never receive...
-
Lake Karachay, world renowned swimming lake!
5 stars too, would be a very energizing bath I have heard!