@Grunnen Overloading "and" so it can be logical or bitwise isn't a problem if boolean is its own type (frowning at C here), because the. However, using the same operator for equality and assignment is a stupid idea (less so if the context can easily be determined - say if assignments aren't possible inside expressions).
Best posts made by Khudzlin
-
RE: Parenthesis-itis
-
RE: Ignoring the Class System
Ugh, and you consider this a good thing? I tend to be wary of languages which think that adding up numbers and strings somehow makes sense.
QFT. Implicit conversions between unrelated types (strings and any other type, for instance) go against type safety. You should use string s = String.Format("In the year {0} (and every other year), formatted strings are the best!", DateTime.Today.Year);
-
RE: €12.00 × 2 = ?
@gurth said in €12.00 × 2 = ?:
@ben_lubar said in €12.00 × 2 = ?:
I'm not aware of a floating point format that can't accurately represent 12.
How about 7, 10, 19.50, or 25.50,? The site I ordered it from has various things priced at €7.00 as well as €7.01, €19.50 and €19.51, etc. I doubt the pricing is like that deliberately, but I have a hard time thinking of a reason why some items would have “correct” pricing and others are one cent off.
Oh, and it also has
<span class="unvisible">
:)In binary formats, numbers ending in .00, .25, .50 and .75 can be represented exactly (unless the amount is ridiculously large). Other numbers of cents require rounding.
Maybe it's because the displayed price is the result of some calculation (like adding VAT), so it's already rounded in binary.
-
RE: IEEE Floating-point quiz!
Yes, that's what I meant in the parenthetical. However, x = -0 still makes me wrong, because according to Wikipedia, sqrt(-0) is -0 (rather than NaN or +0), so rsqrt(-0) is -infinity (and -0 compares as equal to +0).
-
RE: Travel
I've always booked flights and hotels online (never car rentals, though, because those aren't part of my travel plans[1]). I never encountered such a pile of as you describe.
[1] I rented a car once, but I didn't need a flight or hotel that time, and I went to a physical agency.
-
RE: Finding max element of an array using two heap-allocated arrays and a bubble sort
@gwowen You can extract min and max in a single iteration with a dedicated function.
-
RE: Unicode emojis are stupid
Bytes, code units and glyphs are different concepts. Also, before counting glyphs, you need to define them in a way a computer can understand (ie, a completely literal and unambiguous way - good luck).
-
RE: Security #2
@severity_one said in Security #2:
@havokk said:
On the other hand, the airport security staff have never been anything other than friendly, polite and respectful. Completely inflexible on the rules, yes, but respectful.
I don't remember the security at Newark, but what I do remember is US Immigration.They're not very pleasant people. They sit in a little glass cage and 'surly' is probably the best way to describe them.A little further away, in Canada, the immigration officer sits behind a big desk, no glass in sight, and he's not just polite, but very friendly as well.
I was detained by an Immigration Canada officer about 15 years ago. I was going on a canoe trip in Manitoba, so I didn't fill the address field on the form (as we'd be camping out in the middle of nowhere for the duration - no roads at all). Still made the connecting flight.
I haven't had any trouble with US Immigration officers and didn't find them especially surly. The most unfriendly customs personnel I've encountered were in Senegal (on the return trip, even).
-
RE: Arithmetics...
@boomzilla In .Net, the integral types are sbyte, byte, short, ushort, char, int, uint, long and ulong. So bytes are unsigned by default, chars are always unsigned (they're WTF-16) and the others are signed by default.
-
RE: Assert.IsTrue
@zecc said in Assert.IsTrue:
@khudzlin Did you answer a rhetorical question?
Probably 2 in this thread now.
-
RE: Finding max element of an array using two heap-allocated arrays and a bubble sort
@gwowen Nothing stops you from coding that function, even if you have access to library functions.
-
RE: Antivaxers
@Karla said in Antivaxers:
I used to not get the flu vax (docs kept pushing it while I was pregnant) and was hesitant on why newborns need a Hep-B vax (isn't that a sexually transmitted -- I think I have some time before that).
Last year, I knew someone that died of the flu at 60. I get the flu vax now.
Ped explained when kids get Hep-B they often don't know the vector of transmission and there is no cure. My daughter got the Hep-B vax.
Blood is also a vector of transmission. And childbirth carries a risk of transmission to your child if you're infected.
-
RE: Airbus A350 must be rebooted every 149 hours
To be honest, I don't expect planes to be operated continuously for a very long time. Certainly no longer than a few days.
-
RE: Where is Mexico?
@jinpa So we can just count the stars (or similar symbols) to sort out seniority.
-
RE: Unicode emojis are stupid
@dkf said in Unicode emojis are stupid:
if there's UTF-16 in the mix then you've also got surrogates.
Yeah, UTF-16 is , especially because most people who claim to use UTF-16 instead use the even more obsolete UCS-2 (ie not dealing with surrogates correctly).
-
RE: Enough with the handshakes
@gąska said in Enough with the handshakes:
@khudzlin said in Enough with the handshakes:
@gąska And admitting alcohol consumption during the weekend will screw your chances? Way to break the stereotype about Poles.
Welcome to 21st century, where everyone still drinks just like before, but being drunk at work can get you fired. What we used to drink over 18 hours, we now drink within 10.
Drinking during the weekend isn't remotely the same as being drunk at work.
-
RE: Unicode emojis are stupid
Glyphs are beyond the scope of Unicode, they're a rendering concept.
-
RE: 🔥 Liberals need to be told that hitchhiking in Muslim countries greatly increases your chance of encounters with rapists and murderers, apparently.
I've never hitchhiked myself, but I've taken hitchhikers in the past (I don't have a car anymore), sometimes more than one at the same time. I was always alone and unarmed (like most of my county's population, as it happens).
-
RE: Could you pass TDWTF citizenship test?
@Yamikuronue I believe you remember incorrectly and that it did indeed say "Morbs" (I remember it from the days when I was just a lurker).
-
RE: Enough with the handshakes
@steve_the_cynic At most, it's a peck on the cheek.
-
RE: Well done, Blizzard, even *you* are officially promoting gambling
@pie_flavor said in Well done, Blizzard, even *you* are officially promoting gambling:
@Jaloopa Why do I need to be an expert on the topic when several different governments already have experts on the topic and have agreed with me?
Oh wait, you're serious? Let me laugh even harder.
-
RE: Hahahahaha take that, type safety.
@HardwareGeek said in Hahahahaha take that, type safety.:
They were much more common before the ball was made more pointed in 1934, because the rounder ball bounced more reliably.)
Apparently both punts and drop-kicks exist in rugby, too, but I don't know enough about rugby to the difference between them.
In rugby, the ball is not pointed (its an ellipsoid), so kicking it is probably more accurate. There are different circumstances under which a rugby player will kick the ball, which differ in whether that player attempts to score, whether the player expects his team to recover the ball afterwards, and how much the opposing team is allowed to interfere. I guess you could call the score attempts drop kicks and the kicks where the player doesn't attempt to score and expects to opposing team to get the ball punts (I don't know the full rugby vocabulary in English).
-
RE: B*****M and France to go to war!!!1!!
@bjolling said in B*****M and France to go to war!!!1!!:
Don't tell the French but Jacques Brel, Tintin, Les Schtroumpfs, Stromae ... are all Belgian too
The Belgians can keep Hergé. Tintin is full of blatant colonialism.
-
RE: EU schedules a task to get a lock on Daylight Saving Time
@PleegWat said in EU schedules a task to get a lock on Daylight Saving Time:
The main deciding factor will probably be whether Germany and France make the same choice (with or without discussion between them).
Without DST, I think France and Germany definitely should be in different time zones (Spain should also change; I have no strong opinion on whether the Benelux countries should stay in Germany's time zone).
-
RE: "Admissible evidence"
@powerlord said in "Admissible evidence":
@masonwheeler Some things that come to mind:
- With the exception of a single case, all cases in the series are decided by a judge rather than a jury.
- Prosecutors are trusted almost completely.
- ...and just the opposite for Defense attorneys.
- All trials start within 24 hours of a person being arrested.
- All trials can be at most 72 hours.
- Discovery rules are... weird and inconsistent.
The Japanese court system is very different from the US one. One of its feature is trials being decided by a judge rather than a jury. Another is alternating evidence gathering and courtroom proceedings. Note that my knowledge comes entirely from the video posted earlier.
Also, I'll bet on there being exaggerations to make the game more dramatic. It's not like procedurals accurately reflect the law, either.
-
RE: The US: saving the world from itself
@boomzilla Yeah, because an elected dirty commie is so much more dangerous than a military dictatorship.
-
RE: Am foxes really smart?
@Jaloopa said in Am foxes really smart?:
@RaceProUK It's definitely a consonant in Welsh
Wait, I thought both Y and W were vowels in Welsh.
-
RE: Is this a dragon? DO NOT POST PORN WHAT THE FUCK IS WRONG WITH YOU STOP STOP STOP IT
@carrievs I can't help assuming the flying reptile is significantly closer than the fighter jet. Otherwise, it's one big-ass flying critter.
-
RE: Driving Anti-Patterns - Necro Edition
@boomzilla said in Driving Anti-Patterns - Necro Edition:
These totally break down if there's a lot of traffic that can turn on red or something such that they always (or almost) fill up all of the available space before any other way gets a green light. The least sucky solution then is a traffic cop to keep traffic flowing from all ways, but that's not feasible for a permanent or long term situation.
Afaik, turning on red is prohibited across Europe. On the other hand, I regularly see the kind of idiocy @blek describes near where I work, in an intersection between 2 one-way streets.
-
RE: Driving Anti-Patterns - Necro Edition
@remi There must be a superstition that the outer lane is exclusively for slowpokes.
-
RE: Driving Anti-Patterns - Necro Edition
Really dumb of her to cross the line on the driver side.
-
RE: EU schedules a task to get a lock on Daylight Saving Time
@Gurth said in EU schedules a task to get a lock on Daylight Saving Time:
You know, if you’d asked me before I read the above, I would have said that time zones count from 0° longitude, not that one is centred on that.
Being centered on 0° (and other multiples of 15°) is more logical: it minimizes the difference between clock time and solar time.
-
RE: Scandals in Communist Frenchystan
@Quwertzuiopp So you guys really managed to have an independent government-funded public television. I'm envious (especially since it's totally ad-free, as well).
-
RE: Antivaxers
@Gąska Actually, you're right. Recklessly putting others in danger is manslaughter, while intentionally killing is murder in US law as well (note: I'm not from the US).
-
RE: How dare you say our site's insecure!
@antiquarian Well, I don't know how fraudulent they are now, but Protestantism started as a protest against corruption in the Catholic Church (selling indulgences among other things).
-
RE: Case (in)?sensitive filesystems are :doing_it_wrong:
@Khudzlin said in Case (in)?sensitive filesystems are :
[UTF-16] takes more space than UTF-8.
Actually, that's not true for pure text in Chinese or Korean (or any language using mostly characters in the range U+0800 to U+FFFF - those take up 3 bytes in UTF-8 versus 2 in UTF-16). But a webpage in such a language still takes fewer bytes in UTF-8, because the HTML markup uses only ASCII characters (which take up only 1 byte each in UTF-8 versus 2 in UTF-16), and the gains outweigh the losses. Characters outside the BMP or in the range U+0080 to U+07FF take up as much space in both encodings (4 or 2, respectively).
-
RE: And that is why I shouldn't have bought a "gaming" mouse...
@steve_the_cynic Just don't use an AZERTY keyboard. It's a real
-
RE: Stupid patent lawsuits
@tharpa Many countries with population densities comparable or higher than the US have stopped using the death penalty for a long time and have seen no increase in the rates for the crimes it was used for. And the same goes for the US states that stopped using it. This proves that the death penalty is not a more effective deterrent than a long prison sentence, the same way gruesome executions (with torture) were not a more effective deterrent than executions with current methods.
-
RE: Stupid patent lawsuits
@djls45 said in Stupid patent lawsuits:
So then why not save a ton of resources by executing criminals who are effectively permanently removed from society anyways?
Because the way death penalty works in the US, life imprisonment is actually cheaper? And if you shorten the delays and cut the appeals, you increase the number of wrongful executions?
Why not go back to the prison systems where inmates would be fed only if visitors bring them food?
Don't you guys have a rule against cruel and unusual punishments?
-
RE: Oh look, another internet company lets its ego get in the way of everything
@e4tmyl33t I'm not sure you have to be a paying user for running a game. You probably don't have to be one for joining. My next session is on Sunday, I'll ask the others about that.
About remote playing: I once played a session through skype. It was about 12 years ago and I was the only one separated from the group (by 6 time zones). Video definition was probably not up to showing my dice roll, but we didn't have a better solution. I don't know all you can program into discord bots, but I'd be surprised if you can't program dice-rolling.
-
RE: Scandals in Communist Frenchystan
@tufty Nitpick: Fillon was "mis en examen" (liaison is likely to make the pronunciation identical, though). If it happened to Le Pen, she would be "mise en examen". Also, the process is called "mise en examen".
-
RE: WTF Paypal?
Payment in cash could allow them to partially dodge VAT/sales tax.
-
RE: I know there's a push for contactless, but this is ridiculous
@DogsB I'm not going to get a contactless card, especially since I don't live in the UK.
-
RE: Let's play Tax Chicken!
The joys of federal governments and working across tax borders (the latter would apply between countries in Europe, for instance).
-
RE: The FROM Clause
@cark said in The FROM Clause:
Another WTF is the date '6/1/2016' whose interpretation is dependent on the database settings. I'll bet my lunch money on the author not having set that explicitly.
Not taking that bet.
-
RE: Do you drive more by algorithm or instinct?
I don't drive to the office. Then again, no one drives to an office in Paris by choice. I happen to have a nice and direct route from home to work with public transportation, so I preserve my sanity by taking advantage of it.
-
RE: Do you drive more by algorithm or instinct?
@RaceProUK I've used the London Underground a bit (thankfully not during rush hour), and yeah, the one in Paris is much better (though at times, sardines would have grounds to complain). On the other hand, I'd rather take my chances with the Tube than drive in Paris during rush hour.
-
RE: Subway chicken sandwiches made with genuine 50% chicken
@dangeRuss Apparently the difference is that the latter is unfiltered and unsweetened.