archived stringclasses 2
values | author stringlengths 3 20 | author_fullname stringlengths 4 12 ⌀ | body stringlengths 0 22.5k | comment_type stringclasses 1
value | controversiality stringclasses 2
values | created_utc stringlengths 10 10 | edited stringlengths 4 12 | gilded stringclasses 7
values | id stringlengths 1 7 | link_id stringlengths 7 10 | locked stringclasses 2
values | name stringlengths 4 10 ⌀ | parent_id stringlengths 5 10 | permalink stringlengths 41 91 ⌀ | retrieved_on stringlengths 10 10 ⌀ | score stringlengths 1 4 | subreddit_id stringclasses 1
value | subreddit_name_prefixed stringclasses 1
value | subreddit_type stringclasses 1
value | total_awards_received stringclasses 19
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
True | nemtrif | null | As someone who works with both languages, I am afraid these kind of FAQs can be a little harmful. The most important thing when starting with C# if you have C++ background (or vice versa, for that matter) is to start from beginning, and not assume that the languages are similar. Get a good book - a FAQ won't replace it... | null | 0 | 1318949134 | False | 0 | c2sfuxn | t3_lg1xx | null | t1_c2sfuxn | t3_lg1xx | null | 1427748193 | 7 | t5_2fwo | null | null | null |
True | ethraax | null | When it's a question of orders of magnitude, it's often quite important. Sure, getting your program to run 1.2x faster may not be top priority. But getting it to run 100x faster usually is. | null | 0 | 1318949193 | False | 0 | c2sfv6m | t3_lfm1k | null | t1_c2sfv6m | t1_c2sfmoc | null | 1427748196 | 9 | t5_2fwo | null | null | null |
True | grauenwolf | null | They can be created at runtime using reflection. | null | 0 | 1318949520 | False | 0 | c2sfwoo | t3_lg1xx | null | t1_c2sfwoo | t1_c2sf6kq | null | 1427748214 | 3 | t5_2fwo | null | null | null |
True | mao_neko | null | My main question about C# and .NET was what the hell these "assemblies" were and why do they need all these extra steps. Since then I've inferred that they're a kind of package management just for library code, but I still think the name could have been better. Assembly to me == assembly code. | null | 0 | 1318949529 | False | 0 | c2sfwqf | t3_lg1xx | null | t1_c2sfwqf | t3_lg1xx | null | 1427748214 | 4 | t5_2fwo | null | null | null |
True | bo1024 | null | That's true. I just found Haskell much less transparent in terms of performance. | null | 0 | 1318949561 | False | 0 | c2sfwve | t3_lfm1k | null | t1_c2sfwve | t1_c2sec95 | null | 1427748216 | 2 | t5_2fwo | null | null | null |
True | a_redditor | null | [Nope.](http://mlton.org/Developers) | null | 0 | 1318949572 | False | 0 | c2sfwx8 | t3_lg5md | null | t1_c2sfwx8 | t3_lg5md | null | 1427748223 | 2 | t5_2fwo | null | null | null |
True | Unmitigated_Smut | null | Wow, they dropped the ball on that one.
I would go with the [MSDN reference](http://msdn.microsoft.com/en-us/library/ff650316.aspx), which is almost the same code, but adds the *volatile* keyword in the double-checked-locking/lazy initialization instance.
| null | 0 | 1318949708 | False | 0 | c2sfxk3 | t3_lg6ms | null | t1_c2sfxk3 | t1_c2sfn4j | null | 1427748225 | 7 | t5_2fwo | null | null | null |
True | imphasing | null | It's sort of like Steve Holt.
Steve Yegge! | null | 0 | 1318949716 | False | 0 | c2sfxlc | t3_lc3ae | null | t1_c2sfxlc | t1_c2rirbh | null | 1427748225 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1318949759 | False | 0 | c2sfxsm | t3_lg1xx | null | t1_c2sfxsm | t3_lg1xx | null | 1427748228 | -5 | t5_2fwo | null | null | null |
True | another_user_name | null | So M should pretty much always be:
M = RAND_MAX / N;
right? | null | 0 | 1318949771 | False | 0 | c2sfxug | t3_lfsfk | null | t1_c2sfxug | t1_c2sdd38 | null | 1427748229 | 3 | t5_2fwo | null | null | null |
True | bo1024 | null | > Are you just saying Haskell is hard because you don't know how to use it?
Yeah, pretty much (haha). But my point is, how are you supposed to pick up tricks like that? It seems to me that it's harder and less intuitive to find out how to write fast programs. I love lots of things about Haskell, but I see this as a... | null | 0 | 1318949796 | False | 0 | c2sfxy3 | t3_lfm1k | null | t1_c2sfxy3 | t1_c2sf1wy | null | 1427748231 | 4 | t5_2fwo | null | null | null |
True | grauenwolf | null | It isn't about performance at all. Marking a function as virtual is a serious commitment in terms of API design and should treated as such. | null | 0 | 1318949892 | False | 0 | c2sfydv | t3_lg1xx | null | t1_c2sfydv | t1_c2sethc | null | 1427748246 | 6 | t5_2fwo | null | null | null |
True | leonscape | null | What the CLR and MSIL may or may not do for intellisense has no bearing on the design of C# or VB.net or F# or etc... Theres nothing specific in C# to make intellisense work. Even the XML metadata is written in comments, and could in fact be simply done in the comment lines of C++ (which works already I believe). Also ... | null | 0 | 1318950078 | False | 0 | c2sfz7n | t3_lg1xx | null | t1_c2sfz7n | t1_c2sfnvi | null | 1427748254 | 2 | t5_2fwo | null | null | null |
True | Pxtl | null | I learned C++ after leaning Java and I found that Thinking In C++ was a good (free) overview of the language.
http://www.mindview.net/Books/DownloadSites | null | 0 | 1318950085 | False | 0 | c2sfz90 | t3_lg1xx | null | t1_c2sfz90 | t1_c2septv | null | 1427748256 | 6 | t5_2fwo | null | null | null |
True | smors | null | Yes. Which just underscores the point that == on Strings in java is a ad idea. | null | 0 | 1318950164 | False | 0 | c2sfzme | t3_lg1xx | null | t1_c2sfzme | t1_c2sfji2 | null | 1427748260 | 10 | t5_2fwo | null | null | null |
True | leonscape | null | Having seen the hurdles the Kdevelop people jump through to get it to work, *shudder* I'd hate to have to work my mind through all the edge cases. | null | 0 | 1318950166 | False | 0 | c2sfzmu | t3_lg1xx | null | t1_c2sfzmu | t1_c2sf883 | null | 1427748260 | 5 | t5_2fwo | null | null | null |
True | grauenwolf | null | Which method? If everything is virtual you have no way to know which method needs to be overridden. This is especially important if methods are chained such as Add calling Insert. | null | 0 | 1318950222 | False | 0 | c2sfzwd | t3_lg1xx | null | t1_c2sfzwd | t1_c2sex6u | null | 1427748261 | 4 | t5_2fwo | null | null | null |
True | grauenwolf | null | EmployeeCollection is better because you can extend it later with new properties and methods. | null | 0 | 1318950315 | False | 0 | c2sg0av | t3_lg1xx | null | t1_c2sg0av | t1_c2sf0bm | null | 1427748264 | 1 | t5_2fwo | null | null | null |
True | Pxtl | null | Missing feature on Interfaces is he doesn't mention the extension methods. Extension methods *sort of* let you add logic to interfaces. Basically extension methods are just normal static functions that you can call using method syntax.
So you can get IEnumerable myVar.Last() and stuff like that using extension mehto... | null | 0 | 1318950379 | False | 0 | c2sg0lk | t3_lg1xx | null | t1_c2sg0lk | t3_lg1xx | null | 1427748267 | 5 | t5_2fwo | null | null | null |
True | bigdubs | null | there is nothing specific in TCP that causes packets to traverse edges, you just assume it's there because TCP is built on top of IP. TCP's only responsibility is to make sure there is guaranteed and in order reception of packets.
C#||VB.net||F# are abstractions above MSIL / CLR in the same vein, they assume the feat... | null | 0 | 1318950392 | False | 0 | c2sg0od | t3_lg1xx | null | t1_c2sg0od | t1_c2sfz7n | null | 1427748273 | 3 | t5_2fwo | null | null | null |
True | ascii | null | Quoting Wikipedia:
> In C++, a structure is a class defined with the struct keyword. Its members and base classes are public by default. A class defined with the class keyword has private members and base classes by default. This is the **only** difference between structs and classes in C++.
What's wrong with the... | null | 0 | 1318950403 | False | 0 | c2sg0q3 | t3_lg1xx | null | t1_c2sg0q3 | t1_c2sfxsm | null | 1427748268 | 8 | t5_2fwo | null | null | null |
True | bo1024 | null | > Use this library and memoizing a function's results is simply a matter of typing:
> memoizedFib = memoize fib
Cool! I hadn't seen that. That being said, it's still really unwieldy to implement yourself. Having a library function is of course a nice way out. :)
> if the laziness is causing a space leak,... | null | 0 | 1318950439 | False | 0 | c2sg0vs | t3_lfm1k | null | t1_c2sg0vs | t1_c2seezb | null | 1427748269 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | Scala can in some situations be a more approachable solution. | null | 0 | 1318950443 | False | 0 | c2sg0w9 | t3_lfm1k | null | t1_c2sg0w9 | t3_lfm1k | null | 1427748269 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | \+ is literally the only operator like that, how hard is it really to understand?
Also, == *is* comparing references on objects everyone knows that. + is not defined for objects, it just happens to be a String operator. | null | 0 | 1318950459 | True | 0 | c2sg0yq | t3_lg1xx | null | t1_c2sg0yq | t1_c2sfqft | null | 1427748270 | 1 | t5_2fwo | null | null | null |
True | lukeatron | null | An assembly is just a dll or exe that runs against the .net CLR. Probably the most important difference (besides the reliance on the CLR) between a native binary and an assembly is that the assembly contains metadata that describes everything it contains.
I do agree that the nomenclature is a confusing choice given... | null | 0 | 1318950471 | False | 0 | c2sg10z | t3_lg1xx | null | t1_c2sg10z | t1_c2sfwqf | null | 1427748272 | 12 | t5_2fwo | null | null | null |
True | mikeash | null | I got to the "uniform distribution" bit and then just said "WTF?" to myself over and over again until I finished the article. It's great to see someone harp on others for blindly avoiding a construct without understanding why it's bad and then committing the *exact same error* just a few paragraphs later. | null | 0 | 1318950544 | False | 0 | c2sg1e5 | t3_lfsfk | null | t1_c2sg1e5 | t1_c2sdc6n | null | 1427748276 | 3 | t5_2fwo | null | null | null |
True | SeminoleVesicle | null | Probably because any system that benefits from DI is in the realm of 100k or more lines of code. Any example that is presented in a single blog post is going to be trivial to replace with a piece of non-DI code. | null | 0 | 1318950552 | False | 0 | c2sg1fp | t3_lf1px | null | t1_c2sg1fp | t1_c2sf2jg | null | 1427748276 | 3 | t5_2fwo | null | null | null |
True | grauenwolf | null | If you want to mock an object that comes from a factory then do so. Simply don't invoke the factory method. There is no magic here.
| null | 0 | 1318950664 | False | 0 | c2sg1ze | t3_lf1px | null | t1_c2sg1ze | t1_c2se7ry | null | 1427748283 | 2 | t5_2fwo | null | null | null |
True | mikeash | null | No, she says that the integer version doesn't work, but the floating-point version (which works out to the same thing) is ok. She says that it has problems, but for some reason these problems are presented as acceptable, while the integer version with the *exact same problems* is presented as being the output of cluele... | null | 0 | 1318950669 | False | 0 | c2sg20k | t3_lfsfk | null | t1_c2sg20k | t1_c2sdv6l | null | 1427748284 | 2 | t5_2fwo | null | null | null |
True | shevegen | null | Someone moving from Python to Perl?
Python to Ruby I can understand.
Ruby to Python I can understand.
Perhaps even anyone moving to Perl 6.
BUT MOVING TO PERL 5? WHAT FOR AND WHY?
Perl 5 has nothing compelling for Rubyista or Pythonista.
It is the dinosaur language of aging C hackers whose brain is too lazy to le... | null | 0 | 1318950727 | False | 0 | c2sg2af | t3_lg940 | null | t1_c2sg2af | t3_lg940 | null | 1427748287 | -8 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1318950729 | False | 0 | c2sg2an | t3_lg1xx | null | t1_c2sg2an | t1_c2sg0q3 | null | 1427748287 | -8 | t5_2fwo | null | null | null |
True | bo1024 | null | HashMap<A,B> memo = new HashMap<A,B>();
B memoFunc(A input)
{
if(memo.containsKey(input)) return memo.get(input);
B answer = func(input);
memo.put(input,answer);
return answer;
}
(And I don't even like Java!) It's really intuitive, you know? Look it up, ... | null | 0 | 1318950804 | False | 0 | c2sg2o1 | t3_lfm1k | null | t1_c2sg2o1 | t1_c2sefqx | null | 1427748292 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1318950830 | False | 0 | c2sg2sk | t3_lg6zg | null | t1_c2sg2sk | t1_c2sfdcp | null | 1427748294 | 1 | t5_2fwo | null | null | null |
True | bo1024 | null | Cool, thanks. | null | 0 | 1318950861 | False | 0 | c2sg2xu | t3_lfsfk | null | t1_c2sg2xu | t1_c2sepa4 | null | 1427748296 | 1 | t5_2fwo | null | null | null |
True | i8beef | null | I disagree. Factories (what DI Frameworks replace by becoming "the" factory essentially) littered all over the app just to build instances of classes are a bigger maintenance headache than a single configuration space.
My reasoning is that WHICH instance of a class to use is a CONFIGURATION issue. Factories have to pr... | null | 0 | 1318950909 | False | 0 | c2sg36n | t3_lf1px | null | t1_c2sg36n | t1_c2sdx23 | null | 1427748299 | 2 | t5_2fwo | null | null | null |
True | grauenwolf | null | A constructor parameter is enough to shift the decision to the calling code.
Having a factory method or a DI Framework is orthogonal to where dependencies are resolved. | null | 0 | 1318950926 | False | 0 | c2sg39y | t3_lf1px | null | t1_c2sg39y | t1_c2sde4j | null | 1427748300 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | Axilmar: you were a troll on Lambda the Ultimate before you finally gave up and stopped wasting our time there. You're a troll here. Hopefully eventually you'll figure out what the constant in the equation is. | null | 0 | 1318950955 | False | 0 | c2sg3el | t3_lfm1k | null | t1_c2sg3el | t1_c2sew4i | null | 1427748302 | 6 | t5_2fwo | null | null | null |
True | grauenwolf | null | Separation of concerns applies to configuration as well. Cramming everything into a single massive configuration file is not necessarily beneficial. | null | 0 | 1318951046 | False | 0 | c2sg3v3 | t3_lf1px | null | t1_c2sg3v3 | t1_c2sdcev | null | 1427748308 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1318951061 | False | 0 | c2sg3xn | t3_lg6ms | null | t1_c2sg3xn | t3_lg6ms | null | 1427748316 | 0 | t5_2fwo | null | null | null |
True | grauenwolf | null | I don't remember why but I didn't like it for some reason. | null | 0 | 1318951100 | False | 0 | c2sg44l | t3_lff3n | null | t1_c2sg44l | t1_c2sbprc | null | 1427748313 | 1 | t5_2fwo | null | null | null |
True | munificent | null | struct Foo : public Bar {
void someMember() { std::cout << "I am a member function."; }
}
Classes and structs *are* almost the same in C++. | null | 0 | 1318951248 | False | 0 | c2sg4us | t3_lg1xx | null | t1_c2sg4us | t1_c2sg2an | null | 1427748320 | 11 | t5_2fwo | null | null | null |
True | SyKoHPaTh | null | Weird, same OS and Chrome version and it killed my browser. | null | 0 | 1318951250 | False | 0 | c2sg4v6 | t3_lg6zg | null | t1_c2sg4v6 | t1_c2sf9mp | null | 1427748321 | 1 | t5_2fwo | null | null | null |
True | steve_b | null | Is it still the case that C# generics need to be constrained, like it says [here](http://www.andymcm.com/dotnetfaq.htm#14.3)? If so, that seems like a huge limitation compared to the way we use templates in C++. | null | 0 | 1318951300 | False | 0 | c2sg546 | t3_lg1xx | null | t1_c2sg546 | t1_c2sfwoo | null | 1427748324 | 3 | t5_2fwo | null | null | null |
True | munificent | null | > Theres nothing specific in C# to make intellisense work.
The lack of a string-based preprocessor certainly helps compared to C/C++. | null | 0 | 1318951307 | False | 0 | c2sg559 | t3_lg1xx | null | t1_c2sg559 | t1_c2sfz7n | null | 1427748324 | 13 | t5_2fwo | null | null | null |
True | FlySwat | null | As someone who started with .NET 1.0, and created collections for everything due to the lack of generics, I at first wrapped generic lists as subclasses, mainly due to being used to working with collections in that way.
However, by C# 3.0, with LINQ and extension methods, I find that I go now to great lengths to avoid... | null | 0 | 1318951392 | False | 0 | c2sg5jl | t3_lg1xx | null | t1_c2sg5jl | t1_c2sg0av | null | 1427748329 | 3 | t5_2fwo | null | null | null |
True | grauenwolf | null | Is your wrapper thread safe? If no, did you take steps to ensure each thread /request gets its own instance of it?
Where I work the answer is No and No. We are so totally screwed. | null | 0 | 1318951399 | False | 0 | c2sg5l3 | t3_lf1px | null | t1_c2sg5l3 | t1_c2sb6ry | null | 1427748330 | 1 | t5_2fwo | null | null | null |
True | akdas | null | > I do know that ed and ex commands are entered by first typing colon.
Yes, that I'm aware of. Interestingly, [this *vi* reference](http://www.vmunix.com/~gabor/vi.html) does talk about the `g` ex command. | null | 0 | 1318951451 | False | 0 | c2sg5v5 | t3_lfblq | null | t1_c2sg5v5 | t1_c2sf2y0 | null | 1427748334 | 1 | t5_2fwo | null | null | null |
True | grauenwolf | null | Can't add properties that way. | null | 0 | 1318951463 | False | 0 | c2sg5xa | t3_lg1xx | null | t1_c2sg5xa | t1_c2sg5jl | null | 1427748334 | 1 | t5_2fwo | null | null | null |
True | axilmar | null | I left LtU not because I trolled, but because most people there are truly assholes. They are immature, self-hyped people. It was a waste of time.
If you can't see that your darling language (Haskell, in this case), have some serious issues, it's not my fault. I will keep shouting about those problems, any chance that... | null | 0 | 1318951501 | False | 0 | c2sg644 | t3_lfm1k | null | t1_c2sg644 | t1_c2sg3el | null | 1427748336 | -8 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1318951519 | False | 0 | c2sg678 | t3_lg1xx | null | t1_c2sg678 | t1_c2sg4us | null | 1427748337 | -9 | t5_2fwo | null | null | null |
True | ascii | null | Nope.
#include <iostream>
struct foo
{
foo()
:x(1)
{}
int x;
};
struct bar
: foo
{
bar()
:foo(), y(2)
{}
int y;
int baz()
{
std::cout << x << ' ' << y << std::endl;
}
};
... | null | 0 | 1318951541 | False | 0 | c2sg6b9 | t3_lg1xx | null | t1_c2sg6b9 | t1_c2sg2an | null | 1427748338 | 9 | t5_2fwo | null | null | null |
True | FlySwat | null | Properties on collections are a code smell. They hide away the fact that they might be doing an expensive O(N) operation on each access behind what feels like a field.
| null | 0 | 1318951584 | False | 0 | c2sg6iw | t3_lg1xx | null | t1_c2sg6iw | t1_c2sg5xa | null | 1427748342 | 3 | t5_2fwo | null | null | null |
True | julesjacobs | null | "Buying a lottery ticket is not a good investment strategy. But buying 100k lottery tickets is! Promise."
You can sketch the architecture of 100k lines of code in a blog post, and explain why the DI framework helps. If you can't explain in concrete terms (that is, not in hand wavy fluffy language) why something is go... | null | 0 | 1318951689 | False | 0 | c2sg712 | t3_lf1px | null | t1_c2sg712 | t1_c2sg1fp | null | 1427748348 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1318951742 | False | 0 | c2sg7ai | t3_lg1xx | null | t1_c2sg7ai | t1_c2sg6b9 | null | 1427748352 | -8 | t5_2fwo | null | null | null |
True | [deleted] | null | Doesn't scroll on iPhone either | null | 0 | 1318951841 | False | 0 | c2sg7sb | t3_lg1xx | null | t1_c2sg7sb | t1_c2sessy | null | 1427748358 | 6 | t5_2fwo | null | null | null |
True | [deleted] | null | He rolls so fast that when they take pictures all they get is a gaussian blur. | null | 0 | 1318951857 | False | 0 | c2sg7v5 | t3_lfsfk | null | t1_c2sg7v5 | t1_c2sef37 | null | 1427748359 | 2 | t5_2fwo | null | null | null |
True | FlySwat | null | Modern C# singletons should be using Lazy<T>.
| null | 0 | 1318951893 | False | 0 | c2sg81g | t3_lg6ms | null | t1_c2sg81g | t1_c2sfn4j | null | 1427748362 | 4 | t5_2fwo | null | null | null |
True | [deleted] | null | in haskell's IO monad, with haskell's 'do' notation, it looks pretty similar to C.
you could think of the following c function:
void PrintAndIncrement(int* x) {
printf("%d\n", *x);
x++;
}
desugaring to:
f x = printf("%d\n", *x) >>= (\_ -> x++)
so, in a sense, C has only one monad, a... | null | 0 | 1318951909 | False | 0 | c2sg84k | t3_lfm1k | null | t1_c2sg84k | t1_c2sf1nx | null | 1427748362 | 2 | t5_2fwo | null | null | null |
True | fjonk | null | What, that they're pathetic? | null | 0 | 1318951928 | False | 0 | c2sg86l | t3_ld4m9 | null | t1_c2sg86l | t1_c2ryzcx | null | 1427748364 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | adrianmonk: _What's worse, every time I've heard this sort of statement made about Haskell, it is stated without further support, as if it is uncontroversial._
adrianmonk: _My gut feeling is that, depending on the type of work you do, these sorts of errors account for maybe 10 to 25% of all errors._
Oh, the irony. :-... | null | 0 | 1318951956 | False | 0 | c2sg8dn | t3_lfm1k | null | t1_c2sg8dn | t1_c2seiqd | null | 1427748366 | 6 | t5_2fwo | null | null | null |
True | grauenwolf | null | The work around is to throw away type safety and use late bound method calls. It sucks but it does work. | null | 0 | 1318951967 | False | 0 | c2sg8fy | t3_lg1xx | null | t1_c2sg8fy | t1_c2sg546 | null | 1427748366 | 3 | t5_2fwo | null | null | null |
True | jkff | null | Not exactly.
The semicolon is C's operator for sequential composition of computations.
Monads allow you to generalize the notion of sequential composition of computations.
With a simplification, composition is a binary operator on computations (to be more precise, it composes a computation with another one that's de... | null | 0 | 1318951976 | True | 0 | c2sg8hh | t3_lfm1k | null | t1_c2sg8hh | t1_c2sf1nx | null | 1427748367 | 7 | t5_2fwo | null | null | null |
True | [deleted] | null | Allow me to quote from the linked article:
> This is absolutely not a platform for bashing another language. I don't care about any of that. I don't care why the readers want to use Perl or why they want to use Python. I care about people who are used to doing something one way in Python and might be surprised why ... | null | 0 | 1318951988 | False | 0 | c2sg8jd | t3_lg940 | null | t1_c2sg8jd | t1_c2sg2af | null | 1427748367 | 13 | t5_2fwo | null | null | null |
True | xnumbersx | null | Perl people live in a bubble. | null | 0 | 1318952017 | False | 0 | c2sg8o4 | t3_lg940 | null | t1_c2sg8o4 | t3_lg940 | null | 1427748370 | -14 | t5_2fwo | null | null | null |
True | asegura | null | which draws on a `<canvas>`. :-)
| null | 0 | 1318952098 | False | 0 | c2sg92y | t3_lg6zg | null | t1_c2sg92y | t1_c2sf589 | null | 1427748375 | 3 | t5_2fwo | null | null | null |
True | jkff | null | You can see how imperative code in Haskell looks like, e.g., here (shameless plug to my [distributed logging library](http://code.google.com/p/greg), which is also available for Java) http://hackage.haskell.org/packages/archive/greg-client/1.0.2/doc/html/src/System-Log-Greg.html . Look for the "do" blocks. | null | 0 | 1318952122 | False | 0 | c2sg96z | t3_lfm1k | null | t1_c2sg96z | t1_c2sf1nx | null | 1427748376 | 1 | t5_2fwo | null | null | null |
True | ascii | null |
* The original article points out that classes and structs work exactly alike in C++.
* You say this is completely wrong, and such a terrible error that the entire article is useless.
* I point out that it is in fact completely correct.
* You bring up that inheritance and member functions don't work in structs.
* ... | null | 0 | 1318952158 | False | 0 | c2sg9dg | t3_lg1xx | null | t1_c2sg9dg | t1_c2sg7ai | null | 1427748378 | 11 | t5_2fwo | null | null | null |
True | [deleted] | null | Or a partially-applied function that isn't defined on all possible input values. :-) | null | 0 | 1318952161 | False | 0 | c2sg9dz | t3_lfm1k | null | t1_c2sg9dz | t1_c2sei91 | null | 1427748378 | 3 | t5_2fwo | null | null | null |
True | billsnow | null | Well, technically "g" is an ed command (and ex is a superset of ed). Most vi references don't cover ed and ex commands because they have their own separate man pages. Well they cover the simple stuff like "r" and "wq". | null | 0 | 1318952177 | False | 0 | c2sg9hk | t3_lfblq | null | t1_c2sg9hk | t1_c2sg5v5 | null | 1427748381 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | >If you wrote a C++ raytracer using linked lists for everything, using Vector records containing pointers to heap objects, and using a thread pool/work queue to do the raycasting (one pixel at a time), it would perform like shit also.
If I have to worry about those details, why should I use Haskell? As many others ... | null | 0 | 1318952215 | False | 0 | c2sg9op | t3_lfm1k | null | t1_c2sg9op | t1_c2sec95 | null | 1427748383 | 5 | t5_2fwo | null | null | null |
True | grauenwolf | null | How would you represent the total on OrdersCollection in a way that is XAML bindable? You can't use methods here. | null | 0 | 1318952243 | False | 0 | c2sg9tp | t3_lg1xx | null | t1_c2sg9tp | t1_c2sg6iw | null | 1427748385 | 1 | t5_2fwo | null | null | null |
True | honcas | null | They might be changing jobs. | null | 0 | 1318952271 | False | 0 | c2sg9z2 | t3_lg940 | null | t1_c2sg9z2 | t1_c2sg2af | null | 1427748387 | 8 | t5_2fwo | null | null | null |
True | skew | null | It might work for (each instance of) parList to adjust chunk size at runtime. | null | 0 | 1318952313 | True | 0 | c2sga70 | t3_lfm1k | null | t1_c2sga70 | t1_c2sfnxs | null | 1427748390 | 2 | t5_2fwo | null | null | null |
True | pnpbios | null | int NextPowerOfTwo(int x)
{
int v = x-1;
v |= v >> 1;
v |= v >> 2;
v |= v >> 4;
v |= v >> 8;
v |= v >> 16;
return v+1;
}
especially handy if you do lots of graphics code.
| null | 0 | 1318952315 | False | 0 | c2sga7h | t3_lc090 | null | t1_c2sga7h | t3_lc090 | null | 1427748390 | 1 | t5_2fwo | null | null | null |
True | pnpbios | null | Serious question, who actually wants to use WebSphere except WebSphere consultants? Who actually looks at everything available and settles on WebSphere? | null | 0 | 1318952469 | False | 0 | c2sgayq | t3_lc4xg | null | t1_c2sgayq | t3_lc4xg | null | 1427748400 | 2 | t5_2fwo | null | null | null |
True | FlySwat | null | I'd bind to a view model that is composed of a List<Order> and a few helper properties.
| null | 0 | 1318952502 | False | 0 | c2sgb5b | t3_lg1xx | null | t1_c2sgb5b | t1_c2sg9tp | null | 1427748402 | 2 | t5_2fwo | null | null | null |
True | MatrixFrog | null | I haven't done any C or C++ in a while, Does the compiler at least warn you when you try to negate an `unsigned`? | null | 0 | 1318952575 | False | 0 | c2sgbio | t3_lg59j | null | t1_c2sgbio | t3_lg59j | null | 1427748408 | 4 | t5_2fwo | null | null | null |
True | doomchild | null | One pet peeve of mine: describing reference and value types in terms of where they are stored. The *important* point is not that reference types are on the heap, and value types are on the stack, the important point is that reference types are passed by reference, and value types are passed by value. I remember read... | null | 0 | 1318952576 | False | 0 | c2sgbj2 | t3_lg1xx | null | t1_c2sgbj2 | t3_lg1xx | null | 1427748408 | 3 | t5_2fwo | null | null | null |
True | green7ea | null | I like this guy's approach to patterns. I taught a 2nd year class in a software engineering school and saw too many people treat design patterns as the silver bullet. Students had just learned to use design patterns and treated every software problem as a nail and design patterns as the hammer.
I tried so hard to get ... | null | 0 | 1318952668 | False | 0 | c2sgc10 | t3_lg6ms | null | t1_c2sgc10 | t3_lg6ms | null | 1427748415 | 3 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1318952692 | 1426127254 | 0 | c2sgc4o | t3_lg940 | null | t1_c2sgc4o | t3_lg940 | null | 1427748419 | 8 | t5_2fwo | null | null | null |
True | dick_psychiatrist | null | Sounds like a good start.
| null | 0 | 1318952703 | False | 0 | c2sgc6q | t3_lfcpb | null | t1_c2sgc6q | t1_c2saak0 | null | 1427748419 | 2 | t5_2fwo | null | null | null |
True | bitwize | null | > Why A + B != A - (-B) in pathological cases where you use the wrong damn type for a signed value
there, ftfy | null | 0 | 1318952708 | False | 0 | c2sgc7h | t3_lg59j | null | t1_c2sgc7h | t3_lg59j | null | 1427748419 | 7 | t5_2fwo | null | null | null |
True | generalT | null | excellent thought.
they're not thread-safe now, but they can be, because we control them.
[looks at code]
actually, i've written them to be pseudo-immutable, using readonly private members and constructor setting in C#, so i think we're good for now.
however, this is an good catch. thanks grauenwolf.
question: ... | null | 0 | 1318952714 | False | 0 | c2sgc8q | t3_lf1px | null | t1_c2sgc8q | t1_c2sg5l3 | null | 1427748419 | 1 | t5_2fwo | null | null | null |
True | imbcmdth | null | What?!
No.
No.
No.
No, no, no, no. | null | 0 | 1318952768 | True | 0 | c2sgcib | t3_lg661 | null | t1_c2sgcib | t3_lg661 | null | 1428192127 | 1 | t5_2fwo | null | null | null |
True | bongwhacker | null | Wow so wrong.
On a 64 bit system,
B = 0x0000000000000001
-B = 0xFFFFFFFFFFFFFFFFu
| null | 0 | 1318952822 | False | 0 | c2sgct5 | t3_lg59j | null | t1_c2sgct5 | t3_lg59j | null | 1427748433 | -2 | t5_2fwo | null | null | null |
True | Poddster | null | >vi actually doesn't have text objects,
Good job the article says this, then. | null | 0 | 1318952835 | False | 0 | c2sgcvi | t3_lfblq | null | t1_c2sgcvi | t1_c2scnd9 | null | 1427748433 | 1 | t5_2fwo | null | null | null |
True | gmiller123456 | null | Even though Powershell is a huge step forward from cmd.exe, it's not even close to a Posix style shell. I install Cygwin on every PC I own, but the shortcoming is that I can't rely on it to be on every system I work on.
Powershell only has a tiny subset of the Posix commands, and the ones they do have are named horri... | null | 0 | 1318952883 | False | 0 | c2sgd4m | t3_lc72d | null | t1_c2sgd4m | t1_c2rhbun | null | 1427748435 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | Magical internet points, what will I do without them? | null | 0 | 1318952923 | False | 0 | c2sgdbv | t3_lf038 | null | t1_c2sgdbv | t1_c2s9gwz | null | 1427748437 | 1 | t5_2fwo | null | null | null |
True | rinesen | null | Well, I have the first part:
* set a mark with: m<letter>
* reverse search your function with: ?<functionname> (partial is enough)
* copy the name: yw
* go back to the mark: '<letter>
I don't know how to paste best now as the copied word would be on the same line when pressing p.
Edit... | null | 0 | 1318953077 | False | 0 | c2sge4t | t3_lfblq | null | t1_c2sge4t | t1_c2s9egu | null | 1427748451 | 1 | t5_2fwo | null | null | null |
True | yellowstuff | null | I think this is premature generality.
For me there are many times when the collection is used in a small enough scope that I know I will probably never need properties or methods, and if I do it is OK to change the code later rather than do the work up front.
| null | 0 | 1318953201 | False | 0 | c2sgesv | t3_lg1xx | null | t1_c2sgesv | t1_c2sg0av | null | 1427748458 | 2 | t5_2fwo | null | null | null |
True | elperroborrachotoo | null | That'san suboptimal implementation of tail recursion, but what would be "improper"?
;-P | null | 0 | 1318953315 | False | 0 | c2sgfe6 | t3_ld22x | null | t1_c2sgfe6 | t1_c2s8s2d | null | 1427748465 | 2 | t5_2fwo | null | null | null |
True | Iv8f | null | > It neglects inheritance and member functions, which are of massive importance.
>I didn't say it doesn't work
You were implying that you can't use inheritance and member functions with structs and I bet you actually believed that.
> I just said you shouldn't do it
Struct in C++ is just a class with member... | null | 0 | 1318953357 | True | 0 | c2sgfm4 | t3_lg1xx | null | t1_c2sgfm4 | t1_c2sg7ai | null | 1427748468 | 6 | t5_2fwo | null | null | null |
True | Iv8f | null | Just because you don't want me to put functions in structs doesn't mean I shouldn't. | null | 0 | 1318953469 | False | 0 | c2sgg65 | t3_lg1xx | null | t1_c2sgg65 | t1_c2sg678 | null | 1427748473 | 7 | t5_2fwo | null | null | null |
True | drysart | null | > the important point is that reference types are passed by reference, and value types are passed by value
That's not correct. Reference types are passed by value. Yes, the value that is passed is the value of the reference, but that *is not* pass by reference. It's pass by value *of* a reference. The distinc... | null | 0 | 1318953580 | False | 0 | c2sggqa | t3_lg1xx | null | t1_c2sggqa | t1_c2sgbj2 | null | 1427748477 | 10 | t5_2fwo | null | null | null |
True | ethraax | null | That is such a gigantic stretch...
Also, that function doesn't really increment anything. It increments the pointer but since the pointer is passed by value, that change is local to the function, so it really just prints. | null | 0 | 1318953604 | False | 0 | c2sggub | t3_lfm1k | null | t1_c2sggub | t1_c2sg84k | null | 1427748480 | 2 | t5_2fwo | null | null | null |
True | JamesM_ | null | Are you certain? integrated-as is enabled by default on X86 targets now. | null | 0 | 1318953810 | False | 0 | c2sghwx | t3_le4h4 | null | t1_c2sghwx | t1_c2ryu0e | null | 1427748495 | 1 | t5_2fwo | null | null | null |
True | deong | null | I think in this case it's hard to avoid. Well, you can avoid blaming them, but not really avoid the need for them to understand what's going on and make informed decisions.
Clearly you can't simply have rand() do rejection testing, because for most people the cost would be enormous for a miniscule benefit they didn't ... | null | 0 | 1318953842 | False | 0 | c2sgi2n | t3_lfsfk | null | t1_c2sgi2n | t1_c2sfnbb | null | 1427748496 | 1 | t5_2fwo | null | null | null |
True | sidfarkus | null | Upvote. Storage is completely independent of the type of a variable. After all, it's easy and common to put value types on the heap:
class Whatever { int Blah { get; set; } }
or
Action<int> Foo(int bar) {
return b => b * bar; // bar is moved to long-term storage (the heap)
}
| null | 0 | 1318953876 | False | 0 | c2sgi8i | t3_lg1xx | null | t1_c2sgi8i | t1_c2sgbj2 | null | 1427748498 | 2 | t5_2fwo | null | null | null |
True | ethraax | null | I do know C#, and the LINQ syntax/semantics in C# is quite unlike C.
I think claiming that C code is all one big IO monad is like saying "When you think about it, C code is all about moving electrons around." It may be true, but it carries no practical meaning. | null | 0 | 1318953904 | False | 0 | c2sgidb | t3_lfm1k | null | t1_c2sgidb | t1_c2sg8hh | null | 1427748500 | 2 | t5_2fwo | null | null | null |
True | poo_22 | null | What does `' do specifically? | null | 0 | 1318953912 | False | 0 | c2sgiet | t3_lfblq | null | t1_c2sgiet | t1_c2sb7j9 | null | 1427748500 | 1 | t5_2fwo | null | null | null |
Subsets and Splits
Filtered Reddit Uplifting News
The query retrieves specific news articles by their link IDs, providing a basic overview of those particular entries without deeper analysis or insights.
Recent Programming Comments
Returns a limited set of programming records from 2020 to 2023, providing basic filtering with minimal analytical value.