|
TRex EaterofCars posted:Sun's javac is probably one of the best compilers on earth. I have no idea what you're talking about. It produces pretty much a direct translation from Java to bytecode with no optimization or anything. It's easy to be the "best" in a nearly completely trivial process. EDIT: I just realized I skipped a page in my rush to yell at Java, oh well.
|
# ¿ Nov 20, 2008 20:57 |
|
|
# ¿ Apr 25, 2024 03:26 |
|
rjmccall posted:When javac's hands aren't tied by inter-class abstraction boundaries, it can actually do quite a lot; but of course that's a huge limitation. You might mean it could do. It doesn't actually do poo poo. This code:
code:
|
# ¿ Nov 21, 2008 02:49 |
|
tef posted:What if b[] is being modified in a different thread? Then the results are undefined, because Java's volatile is only usable as a field attribute? And also, the length of an array will never change, so this question is pointless? Perhaps I have owned you goon sire?
|
# ¿ Nov 21, 2008 03:27 |
|
Vanadium posted:welp, you can in C++ using gcj's java interface. GCJ Can't Java
|
# ¿ Dec 9, 2008 01:50 |
|
Yesterday, I was asked "do you know why this crashes?" based on an "application has done terrible things and must die" dialog. I looked at the source, and it looked like this:code:
|
# ¿ Jan 3, 2009 10:56 |
|
beer_war posted:
I've done that occasionally with cousin int_expression and uncle pointer_expression to make visual c++ shut up. Yeah, there are other ways, such as (bool)int_expression and !!pointer_expression. I don't like them
|
# ¿ Jan 5, 2009 00:14 |
|
geetee posted:There is no way &1 even compiles (right?) so I don't understand what this entire fiasco is about. The logical operator "AND" requires two ampersands, not one. I'm surprised none of your IDEs warned you about this. It's just a segfault waiting to happen. Just use modulus and move on. Hrm good sir I think you are wrong, allow me a moment to write a two-page refutation of this complete with references (with exact page numbers) to the C99 standard, the C++98 standard, the ANSI C standard and the C++0x draft.
|
# ¿ Jan 7, 2009 15:52 |
|
minato posted:
That's pretty likely to go boom on GCC FYI
|
# ¿ Jan 7, 2009 17:33 |
|
Presto posted:Should be fine, although it may bitch about violating strict aliasing rules. It won't "bitch", but it's quite possible that it will randomly fail! Just use unions drat it. Jeet chirst this is making me so angry. What nubbery..
|
# ¿ Jan 7, 2009 20:01 |
|
I was thinking about plunking this in my code:code:
EDIT: also this code:
Painless fucked around with this message at 15:26 on Feb 6, 2009 |
# ¿ Feb 6, 2009 15:15 |
|
gibbed posted:Why is this a horror? - random, pointless printing to cerr - creating a T instance makes the byteswap function a lot less generic than it could be - pointless runtime switching (this will almost certainly get optimized away, though) among other crimes
|
# ¿ Jul 7, 2009 20:55 |
|
Lexical Unit posted:In case y'all were curious, here are the lines of code that lead me to inspect the byteswap header file in the first place, A horribly wrong way to use a horribly implemented function and simultaneously ignore the existence of a horribly implemented utility function? Nice.
|
# ¿ Jul 7, 2009 21:53 |
|
Munkeymon posted:http://blog.php-security.org/archives/92-CORE-GRASP-PHP-Tainted-Mode.html quote:maybe all these problems are gone soon
|
# ¿ Aug 31, 2009 17:27 |
|
I noticed that clearing a list was taking quite a bit of time so I replaced a list.clear() call with the following line:code:
|
# ¿ Sep 3, 2009 18:36 |
|
Otto Skorzeny posted:STL lists are Too Slow Ugggh these people are everywhere and it's never an argument against the design, it's always "I used dinkumware STL 0.1 on Visual C++ 6.0 in a trivial benchmark with a new/delete allocator and it was slower than java! So what the gently caress"
|
# ¿ Sep 23, 2009 19:35 |
|
The correct way to fix crashes caused off-by-one errors in loops involving arrays is to make every array one element larger than it needs to be This advice was in Code Complete, so you know it's good
|
# ¿ Oct 4, 2009 20:05 |
|
geetee posted:You talked poo poo when you were in no place to have done so and now you're back peddling. Well CoC is a pretty good place for a back peddler, I think a lot of people here have back problems and would like to buy a new one
|
# ¿ Nov 9, 2009 01:48 |
|
MononcQc posted:One of the lead devs back then (years before I got here) was a C programmer down to the bone. Never bothered to get into PHP the way he should have (not that I can blame him). The proper way to get into PHP is in a casket
|
# ¿ Nov 30, 2009 19:47 |
|
quote:CINT is written in C++ itself, with slightly less than 400,000 lines of code.
|
# ¿ Jan 14, 2010 17:22 |
|
Lexical Unit posted:I bet there's a smaller horror inside!
|
# ¿ Jan 31, 2010 21:14 |
|
king_kilr posted:Ah java, was my_str == "foobar" really that hard. Within the constraints of Java's lovely type system, making that the equivalent of "my_str.equals( "foobar" )" would just make problems worse.
|
# ¿ Feb 7, 2010 02:35 |
|
I dunno, most of that doesn't look that terrible (except for the new(this) part).
|
# ¿ Mar 18, 2010 08:09 |
|
This is worst derail, occurring on ugliest track
|
# ¿ Mar 18, 2010 16:13 |
|
That fwrite call is amazing.
|
# ¿ Mar 29, 2010 23:13 |
|
Also remove exceptions, dynamic_cast and typeid and add restrict from C99, I don't care how much the standard committee s about how hard it is to define The language would be almost usable and most C users would have no more excuses and then remove virtual because class-based polymorphism is an abomination
|
# ¿ Apr 14, 2010 23:15 |
|
First rule of optimization: assume that your compiler was written in 1983 by an army of white collared chimps with typewriters Second rule of optimization (follows from first): there's a massive difference between i++ and ++i, especially for primitives Third rule of optimization: god the neck of this bottle feels amazing in my rear end
|
# ¿ Apr 27, 2010 22:24 |
|
Yeah so yesterday I saw some punk kid writing "NULL" so I smacked him on the face and was like "yo don't try to be a hero, that pointer's a ZERO"
|
# ¿ May 19, 2010 17:07 |
|
Janin posted:Just discovered a new take on the for-case pattern (bonus points: spot the bug which brought me to discover this): That's like a matryoshka of horrors
|
# ¿ Jun 4, 2010 01:28 |
|
The way you describe it, your way of "fixing" things sounds like a coding horror in itself. Class A has a bug, so fix it by quietly removing 'final' and extending with a class that has the bug fixed?
|
# ¿ Jul 1, 2010 16:12 |
|
|
# ¿ Apr 25, 2024 03:26 |
|
litghost posted:Any C or C++ derivative with support for structured exceptions That's a feature of the platform, not the language
|
# ¿ Sep 22, 2010 05:54 |