|
When I posted that code all I hoped for was a few "heh"s... not this.
|
# ¿ Jan 8, 2011 17:47 |
|
|
# ¿ May 16, 2024 14:02 |
|
A bus factor of zero means no one knows how the codebase works. edit: Scaevolus fucked around with this message at 20:08 on Jan 10, 2011 |
# ¿ Jan 10, 2011 19:59 |
|
Wheany posted:I thought the whole point of BS was quick screen scraping: The point was easy screen scraping. BeautifulSoup is written in Python, don't expect it to be fast. lxml has essentially the same interface (and XPath), so there's really no reason not to use it. Scaevolus fucked around with this message at 19:21 on Jan 27, 2011 |
# ¿ Jan 27, 2011 19:12 |
|
If you're calling abs(INT_MIN), something has probably gone wrong already.
|
# ¿ Jan 30, 2011 03:14 |
|
It looks like the Blackberry JVM is really bad:quote:Optimizing division operations
|
# ¿ Feb 15, 2011 21:30 |
|
It's probably a straightforward interpreter, with zero optimization:quote:Optimizing subexpressions
|
# ¿ Feb 15, 2011 21:47 |
|
BonzoESC posted:That's how AES-CTR and AES-OFB work, except the table is so fantastically large it's impractical to store.
|
# ¿ Feb 22, 2011 06:18 |
|
That's not how aes_encrypt works, though. It expects to get a (random) 128-bit string. It should probably be noted in the documentation, but I don't see how this is a horror.
|
# ¿ Feb 24, 2011 21:19 |
|
What's the horror?
|
# ¿ Mar 29, 2011 23:04 |
|
Zombywuf posted:Look at the graph for the part before the Perl one goes crazy. It's orders of magnitude slower for the non pathological case. It also doesn't do back references. I think the only way this could be faster in the general case is that you could potentially do some bit-twiddling to match a whole SIMD register's width of regexes at the same time, maybe.
|
# ¿ Apr 13, 2011 17:06 |
|
the best quine "This is a Ruby program that outputs a Python program that outputs a Perl program that outputs a Lua program that outputs a OCaml program that outputs a Haskell program that outputs a C program that outputs a Java program that outputs a brainfuck program that outputs a Whitespace program that outputs a Unlambda program that outputs the program itself." code:
Scaevolus fucked around with this message at 03:22 on Apr 15, 2011 |
# ¿ Apr 15, 2011 03:17 |
|
hq9+ quinecode:
|
# ¿ Apr 15, 2011 06:00 |
|
Volte posted:Is there some kind of quine theory that reduces creating quines to some sort of mechanical procedure, or did that guy just spend way too much time on it e: okay, the haskell one does a bit of non-trivial escaping into brainfuck (and probably whitespace as well) Scaevolus fucked around with this message at 00:35 on Apr 17, 2011 |
# ¿ Apr 17, 2011 00:30 |
|
mjau posted:
code:
|
# ¿ May 22, 2011 13:34 |
|
code:
|
# ¿ May 23, 2011 10:23 |
|
Not to mention that reflection is very slow, so it's not the kind of thing you'd want to be doing in your networking code.
|
# ¿ May 27, 2011 02:20 |
|
Fehler posted:
|
# ¿ Jul 12, 2011 03:11 |
|
"<< 1" instead of "* 2" is generally a horror.
|
# ¿ Jul 13, 2011 17:15 |
|
shodanjr_gr posted:I sympathize with you for everything you said apart from the coding-style issue. Coding style consistency is critical inside a big project for readability and maintenance purposes...Unless he is forcing some rear end-backwards coding style, I don't see a problem with your manager fixing up your code. It's actually something that you are supposed to take care of yourself...
|
# ¿ Jul 28, 2011 02:59 |
|
Plorkyeran posted:The volatile there is extra-weird. He's probably been bitten by bad compilers for embedded systems before, making him learn a more defensive style of programming. Scaevolus fucked around with this message at 00:55 on Aug 11, 2011 |
# ¿ Aug 11, 2011 00:21 |
|
ORMs are dumb, how are you supposed to savagely optimize your database usage?
|
# ¿ Oct 6, 2011 20:11 |
|
I hate my classmates. INFINITY = 40000 #circumference of the earth
|
# ¿ Oct 7, 2011 22:19 |
|
Sometimes people really want to write Java.code:
|
# ¿ Oct 7, 2011 22:48 |
|
baquerd posted:And what about that says Java to you?
|
# ¿ Oct 8, 2011 00:20 |
|
Regarding Python's def fun(a, b,) thing, function arguments are not the same thing as tuples. From the official grammar. code:
|
# ¿ Oct 20, 2011 18:43 |
|
EpicCodeMonkey posted:I never understood why the language (or other C-derived languages, for that matter) don't make fall-through legal in switch statements, but require that the last statement in each case be "break", "return", or "continue" - the latter specifying a fallthrough. If anything else is encountered it would be a syntax error. The only downside would be that: Expression switches In an expression switch, the switch expression is evaluated and the case expressions, which need not be constants, are evaluated left-to-right and top-to-bottom; the first one that equals the switch expression triggers execution of the statements of the associated case; the other cases are skipped. If no case matches and there is a "default" case, its statements are executed. There can be at most one default case and it may appear anywhere in the "switch" statement. A missing switch expression is equivalent to the expression true. In a case or default clause, the last statement only may be a "fallthrough" statement (§Fallthrough statement) to indicate that control should flow from the end of this clause to the first statement of the next clause. Otherwise control flows to the end of the "switch" statement. The expression may be preceded by a simple statement, which executes before the expression is evaluated. code:
|
# ¿ Oct 23, 2011 20:27 |
|
Optimus Prime Ribs posted:I have to wonder: is Ramsus just a gigantic meat-head or is PHP an elaborate troll? Rasmus Lerdof posted:I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say "Yeah it works but you're leaking memory everywhere. Perhaps we should fix that." I’ll just restart Apache every 10 requests. Rasmus Lerdof posted:I don't know how to stop it, there was never any intent to write a programming language [...] I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way.
|
# ¿ Nov 3, 2011 21:50 |
|
Pangolin Poetry posted:a recent horror that I constructed was to have a program calculate integers, then output them to a file as strings, which were then read into a different program as strings, which were then re-converted to integers, then cast as floats inside an array. then, i graphed them. It sounds like you've implemented a poor man's version of UNIX pipes.
|
# ¿ Dec 3, 2011 20:58 |
|
Zombywuf posted:CPU prediction logic has got more complex since then, which is what that problem seems to be about. No, the problem is about cache aliasing.
|
# ¿ Dec 19, 2011 21:39 |
|
yaoi prophet posted:What exactly happened with Itanium? Over-optimistic sales forecasts.
|
# ¿ Dec 22, 2011 21:10 |
|
Language developers not caring about algorithmic attacks is kind of a horror: http://www.ocert.org/advisories/ocert-2011-003.html https://www.youtube.com/watch?v=R2Cq3CLI6H8 Basically you can DOS most web frameworks easily by sending POST data with keys that are chosen to collide and cause worst-case hashmap performance.
|
# ¿ Dec 29, 2011 09:27 |
|
Crosscontaminant posted:You should probably specify you're catching an XmlException - naked catch blocks are discouraged in Python (which I'm familiar with) and I can't imagine the same not being true for Visual Basic.
|
# ¿ Jan 12, 2012 23:10 |
|
BP posted:Interestingly, we do have a TLS implementation available. However none of our customers actually use it due to "performance concerns", and internal management is equally wary. This is despite realistic performance tests with our application that show around a ~0.2% performance degradation from turning on TLS. How much of a performance hit is the homebrew "encryption"?
|
# ¿ Feb 11, 2012 21:31 |
|
Zombywuf posted:This is why Ritchie granted us the power to name functions.
|
# ¿ Feb 17, 2012 10:18 |
|
Otto Skorzeny posted:I thought the rules were 'just' that this wasn't allowed, eg. a read of type A from union {A, B} foo is only allowed if the last write to foo was of type A? iirc, C99 doesn't even guarantee that integers are represented by two's complement. Scaevolus fucked around with this message at 21:07 on Feb 19, 2012 |
# ¿ Feb 19, 2012 21:01 |
|
Munkeymon posted:Well, yes and no. Literally
|
# ¿ Mar 5, 2012 21:10 |
|
The Gripper posted:
code:
|
# ¿ Mar 16, 2012 17:18 |
|
Nippashish posted:PHP's rand() function seems to have some pretty obvious patterns. Woah, it's weird to see people link old stuff you've written. pokeyman posted:Yeah Windows rand() is loving worthless. Found that out when trying to reimplement the deals in FreeCell. It's got some ridiculously low period.
|
# ¿ Apr 11, 2012 04:05 |
|
nielsm posted:Not only that, you only need to recalculate lighting when something changes, and you can probably take a shortcut and only recalculate e.g. 15 blocks in each direction from the changed block. That's basically what Minecraft does.
|
# ¿ Apr 18, 2012 21:05 |
|
|
# ¿ May 16, 2024 14:02 |
|
There's a "new" OpenSSL vulnerability in the parser for ASN.1, a good example of the hilarious overcomplication that design-by-committee causes. Some people are smart: djmdjm posted:FYI OpenSSH's sshd is not vulnerable, despite using OpenSSL. Back in 2002 and after a different ASN.1 bug, Markus Friedl observed that RSA verification used the OpenSSL's full ASN.1 parser to parse PKCS#1 RSA signatures despite them having an almost entirely fixed format under the parameters used in the SSH protocol. Some are cheeky as well: mdowd posted:I published that bug in our book (TAOSSA) in 2006. I just neglected to mention it was 0day.
|
# ¿ Apr 20, 2012 03:11 |