|
qntm posted:
the Peano approach
|
# ? May 14, 2015 13:57 |
|
|
# ? May 25, 2024 05:34 |
|
code:
|
# ? May 14, 2015 14:33 |
|
omeg posted:
I love an unsigned int having a signed magic number.
|
# ? May 14, 2015 15:52 |
Biowarfare posted:they were right though no no no no no no no no no no no no no no no no no no no no no
|
|
# ? May 14, 2015 16:14 |
|
ChickenWing posted:no no no no no no no no no no no no no no no no no no no no no My next favourite thing, after JS/Java, is - "Have you programmed in MVC? How many applications have you written in MVC?" (it might be pedantic, but MVC is not a programming language, goddamit) canis minor fucked around with this message at 16:20 on May 14, 2015 |
# ? May 14, 2015 16:18 |
I'm an expert in Microsoft. Excel? No, Microsoft.
|
|
# ? May 14, 2015 16:39 |
|
Manslaughter posted:I'm an expert in Microsoft. My Adobe doesn't work.
|
# ? May 14, 2015 17:08 |
Maybe you should pay it a living wage.
|
|
# ? May 14, 2015 17:10 |
|
Ithaqua posted:My Adobe doesn't work. It only works on java se 6.dailyReleaseBuild32.4
|
# ? May 14, 2015 17:15 |
|
Manslaughter posted:I'm an expert in Microsoft. I'm such an expert in Microsoft that my email's BillyGIsMyHomeboy@microsoft.com
|
# ? May 14, 2015 17:25 |
|
QuarkJets posted:I really liked Julia a lot until I started using Python's Numba module Is numba any good? I feel like it's trying to do something to python that python just wasn't built to do.
|
# ? May 14, 2015 17:29 |
|
Dr. Stab posted:
I love how that will overflow if n is odd.
|
# ? May 14, 2015 18:04 |
|
zergstain posted:I love how that will overflow if n is odd. code:
|
# ? May 14, 2015 18:36 |
|
zergstain posted:I love how that will overflow if n is odd. My favorite part is just what the gently caress is it even doing?
|
# ? May 14, 2015 18:41 |
|
code:
code:
HappyHippo fucked around with this message at 19:03 on May 14, 2015 |
# ? May 14, 2015 19:00 |
HappyHippo posted:
|
|
# ? May 14, 2015 19:17 |
|
ratbert90 posted:It only works on java se 6.dailyReleaseBuild32.4 There is hardware I work with that has management software that only runs with Java 6 on IE 8 in Windows XP. Not kidding.
|
# ? May 14, 2015 19:19 |
|
HardDisk posted:
Since signed integer overflow doesn't cause an exception anywhere that has INT_MIN rather than something like Integer.MIN_VALUE, that's still going to misbehave when n is odd. It's left as an exercise to the reader to determine whether the loop doesn't terminate in that case or gives the wrong answer.
|
# ? May 14, 2015 19:26 |
|
Obviously there's an implied #define int boost::multiprecision::number<boost::multiprecision::cpp_int_backend<32, 32, boost::multiprecision::signed_magnitude, boost::multiprecision::checked>> and #define OverflowException std::overflow_error first.
|
# ? May 14, 2015 19:38 |
|
code:
In Python 3 this is O(1), because range now has a custom __contains__ method and doesn't have to test every value to check for inclusion.
|
# ? May 14, 2015 19:46 |
|
Blotto Skorzany posted:Since signed integer overflow doesn't cause an exception anywhere that has INT_MIN rather than something like Integer.MIN_VALUE, that's still going to misbehave when n is odd. It's left as an exercise to the reader to determine whether the loop doesn't terminate in that case or gives the wrong answer. What plorky said. I thought the code was C# for some reason and didn't notice that it wasn't Integer.MIN_VALUE until now. Or whatever it is in C# Space Kablooey fucked around with this message at 19:53 on May 14, 2015 |
# ? May 14, 2015 19:50 |
|
code:
The MUMPSorceress fucked around with this message at 20:28 on May 14, 2015 |
# ? May 14, 2015 20:17 |
|
code:
|
# ? May 14, 2015 20:34 |
|
qntm posted:
This one is a lot of fun, I like it.
|
# ? May 14, 2015 20:36 |
|
Jsor posted:
Had a good laugh at this one
|
# ? May 14, 2015 20:46 |
|
HappyHippo posted:
Try that with 2147483648 (231) in JS.
|
# ? May 14, 2015 20:54 |
|
code:
|
# ? May 14, 2015 23:04 |
Munkeymon posted:Try that with 2147483648 (231) in JS. Wait, why does the right shift become negative?
|
|
# ? May 14, 2015 23:14 |
|
VikingofRock posted:Wait, why does the right shift become negative? Maybe it secretly executes a "mul 2" instead of something like shift right??
|
# ? May 14, 2015 23:32 |
|
a right shift should probably make it do "div 2" and not "mul" It's probably because 2<<31 is one past the biggest value you can fit into a signed 32bit int and the bitshifts work in terms of 32bit ints so it gets cast to one and it overflows and is suddenly int_min?
|
# ? May 14, 2015 23:36 |
|
Vanadium posted:a right shift should probably make it do "div 2" and not "mul" Yeah, it's two's-complement representation. MDN's bitwise operators page may be helpful in working it out.
|
# ? May 14, 2015 23:47 |
|
Vanadium posted:a right shift should probably make it do "div 2" and not "mul" Er, derp. Not sure how I made that mistake
|
# ? May 14, 2015 23:51 |
|
I was digging for a bug today that was affecting a part of our invoicing system. The thing that grouped invoices together wasn't properly updating the totals, and every group of invoices was getting $0 as a total. I ask the dev responsible for writing this code a couple years ago if he's seen the issue: quote:Have you seen this before? Can't find the bug? Just write a loving function to fix it afterwards! Genius!
|
# ? May 14, 2015 23:56 |
Subjunctive posted:Yeah, it's two's-complement representation. MDN's bitwise operators page may be helpful in working it out. I'm still confused. From that link: quote:>> (Sign-propagating right shift) and yet: JavaScript code:
VikingofRock fucked around with this message at 00:07 on May 15, 2015 |
|
# ? May 14, 2015 23:58 |
|
VikingofRock posted:I'm still confused. From that link: ECMA-262 posted:11.7.2 The Signed Right Shift Operator ( >> )
|
# ? May 15, 2015 00:12 |
|
Qwertycoatl posted:
I think this is my favorite.
|
# ? May 15, 2015 00:27 |
|
Holy poo poo, at first I thought it was broken for x < 5.
|
# ? May 15, 2015 00:29 |
|
nm
xtal fucked around with this message at 00:51 on May 18, 2015 |
# ? May 15, 2015 00:32 |
|
[code] class EnterpriseOddEvenProviderBeanFactoryImpl {
|
# ? May 15, 2015 01:10 |
|
|
# ? May 25, 2024 05:34 |
|
Snapchat A Titty posted:[code] AbstractSingletonProxyFactoryBean?
|
# ? May 15, 2015 01:18 |