|
Otto Skorzeny posted:For C or Obj-C, clang. For C++, nothing yet. Is icc not any good now? I haven't written C++ in years so I'm dated but it used to be pretty good.
|
# ? Mar 14, 2010 04:13 |
|
|
# ? May 17, 2024 15:47 |
|
ICC will compile fine, but it disables some optimizations unless it's running on an Intel processor. TenDRA is a really good, really fast C compiler, but it's not seen much development in a while and its C++ support isn't much better than clang. I only compile with it to verify that my code doesn't accidentally use any GCC extensions.
|
# ? Mar 14, 2010 05:12 |
|
Otto Skorzeny posted:For C or Obj-C, clang. For C++, nothing yet. clang is worth keeping an eye on for c++ support
|
# ? Mar 14, 2010 09:56 |
|
HFX posted:I've just got in a habit of treating all warnings as errors. I tried this for a while, but it made certain kinds of debug code annoyingly difficult, especially with warnings turned way up. Yes, I know that variable isn't used, I commented out all the code that used it, I don't feel like commenting out every individual necessary variable definition as well As well as stuff like if(somevector.size() < 10) {}, or for(int i = 0; i < somevector.size(); i++) {}, and the warnings that spews out annoy me and 99% of the time (100% of the time, with what I've been doing lately) are absolutely worthless. tef posted:clang is worth keeping an eye on for c++ support Worth noting that Clang (which is written in C++) now builds itself, and that series of boxes has gotten substantially greener since I first inspected it. It wouldn't surprise me at all if it built the vast majority of non-template-magic programs totally fine by the end of the year, if not building the majority of Boost. I am so totally excited for Clang. ZorbaTHut fucked around with this message at 23:02 on Mar 14, 2010 |
# ? Mar 14, 2010 22:55 |
|
ZorbaTHut posted:Worth noting that Clang (which is written in C++) now builds itself, and that series of boxes has gotten substantially greener since I first inspected it. It wouldn't surprise me at all if it built the vast majority of non-template-magic programs totally fine by the end of the year, if not building the majority of Boost. Actually, we should be fine on template-magic programs; metaprograms that don't compile are pretty firmly in the "individual bug" category rather than "serious architectural work required". Our major holes are all around virtual inheritance (lots of code-generation problems), access control (lots of implementation gaps), and exceptions (lots of rigorous testing needed).
|
# ? Mar 15, 2010 02:23 |
|
code:
code:
TOO SCSI FOR MY CAT fucked around with this message at 19:07 on Mar 16, 2010 |
# ? Mar 16, 2010 19:03 |
|
Janin posted:
|
# ? Mar 17, 2010 16:24 |
|
Janin posted:
|
# ? Mar 17, 2010 16:35 |
|
Janin posted:
I thought that 'what would you have to do without arrays?' question in my CS tutorial was stupid. Apparently not!
|
# ? Mar 17, 2010 16:40 |
|
Jonnty posted:I thought that 'what would you have to do without arrays?' question in my CS tutorial was stupid. Apparently not! The right answer to your question would be I'd use a list. I've come to the conclusion that most programmers have never progressed beyond the intro classes in their skill set. Once you do that, a lot of the code you deal with starts to make a lot of sense.
|
# ? Mar 17, 2010 18:21 |
|
HFX posted:The right answer to your question would be I'd use a list. Oh, don't be pedantic, you know what they meant.
|
# ? Mar 17, 2010 19:58 |
|
Jonnty posted:Oh, don't be pedantic, you know what they meant. well, what DID they mean? because you can get along just fine without arrays as long as you have pointers: code:
n.ed: I'm actually being serious, what do you think that that question means? They didn't ask "what would you do without any language construct that allows you to create a data type containing more than one value", they asked what you would do without arrays.
|
# ? Mar 17, 2010 21:52 |
|
What is an array? A contiguous buffer in memory that you can treat as a vector of values?
|
# ? Mar 17, 2010 21:59 |
|
LockeNess Monster posted:What is an array? A contiguous buffer in memory that you can treat as a vector of values? What is an array? A miserable pile of values! But enough talk...
|
# ? Mar 17, 2010 22:01 |
|
Ryouga Inverse posted:What is an array? A miserable pile of values! But enough talk... I mean, depending on the definition of the array the assignment statement "don't use arrays" would have very different implications. Array could mean associative array, and/or linked list could count as an array as well.
|
# ? Mar 17, 2010 22:02 |
|
LockeNess Monster posted:I mean, depending on the definition of the array the assignment statement "don't use arrays" would have very different implications. Well, yeah, that's why this discussion is anything but pedantic. "What if you didn't have arrays" is an incredibly vague question.
|
# ? Mar 17, 2010 22:05 |
|
LockeNess Monster posted:I mean, depending on the definition of the array the assignment statement "don't use arrays" would have very different implications. You could say that procedures are arrays of instructions, but trying to super-extend definitions like that isn't helpful. An array is a fixed-size, homogenous sequence of values, stored consecutively in memory. I think it's fair to give the tutorial a break, though, considering that arrays are usually taught before lists. Obviously, it's asking "what would you have to do without data structures?"
|
# ? Mar 17, 2010 22:05 |
|
I guess I just hate the question because the answer they're expecting is predicated on you not knowing anything but what they've taught you. I hate questions like that because I always try to read more about what I'm doing, etc. and so I always know the "pedantic" answer to the question. It's a legitimate question as written - "What would you do [in this function] if you couldn't/didn't want to use arrays?" because then you can give any of the valid answers that still accomplish the task but don't use arrays. But when you write the question specifically expecting the answer "gently caress WE'RE SCREWED UNLESS THERE'S SOMETHING ELSE YOU HAVEN'T TOLD ME YET" and use vague terminology to boot, well...
|
# ? Mar 17, 2010 22:34 |
|
Ryouga Inverse posted:I guess I just hate the question because the answer they're expecting is predicated on you not knowing anything but what they've taught you. I hate questions like that because I always try to read more about what I'm doing, etc. and so I always know the "pedantic" answer to the question. "Array" is not vague terminology in C, C++, Java, Pascal, or C#. If it's a class in PHP, yeah, you might have a point, but I don't think that was the case.
|
# ? Mar 18, 2010 02:05 |
|
Nomnom Cookie posted:"Array" is not vague terminology in C, C++, Java, Pascal, or C#. If it's a class in PHP, yeah, you might have a point, but I don't think that was the case. okay, so "use a linked list" is a perfectly valid response to the question, because they didn't specifically disallow that solution
|
# ? Mar 18, 2010 02:38 |
|
....and the thread reaches another low point. To get bach on track, I present you with an excerpt from the Blob class. It hasn't seen use in a long, long time (or very possibly ever), but still lurks around in our Perforce history somewhere and is occasionally brought out to scare fresh coders. code:
code:
Vinterstum fucked around with this message at 02:58 on Mar 18, 2010 |
# ? Mar 18, 2010 02:39 |
|
I dunno, most of that doesn't look that terrible (except for the new(this) part).
|
# ? Mar 18, 2010 08:09 |
|
I'll raise this. So I've been putting in a lot of hours on a project that is 90% of javascript. For the most part it is one unified application and not a javascript just for a webpage at a time. I decided to see how large the project has grown: find . -name "*.*" -exec cat {} \; | wc -l cat: .: Is a directory 194914 That's right a 200K lines of code Javascript application. This explains why I've been working 60+ hours for the last 2 months since I joined the project. Imagine the pain from debugging with most of the people being of the intro class programming variety. Jonnty posted:Oh, don't be pedantic, you know what they meant. To be fair, there is a whole class of languages built upon the concept of the list being your basic data structure. Some of them don't even have arrays, although most do for performance reasons.
|
# ? Mar 18, 2010 09:15 |
|
Linked list is like answering "Drive my Hummer!" when someone asks you what you would do if you didn't have a car.
|
# ? Mar 18, 2010 09:19 |
|
evensevenone posted:Linked list is like answering "Drive my Hummer!" when someone asks you what you would do if you didn't have a car. No, your analogy is inapt. Using a linked list is like answering, "I never drive my car" when someone asks me what I would do if I didn't have a car.
|
# ? Mar 18, 2010 10:30 |
|
Nomnom Cookie posted:"Array" is not vague terminology in C, C++, So I guess I will be okay if I dynamically allocate enough memory for N objects of type T and just have a pointer to them instead of declaring a T[N]?
|
# ? Mar 18, 2010 15:39 |
|
This is worst derail, occurring on ugliest track
|
# ? Mar 18, 2010 16:13 |
|
Vanadium posted:So I guess I will be okay if I dynamically allocate enough memory for N objects of type T and just have a pointer to them instead of declaring a T[N]? Yes, those are both arrays.
|
# ? Mar 18, 2010 16:16 |
|
How is the former an array? vvv that just means you access the elements of actual arrays through a pointer, it does not make everything you can point to an array Vanadium fucked around with this message at 16:56 on Mar 18, 2010 |
# ? Mar 18, 2010 16:28 |
|
Vanadium posted:How is the former an array? You do realize that the former is fundamentally what an array is right? You can very well do *(pointer + sizeof(object) * index). In fact [] is syntactic sugar for the pointer math.
|
# ? Mar 18, 2010 16:31 |
|
This is a retarded derail. Can we just all accept that an array is something contiguous in virtual memory that can be accessed via some sort of get_element_at_index() function? Unless you are a php programmer or something. Vanadium. Those are both arrays. Just one is on heap and another one is on stack or in Data section.
|
# ? Mar 18, 2010 16:33 |
|
LockeNess Monster posted:This is a retarded derail. Can we just all accept that an array is something contiguous in virtual memory that can be accessed via some sort of get_element_at_index() function? Unless you are a php programmer or something. I can agree to that, and I'm sorry I joked about the list earlier since that lead to the derail. HFX fucked around with this message at 16:38 on Mar 18, 2010 |
# ? Mar 18, 2010 16:34 |
|
(found via irc)
|
# ? Mar 18, 2010 18:30 |
|
haha, that's incredible "Do you mean <question that probably gets asked approx. 20 times a day on that forum>? I can't answer anything more complicated than that."
|
# ? Mar 18, 2010 19:25 |
|
If you want a laugh, I strongly recommend searching phpfreaks.com's forums for all of Q695's posts: http://www.phpfreaks.com/forums/index.php?action=profile;area=showposts;u=70191 haku posted:You have programming training?!?! Q695 posted:Yes, I have a degree in IT (my BS), focusing in Web Development (my AAS), and looking for work more along the lines of QA and eventually becoming an architect. Why is that so shocking? edit: aaah hahahaha http://www.phpfreaks.com/forums/index.php/topic,240167.0.html is pure gold. Q695 believed that using an HTML <input> type of 'password' automatically encrypted the data (with SSL) before sending it to the server. Q695 posted:Why did a college professor lie to me about it then? Why wouldn't password automatically encrypt the data when sending it? I can appreciate not being knowledgeable; you have to learn somehow. He's just so arrogant in his stupidity, when his suggestions are almost all bad ideas and he's proven wrong by smarter people in almost every post. He's a jackass to people that try to help him, too: http://www.phpfreaks.com/forums/index.php/topic,240090.0.html Lysidas fucked around with this message at 03:13 on Mar 19, 2010 |
# ? Mar 18, 2010 21:31 |
|
Jesus. H. Christ. It's poo poo like ^^^^ that make me incredibly sad to be associated to PHP. I'll hazard a guess that poo poo like that and the general "php c0d3rz" creating awful, terrible code is the primary factor behind so much PHP hate these days. We're not all like that, I promise! - Please don't lump us competent folks in with this lot. </plea>
|
# ? Mar 19, 2010 08:05 |
|
His lovely attitude has nothing to do with PHP, or any other language. He's just a bad programmer.
|
# ? Mar 19, 2010 08:16 |
|
I like how he is boasting with the fact that he went to college and had an OMG real life college professor tell him that!
|
# ? Mar 19, 2010 08:17 |
|
I just ran into this comment while coming through client's jsp files.code:
|
# ? Mar 19, 2010 16:26 |
|
|
# ? May 17, 2024 15:47 |
|
LockeNess Monster posted:I like how he is boasting with the fact that he went to college and had an OMG real life college professor tell him that! Professors: fine for theory, always wrong on code.
|
# ? Mar 19, 2010 16:59 |