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 | ejsik | null | Just received mine. Thank You! | null | 0 | 1316706489 | False | 0 | c2lruhd | t3_jjcwd | null | t1_c2lruhd | t3_jjcwd | null | 1428193475 | 1 | t5_2fwo | null | null | null |
True | sebzim4500 | null | Well of course ;p
But I meant on reddit...
EDIT: and please don't direct me to r/microsoft | null | 0 | 1316706623 | False | 0 | c2lrv6h | t3_kmevq | null | t1_c2lrv6h | t1_c2lpkfp | null | 1427632989 | 3 | t5_2fwo | null | null | null |
True | s73v3r | null | Again, if you can't get some kind of NDA or other promise not to steal the invention in place before revealing it, that's your own damn fault.
Not to mention, your link doesn't really back you up. Of all the things that were listed, only one guy mentioned NDA, and it was in passing. There were many, many more things that were mentioned, and given far more emphasis. | null | 0 | 1316706867 | False | 0 | c2lrwhc | t3_klqte | null | t1_c2lrwhc | t1_c2lr6ff | null | 1427633010 | 1 | t5_2fwo | null | null | null |
True | tnoy | null | Yeah, same here. The ur-lisp reimplementation of the day mailing list is great, though, so I don't want to unsubscribe. | null | 0 | 1316707153 | False | 0 | c2lrxzl | t3_knafe | null | t1_c2lrxzl | t1_c2lo9ig | null | 1427633023 | 1 | t5_2fwo | null | null | null |
True | filipf | null | It is not.
http://ermau.com/using-winrt-from-net/ | null | 0 | 1316707161 | False | 0 | c2lry1i | t3_kl1qp | null | t1_c2lry1i | t1_c2lg9hu | null | 1427633023 | 2 | t5_2fwo | null | null | null |
True | grauenwolf | null | Of course not, open source isn't a receipe for free labor. | null | 0 | 1316707190 | False | 0 | c2lry67 | t3_kl7h0 | null | t1_c2lry67 | t1_c2lpf9u | null | 1427633026 | 1 | t5_2fwo | null | null | null |
True | filipf | null | How about working sound and graphic drivers... | null | 0 | 1316707335 | False | 0 | c2lryvp | t3_kl7h0 | null | t1_c2lryvp | t1_c2lg2k2 | null | 1427633033 | 0 | t5_2fwo | null | null | null |
True | mvanier | null | And Abelson and Sussman's "Structure and Interpretation of Computer Programs" FTW. | null | 0 | 1316707857 | False | 0 | c2ls1gz | t3_kkegr | null | t1_c2ls1gz | t1_c2l36iu | null | 1427633067 | 1 | t5_2fwo | null | null | null |
True | nascent | null | > So all the above cannot be used when the GC is disabled.
You can use them, but the GC will not collect any memory.
> Yeah, better than C, worse than C++.
At this time, yes.
> D 2.0 doesn't have bitfields.
They don't seem too [ugly](http://www.d-programming-language.org/phobos/std_bitmanip.html#bitfields) to me.
You have [postblits](http://www.d-programming-language.org/struct#StructPostblit) for struct. Classes have reference semantics. Unlike C++ Classes and Structs are different things.
| null | 0 | 1316707932 | False | 0 | c2ls1uu | t3_kljc0 | null | t1_c2ls1uu | t1_c2lrue1 | null | 1427633073 | 2 | t5_2fwo | null | null | null |
True | we_the_sheeple | null | Did you make it in to work? We need to know!! | null | 0 | 1316708055 | False | 0 | c2ls2g5 | t3_kn9fk | null | t1_c2ls2g5 | t1_c2lqed3 | null | 1427633080 | 16 | t5_2fwo | null | null | null |
True | igouy | null | You work for the company that makes Opa. | null | 0 | 1316708154 | False | 0 | c2ls2xq | t3_kn8ra | null | t1_c2ls2xq | t1_c2lmfw5 | null | 1427633087 | 6 | t5_2fwo | null | null | null |
True | futant462 | null | Steve Sounders is a cool dude. Came to our company and gave a talk on mobile performance a few weeks ago. Interesting stuff. | null | 0 | 1316708158 | False | 0 | c2ls2yf | t3_knua7 | null | t1_c2ls2yf | t3_knua7 | null | 1427633087 | 2 | t5_2fwo | null | null | null |
True | axilmar | null | > You can use them, but the GC will not collect any memory.
And therefore memory will be leaked. And so, you can't use them.
> Unlike C++ Classes and Structs are different things.
That's the problem exactly. Same concept, two different treatments.
| null | 0 | 1316708221 | False | 0 | c2ls39a | t3_kljc0 | null | t1_c2ls39a | t1_c2ls1uu | null | 1427633091 | 1 | t5_2fwo | null | null | null |
True | kenotron | null | Only in that they are both randomized data structures. Skip lists are only binary in expectation (there might be more than 2 items before the next level).
Treaps, however, are always binary search trees. The randomness is used to balance the structure in expectation. | null | 0 | 1316708316 | False | 0 | c2ls3st | t3_kn9gt | null | t1_c2ls3st | t1_c2lqslf | null | 1427633097 | 2 | t5_2fwo | null | null | null |
True | onedeadgod | null | What experiences do you have with abstraction libs failing? | null | 0 | 1316708338 | False | 0 | c2ls3wp | t3_kmp73 | null | t1_c2ls3wp | t1_c2lltua | null | 1427633098 | 1 | t5_2fwo | null | null | null |
True | useful_idiot | null | Yo dawg I herd u like github... | null | 0 | 1316708410 | False | 0 | c2ls4ai | t3_knhd2 | null | t1_c2ls4ai | t3_knhd2 | null | 1427633104 | -7 | t5_2fwo | null | null | null |
True | onedeadgod | null | Huh?! | null | 0 | 1316708482 | False | 0 | c2ls4om | t3_kmp73 | null | t1_c2ls4om | t1_c2lneri | null | 1427633110 | 1 | t5_2fwo | null | null | null |
True | onedeadgod | null | You poor thing. | null | 0 | 1316708588 | False | 0 | c2ls594 | t3_kmpyi | null | t1_c2ls594 | t1_c2lqx1h | null | 1427633116 | -4 | t5_2fwo | null | null | null |
True | igouy | null | Expecting? No. Hoping for more? Yes. :-) | null | 0 | 1316708825 | False | 0 | c2ls6fk | t3_klypn | null | t1_c2ls6fk | t1_c2lix35 | null | 1427633131 | 1 | t5_2fwo | null | null | null |
True | nascent | null | Yes. This is true of immutable too, which is why when you cast to it, you must make sure no mutable references exist afterwards. (casting breaks the type system).
Also, there is some interest in allowing a pure function have it's returned value implicitly storable to immutable, investigation and implementation must be done though. | null | 0 | 1316708962 | False | 0 | c2ls74g | t3_knn5p | null | t1_c2ls74g | t1_c2lqxas | null | 1427633140 | 5 | t5_2fwo | null | null | null |
True | andralex | null | The Color example is a bit confused. In either C++ or D you'd need to switch from storing a Color to storing a Color*. Changing from value to reference semantics is not magic one would expect to work out automatically. Also, this has nothing to do with polymorphic semantics which motivate the distinction between struct and class in D.
What std::vector has to do with the discussion is that it's a type that has chosen value semantics from day one. In C++ people always choose at design time whether a type is value or polymorphic, and using it the other way around is almost always incorrect. D clarifies that in the type and therefore eliminates many mistakes.
Regarding RAII, it seems your knowledge predates the current D programming language, which has deterministic destructors.
>Jesus Christ, you took a simple concept and blown it out of proportions.
So there's an emotional component too? That would be edifying. My understanding of your arguments is that you started with a preconception ("D is not better than C++") and then built arguments, no matter how weak or ignorant, to support it. | null | 0 | 1316708987 | True | 0 | c2ls79b | t3_kljc0 | null | t1_c2ls79b | t1_c2lqfxz | null | 1427633142 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | Brilliant. It makes it much more easy to understand the purpose. | null | 0 | 1316709074 | False | 0 | c2ls7pv | t3_kmk56 | null | t1_c2ls7pv | t3_kmk56 | null | 1427633148 | 0 | t5_2fwo | null | null | null |
True | nascent | null | Modifying const and immutable values are undefined, casting is defined. | null | 0 | 1316709081 | False | 0 | c2ls7qo | t3_knn5p | null | t1_c2ls7qo | t1_c2lrfpm | null | 1427633148 | 5 | t5_2fwo | null | null | null |
True | FlySwat | null | Even if I didn't already know that github was built on ruby, I would have been able to deduce that from the attitude in the presentation. | null | 0 | 1316709108 | False | 0 | c2ls7vn | t3_knhd2 | null | t1_c2ls7vn | t3_knhd2 | null | 1427633150 | 5 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316709114 | True | 0 | c2ls7w1 | t3_kn9fk | null | t1_c2ls7w1 | t1_c2lpv69 | null | 1427633150 | 2 | t5_2fwo | null | null | null |
True | mrcaron | null | Good presentation slides... but is there a video or audio anywhere? | null | 0 | 1316709182 | False | 0 | c2ls89k | t3_knhd2 | null | t1_c2ls89k | t3_knhd2 | null | 1427633155 | 6 | t5_2fwo | null | null | null |
True | onedeadgod | null | No one is actually answering the question so far. The topic is the factors, not your favorite programming language or relative propaganda.
Consider:
1. Program requirements
2. Timeline
3. Environment
4. Libraries available
5. Proficiency
That's my top 5.
3. | null | 0 | 1316709315 | False | 0 | c2ls8zi | t3_kn8ra | null | t1_c2ls8zi | t3_kn8ra | null | 1427633164 | 3 | t5_2fwo | null | null | null |
True | onedeadgod | null | Sorry for the trailing 3. iPad snafu. | null | 0 | 1316709359 | False | 0 | c2ls97h | t3_kn8ra | null | t1_c2ls97h | t1_c2ls8zi | null | 1427633167 | 2 | t5_2fwo | null | null | null |
True | nascent | null | > And therefore memory will be leaked. And so, you can't use them.
No, you can re-enable the GC and it will collect. For projects that will not use the GC ever, there is work to be done on improving library options that don't make use of the GC.
> That's the problem exactly. Same concept, two different treatments.
No, they are two different concepts, two different treatments. If they were the same then there would only be one in D. | null | 0 | 1316709428 | False | 0 | c2ls9jn | t3_kljc0 | null | t1_c2ls9jn | t1_c2ls39a | null | 1427633172 | 1 | t5_2fwo | null | null | null |
True | Poita_ | null | However, if you cast *away* const, the behaviour is undefined.
const(int) x = 1;
const(int)* p = &x;
*(cast(int*)p) = 2;
writeln(x);
This prints '1' on my machine. YMMV. | null | 0 | 1316709551 | False | 0 | c2lsa7j | t3_knn5p | null | t1_c2lsa7j | t1_c2ls7qo | null | 1427633180 | 3 | t5_2fwo | null | null | null |
True | axilmar | null | > In either C++ or D you'd need to switch from storing a Color to storing a Color*. Changing from value to reference semantics is not magic one would expect to work out automatically.
No. In C++, when you change from struct to class, you wouldn't need to change how your functions are implemented.
> What std::vector has to do with the discussion is that it's a type that has chosen value semantics from day one.
std::vector has not chosen value or reference semantics. std::vector's elements can be pointers or values. It's up to the user.
> D clarifies that in the type and therefore eliminates many mistakes.
What mistakes? please refer to some examples.
> Regarding RAII, it seems your knowledge predates the current D programming language, which has deterministic destructors.
No, what I wrote above was straight out of D2's pages. D2 has deterministic destructors, and scope(this) and scope(that). Confusing, to say the least. Too many options for the same thing.
> So there's an emotional component too? My understanding of your arguments is that you started with a preconception ("D is not better than C++") and then built arguments, no matter how weak and ignorant, to support it.
Don't attack the messenger, attack the message.
| null | 0 | 1316709579 | False | 0 | c2lsacp | t3_kljc0 | null | t1_c2lsacp | t1_c2ls79b | null | 1427633182 | 0 | t5_2fwo | null | null | null |
True | axilmar | null | > No, you can re-enable the GC and it will collect. For projects that will not use the GC ever, there is work to be done on improving library options that don't make use of the GC.
But I was speaking about projects that will not use the GC ever.
> No, they are two different concepts, two different treatments. If they were the same then there would only be one in D.
Structs and classes are records. Their only difference is how they are memory managed. It's the same concept. Take memory management out, and they are the same.
What you're essentially saying is that "structs and classes are different because we made them different".
| null | 0 | 1316709748 | False | 0 | c2lsbaa | t3_kljc0 | null | t1_c2lsbaa | t1_c2ls9jn | null | 1427633194 | 1 | t5_2fwo | null | null | null |
True | eaturbrainz | null | In Scala this would work by initializing a *val* (immutable) data member with a block expression, in which you mutate a *var* (mutable) variable inside the block before finally returning the value to be stored in something immutable. | null | 0 | 1316709783 | False | 0 | c2lsbi4 | t3_knn5p | null | t1_c2lsbi4 | t1_c2lqiow | null | 1427633197 | 1 | t5_2fwo | null | null | null |
True | FrogsEye | null | > But this is not the end of the story. We believe in free software (hence the AGPL license) but we also understand that it may not be very suitable for commercial users of Opa. Such users will be able to obtain a private license (paid). [(source)](http://blog.opalang.org/2011/08/opa-license-contributions.html)
Thanks but no thanks. No price mentioned anywhere of course. | null | 0 | 1316710050 | False | 0 | c2lscys | t3_kn8ra | null | t1_c2lscys | t1_c2lmfw5 | null | 1427633217 | 3 | t5_2fwo | null | null | null |
True | djnattyp | null | or any .NET frameworks, or any PHP frameworks, or...
Plus it's inaccurate because some of the options listed (Flex and JAX-RS for example) can be used inside other frameworks (i.e. Spring MVC) to supply some specific need (Flash app inside a web page and REST interfaces respectively in the case of Flex and JAX-RS)
> participants: 1463
But this is the crowning reason for the downvotes - the poll is for such a small number of participants that it's not useful / misleading to apply outside that small community.
There's no way Vaadin is more popular than JSF, Spring MVC or Ruby on Rails, outside of the small sample polled. | null | 0 | 1316710302 | False | 0 | c2lseb1 | t3_kn6hr | null | t1_c2lseb1 | t1_c2lq7ei | null | 1427633234 | -1 | t5_2fwo | null | null | null |
True | omnilynx | null | Interesting idea, and it might be enlightening to do once as an exercise, but completely impractical and honestly not very useful. | null | 0 | 1316710331 | False | 0 | c2lsegl | t3_kmk56 | null | t1_c2lsegl | t3_kmk56 | null | 1427633237 | 1 | t5_2fwo | null | null | null |
True | foldl | null | How is single-threading the issue here? | null | 0 | 1316710379 | False | 0 | c2lsepx | t3_kkw07 | null | t1_c2lsepx | t1_c2lb1hl | null | 1427633240 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316710485 | False | 0 | c2lsfac | t3_klrrx | null | t1_c2lsfac | t1_c2lg9nn | null | 1427633248 | 3 | t5_2fwo | null | null | null |
True | andralex | null | >Also, there is some interest in allowing a pure function have it's returned value implicitly storable to immutable
I recall that's implemented already. | null | 0 | 1316710700 | False | 0 | c2lsgek | t3_knn5p | null | t1_c2lsgek | t1_c2ls74g | null | 1427633262 | 6 | t5_2fwo | null | null | null |
True | replyingtopost | null | To provide a little more detail, if anyone is interested in using gpus, gpus operate in groups (warps or streams) where each group is given more or less an instruction. Each member of the group cannot directly talk to the other, but they can write to different types of shared memory to "transfer" data. Memory access on the GPUs can be a little different for each architecture so there are a lot of subtleties with regards to speed up, and it is a different sort of programming paradigm compared to MPI, although lots of concepts in reduction and such can be borrowed from MPI for GPUs. | null | 0 | 1316710754 | False | 0 | c2lsgoh | t3_kltgu | null | t1_c2lsgoh | t1_c2lcwja | null | 1427633268 | 1 | t5_2fwo | null | null | null |
True | mricon | null | Quebec is actually pretty much nothing like France culturally, so the usual stereotype of a guy in a beret and a bow-tie riding a bike with french bread sticking out of his bag doesn't apply. | null | 0 | 1316710976 | False | 0 | c2lshub | t3_klhlv | null | t1_c2lshub | t1_c2llwsw | null | 1427633285 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316711034 | False | 0 | c2lsi4r | t3_kn9gt | null | t1_c2lsi4r | t3_kn9gt | null | 1427633288 | 3 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316711041 | False | 0 | c2lsi66 | t3_klrrx | null | t1_c2lsi66 | t1_c2lmrk6 | null | 1427633288 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | Single threaded VMs can't execute more than one thing at the same time. | null | 0 | 1316711080 | False | 0 | c2lsie0 | t3_kkw07 | null | t1_c2lsie0 | t1_c2lsepx | null | 1427633291 | 1 | t5_2fwo | null | null | null |
True | mistralol | null |
When working on small applications almost none. When working on larger applications they just tend to fall apart because of performance related reasons. They also become a nightmare to maintain when you have large complex databases.
| null | 0 | 1316711347 | False | 0 | c2lsjrr | t3_kmp73 | null | t1_c2lsjrr | t1_c2ls3wp | null | 1427633307 | 2 | t5_2fwo | null | null | null |
True | joshu | null | Hi. This is my project. I'll try to reply to feedback inline. | null | 0 | 1316711362 | False | 0 | c2lsjui | t3_kmpyi | null | t1_c2lsjui | t3_kmpyi | null | 1427633316 | 2 | t5_2fwo | null | null | null |
True | joshu | null | There's no deliberate omissions, I just felt it would be better to launch and get it out there. | null | 0 | 1316711390 | False | 0 | c2lsjzn | t3_kmpyi | null | t1_c2lsjzn | t1_c2lhn07 | null | 1427633309 | 3 | t5_2fwo | null | null | null |
True | deafbybeheading | null | So stupid question: the basic statically-typed OO way of doing essentially this would be to provide an immutable interface (or set of interfaces, for something more complex) to a data structure, build it using the concrete type(s), and only hand out references to data structure though the immutable interface type.
Is this not the same thing because the "client" (the user of the immutable interface) can still cast to the concrete type? Or is this more about achieving the same thing at the value type (rather than buying into objects and interfaces)? | null | 0 | 1316711396 | False | 0 | c2lsk18 | t3_knn5p | null | t1_c2lsk18 | t1_c2lqiow | null | 1427633309 | 2 | t5_2fwo | null | null | null |
True | joshu | null | How many are actually active and used? I'm not trying to cover everything, just stuff that's heavily used.
Frameworks in general aren't well covered. | null | 0 | 1316711432 | False | 0 | c2lsk8q | t3_kmpyi | null | t1_c2lsk8q | t1_c2lhmwa | null | 1427633312 | 2 | t5_2fwo | null | null | null |
True | mistralol | null |
An abstraction lib attempts to understand data. However it cannot do this yet to the same level of a human :) I explain on another post the typical problems. Normally performance related. | null | 0 | 1316711439 | False | 0 | c2lsk9z | t3_kmp73 | null | t1_c2lsk9z | t1_c2lqg5j | null | 1427633314 | 1 | t5_2fwo | null | null | null |
True | joshu | null | Don't worry about it. It's processed by humans. | null | 0 | 1316711447 | False | 0 | c2lskbb | t3_kmpyi | null | t1_c2lskbb | t1_c2lhwht | null | 1427633314 | 2 | t5_2fwo | null | null | null |
True | digital_cucumber | null | Doing things like that might help seeing one's code from different perspective, helping to get closer to that perfection, "...not when there is nothing more to add, but when there is nothing left to take away."
So it makes sense... kind of.
I suggest a small correction, though.
Do it, but DON'T COMMIT the code (or have a commit hook which would wipe all lines starting with #N) | null | 0 | 1316711454 | False | 0 | c2lskck | t3_kmk56 | null | t1_c2lskck | t3_kmk56 | null | 1427633323 | 1 | t5_2fwo | null | null | null |
True | foldl | null | Right, but the page didn't say that two things were executed at the same time. | null | 0 | 1316711475 | False | 0 | c2lskha | t3_kkw07 | null | t1_c2lskha | t1_c2lsie0 | null | 1427633316 | 1 | t5_2fwo | null | null | null |
True | joshu | null | We're working on it. | null | 0 | 1316711529 | False | 0 | c2lskr2 | t3_kmpyi | null | t1_c2lskr2 | t1_c2lptho | null | 1427633319 | 2 | t5_2fwo | null | null | null |
True | joshu | null | No agenda, just laziness. I don't know the Java world very well. | null | 0 | 1316711561 | False | 0 | c2lskx6 | t3_kmpyi | null | t1_c2lskx6 | t1_c2lqyss | null | 1427633322 | 1 | t5_2fwo | null | null | null |
True | joshu | null | It's on our todo list. It doesn't feel like there's a huge level of activity there yet. Is there choices around libraries, etc yet?
(I like go and google a bunch -- I worked there.) | null | 0 | 1316711766 | False | 0 | c2lsm1z | t3_kmpyi | null | t1_c2lsm1z | t1_c2lptnm | null | 1427633343 | 1 | t5_2fwo | null | null | null |
True | joshu | null | Thanks! | null | 0 | 1316711772 | False | 0 | c2lsm3m | t3_kmpyi | null | t1_c2lsm3m | t1_c2lpy2w | null | 1427633343 | 1 | t5_2fwo | null | null | null |
True | paxcoder | null | I guess noone is willing to argue with a professor that teaches the subject, so let me be so naive:
>You could of course define some X=MN and then declare the algorithm to be O(X), but I would argue that this is not the natural and canonical way most computer scientists would approach the problem.
I haven't been taught much complexity theory, which is why I'm re-learning it myself, and why I'm reading this. Having said that, I haven't seen the expression O(AB) used. Instead, I saw stuff being "compiled" (no pun) to O(N). The alternative is O(N^2), but since A != B, I think that's not how one would express the above case.
From the moment I've been introduced to big-O notation, I've been skeptical as to how accurate it represents complexity of an algorithm. Aside from the obvious question of which algorithm of the two labeled the same "O" comes closer to which of its complexity bounds, I'm guessing the above represents a problem as well. What is the x in O(x)? Is it worst-case scenario of the number of iterations? If the two loops from the example be exchanged for a single one, shouldn't still yield the same O, shouldn't it? It seems you call the two-loop version O(XY), and the other one O(N) simply because of the syntax.
Do you have an explanation? Any suggestions as to what to read?
Thank you in advance! :-) | null | 0 | 1316711816 | False | 0 | c2lsmco | t3_ki0wp | null | t1_c2lsmco | t1_c2kjhjv | null | 1427633356 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | Right, so if I create a data structure using that idiom, how can I inform the compiler of the data structure's immutability, allowing me to (for instance) freely share the data structure between threads? [I sketched some code that does exactly this](http://www.reddit.com/r/programming/comments/knn5p/thoughts_on_immutability_in_d/c2lrfpm), and AIUI from the replies, casting the return value to an `immutable(List!T)` is actually legit. | null | 0 | 1316711904 | False | 0 | c2lsmul | t3_knn5p | null | t1_c2lsmul | t1_c2lsk18 | null | 1427633357 | 2 | t5_2fwo | null | null | null |
True | nascent | null | OH!
void main() {
immutable A = myFoo();
}
class A {}
A myFoo() pure {
return new A();
}
It does work! | null | 0 | 1316712106 | False | 0 | c2lsnxh | t3_knn5p | null | t1_c2lsnxh | t1_c2lsgek | null | 1427633364 | 5 | t5_2fwo | null | null | null |
True | ArthurTrollington | null | "Error establishing a database connection"
| null | 0 | 1316712118 | False | 0 | c2lso1s | t3_ko2wv | null | t1_c2lso1s | t3_ko2wv | null | 1427633364 | 7 | t5_2fwo | null | null | null |
True | grauenwolf | null | While I don't exactly trust this guy's opinion, I can believe Microsoft is in pure reactionary mode. | null | 0 | 1316712163 | False | 0 | c2lso97 | t3_ko2wv | null | t1_c2lso97 | t3_ko2wv | null | 1427633366 | 15 | t5_2fwo | null | null | null |
True | nascent | null | Inheritance has nothing to do with memory management and that is the concept around classes. | null | 0 | 1316712244 | False | 0 | c2lsoqf | t3_kljc0 | null | t1_c2lsoqf | t1_c2lsbaa | null | 1427633370 | 1 | t5_2fwo | null | null | null |
True | sltkr | null | Functional programming is a lot like object-oriented programming, in that even though many people have some idea of what it entails, every person you ask will give you a different definition.
Language purists probably reject LISP as a functional language, only accepting the pure ones; i.e. languages that avoid mutable state entirely. But that excludes all the languages in the ML family too. And even a lazy, non-strict, pure language like Haskell supports "unsafe" operations (though arguably those are more of an exception to the rules).
To me, an essential part of a functional programming language is that it allows functions to be treated as data. This means functions can be saved in variables, passed as arguments, and returned from functions. Additionally, they can be created or modified at runtime through partial application and by creating closures.
In C, you can pass functions around (through function pointers) but you cannot (portably) create/modify them at runtime. For example, you can't create a function that takes an integer, and returns a function that adds that integer to its argument. To me, C is therefore not a functional language. Additionally, C's type system is very limited, which is more of a practical concern. You can't write generic functions, without relying on void* casts and size_t computations (see the qsort() standard function for an example of a higher-order function in C -- in my opinion language support is too poor to call it proper "support").
The thing about C of course, is that it's a very versatile and powerful language. You can emulate a lot of different programming styles with some macros and a lot of discipline. For example, GTK+ is an object-oriented library written in/for C, but I still wouldn't call C an object-oriented language, since none of the OO-support comes from the language itself.
The reason I personally do accept LISP and ML as functional languages is that they don't require you to use mutable state; you can choose to write pure functions in them (and in reality, LISP programs often contain a mixture of pure and unpure functions). For example, the random number generator could have been encapsulated in a monad. Although you can try to do the same in C (basically avoiding variable re-assignment entirely) you will quickly notice that the remaining part of the language isn't powerful enough to write sensible programs (in the meaning that it just isn't practical -- the language is probably still Turing complete).
So, tl;dr: I think LISP and ML are functional programming languages, but not C. Purists probably disagree. | null | 0 | 1316712266 | True | 0 | c2lsoui | t3_kn9gt | null | t1_c2lsoui | t1_c2lqp0v | null | 1427633372 | 5 | t5_2fwo | null | null | null |
True | [deleted] | null | I'm actually quite stoked about the potential for the site. I sent my ideas in the feedback form. I'll keep my eyes on the site. | null | 0 | 1316712348 | False | 0 | c2lspa6 | t3_kmpyi | null | t1_c2lspa6 | t1_c2lsm3m | null | 1427633378 | 1 | t5_2fwo | null | null | null |
True | fldash | null | Too bad I can't get college credit for this... | null | 0 | 1316712421 | False | 0 | c2lsppn | t3_kn9fk | null | t1_c2lsppn | t3_kn9fk | null | 1427633387 | 1 | t5_2fwo | null | null | null |
True | asshammer | null | Looks like he's about to get himself a much bigger sample size... | null | 0 | 1316712489 | False | 0 | c2lsq25 | t3_knua7 | null | t1_c2lsq25 | t3_knua7 | null | 1427633390 | 1 | t5_2fwo | null | null | null |
True | grauenwolf | null | It sounds like a great training tool, but I wouldn't use it in production code. | null | 0 | 1316712786 | False | 0 | c2lsrom | t3_kmk56 | null | t1_c2lsrom | t1_c2lliur | null | 1427633410 | 1 | t5_2fwo | null | null | null |
True | nascent | null | If you modify const values it is undefined.
auto x = 1;
const(int)* p = &x;
*(cast(int*)p) = 2;
writeln(x);
prints 2. A value which is not const may be modified after casting away const. I think this should be explicitly stated in the spec but it isn't. I don't think it is stated anywhere that "casting away const is undefined," and if it does I suggest filing a bug.
Casting has a defined behavior, the reason you don't cast away const to make modifications is because the value could actually be immutable or stored on several threads/processors/computers. The compiler can not make a guarantee that it will be updated or even fail consistently.
Some have tried to say that undefined behavior means the compiler could format your hard-drive. Problem is, since the compiler doesn't know when this situation happens it can't actually do such things. | null | 0 | 1316712961 | True | 0 | c2lssmr | t3_knn5p | null | t1_c2lssmr | t1_c2lsa7j | null | 1427633430 | 3 | t5_2fwo | null | null | null |
True | ryobiguy | null | > One of the optimizations Rajiv’s team made for the Android browser running on Qualcomm chipsets is to close the TCP connections after the page is done loading.
I don't get why this is Qualcomm specific -- shouldn't this be part of the networking stack rather than the chipset? | null | 0 | 1316713038 | False | 0 | c2lst33 | t3_knua7 | null | t1_c2lst33 | t3_knua7 | null | 1427633432 | 2 | t5_2fwo | null | null | null |
True | nyxerebos | null | [I smell money!](http://theinfosphere.org/images/6/6b/Nudar.png) | null | 0 | 1316713052 | False | 0 | c2lst69 | t3_kmref | null | t1_c2lst69 | t1_c2lig66 | null | 1427633432 | 1 | t5_2fwo | null | null | null |
True | mr_chromatic | null | > I would mock the email service
That and simulating unlikely failure conditions are the few cases where mock objects make sense--except that the only thing I'd mock is the email delivery itself. That one thing is easy enough to verify when deploying. | null | 0 | 1316713370 | False | 0 | c2lsuxm | t3_klypn | null | t1_c2lsuxm | t1_c2lqg04 | null | 1427633465 | 1 | t5_2fwo | null | null | null |
True | GeoKangas | null | > each node has both a key and a value, and for each node, the left child has a smaller key and the right child has a larger key (we specifically avoid the case of non-unique keys, because we'll be discussing BBTs as a way of simulating maps). Recursing, we can see that the left subtree of any node has only nodes with smaller keys, and the right subtree of any node has only nodes with larger keys.
What about this one:
4
/ \
/ \
/ \
/ \
1 7
/ \ / \
/ \ / \
0 8 2 8
[edit] Sorry about how pathetically ugly the tree comes out.
| null | 0 | 1316713532 | False | 0 | c2lsvrd | t3_kn9gt | null | t1_c2lsvrd | t3_kn9gt | null | 1427633470 | 2 | t5_2fwo | null | null | null |
True | ChaosMotor | null | You're an idiot. Have you *ever* looked for investment? Fucking ever? Because you're basically telling me what my own industry is like, when you've got no fucking clue. | null | 0 | 1316713820 | False | 0 | c2lsxbx | t3_klqte | null | t1_c2lsxbx | t1_c2lrwhc | null | 1427633484 | 0 | t5_2fwo | null | null | null |
True | reddit_clone | null | I had wished for it for a long time but was never been able to voice it as succinctly.
I would like a variable that can be changed once (deferred initialization) but never again.
(My point of reference is C++ though. I know next to nothing about D) | null | 0 | 1316713824 | False | 0 | c2lsxcn | t3_knn5p | null | t1_c2lsxcn | t1_c2lqiow | null | 1427633484 | 3 | t5_2fwo | null | null | null |
True | blafunke | null | Since when is null null? | null | 0 | 1316713864 | False | 0 | c2lsxl4 | t3_ko43u | null | t1_c2lsxl4 | t3_ko43u | null | 1427633487 | 1 | t5_2fwo | null | null | null |
True | eaturbrainz | null | Hello again, my type-theorist friend. Outside the type-theory proof world, it is generally accepted that "strongly typed" and "statically typed" are different things.
Statically typed: types are checked and/or inferred at compile-time, and a type-error is a compilation error.
Strongly typed: types are checked, and trying an operation that results in a type error will generate a type-error exception of some sort, *either* at compile-time *or* at run-time. In type-theoretic terms, a language can be, as you put it, "all one dynamic unitype" while still being strongly typed if it throws type-errors at runtime. | null | 0 | 1316714091 | False | 0 | c2lsytv | t3_kljc0 | null | t1_c2lsytv | t1_c2ldagn | null | 1427633504 | 1 | t5_2fwo | null | null | null |
True | eaturbrainz | null | >D has type inference,
Does it use Hindley-Milner, local type inference, or something else? I was quite under the impression that D only has type propagation rather than true inference. | null | 0 | 1316714148 | False | 0 | c2lsz6a | t3_kljc0 | null | t1_c2lsz6a | t1_c2ljruc | null | 1427633519 | 1 | t5_2fwo | null | null | null |
True | thechilipepper0 | null | This is outstandingly insightful. It also explains why my connection (att) seems so slow even in a mid size, not overpopulated area. | null | 0 | 1316714258 | False | 0 | c2lszse | t3_knua7 | null | t1_c2lszse | t3_knua7 | null | 1427633523 | 2 | t5_2fwo | null | null | null |
True | boyo17 | null | This article reads as if written by a junior high student. I could only skim this article, but the story reflects rather poorly on the author. | null | 0 | 1316714327 | False | 0 | c2lt06b | t3_ko2wv | null | t1_c2lt06b | t3_ko2wv | null | 1427633524 | 52 | t5_2fwo | null | null | null |
True | Tumbler | null | Wow, this is awesome. I want more! I hope this become a normal thing to have all the classes in the entire school available like this. Really opens my eyes to how much more effective teaching can be in the right hands. | null | 0 | 1316714373 | False | 0 | c2lt0gl | t3_kn9fk | null | t1_c2lt0gl | t3_kn9fk | null | 1427633526 | 1 | t5_2fwo | null | null | null |
True | Barney21 | null | i++; // without this, i wouldn't get bigger. | null | 0 | 1316714427 | False | 0 | c2lt0rz | t3_kmk56 | null | t1_c2lt0rz | t3_kmk56 | null | 1427633529 | 2 | t5_2fwo | null | null | null |
True | darth_choate | null | Yeah, I was wondering if the author is a native English speaker. I swear, there were a couple of sentences whose meaning I could not figure out even after repeated readings. | null | 0 | 1316714441 | False | 0 | c2lt0us | t3_ko2wv | null | t1_c2lt0us | t1_c2lt06b | null | 1427633530 | 8 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316714568 | False | 0 | c2lt1it | t3_kmp73 | null | t1_c2lt1it | t1_c2lneri | null | 1427633539 | 1 | t5_2fwo | null | null | null |
True | henk53 | null | >the poll is for such a small number of participants that it's no
I'm not so sure about that. Really popular articles in /r/programming rarely get more than 1000 votes, are those all insignificant? The majority of articles on Dzone get 20 to 30 votes at most.
I'd say it's statistically significant. You see those *seemingly* small sample sizes much more often. If the population is sufficiently random, then 1463 individuals is absolutely enough. In this specific case, I first watched the poll at around 700 votes and then again after it closed and the numbers weren't that different really. It perhaps goes against common wisdom, but it's a well understood thing in statistics. Wikipedia is a start: http://en.wikipedia.org/wiki/Sample_size_determination
Here's a calculator:
http://www.custominsight.com/articles/random-sample-calculator.asp
If we estimate there are about 9,000,000 Java developers (see e.g. http://jaxenter.com/how-many-java-developers-are-there-10462.html), then we need only 1037 observations for a 99% confidence, and only 425 for 90% confidence (with the usual error margin of 4%).
The question whether the users are sufficiently random here is MUCH more important. It could be said that 18% of the German Java users that visit the JAX websites and Twitter users scanning for hashtags #jsf, #wicket, #grails, etc prefer Vaadin (as the call to vote predominantly appeared at those places).
Now I do agree, Vaadin is surprising. Absolutely surprising, I and most of my co-workers (die hard Java fans) hadn't really heard about it before. The rest of the numbers however are very much inline with what other polls have been showing.
I do like the note that it's some kind of urban myth that RoR is so popular. It was very much hyped and a lot of people have talked about it, but when push comes to shove surprisingly few people actually use it (then again, the poll was about preference and not about usage, if it's about usage Struts traditionally scores rather high, but when asked for preference it scores very low).
| null | 0 | 1316714579 | False | 0 | c2lt1l4 | t3_kn6hr | null | t1_c2lt1l4 | t1_c2lseb1 | null | 1427633540 | 3 | t5_2fwo | null | null | null |
True | yeswecould | null | > But does the security sandbox and lack of inter-process communication still apply?
I think not. However there is nothing in the blog post indicating whether the visual component of WinRT could be run inside desktop mode. He's enumerating devices, not showing replacement framework for WPF running in windowed mode. | null | 0 | 1316714640 | False | 0 | c2lt1xb | t3_kmsmr | null | t1_c2lt1xb | t1_c2lqccf | null | 1427633544 | 1 | t5_2fwo | null | null | null |
True | tragomaskhalos | null | Yep, horrible bit of software. My fave misfeature is:
1. Run a megaquery that takes ages.
2. Go to save the results.
3. Stupid piece of crap *re-runs* the query. WTF?
PL/SQL Developer is a bit better. | null | 0 | 1316714667 | False | 0 | c2lt22l | t3_ko3r2 | null | t1_c2lt22l | t3_ko3r2 | null | 1427633545 | 98 | t5_2fwo | null | null | null |
True | frezik | null | I was able to get to it by going to the homepage and opening a link from there. | null | 0 | 1316714681 | False | 0 | c2lt24r | t3_ko2wv | null | t1_c2lt24r | t1_c2lso1s | null | 1427633546 | 1 | t5_2fwo | null | null | null |
True | bobindashadows | null | They generate processor exceptions on a processor before the Pentium Pro. | null | 0 | 1316714682 | False | 0 | c2lt24s | t3_kmshh | null | t1_c2lt24s | t1_c2lp00r | null | 1427633546 | 2 | t5_2fwo | null | null | null |
True | ex_ample | null | Works fine for me. | null | 0 | 1316714749 | False | 0 | c2lt2ij | t3_kl7h0 | null | t1_c2lt2ij | t1_c2lryvp | null | 1427633552 | 1 | t5_2fwo | null | null | null |
True | frezik | null | And this is someone who started as a Microsoft Evangelist, which, as far as I can tell, means talking with a lot of people to promote Microsoft products. With communication like this, no wonder Silverlight has such a questionable future. | null | 0 | 1316714829 | False | 0 | c2lt2ym | t3_ko2wv | null | t1_c2lt2ym | t1_c2lt06b | null | 1427633558 | 26 | t5_2fwo | null | null | null |
True | Dr9 | null | Because it has an error establishing a connection to a database?
I must say, that is a pretty glib take on it. Sure it has some issues with ADO.net -but LINQ is pretty good once you get used to the syntax. | null | 0 | 1316714857 | False | 0 | c2lt34b | t3_ko2wv | null | t1_c2lt34b | t3_ko2wv | null | 1427633560 | 5 | t5_2fwo | null | null | null |
True | Affar | null | I never liked Oracle software, it seem that every app is intentionally designed to fuck up your mind. | null | 0 | 1316715090 | False | 0 | c2lt4eq | t3_ko3r2 | null | t1_c2lt4eq | t3_ko3r2 | null | 1427633577 | 158 | t5_2fwo | null | null | null |
True | [deleted] | null | http://www.riagenic.com.nyud.net/archives/722 | null | 0 | 1316715137 | False | 0 | c2lt4nh | t3_ko2wv | null | t1_c2lt4nh | t1_c2lt34b | null | 1427633580 | 4 | t5_2fwo | null | null | null |
True | eaturbrainz | null | And then what of Sing#? | null | 0 | 1316715160 | False | 0 | c2lt4rx | t3_klgme | null | t1_c2lt4rx | t1_c2lrfxn | null | 1427633581 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | Eric Lippert coined the term ["popsicle immutability"](http://blogs.msdn.com/b/ericlippert/archive/2007/11/13/immutability-in-c-part-one-kinds-of-immutability.aspx) to describe this. | null | 0 | 1316715206 | False | 0 | c2lt50f | t3_knn5p | null | t1_c2lt50f | t1_c2lsxcn | null | 1427633593 | 3 | t5_2fwo | null | null | null |
True | boyo17 | null | Exactly. But it's not just the language usage. He comes off as very immature. Everything focuses on who he thinks is "cool" and his petty squabbles with others. The title of the article might as well be "Why No One Should Ever Hire Me Again." | null | 0 | 1316715269 | False | 0 | c2lt5c5 | t3_ko2wv | null | t1_c2lt5c5 | t1_c2lt0us | null | 1427633590 | 23 | t5_2fwo | null | null | null |
True | jldugger | null | You know those guys who spend way too much time arguing on reddit and slashdot? Turns out Silverlight failed because they hired one of those people to manage it. | null | 0 | 1316715326 | False | 0 | c2lt5ne | t3_ko2wv | null | t1_c2lt5ne | t3_ko2wv | null | 1427633595 | 39 | t5_2fwo | null | null | null |
True | Rhomboid | null | I thought the opposite: it should be in the browser, as it's the browser that knows when all page assets have loaded and no more requests will need to be made. It should be up to the application when a socket closes, you don't want the kernel having to guess which application is a browser and which isn't, and arbitrarily deciding to prematurely close a connection before the application issues the close syscall based on heuristics of what kind of application it is.
But I also got the impression that this guy does not have control of the browser, so he made a really rough hack at the low level because that was the only option available to him.
| null | 0 | 1316715429 | False | 0 | c2lt678 | t3_knua7 | null | t1_c2lt678 | t1_c2lst33 | null | 1427633600 | 2 | t5_2fwo | null | null | null |
True | YourMatt | null | I regularly use SQL Developer and SQL Server Management Studio, and they both have issues of their own. I think neither are especially great. | null | 0 | 1316715492 | False | 0 | c2lt6k3 | t3_ko3r2 | null | t1_c2lt6k3 | t3_ko3r2 | null | 1427633604 | 5 | 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.