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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
null | flekkzo | null | The dislike for ObjC always makes me sad. They got so much right in that language, and yet it was so rejected :(
I'd argue that the one thing they didn't get right from the start was blocks, they should have lifted that from Smalltalk at once even though it would have had a negative impact from a performance point of ... | null | 0 | 1492790974 | False | 0 | dgkdml9 | t3_66ovil | null | null | t1_dgkb1rb | null | 1494261189 | 10 | t5_2fwo | null | null | null |
null | _Mardoxx | null | Lol | null | 0 | 1492791004 | False | 0 | dgkdnig | t3_66ori0 | null | null | t1_dgk4wzq | null | 1494261201 | 4 | t5_2fwo | null | null | null |
null | fruitcakefriday | null | I don't see an error there...it looks like its purpose is to get a value of `i` that *isn't* in the range `MIN_VAL`:`MAX_VAL`.
It doesn't seem ideal because it can *potentially* spend a lot of time doing this until it finds a value that fails the `while` clause. E.g. if MIN were 0.001 and MAX were 0.999, it could take... | null | 0 | 1492791056 | False | 0 | dgkdp56 | t3_66ph5r | null | null | t1_dgkd55w | null | 1494261223 | 1 | t5_2fwo | null | null | null |
null | _Mardoxx | null | The trick is to know what you need not to know. | null | 0 | 1492791059 | False | 0 | dgkdp80 | t3_66ori0 | null | null | t1_dgk5f8k | null | 1494261224 | 3 | t5_2fwo | null | null | null |
null | _Mardoxx | null | Lol
Is it that simple?
Migration 1. Add User table, columns: first name, last name, status Id
Migration 2. Add column middle name, remove column status Id
Roll back to 1 because you need atatusId again
Whoops data-loss! | null | 0 | 1492791074 | False | 0 | dgkdpov | t3_66orkv | null | null | t1_dgk493s | null | 1494261230 | -1 | t5_2fwo | null | null | null |
null | Khao8 | null | i = rand(MIN_VAL, MAX_VAL); | null | 0 | 1492791078 | False | 0 | dgkdpt0 | t3_66ph5r | null | null | t1_dgkde9j | null | 1494261231 | 3 | t5_2fwo | null | null | null |
null | mrmus | null | When it comes to JavaScript engines ChakraCore is OSS and runs on Linux and OS X. | null | 0 | 1492791109 | False | 0 | dgkdqt3 | t3_66nhce | null | null | t1_dgkd667 | null | 1494261244 | 24 | t5_2fwo | null | null | null |
null | nazeem_chillfurrow | null | If you are using different SSH keys on each server, you'd only end up losing that server's private key if it got compromised.
Unless you are implying the hacker ssh's into every machine individually to gain those other private keys. In that case, you could prevent this by using passworded private key authentication. | null | 0 | 1492791140 | False | 0 | dgkdrs3 | t3_66ozd2 | null | null | t1_dgkdgti | null | 1494261258 | -9 | t5_2fwo | null | null | null |
null | Me00011001 | null | Exactly. I'll even add that in some cases, it made it worse by not yielding to let the other thread(s) run to be able to satisfy the condition. | null | 0 | 1492791191 | 1492802833 | 0 | dgkdtfu | t3_66ph5r | null | null | t1_dgkdh0s | null | 1494261279 | 4 | t5_2fwo | null | null | null |
null | singham | null | cannot agree more. Though I am newbie at all this. | null | 0 | 1492791211 | False | 0 | dgkdu0l | t3_66ihh2 | null | null | t1_dgk1j5o | null | 1494261287 | 1 | t5_2fwo | null | null | null |
null | chainingsolid | null | I stopped learning c++ at header files, I ended up finding D, and am now using it (I was looking for a language to do game Dev in).
| null | 0 | 1492791242 | False | 0 | dgkduzg | t3_66ovil | null | null | t1_dgkbs68 | null | 1494261300 | 18 | t5_2fwo | null | null | null |
null | CH31415 | null | It is distinguishing from ~~arguments~~ parameters used to define the function and arguments used to invoke a function.
When you call a function foo(1,2), the 1 & 2 are arguments. When you define the function
function foo(param1, param2) {
...
}
param1 and param2 are formal parameters, or form... | null | 0 | 1492791282 | 1492798933 | 0 | dgkdwb1 | t3_66nhce | null | null | t1_dgkcvl3 | null | 1494261318 | 7 | t5_2fwo | null | null | null |
null | nemtrif | null | > kudos to Rust, one of the rare languages that started right in that regard
IIRC, even Rust started with a GC - then they made it optional, then removed it. Still much better than the mess with D. | null | 0 | 1492791372 | False | 0 | dgkdz6s | t3_66ovil | null | null | t1_dgkd6tf | null | 1494261356 | 27 | t5_2fwo | null | null | null |
null | ruindd | null | > Low assertion density
Why is a low density better than a medium or high density? | null | 0 | 1492791435 | False | 0 | dgke17m | t3_66pzb8 | null | null | t3_66pzb8 | null | 1494261384 | 98 | t5_2fwo | null | null | null |
null | bachmeier | null | > the standard library still requires the GC
This assumes that the only reason to use D is as a C++ replacement. That is only one of many reasons to use D. | null | 0 | 1492791448 | False | 0 | dgke1mu | t3_66ovil | null | null | t1_dgkagk7 | null | 1494261390 | 3 | t5_2fwo | null | null | null |
null | TashanValiant | null | What does a Godel number have to do with the universe? Its just mapping natural numbers to a countable language. There is nothing special about that that says anything at all profound or terrible about the universe. | null | 0 | 1492791501 | False | 0 | dgke3cs | t3_66ph5r | null | null | t1_dgkd5wn | null | 1494261413 | 13 | t5_2fwo | null | null | null |
null | Fazwa | null | You can even write "public int Age { get; set; }" if you have no logic for the variable or "public int Age { get; private set; }" if you want to limit the scope of the mutator. | null | 0 | 1492791571 | False | 0 | dgke5ma | t3_66gn8p | null | null | t1_dgjj73j | null | 1494261443 | 1 | t5_2fwo | null | null | null |
null | Adverpol | null | Even though I guess the post is meant at marketing D, I read it as a well-written first-time introduction to boost::hana. I've seen it mentioned enough to warrant a closer look. | null | 0 | 1492791627 | False | 0 | dgke7d4 | t3_66ovil | null | null | t3_66ovil | null | 1494261466 | 11 | t5_2fwo | null | null | null |
null | [deleted] | null | [deleted] | null | 0 | 1492791659 | False | 0 | dgke8cs | t3_66pera | null | null | t1_dgkdfyo | null | 1494261480 | 1 | t5_2fwo | null | null | null |
null | stiaje | null | The upside, which makes WebGL interesting to me despite all its technical warts, is the fact that you can post a link to a URL just like here, and people are able to check it out on any platform without downloading or installing anything! | null | 0 | 1492791681 | False | 0 | dgke91y | t3_66isie | null | null | t1_dgj9mr6 | null | 1494261489 | 5 | t5_2fwo | null | null | null |
null | mirhagk | null | There's a good reason why you leave the IDE open, and that's that it's a pain in the butt to restart. If loading the IDE was faster than you might close it down and reopen it on demand.
Doing that means that you reduce the amount of windows you need to leave open all the time. | null | 0 | 1492791694 | False | 0 | dgke9i6 | t3_66na95 | null | null | t1_dgk5o5w | null | 1494261495 | 2 | t5_2fwo | null | null | null |
null | Yehosua | null | I (and the article) are talking about using private key authentication from my local machine to multiple servers - a server never sees any private keys, so even if a server is compromised, the private keys are safe. | null | 0 | 1492791708 | False | 0 | dgke9xq | t3_66ozd2 | null | null | t1_dgkdrs3 | null | 1494261500 | 5 | t5_2fwo | null | null | null |
null | htuhola | null | A half-assed implementation of a machine readable file format specification that is using a half-assed yet-another-markup-language that is ugly and hard to associate to the structures it generates.
The idea of a machine readable spec is just a programming language, in this case a program that can be interpreted in two... | null | 1 | 1492791717 | 1492791910 | 0 | dgkea8k | t3_66n94w | null | null | t1_dgkcfp9 | null | 1494261504 | 0 | t5_2fwo | null | null | null |
null | Tokugawa | null | I'm sorry to bother, but am I reading your fix right?
"Get the difference between the maximum and minimum values. Divide a random number by that result, then add the remainder to the minimum value and call it 'i'."
If I'm reading that right, how does that replace "give me a random number that's not bigger th... | null | 0 | 1492791867 | False | 0 | dgkef20 | t3_66ph5r | null | null | t1_dgkdicq | null | 1494261569 | 2 | t5_2fwo | null | null | null |
null | devel_watcher | null | Which also wrong because you're getting a non-uniform distribution in most of the cases. | null | 0 | 1492791874 | False | 0 | dgkefa5 | t3_66ph5r | null | null | t1_dgkdicq | null | 1494261572 | 24 | t5_2fwo | null | null | null |
null | Tokugawa | null | Thank you for your reply. | null | 0 | 1492792062 | False | 0 | dgkeldz | t3_66ph5r | null | null | t1_dgkdmhd | null | 1494261654 | 8 | t5_2fwo | null | null | null |
null | OrphisFlo | null | Sure, *you* don't need all of those for this one project you have.
But I do. And let me tell you, this is the easy way to handle that problem. If you can handle a lot of configurations, you can also just handle 3. That's the price to pay for quality and portability.
Creating so many configurations is not always easy,... | null | 0 | 1492792081 | False | 0 | dgkem1e | t3_66ihh2 | null | null | t1_dgkafvk | null | 1494261662 | 1 | t5_2fwo | null | null | null |
null | YourGamerMom | null | You take `i`, a random integer, and make sure it is no bigger than the difference between the smallest and largest values. Then you add the smallest value to it. `i` is therefore at least the smallest value, and no bigger than the largest value. | null | 0 | 1492792154 | False | 0 | dgkeoes | t3_66ph5r | null | null | t1_dgkef20 | null | 1494261694 | 6 | t5_2fwo | null | null | null |
null | ss4johnny | null | God I hate header files. | null | 0 | 1492792197 | False | 0 | dgkepue | t3_66ovil | null | null | t1_dgkduzg | null | 1494261714 | 31 | t5_2fwo | null | null | null |
null | tkannelid | null | > I made the experiment last year for a presentation on calendars (no, don't laugh, calendars are actually super interesting)
Calendars are scary. | null | 0 | 1492792215 | False | 0 | dgkeqh3 | t3_66ph5r | null | null | t3_66ph5r | null | 1494261723 | 93 | t5_2fwo | null | null | null |
null | fear_the_future | null | no amount of plugins will ever make Atom or VSCode as feature rich as IntelliJ IDEA. If it's not fast, then what else does it have to compete? | null | 0 | 1492792220 | False | 0 | dgkeqmp | t3_66na95 | null | null | t1_dgjy6p7 | null | 1494261725 | 1 | t5_2fwo | null | null | null |
null | Kiylyou | null | After reading the reason it seemed like they meant to say high assertion density... | null | 0 | 1492792316 | False | 0 | dgketrv | t3_66pzb8 | null | null | t1_dgke17m | null | 1494261767 | 229 | t5_2fwo | null | null | null |
null | scorpionmintred | null | > go do something different with your life
The negativity and cynicism is exactly what makes us suited to programming. If you're optimistic about your code, you miss all the possible ways it can break. Only by assuming everything is shitty can you find flaws.
I agree "everything is terrible" may be overstating i... | null | 0 | 1492792467 | False | 0 | dgkeyq1 | t3_66ph5r | null | null | t1_dgkc3i8 | null | 1494261833 | 16 | t5_2fwo | null | null | null |
null | thekab | null | Clearly the title is wrong as the first sentence states a *minimum* number of assertions per function. | null | 0 | 1492792505 | False | 0 | dgkezzf | t3_66pzb8 | null | null | t1_dgke17m | null | 1494261850 | 114 | t5_2fwo | null | null | null |
null | eldelshell | null | Yeah, but it pays really well. OTOH he's speaking of whole systems and usually each team tackles different problems on different components, which makes things bearable. | null | 0 | 1492792510 | False | 0 | dgkf04z | t3_66ph5r | null | null | t1_dgkc3i8 | null | 1494261852 | 1 | t5_2fwo | null | null | null |
null | hector_villalobos | null | From [Wikipedia]( https://en.wikipedia.org/wiki/Crystal_\(programming_language\) ):
> Crystal is a general-purpose, object-oriented programming language designed and developed by Ary Borenszweig and Juan Wajnerman and over one-hundred listed contributors.[2] Crystal is developed as open source software (under the A... | null | 0 | 1492792520 | False | 0 | dgkf0h9 | t3_66pdn9 | null | null | t1_dgkdda2 | null | 1494261856 | 13 | t5_2fwo | null | null | null |
null | xcbsmith | null | > Usually I use both. You're telling me you never need to manually look at your data ever?
I've never had much success staring at magnetic disks or flash memory to look at data. I've never tried using a magnet or multimeter to read the data either. I always end up using some kind of a tool to represent what's in a ... | null | 0 | 1492792566 | False | 0 | dgkf1xi | t3_66kyez | null | null | t1_dgkcxmc | null | 1494261876 | -1 | t5_2fwo | null | null | null |
null | ErstwhileRockstar | null | >> Refactoring entity – enriching its behaviour
This is an Anti-Pattern! Entities are here to map database records to in-memory records. Nothing else. Shoving business logic into entities leads to convoluted and difficult to test code. Avoid it!
if (this.status == IssueStatus.DONE && newStatus == Is... | null | 1 | 1492792679 | False | 0 | dgkf5n2 | t3_66p4p4 | null | null | t3_66p4p4 | null | 1494261925 | -1 | t5_2fwo | null | null | null |
null | matthieum | null | Actually, the story of GCs in Rust is amusing.
Those who knew Rust pre-1.0 may remember the `@` sign which denoted GC'ed pointers: `@T` would be a GC'ed pointer to `T`.
However, this was a big fat lie. There was actually no GC behind the scenes as nobody ever bothered to implement one: it was a reference counted poin... | null | 0 | 1492792699 | False | 0 | dgkf69f | t3_66ovil | null | null | t1_dgkdz6s | null | 1494261933 | 63 | t5_2fwo | null | null | null |
null | FR_STARMER | null | tru
edit: wait no read that wrong | null | 0 | 1492792730 | False | 0 | dgkf79l | t3_66ovil | null | null | t1_dgk8t7e | null | 1494261947 | 11 | t5_2fwo | null | null | null |
null | run5k | null | Maybe for you, but most girls love the D. | null | 0 | 1492792738 | False | 0 | dgkf7ik | t3_66ovil | null | null | t3_66ovil | null | 1494261950 | -16 | t5_2fwo | null | null | null |
null | eldelshell | null | Funny he (being a French presentation) didn't go deeper into languages. Apart from encoding, building apps for different languages is hard. For example, money (US$ XXX vs XXX €, decimal units, plurals, etc. | null | 0 | 1492792776 | False | 0 | dgkf8qz | t3_66ph5r | null | null | t3_66ph5r | null | 1494261967 | 11 | t5_2fwo | null | null | null |
null | greenthumble | null | The modulo / remainder operator (%) is super handy for keeping a value in a particular range. By itself, that range in (a % b) would be (0 to b - 1).
Handy for seeing if a value is even or odd (x % 2 == 0) ? 'even' : 'odd'. This use is good for "table striping" for example, making every other row in a table of data ha... | null | 0 | 1492792789 | 1492799436 | 0 | dgkf963 | t3_66ph5r | null | null | t1_dgkef20 | null | 1494261973 | 3 | t5_2fwo | null | null | null |
null | stronghup | null | I think it's a good point that log-messages should be more LIKE emails, in that there should be an explicit or implicit recipient, "who needs to know this". There are developers and admins and product-owners even sales-people. Even customers.
Doesn't mean we send an email right away but that there is a simple way for ... | null | 0 | 1492792810 | 1492793088 | 0 | dgkf9uu | t3_66ftqf | null | null | t3_66ftqf | null | 1494261982 | 1 | t5_2fwo | null | null | null |
null | valenterry | null | > Our first [anemic domain model] implementation is a very common one.
Rather a bad one. It already starts with the `update` method in the service which contains constraints that must be in the repository because the repository needs to ensure that data are consistent to the domain model. So, when you tell the mode... | null | 0 | 1492792886 | 1492941668 | 0 | dgkfcca | t3_66p4p4 | null | null | t3_66p4p4 | null | 1494262016 | 3 | t5_2fwo | null | null | null |
null | ErstwhileRockstar | null | Someone should invent reusable code, e.g. reusable lists, hash tables etc. Wouldn't it be great! | null | 0 | 1492792956 | False | 0 | dgkfek4 | t3_66q0mn | null | null | t3_66q0mn | null | 1494262046 | 18 | t5_2fwo | null | null | null |
null | blackwalls81 | null | All this looks really great, however I think I just can't deal with the effort of maintaining these complex editor configurations anymore.
I've been a multi-decade Vim user, until I switched to VSCode last year. It made me realize how much better the user experience can be for an editor. I had all kinds of complex vim... | null | 0 | 1492792982 | False | 0 | dgkffco | t3_66b2iu | null | null | t3_66b2iu | null | 1494262056 | 1 | t5_2fwo | null | null | null |
null | [deleted] | null | i'm not really religious but CAN I GET AN AMEN.
it is terrible and no one gives a shit, in fact by giving a shit you're more likely to be seen as a loon; just pretend it's all perfect, so it shall be. | null | 0 | 1492793082 | False | 0 | dgkfior | t3_66ph5r | null | null | t3_66ph5r | null | 1494262100 | 27 | t5_2fwo | null | null | null |
null | zjm555 | null | I see what you mean, but I don't like "terrible" as the word to frame it. We have to be cautious, even paranoid, and we'll have impostor syndrome as a result of all this, but "terrible" is really an overstatement to describe the life of a programmer IMO. | null | 0 | 1492793115 | False | 0 | dgkfjr6 | t3_66ph5r | null | null | t1_dgkeyq1 | null | 1494262116 | 6 | t5_2fwo | null | null | null |
null | calrogman | null | > I only use a text editor written in lovingly hand-crafted assembly
[ORG 0x100]
top: mov ah,0x0a
mov dx, buffer
int 0x21
mov ah, 0x09
mov dl,message
int 0x21
jmp short top
message:
db 10,'?',13,10,'$'
buffer:
(Stolen from ht... | null | 0 | 1492793141 | False | 0 | dgkfkn0 | t3_66na95 | null | null | t1_dgk7bwt | null | 1494262128 | 3 | t5_2fwo | null | null | null |
null | jsusk24 | null | Did you try rewrite it in rust? | null | 1 | 1492793163 | False | 0 | dgkflbj | t3_66na95 | null | null | t3_66na95 | null | 1494262136 | -1 | t5_2fwo | null | null | null |
null | Meltz014 | null | The original intent was to generate a random int that *is* in the range MIN_VAL:MAX_VAL. My original while condition was incorrect, so i negated it and it should now generate a value within the range. | null | 0 | 1492793165 | False | 0 | dgkfle8 | t3_66ph5r | null | null | t1_dgkdp56 | null | 1494262137 | 1 | t5_2fwo | null | null | null |
null | [deleted] | null | > For that I recommend throwing your computer out the window and living as a sustenance farmer in Papua New Guinea
i'd recommend doing this even without those other things; life is better this way | null | 0 | 1492793175 | False | 0 | dgkflqx | t3_66na95 | null | null | t1_dgjwnrx | null | 1494262142 | 1 | t5_2fwo | null | null | null |
null | tsiatt | null | You can also type "C" and hit tab. Then it only searches in C.
Also: i made a fluid app so i can just start it like a "native" app. | null | 0 | 1492793236 | False | 0 | dgkfnon | t3_66muka | null | null | t1_dgk3j2o | null | 1494262168 | 2 | t5_2fwo | null | null | null |
null | commandlineluser | null | A programming language -_-
https://crystal-lang.org/
https://getgood.at/crystal/in-a-day | null | 1 | 1492793255 | False | 0 | dgkfoap | t3_66pdn9 | null | null | t1_dgkdda2 | null | 1494262176 | -3 | t5_2fwo | null | null | null |
null | [deleted] | null | [deleted] | null | 0 | 1492793272 | 1492880438 | 0 | dgkfov8 | t3_66nhce | null | null | t1_dgk4ljy | null | 1494262183 | 2 | t5_2fwo | null | null | null |
null | mononcqc | null | Yeah there's a lot more to cover, but I was restricted to ~40 minutes to present the entire thing and had to cut, pick and choose. l10n and i18n on their own could cover hours of content. | null | 0 | 1492793310 | False | 0 | dgkfq20 | t3_66ph5r | null | null | t1_dgkf8qz | null | 1494262200 | 18 | t5_2fwo | null | null | null |
null | Idlys | null | I think Jonathan Blow said it best: in order to move to another language, there is a significant cost in rebuilding libraries, tooling, and learning the new language. D has no big selling points compared to Go and Rust. It can only say that it is a better C++. That's not good enough. Go has it's simplicity and easy con... | null | 0 | 1492793326 | False | 0 | dgkfqkz | t3_66ovil | null | null | t1_dgk7yam | null | 1494262207 | 12 | t5_2fwo | null | null | null |
null | [deleted] | null | can't recursion also be bounded? | null | 0 | 1492793328 | False | 0 | dgkfqmu | t3_66pzb8 | null | null | t3_66pzb8 | null | 1494262207 | 20 | t5_2fwo | null | null | null |
null | Semperdark | null | It's a compiled language with syntax that feels like Ruby without the slowness. | null | 0 | 1492793350 | False | 0 | dgkfrd1 | t3_66pdn9 | null | null | t1_dgkdda2 | null | 1494262217 | 37 | t5_2fwo | null | null | null |
null | [deleted] | null | [deleted] | null | 0 | 1492793399 | False | 0 | dgkfsva | t3_66ph5r | null | null | t1_dgkfq20 | null | 1494262237 | 1 | t5_2fwo | null | null | null |
null | Yehosua | null | This is cool, and I've wished for similar functionality in the past.
On the other hand, the thought of effectively giving shell access to any random tarball, git repo, or publicly writable directory that I `cd` into seems like a security risk.
Am I worrying too much? | null | 0 | 1492793414 | False | 0 | dgkftcj | t3_66pduj | null | null | t3_66pduj | null | 1494262243 | 1 | t5_2fwo | null | null | null |
null | Tokugawa | null | I am not the quickest with math, so I tried it with some real numbers.
0 % (200 - 10 = 190) + 10 = 10
379 % (200 - 10 = 190) + 10 = 199
380 % (200 - 10 = 190) + 10 = 10
Am I missing something, or will the proposed solution never be equal to MAX_VAL? | null | 0 | 1492793474 | False | 0 | dgkfvab | t3_66ph5r | null | null | t1_dgkeoes | null | 1494262270 | 1 | t5_2fwo | null | null | null |
null | [deleted] | null | [deleted] | null | 1 | 1492793545 | False | 0 | dgkfxlh | t3_66pdn9 | null | null | t1_dgkdda2 | null | 1494262301 | -1 | t5_2fwo | null | null | null |
null | Phobos15 | null | No, admins should fire mods that contradict the community.
They have done it in multiple subreddits, their claim of hands off is bogus. | null | 0 | 1492793583 | False | 0 | dgkfytf | t3_66kb3c | null | null | t1_dgjs5p3 | null | 1494262316 | 1 | t5_2fwo | null | null | null |
null | YourGamerMom | null | Yes, `i` will be at most `MAX_VAL - 1`. | null | 0 | 1492793613 | False | 0 | dgkfzsi | t3_66ph5r | null | null | t1_dgkfvab | null | 1494262330 | 3 | t5_2fwo | null | null | null |
null | [deleted] | null | [deleted] | null | 0 | 1492793639 | False | 0 | dgkg0nk | t3_66ph5r | null | null | t1_dgkdicq | null | 1494262341 | 1 | t5_2fwo | null | null | null |
null | jck | null | Yeah that's pretty good. My OS takes about 10 seconds to boot. | null | 0 | 1492793718 | False | 0 | dgkg3at | t3_66na95 | null | null | t1_dgjwed1 | null | 1494262376 | 5 | t5_2fwo | null | null | null |
null | fluffynukeit | null | The article suggests that a lot of these rules are so that analysis by a static code analyzer is easier and more reliable. What is a good freeware static code analyzers I could deploy on a C or C++ codebase? One reason is just to see how they work but another is that I inherited a disastrous one and I'd like to be ab... | null | 0 | 1492793722 | False | 0 | dgkg3fb | t3_66pzb8 | null | null | t3_66pzb8 | null | 1494262378 | 261 | t5_2fwo | null | null | null |
null | ThreshPrinceOfBot | null | `i` won't be in the same range of values as the original code so this is also wrong.
`i = (rand() % ( MAX_VAL - MIN_VAL - 1)) + MIN_VAL + 1;`
Your answer had a range of `[MIN_VAL, MAX_VAL)`
The original code had a range of `(MIN_VAL, MAX_VAL)`
The solution I posted has a range of `(MIN_VAL, MAX_VAL)`
However, as /... | null | 0 | 1492793773 | False | 0 | dgkg560 | t3_66ph5r | null | null | t1_dgkdicq | null | 1494262402 | 1 | t5_2fwo | null | null | null |
null | [deleted] | null | [deleted] | null | 0 | 1492793782 | 1492794051 | 0 | dgkg5fy | t3_66ovil | null | null | t1_dgkbs68 | null | 1494262405 | 1 | t5_2fwo | null | null | null |
null | G00dAndPl3nty | null | Node is dynamic, so yes, its about node | null | 0 | 1492793794 | False | 0 | dgkg5uo | t3_66d6w5 | null | null | t1_dgk2mwo | null | 1494262411 | 1 | t5_2fwo | null | null | null |
null | Tokugawa | null | So then MAX_VAL isn't really a maximum value. That seems problematic. | null | 0 | 1492793866 | False | 0 | dgkg86e | t3_66ph5r | null | null | t1_dgkfzsi | null | 1494262441 | 2 | t5_2fwo | null | null | null |
null | flyout7 | null | It can be, but my guess is that given the techniques their static analyzer uses, it may be very inefficient or impossible to prove that it is bounded. | null | 0 | 1492793883 | False | 0 | dgkg8q5 | t3_66pzb8 | null | null | t1_dgkfqmu | null | 1494262449 | 49 | t5_2fwo | null | null | null |
null | tkannelid | null | That code looks correct to me (aside from missing parentheses).
If you want an integer number of bits of randomness, you can just use something like `rand() & 0xF`.
If you want a uniformly random value in an interval that isn't an integer number of bits wide, things are complicated. The common way of doing this i... | null | 0 | 1492793890 | False | 0 | dgkg8y3 | t3_66ph5r | null | null | t1_dgkbwnk | null | 1494262452 | 4 | t5_2fwo | null | null | null |
null | YourGamerMom | null | The *real* solution would be
i = (rand() % ((max + 1) - min)) + min
But usually `max` is something like the length of an array, so never reaching it is something desirable. | null | 0 | 1492794019 | 1492794418 | 0 | dgkgd54 | t3_66ph5r | null | null | t1_dgkg86e | null | 1494262507 | 2 | t5_2fwo | null | null | null |
null | CubsThisYear | null | Can anybody comment on the practical benefit of metaprogramming like this? I completely get the theoretical benefits and its definitely a fun thought experiment to see how far you can push it. That said, I work in a fairly low-latency space (fintech) and I just haven't seen the value. It seems like modern processors... | null | 0 | 1492794019 | False | 0 | dgkgd5l | t3_66ovil | null | null | t3_66ovil | null | 1494262507 | 17 | t5_2fwo | null | null | null |
null | tkannelid | null | `rand()` is a C function that returns an integer between 0 and RAND_MAX, which is probably 2**15 or 2**32.
The arithmetic version [potentially has a bias](https://www.reddit.com/r/programming/comments/66ph5r/everything_is_terrible/dgkg8y3/). | null | 0 | 1492794041 | False | 0 | dgkgdu5 | t3_66ph5r | null | null | t1_dgkdp56 | null | 1494262516 | 0 | t5_2fwo | null | null | null |
null | SBC_BAD1h | null | Use WINE? | null | 0 | 1492794070 | False | 0 | dgkgeqz | t3_66gctx | null | null | t1_dgjn8d2 | null | 1494262529 | 1 | t5_2fwo | null | null | null |
null | tkannelid | null | > My comment applies when the original code was negated and semi-correct. However, the new code is that it actually should be impossible for it to complete under any circumstance.
If the range is (5, 10), then you expect it to complete in one round the vast majority of the time. You're only rejecting about one bill... | null | 0 | 1492794094 | False | 0 | dgkgfj3 | t3_66ph5r | null | null | t1_dgkdmhd | null | 1494262540 | 8 | t5_2fwo | null | null | null |
null | nazeem_chillfurrow | null | The same logic applies whether you want to call it a local machine or a server. Either way, each machine has one private key only, so one machine getting compromised will only give the hacker one private key.
Unless they also grab your known_hosts file and use the one private key to connect to all of those. That's whe... | null | 0 | 1492794109 | 1492796602 | 0 | dgkgg06 | t3_66ozd2 | null | null | t1_dgke9xq | null | 1494262546 | -6 | t5_2fwo | null | null | null |
null | tkannelid | null | Embedded devices, working in C. There is no such library function. | null | 0 | 1492794221 | False | 0 | dgkgjmz | t3_66ph5r | null | null | t1_dgkdpt0 | null | 1494262595 | 5 | t5_2fwo | null | null | null |
null | Tokugawa | null | Thank you for your replies. | null | 0 | 1492794339 | False | 0 | dgkgnel | t3_66ph5r | null | null | t1_dgkgd54 | null | 1494262646 | 2 | t5_2fwo | null | null | null |
null | technomancy | null | I enjoyed it a lot; great post.
One thing I found interesting is that the problems tended to fall into two categories of "caused by bad technological representations of simple things" vs "the underlying problem is inherently tricky and error-prone, and the technological abstraction is not necessarily to blame". For ex... | null | 0 | 1492794413 | False | 0 | dgkgpqf | t3_66ph5r | null | null | t1_dgkfq20 | null | 1494262677 | 10 | t5_2fwo | null | null | null |
null | Khao8 | null | :( | null | 0 | 1492794469 | False | 0 | dgkgrl2 | t3_66ph5r | null | null | t1_dgkgjmz | null | 1494262702 | 1 | t5_2fwo | null | null | null |
null | thekab | null | I find it useful in small applications. That's about it.
The largest application we've built with it isn't very big and is riddled with problems. Some of those are due to the developers, many of them are not.
I'd be a lot more on board with it if NPM were actually a viable dependency management tool. | null | 0 | 1492794508 | False | 0 | dgkgssa | t3_66d6w5 | null | null | t1_dgiy4az | null | 1494262718 | 2 | t5_2fwo | null | null | null |
null | eluusive | null | D can easily operate with C++14.
D and dmd work well on macos, linux and windows. iOS and Android support are lacking. It can compile to emscripten, I don't know what the state of the support is though.
It's probably not a great fit for your project, unless you want to start helping to own the tools you use. | null | 0 | 1492794524 | False | 0 | dgkgtaj | t3_66ovil | null | null | t1_dgkcci9 | null | 1494262724 | 5 | t5_2fwo | null | null | null |
null | tkannelid | null | We're talking about C.
You can give up type safety to use `void*` everywhere and make allocation difficult (storage is allocated inline with the node struct; you have to define the amount of storage space when creating the linked list; you have to use its function for allocating memory).
You can use `void*` everywher... | null | 1 | 1492794533 | False | 0 | dgkgtky | t3_66q0mn | null | null | t1_dgkfek4 | null | 1494262728 | 1 | t5_2fwo | null | null | null |
null | hardolaf | null | That doesn't work that well at finding performance issues. People are good at finding small performance issues and fixing them. But that may not effect system level performance in any meaningful way.
Static (and later in the design cycle, runtime) analysis can be used to determine the largest contributors to system pe... | null | 0 | 1492794563 | False | 0 | dgkguj6 | t3_66kb3c | null | null | t1_dgk832x | null | 1494262741 | 1 | t5_2fwo | null | null | null |
null | zippyfan | null | I'm in the honey moon period with my pc. I recently upgraded to a custom built pc over a laptop I've used for four years.
Let me tell you a 3.1ghz quad core processor with 7200rpm HDD beats a 2.4 ghz quad core processor and 5400rpm HDD any day of the week. Not only that, i have my OS and essential software on an ssd i... | null | 1 | 1492794576 | False | 0 | dgkguyo | t3_66na95 | null | null | t3_66na95 | null | 1494262747 | -1 | t5_2fwo | null | null | null |
null | Tokugawa | null | How would you solve it? | null | 0 | 1492794689 | False | 0 | dgkgyi8 | t3_66ph5r | null | null | t1_dgkefa5 | null | 1494262794 | 1 | t5_2fwo | null | null | null |
null | Antrikshy | null | Reminds me of [this excellent article](https://medium.com/message/everything-is-broken-81e5f33a24e1). | null | 0 | 1492794940 | False | 0 | dgkh6oo | t3_66ph5r | null | null | t1_dgkbj27 | null | 1494262904 | 8 | t5_2fwo | null | null | null |
null | bachmeier | null | > It can only say that it is a better C++.
Strongly disagree. It's a better scripting language. It's a better C. It's a better Fortran. One thing it's not is C++.
Out of curiosity, since this seems to come up so often: Have either Go or Rust reached 50% of C++'s enterprise usage? If they haven't, there's no reason... | null | 0 | 1492794944 | False | 0 | dgkh6ti | t3_66ovil | null | null | t1_dgkfqkz | null | 1494262906 | 7 | t5_2fwo | null | null | null |
null | htuhola | null | It's that you don't need to type it from the papers into your program when you need to read or write machine code.
| null | 0 | 1492794968 | False | 0 | dgkh7mq | t3_66kyez | null | null | t1_dgjrfxg | null | 1494262916 | 2 | t5_2fwo | null | null | null |
null | stefantalpalaru | null | What's with the arbitrary breaking changes? Is it a language for masochists? | null | 0 | 1492795000 | False | 0 | dgkh8nv | t3_66pdn9 | null | null | t3_66pdn9 | null | 1494262931 | -24 | t5_2fwo | null | null | null |
null | UsingYourWifi | null | Cliff notes on some other parts? | null | 0 | 1492795050 | False | 0 | dgkhaap | t3_66nhce | null | null | t1_dgk6xs2 | null | 1494262952 | 3 | t5_2fwo | null | null | null |
null | perestroika12 | null | Makes sense, thanks! | null | 0 | 1492795080 | False | 0 | dgkhb7g | t3_66nhce | null | null | t1_dgkdwb1 | null | 1494262965 | 1 | t5_2fwo | null | null | null |
null | ArmedMilitia | null | BF4 on PC allows server renters to specify tickrate. Many are still 30hz, but some are 44hz, 60hz, 120hz, or 144hz.
Neat! | null | 0 | 1492795108 | False | 0 | dgkhc32 | t3_62yl50 | null | null | t1_dfq5v2c | null | 1494262976 | 2 | t5_2fwo | null | null | null |
null | Tokugawa | null | I don't think your solution would be able to return the minimum value as i.
/u/YourGamerMom proposed i = (rand() % ((max + 1) - min)) + min which allows for the full range.
I am very new, so if I'm wrong, let me know. | null | 0 | 1492795116 | False | 0 | dgkhccw | t3_66ph5r | null | null | t1_dgkg560 | null | 1494262979 | 1 | t5_2fwo | null | null | null |
null | FORGOT123456 | null | don't you mean Uganda? | null | 0 | 1492795222 | False | 0 | dgkhftv | t3_66na95 | null | null | t1_dgjwnrx | null | 1494263025 | 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.