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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
False | [deleted] | None | I stepped onto go a few months back and quickly realised that they tightly control their STL. Jesus, people keep begging them to add generics and they've blatantly refused for years.
This minimalist approach is so refreshing after using C++ for years. I hope these are the same. | null | 0 | 1546073236 | False | 0 | ecsk77p | t3_aac4hg | null | null | t1_ecshv7w | /r/programming/comments/aac4hg/modern_c_lamentations/ecsk77p/ | 1548217677 | -1 | t5_2fwo | r/programming | public | null |
False | VeganBigMac | t2_ptrwa | Tons of great devs don't know C. According to SO's survey, only 22% of professional devs use it in their work. Why would you learn a language that you have no reason to. The entire point of the article was arguing against this exact type of elitism. | null | 0 | 1546073241 | False | 0 | ecsk7d8 | t3_aaco1d | null | null | t1_ecs1608 | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecsk7d8/ | 1548217679 | 13 | t5_2fwo | r/programming | public | null |
False | kr_kr | t2_14gk4x | It also depends on the team's and company's culture. There're a lot of places and type of people who would never agree to do pair programming, and it's not necessarily a bad thing. | null | 0 | 1546073301 | False | 0 | ecsk9bd | t3_aaagix | null | null | t1_ecsge9t | /r/programming/comments/aaagix/why_review_code/ecsk9bd/ | 1548217704 | 1 | t5_2fwo | r/programming | public | null |
False | DCoder1337 | t2_bkgg4 | > *chlorine trifluoride, a substance that can burn through concrete*
Ah, *that* substance.
> _There’s a report from the early 1950s of a one-ton spill of the stuff. **It burned its way through a foot of concrete floor and chewed up another meter of sand and gravel beneath**, completing a day that I’m sure no one involved ever forgot._
> *It is hypergolic with every known fuel, and so rapidly hypergolic that no ignition delay has ever been measured. It is also hypergolic with such things as cloth, wood, and test engineers, not to mention asbestos, sand, and water-with which it reacts explosively. <…> the operator is confronted with the problem of coping with a metal-fluorine fire. For dealing with this situation, I have always recommended a good pair of running shoes.*
Source: [Things I Won't Work With](http://blogs.sciencemag.org/pipeline/archives/2008/02/26/sand_wont_save_you_this_time) | null | 0 | 1546073328 | False | 0 | ecska5q | t3_aaco1d | null | null | t1_ecs9skf | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecska5q/ | 1548217713 | 19 | t5_2fwo | r/programming | public | null |
False | 10260909569552752544 | t2_15sg0jz4 | It's simple, just make everything of type any. Your co-workers will love you. | null | 0 | 1546073392 | False | 0 | ecskc5g | t3_aaco1d | null | null | t1_ecryt92 | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecskc5g/ | 1548217738 | 16 | t5_2fwo | r/programming | public | null |
False | Whisper | t2_9nq1 | That's the wrong question.
The correct question is "what problem that people have do monads solve, which cannot be solved as easily without monads?". | null | 0 | 1546073611 | False | 0 | ecskivu | t3_aai5ap | null | null | t3_aai5ap | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecskivu/ | 1548217851 | 65 | t5_2fwo | r/programming | public | null |
False | Occivink | t2_53r1h | It's not that I want it, it's that it's the only "correct" behavior. Consider the following:
You have a directory `~/foo`, and inside it a symlink `bar` that points to `/mnt/baz`. You do `cd ~/foo/bar` and because of the virtual path thing, both the prompt and `pwd` tell you that you're in `~/foo/bar`. Moving up with `cd ..` works as you would expect and takes you to `~/foo`.
But then you do `ls ..` and surprise, it lists the content of `/mnt/`. Worse yet, you decide to do `find .. -type f -delete` thinking it will delete the files in `~/foo`, but instead it deletes the ones in `/mnt/`.
With this change, `..` means different things for cd and for other programs. If you have complex symlink hierarchies it gets even more unpredictable.
| null | 0 | 1546073623 | False | 0 | ecskj9f | t3_aabai1 | null | null | t1_ecsglgt | /r/programming/comments/aabai1/fish_shell_30/ecskj9f/ | 1548217856 | 9 | t5_2fwo | r/programming | public | null |
False | invisibowl | t2_j44u6 | In which /u/cleeder learns that non-native English speakers exist | null | 0 | 1546073783 | False | 0 | ecsko1q | t3_aabai1 | null | null | t1_ecrs6e4 | /r/programming/comments/aabai1/fish_shell_30/ecsko1q/ | 1548217915 | 4 | t5_2fwo | r/programming | public | null |
False | witti534 | t2_i759c | But you made it work at least once. | null | 0 | 1546073973 | False | 0 | ecsktr9 | t3_aac4hg | null | null | t1_ecshr26 | /r/programming/comments/aac4hg/modern_c_lamentations/ecsktr9/ | 1548217985 | 1 | t5_2fwo | r/programming | public | null |
False | SaadAttieh | t2_2pd4av8 | I agree entirely. What I am hoping for is to fine out if something lightweight like this is in demand. And especially those who want "range" like behaviour with c++14. If this is so, I will be looking for help to formalise the interface. I have certainly tried to make the interface as consistent as possible. With helpers to create your own generators, collectors (generator evaluators), taking ownership of objects passed as rvalues and holding references to lvalues during composition, allowing for both piping and functional interfaces and so on. I'm working on complete documentation. But obviously the amount of effort I can spend on this is really dependent on whether or not people like the interface and the lib as a whole. "as you mentioned, it's not exactly created by the standards committee but in return, it works now and is *hopefully* easy to use. | null | 0 | 1546073978 | False | 0 | ecsktwf | t3_aach46 | null | null | t1_ecru840 | /r/programming/comments/aach46/lazy_code_a_c_header_only_lib_what_if_you_could/ecsktwf/ | 1548217987 | 4 | t5_2fwo | r/programming | public | null |
False | eskimoFry | t2_gxd2g | yeah, I am trying to focus on one thing but the thing I am focusing on apparently has no scope. So back to being jack of all trades until I can settle on one thing. | null | 0 | 1546074140 | False | 0 | ecskylm | t3_aaco1d | null | null | t1_ecsbf8y | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecskylm/ | 1548218046 | 1 | t5_2fwo | r/programming | public | null |
False | Adverpol | t2_k7xhv | Ive written quite a few of these, in practice its flexible enough to fit my needs. | null | 0 | 1546074594 | False | 0 | ecslce9 | t3_aac4hg | null | null | t1_ecrlcb9 | /r/programming/comments/aac4hg/modern_c_lamentations/ecslce9/ | 1548218218 | 5 | t5_2fwo | r/programming | public | null |
False | jl2352 | t2_11g67p | They had an entire team dedicated to testing. So they worked on trying to find bugs, and trying to break code checked in.
They also basically wrote it twice. Everything it would do and how it would do it was formally spec’d. Then it was written again in actual code. If you didn’t know how it would be implemented then the developers couldn’t just work it out. The spec would have to be changed to explain how. | null | 0 | 1546074804 | False | 0 | ecsliv3 | t3_aa3qdm | null | null | t1_ecqfhl7 | /r/programming/comments/aa3qdm/please_do_not_attempt_to_simplify_this_code_keep/ecsliv3/ | 1548218297 | 8 | t5_2fwo | r/programming | public | null |
False | vplatt | t2_1uz5 | > Monads are about null safety.
It seems a little more complicated than that: https://en.wikipedia.org/wiki/Monad_(functional_programming)
Nulls are only one of the side effects. | null | 0 | 1546074847 | False | 0 | ecslk8s | t3_aai5ap | null | null | t1_ecseuoi | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecslk8s/ | 1548218315 | 1 | t5_2fwo | r/programming | public | null |
False | killerstorm | t2_m827 | It's not really "modern", we had a plenty of C++ metaprogramming fans in mid 2000s, or even earlier. Back then the language didn't have lambdas, but it didn't stop people from implementing lambdas using template and operator abuse. It was not any simpler than modern modern C++, and yes, people got some of that stuff into production.
So it's not really "modern vs old", it's people who over-engineer stuff against people who keep it simple.
And C++ was always multiple languages, it's not a new phenomenon. Even 10 years ago I could could maybe 5-6 styles:
1. kinda like C
2. "classic" style -- classes, pointers everywhere, manual memory management
3. using STL containers, RAII and so on
4. #3 + smart pointers
5. heavy use of metaprogramming, lambdas (before those were in the language)
Plus plenty of sub-styles, e.g. "without exceptions", some perverted memory management styles (Symbian programming, for example, used completely different memory management idioms; also in game programming they usually avoid allocating stuff on heap in the main loop), etc.
| null | 0 | 1546075106 | False | 0 | ecslsfg | t3_aac4hg | null | null | t1_ecqu6o3 | /r/programming/comments/aac4hg/modern_c_lamentations/ecslsfg/ | 1548218445 | 7 | t5_2fwo | r/programming | public | null |
False | jediknight | t2_2smkc | > "what problem that people have do monads solve, which cannot be solved as easily without monads?".
The most frequent problem is handling failure. Once you start using `Maybe` for any length of time you realize that this is the sanest way. There are so many operations that fail and having this failure explicit in the type gives you a wonderful pause to think about unexpected consequences. | null | 0 | 1546075115 | False | 0 | ecslsoi | t3_aai5ap | null | null | t1_ecskivu | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecslsoi/ | 1548218448 | 30 | t5_2fwo | r/programming | public | null |
False | alexanimal | t2_8ucwy | Are you me, Dan? No wait I'm not you you're uhh successful? | null | 0 | 1546075309 | False | 0 | ecslyhi | t3_aaco1d | null | null | t3_aaco1d | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecslyhi/ | 1548218520 | 3 | t5_2fwo | r/programming | public | null |
False | ForgetTheRuralJuror | t2_xcv53 | Learn to use the sites that you're trying to emulate. | null | 0 | 1546075312 | False | 0 | ecslykw | t3_aaco1d | null | null | t1_ecs9bf0 | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecslykw/ | 1548218521 | 8 | t5_2fwo | r/programming | public | null |
False | real_jeeger | t2_8dabp | Pah, what's wrong with a good sprinkling of "if err != nil"? | null | 0 | 1546075579 | False | 0 | ecsm6hx | t3_aai5ap | null | null | t1_ecslsoi | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecsm6hx/ | 1548218619 | 27 | t5_2fwo | r/programming | public | null |
False | fatdunky | t2_xq7c5 | This reminds me of bbs days. Each site had it's own demo apps, they would use various techniques like this. Fire was the most popular. Well showing ascii art was the most popular lol, but fire was the most popular of the fancy effects.
https://youtu.be/xbUEFy1rk0k
| null | 0 | 1546075641 | 1546075879 | 0 | ecsm89h | t3_aajb7r | null | null | t3_aajb7r | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecsm89h/ | 1548218641 | 37 | t5_2fwo | r/programming | public | null |
False | vplatt | t2_1uz5 | Sounds good. What are your results with this routine? And do you actually incorporate some physical time in there, a.k.a. the gym? | null | 0 | 1546075749 | False | 0 | ecsmbf8 | t3_aab645 | null | null | t1_ecr1w4n | /r/programming/comments/aab645/learning_to_learn_develop_skills_to_master/ecsmbf8/ | 1548218680 | 1 | t5_2fwo | r/programming | public | null |
False | oselotti | t2_9x4a3 | Yes, a monad is something that obeys monad laws:
Left identity
```
return a >>= f == f a
```
Right identity
```
m >>= return == m
```
Associativity
```
(m >>= f) >>= g == m >>= (\x -> f x >>= g)
``` | null | 0 | 1546075799 | False | 0 | ecsmcv9 | t3_aai5ap | null | null | t1_ecsbyf5 | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecsmcv9/ | 1548218698 | 7 | t5_2fwo | r/programming | public | null |
False | max630 | t2_mwwkl | It looks like C++ as it always used to be. Each of the used classes or methods is defined somewhere and usually (if it is in stl) quite extensively documented. it may take time to coprehend it but it's a task which terminates eventually (this is not always so, in the programming field). For a person which claims oneself as having 20 years of c++ experience playing the holy fool at exactly this code does not feel appropriate. | null | 1 | 1546075799 | 1546108853 | 0 | ecsmcvb | t3_aac4hg | null | null | t1_ecrogyu | /r/programming/comments/aac4hg/modern_c_lamentations/ecsmcvb/ | 1548218698 | 1 | t5_2fwo | r/programming | public | null |
False | vplatt | t2_1uz5 | Yep. **It's easier to ask forgiveness than to beg for permission.**
Of course, you shouldn't try this until you truly know what you're doing. Otherwise, you're fired.
YMMV. | null | 0 | 1546075830 | False | 0 | ecsmds3 | t3_aab645 | null | null | t1_ecqnkd5 | /r/programming/comments/aab645/learning_to_learn_develop_skills_to_master/ecsmds3/ | 1548218708 | 1 | t5_2fwo | r/programming | public | null |
False | darksv | t2_h8y93mb | >but not "count from 1 to infinity"
In fact, you can get unbounded ranges by not providing the upper bound in range syntax, like `1..`:
fn main() {
let triples = (1..).flat_map(|z|
(1..(z+1)).flat_map(move |x|
(x..(z+1))
.filter(move |y| x*x + y*y == z*z)
.map(move |y| (x, y, z))
)
);
for (a, b, c) in triples.take(10) {
println!("({:?},{:?},{:?})", a, b, c);
}
} | null | 0 | 1546075838 | False | 0 | ecsme0d | t3_aac4hg | null | null | t1_ecsejdm | /r/programming/comments/aac4hg/modern_c_lamentations/ecsme0d/ | 1548218711 | 9 | t5_2fwo | r/programming | public | null |
False | tonyplee | t2_12fpia | Any idea the processing speed in term of fps for the 4K demo for X gpu?
&#x200B;
&#x200B; | null | 0 | 1546076069 | False | 0 | ecsmknp | t3_aa91bp | null | null | t1_ecq9fc2 | /r/programming/comments/aa91bp/computer_vision_ai_object_detection_and/ecsmknp/ | 1548218794 | 1 | t5_2fwo | r/programming | public | null |
False | monkeyWifeFight | t2_3nh9b | > Lots of things are many times more verbose, so they are far harder to read; things like lambdas are easily replaced by good old functors so I don't see any reason to use them.
Are you saying that you actually prefer this:
struct StringComparator {
bool operator() (const string &a, const string &b){
return a.size() < b.size();
}
};
sort(begin(strs), end(strs), StringComparator() );
To this:
sort(begin(strs), begin(strs), [](const auto &a, const auto &b){return a.size() < b.size();});
Clearly this is *less verbose*. There's also the additional benefit of having the comparator definition on the same line as the sort call, you don't have to go to a different code site just to find your comparator. | null | 0 | 1546076105 | False | 0 | ecsmlqy | t3_aac4hg | null | null | t1_ecrv75u | /r/programming/comments/aac4hg/modern_c_lamentations/ecsmlqy/ | 1548218807 | 1 | t5_2fwo | r/programming | public | null |
False | SanityInAnarchy | t2_5oygg | I suspected I was missing something, but couldn't find it. Thanks! Edited it into the original post to make it less of a wall of text. | null | 0 | 1546076259 | False | 0 | ecsmq9c | t3_aac4hg | null | null | t1_ecsme0d | /r/programming/comments/aac4hg/modern_c_lamentations/ecsmq9c/ | 1548218863 | 2 | t5_2fwo | r/programming | public | null |
False | monkeyWifeFight | t2_3nh9b | It's such a depressing indictment of the decline of this sub that this vacous (and wrong) comment gets 3x the votes compared to the thoughtful explanation by /u/lobster_johnson below. | null | 0 | 1546076420 | False | 0 | ecsmuri | t3_aac4hg | null | null | t1_ecr17pc | /r/programming/comments/aac4hg/modern_c_lamentations/ecsmuri/ | 1548218919 | 25 | t5_2fwo | r/programming | public | null |
False | GItPirate | t2_8y7x7vr | I loved looking through that. Awesome stuff man | null | 0 | 1546076441 | False | 0 | ecsmvah | t3_aajb7r | null | null | t1_ecsk2su | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecsmvah/ | 1548218926 | 36 | t5_2fwo | r/programming | public | null |
False | nacholicious | t2_k7ymt | As an android developer I still find it incredibly weird how both web and mobile are essentially frontend ui systems, but for some reason mobile is always seen as part of the greater software engineering ecosystem (with the same traditions, best practices, etc) while web is doing it's own thing almost completely isolated from the rest | null | 0 | 1546076530 | False | 0 | ecsmxnj | t3_aaco1d | null | null | t1_ecseae1 | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecsmxnj/ | 1548218956 | 9 | t5_2fwo | r/programming | public | null |
False | Log2 | t2_6aj98 | It's going to spread like wildfire in your code base. | null | 0 | 1546076544 | False | 0 | ecsmy07 | t3_aai5ap | null | null | t1_ecsm6hx | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecsmy07/ | 1548218959 | 19 | t5_2fwo | r/programming | public | null |
False | alphaglosined | t2_f0fiz | Ugh what limit? Gonna need some source to back that one up as I've never seen it. | null | 0 | 1546076709 | False | 0 | ecsn2g1 | t3_aac4hg | null | null | t1_ecsc9zp | /r/programming/comments/aac4hg/modern_c_lamentations/ecsn2g1/ | 1548219044 | 5 | t5_2fwo | r/programming | public | null |
False | DJRBuckingham | t2_ywqtq | I was mostly thinking of MSVC for std::vector, yes, although I've experimented with doing as you suggest and debug was still significantly slower. If memory serves a full debug build caused a 16x performance degradation but only 8x if you disabled the iterator debugging/etc, compared to a 2x performance degradation with a "roll-your-own" vector.
The discrepancy seems to be due to the STL being implemented with a programming style I can only describe as "smallest function wins, it'll all get inlined in the end". This of course murders debug performance in a fundamental way, and from the discussions I've witnessed at least of the MS STL maintainers, they are well aware of this but don't care. That was a big part of the reason I gave up on them.
As for improving the linker/compiler/etc, I'm sure there are a million ways of doing it, the problem is that nobody appears to be looking at it, seemingly because nobody on those projects cares. What's even more frustrating is that we don't even have access to telemetry or profiling hooks so we - the end users - could dig into slow compiling/linking code ourselves. Putting my cynical hat on though, I think the reason we haven't seen such telemetry is because it would expose the mess that is C++11/onwards code, and give more ammunition to the "just use C" folks. | null | 0 | 1546076753 | False | 0 | ecsn3mt | t3_aac4hg | null | null | t1_ecsjw62 | /r/programming/comments/aac4hg/modern_c_lamentations/ecsn3mt/ | 1548219058 | 16 | t5_2fwo | r/programming | public | null |
False | [deleted] | None | [deleted] | null | 0 | 1546076784 | False | 0 | ecsn4f2 | t3_aai5ap | null | null | t1_ecslsoi | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecsn4f2/ | 1548219068 | 4 | t5_2fwo | r/programming | public | null |
False | alphaglosined | t2_f0fiz | But at least with D you have a chance of interacting with C++ directly ;)
Anyway, the GC was never an issue. You just have to learn some very basic things about how it works, which is something anyone should learn with such runtimes. | null | 0 | 1546076850 | False | 0 | ecsn673 | t3_aac4hg | null | null | t1_ecroylj | /r/programming/comments/aac4hg/modern_c_lamentations/ecsn673/ | 1548219090 | 3 | t5_2fwo | r/programming | public | null |
False | kuikuilla | t2_b2ngh | > 1. massively expensive to label images for training
Why not use 3d models and game engines to produce the training material? No need to label 2d images, just make a close to photoreal 3d world and have the engine label the objects automatically? | null | 0 | 1546076863 | False | 0 | ecsn6kd | t3_aa91bp | null | null | t1_ecqdg1t | /r/programming/comments/aa91bp/computer_vision_ai_object_detection_and/ecsn6kd/ | 1548219094 | 1 | t5_2fwo | r/programming | public | null |
False | failsatreddit | t2_2tiupr3k | Please lose all the annoying semi colons and we'll talk. | null | 0 | 1546076881 | False | 0 | ecsn71n | t3_aac4hg | null | null | t3_aac4hg | /r/programming/comments/aac4hg/modern_c_lamentations/ecsn71n/ | 1548219100 | -8 | t5_2fwo | r/programming | public | null |
False | DJRBuckingham | t2_ywqtq | I'm keeping an eye on Jai for sure, I have a lot of respect for Jon and support what he is try to achieve. Wasn't aware of Zig, I'll take a look, thanks. | null | 0 | 1546076998 | False | 0 | ecsna4s | t3_aac4hg | null | null | t1_ecshv7w | /r/programming/comments/aac4hg/modern_c_lamentations/ecsna4s/ | 1548219138 | 3 | t5_2fwo | r/programming | public | null |
False | trenskow | t2_9ix9e | Oh, man! What the demo scene were able to pull out of a Commodore 64 still amazes me to this day. | null | 0 | 1546077050 | False | 0 | ecsnbh4 | t3_aajb7r | null | null | t1_ecsjz8t | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecsnbh4/ | 1548219155 | 110 | t5_2fwo | r/programming | public | null |
False | rifeid | t2_7jmul | Less vague title: The Commons Clause and similar "like FLOSS but actually not" licenses are bad for your business and for the ecosystem. | null | 0 | 1546077070 | False | 0 | ecsnbzh | t3_aajf75 | null | null | t3_aajf75 | /r/programming/comments/aajf75/the_cyclical_theory_of_open_source/ecsnbzh/ | 1548219161 | 4 | t5_2fwo | r/programming | public | null |
False | theaceshinigami | t2_eeral | every time I learn more about the development for doom the more amazing the game becomes. | null | 0 | 1546077124 | False | 0 | ecsnd57 | t3_aajb7r | null | null | t3_aajb7r | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecsnd57/ | 1548219175 | 18 | t5_2fwo | r/programming | public | null |
False | vattenpuss | t2_brzia | I agree it has that effect, but blaming a group is rarely helpful either.
Unless your organisation is small enough for "the whole team" to mean "the whole company", blaming teams will still lead to the same issue as blaming individual developers: people will start hesitating to report issues. The correct way out of the blame game is to stop looking for anyone to blame and instead just fix your problems, identify how to prevent them happening again (if possible) and then move on. | null | 0 | 1546077156 | False | 0 | ecsndv1 | t3_aaagix | null | null | t1_ecql1s4 | /r/programming/comments/aaagix/why_review_code/ecsndv1/ | 1548219185 | 3 | t5_2fwo | r/programming | public | null |
False | BoxMonster44 | t2_4zr8u | Basically. It's kind of the other way around - pretty sure the functional way of thinking came first and TS adopted it. (Not a knock on TS at all - strict null checking in particular is a very elegant application of the Maybe concept.)
More useful than Maybe is Either. Rust uses a type called Result, which is the same - it either contains the value you want, or an error object describing what went wrong. The type system enforces you handle both cases, with some syntactic sugar for short circuiting in case of an error. It's analogous to throwing an exception, but it will just do an early return with the error result if there is one. | null | 0 | 1546077188 | False | 0 | ecsneh3 | t3_aai5ap | null | null | t1_ecsn4f2 | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecsneh3/ | 1548219192 | 10 | t5_2fwo | r/programming | public | null |
False | mr_birkenblatt | t2_d7qfg | almost. `Maybe` still has the original type. This way you can call functions with `None` (and it type checks). In TypeScript you have `Foo?` types (? not sure about the syntax) that indicate that a type can be null. This is equivalent to `Maybe` (just the syntax and the name are different -- they are the same concept). | null | 0 | 1546077206 | False | 0 | ecsneu6 | t3_aai5ap | null | null | t1_ecsn4f2 | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecsneu6/ | 1548219196 | 9 | t5_2fwo | r/programming | public | null |
False | [deleted] | None | [deleted] | null | 0 | 1546077282 | 1546078691 | 0 | ecsngb6 | t3_aaco1d | null | null | t3_aaco1d | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecsngb6/ | 1548219215 | 1 | t5_2fwo | r/programming | public | null |
False | vattenpuss | t2_brzia | Why should management see any information from the review process? I don't see any reason to have any sort of "paper trail". The review is of code "in flight", the code under review has not yet been merged into mainline.
IMO, the review is between the person(s) who made the change, and the person(s) reviewing it. If you have some tooling like GitLab or GitHub to help you with the review then by all means write the feedback down, but only if it's a useful tool in the review process.
If you want to know which programmer needs the most help, make sure your organisation has some peer feedback process and help managers help their employees. Don't abuse other tools for finding reasons to be a bad employer. | null | 0 | 1546077592 | False | 0 | ecsnm6p | t3_aaagix | null | null | t1_ecri7c6 | /r/programming/comments/aaagix/why_review_code/ecsnm6p/ | 1548219288 | 1 | t5_2fwo | r/programming | public | null |
False | fagnerbrack | t2_xeaqp | It's not a bad thing for the company but a good thing for the competition | null | 0 | 1546077618 | 1546309659 | 0 | ecsnmn0 | t3_aaagix | null | null | t1_ecsk9bd | /r/programming/comments/aaagix/why_review_code/ecsnmn0/ | 1548219293 | -1 | t5_2fwo | r/programming | public | null |
False | Log2 | t2_6aj98 | Also, anything can be an approximation. The question is what guarantees on how good it is do we have. | null | 0 | 1546077817 | False | 0 | ecsnqdg | t3_a9qz9q | null | null | t1_ecm8hwe | /r/programming/comments/a9qz9q/amoeba_finds_approximate_solutions_to_nphard/ecsnqdg/ | 1548219339 | 1 | t5_2fwo | r/programming | public | null |
False | MentalMachine | t2_biq50 | Probably talking out of my ass but here goes: not sure it's as much that devs are bad interviewers, more that the interview process is kinda garbage. You put in a CV and cover letter, get your references sorted, then you go in, making sure you do all the soft skills well, can recount your experiences etc, and then you have to whiteboard out a problem in 20 mins with literally your new boss judging you.
Meanwhile your actual work you are given a design/story/whatever and have some deadline to hit, ie your boss isn't standing over your shoulder while you type or try and solve a hard question.
You spend so much time stressing about hitting all the soft parts of the interview that it's easy to lose your head when you're in a situation that will never happen realistically.
I guess Facebook is in a different league given how complex and broad some of their stuff is, but that's my 2 cents. | null | 0 | 1546077830 | False | 0 | ecsnqmo | t3_aaco1d | null | null | t1_ecrei69 | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecsnqmo/ | 1548219342 | 5 | t5_2fwo | r/programming | public | null |
False | vattenpuss | t2_brzia | What can one then do with this credit? Can you buy stuff with it? Cake? | null | 0 | 1546077939 | False | 0 | ecsnskz | t3_aaagix | null | null | t1_ecr4z3a | /r/programming/comments/aaagix/why_review_code/ecsnskz/ | 1548219367 | 1 | t5_2fwo | r/programming | public | null |
False | stevenjd | t2_9q2nh | > This isn't about tone.
Of course it is. You don't like the tone of the message: "You're an idiot and stop wasting our time" instead of "I'm ever so sorry, I don't mean to offend or be rude, please don't take offense, but I fear that you may be operating on one or two teeny little misapprehensions or misunderstandings here..." or similar.
Or more likely, "You're an idiot" versus dead silence. I've seen that happen a lot, people get shunned and never even know why they're not getting their questions answered. | null | 0 | 1546077952 | False | 0 | ecsnssu | t3_aaco1d | null | null | t1_ecsk5io | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecsnssu/ | 1548219368 | -10 | t5_2fwo | r/programming | public | null |
False | Tynach | t2_9rbwn | How much of this also applies to `g++` and `clang`? If this is mostly just complaints about MSVC, but other C++ compilers don't have these issues, then perhaps you should consider migrating to a different compiler.
Granted, with C++ especially, you can't just switch compilers. I understand that, especially in the context of large projects that are probably using third party libraries with precompiled binaries that require linking to them with MSVC's tools.
But for new projects and/or projects that don't have external binary libraries that were compiled with MSVC, I'm wondering if switching to one of the alternatives is a viable option. | null | 0 | 1546078173 | False | 0 | ecsnwr8 | t3_aac4hg | null | null | t1_ecsn3mt | /r/programming/comments/aac4hg/modern_c_lamentations/ecsnwr8/ | 1548219419 | 11 | t5_2fwo | r/programming | public | null |
False | Ameisen | t2_5qad2 | I'm sorry, but I'm not particularly interested in slippery-slope arguments. You speak of the blasphemy of using a template parameter instead of a raw function pointer as being a guarantee of being leading to deeply nested abstractions, and I simply don't see the connection. The usage patterns aren't even particularly similar. You can misuse any language feature - I've certainly seen function pointer monstrosities that compiled to horrible indirect code in debug mode. However, it isn't conceptually reasonable to suggest template parameter inference of function types leading to an overly complex template system. | null | 0 | 1546078309 | False | 0 | ecsnz7h | t3_aac4hg | null | null | t1_ecs9x3p | /r/programming/comments/aac4hg/modern_c_lamentations/ecsnz7h/ | 1548219449 | 2 | t5_2fwo | r/programming | public | null |
False | mr_birkenblatt | t2_d7qfg | all those explanations always make it seem that making failure more easily to deal with is the only benefit of monads. if you explain it using `Applicative` its benefits become more clear imho. short version:
with `Applicative` you have two functions.
1) you can wrap something in the applicative type `foo -> App foo`
2) you apply a function to its content `App (a -> b) -> App a -> App b`
so you can take a data structure and apply a function to all of its components. however, the main limitation of this is that you cannot *change* the data structure in this way; the wrapping stays the same. monads are the solution to this problem by letting you wrap the result of the mapping function. so 2) becomes `App a -> (a -> App b) -> App b` (don't mind the change of the order of the arguments). here now in the mapping function you can decide *how* to wrap your result `b`.
Structure | Applicative | Monad
-|-|-
`Maybe` or `Either` (ie. failure) | you skip the current operation if there was an error before but your operation cannot introduce an error | errors get propagated and you can introduce errors
`List` | you can apply functions to each element but the size of the list cannot be changed by the functions themselves | you apply functions to each element and you can decide whether the list will grow or shrink
`Tree` | you apply functions to each node in the tree | you apply a function that can also create new subtrees or prune branches
EDIT: clarifications | null | 0 | 1546078493 | 1546097711 | 0 | ecso2hr | t3_aai5ap | null | null | t3_aai5ap | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecso2hr/ | 1548219490 | 13 | t5_2fwo | r/programming | public | null |
False | major_clanger | t2_148kf8 | Part laziness, part 'Google does this so it must be right'.
It's far easier to pick off-the-shelf algo-puzzler questions from leetcode, than to build exercises/questions more representative of the coding done at the company. | null | 0 | 1546078515 | False | 0 | ecso2vh | t3_aaco1d | null | null | t1_ecs5llh | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecso2vh/ | 1548219495 | 7 | t5_2fwo | r/programming | public | null |
False | Ameisen | t2_5qad2 | The compiler is *very* good at ICF these days. This isn't the early 2000's anymore. I've seen better output from templates rather than equivalent macro constructs, and vastly better than user-written variants which rarely match in layout or semantics.
I sincerely feel as though many people here don't actually understand what templates are or how they work. | null | 0 | 1546078526 | False | 0 | ecso32u | t3_aac4hg | null | null | t1_ecs96mh | /r/programming/comments/aac4hg/modern_c_lamentations/ecso32u/ | 1548219498 | 5 | t5_2fwo | r/programming | public | null |
False | curious_s | t2_14kg9o | Fourth! | null | 0 | 1546078612 | False | 0 | ecso4mu | t3_aaco1d | null | null | t1_ecsg9s9 | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecso4mu/ | 1548219517 | 1 | t5_2fwo | r/programming | public | null |
False | franzwong | t2_5ysgs | Maybe is like "Null object" in design pattern. You can still "call" the method but it does nothing. | null | 0 | 1546078887 | False | 0 | ecso9m3 | t3_aai5ap | null | null | t1_ecsn4f2 | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecso9m3/ | 1548219606 | 0 | t5_2fwo | r/programming | public | null |
False | [deleted] | None | [deleted] | null | 0 | 1546078942 | False | 0 | ecsoaki | t3_aai5ap | null | null | t1_ecsn4f2 | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecsoaki/ | 1548219618 | 1 | t5_2fwo | r/programming | public | null |
False | cpt_fwiffo | t2_eidmq | You can get a lot of stuff done with python without knowing much about it. That's one of its main strengths. | null | 0 | 1546078986 | False | 0 | ecsobe1 | t3_aaco1d | null | null | t1_ecrf8qc | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecsobe1/ | 1548219627 | 2 | t5_2fwo | r/programming | public | null |
False | Ameisen | t2_5qad2 | You're conflating deeply-nested templates with the issue at hand, which is literally using a template argument instead of a function pointer. It's a giant leap there, and to suggest that one inevitably leads to the other comes across as fear-mongering. I don't generally have difficulty debugging shallowly-templated code (function pointer tangles, though...), and shallow templates don't meaningfully increase compile time. The C equivalent of littering macros everywhere? A nightmare to debug, refactor, and understand. Sure compiles fast, though... but then again, assembly assembles *really* fast.
I can assure you that it's easier to refractor template function arguments than function pointers.
And if it's something you dont want in a header file, then it's a non-argument to begin with and isn't really relevant to the discussion, as template arguments aren't really even *applicable* there. You cannot use an example of a situation where the choice isn't reasonably applicable as an example of a downside.
Why does your socket class require a function pointer?
And please stop trying to make arguments for me. I don't appreciate it. | null | 0 | 1546079118 | 1546079353 | 0 | ecsodrg | t3_aac4hg | null | null | t1_ecs5w99 | /r/programming/comments/aac4hg/modern_c_lamentations/ecsodrg/ | 1548219657 | 2 | t5_2fwo | r/programming | public | null |
False | BrunchWithBubbles | t2_gw8cq | No. It’s true that Maybe adds an additional inhabitant to a type (`Nothing`) just like nullable (`?`) in Typescript with strict null checks adds an additional inhabitant (`null`). The key difference is that Maybe can be nested as in `Maybe (Maybe a)`, which is what enables Maybe to be a monad. Nullable types cannot be nested and therefore has no monadic structure whatsoever. | null | 0 | 1546079120 | False | 0 | ecsodsm | t3_aai5ap | null | null | t1_ecsn4f2 | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecsodsm/ | 1548219657 | 18 | t5_2fwo | r/programming | public | null |
False | mister_virgin | t2_v723mp3 | It's really confusing what people really refer to when saying "TDD"
Type DD or Test DD | null | 0 | 1546079278 | False | 0 | ecsogou | t3_aaco1d | null | null | t1_ecsg8zo | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecsogou/ | 1548219693 | 1 | t5_2fwo | r/programming | public | null |
False | Tynach | t2_9rbwn | I think you misspelled 'Perl'. | null | 0 | 1546079323 | False | 0 | ecsohil | t3_aac4hg | null | null | t1_ecsctqj | /r/programming/comments/aac4hg/modern_c_lamentations/ecsohil/ | 1548219703 | 2 | t5_2fwo | r/programming | public | null |
False | Frizkie | t2_4ptdg | Wow that video hits hard. Remarkably lucid compared to the other stuff you see of his time in his van.
He knew he was crazy. In his mind, what was he going to do about it? | null | 0 | 1546079525 | False | 0 | ecsolgu | t3_9d6rpt | null | null | t1_e5gzm2g | /r/programming/comments/9d6rpt/creator_of_temple_os_terry_davis_has_passed_away/ecsolgu/ | 1548219752 | 1 | t5_2fwo | r/programming | public | null |
False | throwawayinthefire | t2_dv0fg | I tried to get started to look at the docs and the page wasn't available on mobile | null | 0 | 1546079581 | False | 0 | ecsomlr | t3_aahy66 | null | null | t3_aahy66 | /r/programming/comments/aahy66/releasing_documate_v102/ecsomlr/ | 1548219766 | 6 | t5_2fwo | r/programming | public | null |
False | AlexMeanberg | t2_9c46d | From this except, the book sounds incredible | null | 0 | 1546079692 | False | 0 | ecsooqd | t3_aajb7r | null | null | t3_aajb7r | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecsooqd/ | 1548219792 | 9 | t5_2fwo | r/programming | public | null |
False | LeeHide | t2_tqbvo | Ay fuck unity. If someone wants to get started with video game development *as a programmer*, there is no way in hell they should start with unity. C# itself is one if the slickest OOP languages out there, but it's important to grasp that language and the concepts and ways of OOP outside of the context of unity to be efficient with it.
As somebody who has been learning game programming for a few years now, I can quite safely say what taught me the most and what taught me the least.
For me, at least, it was far more rewarding to make my own engine for 2D cellular automata, to try to make a platforming engine, and so on. Doing things like that in C++ with OpenGL or SFML or with the C# .NET equivalents OpenTK / SFML.NET taught me so much about the basics about video game design, made me more confident.
Yes, if you do it like that it will take you hours to get something together that does what you want it to do, whereas in unity you can shit together a game with some assets and some copy-paste code (or self written shit code). But the feeling you get after making an asset flip or even your own unity game is that you made the engine do something that you dont actually understand. You clicked some buttons, looked at some tutorials which always just say "but i wont get into detail about that right now". Fuck that.
Once I understood how to make a (shitty) rendering pipeline, how to make some (shitty) shaders, how to optimize your code, handle multiple threads, make some basic physics and so on, making a game in unity can be an absolute blast.
Once you know all the basics and have the confidence to go in there with the mentality that you are in power of the engine and you understand (or can make educated guesses as to) whats roughly happening in the background, you can have a great time and having something like unity for a somewhat experienced person is a blessing.
So if you're a beginner, try to make some games from scratch, to learn how you would go about implementing the basics, and learn how to code first. Don't go into unity not knowing how to code, it's not a good platform to learn it. | null | 0 | 1546079723 | False | 0 | ecsopcl | t3_aajb7r | null | null | t1_ecsjz8t | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecsopcl/ | 1548219799 | 72 | t5_2fwo | r/programming | public | null |
False | Ameisen | t2_5qad2 | Why would a 64-bit type be inferred from a 32-bit? | null | 0 | 1546079741 | False | 0 | ecsopo6 | t3_aac4hg | null | null | t1_ecrhnrt | /r/programming/comments/aac4hg/modern_c_lamentations/ecsopo6/ | 1548219803 | 1 | t5_2fwo | r/programming | public | null |
False | DJRBuckingham | t2_ywqtq | I find MSVC is generally worse than gcc/clang, but only noticeably so in a few rare cases. Some of the projects I've worked on were MSVC only, and they also tended to be the largest, so I'm more intimately familiar with the drawbacks of that compiler. Other projects I've worked on were cross-platform and used gcc/clang/MSVC in some form, and they all performed broadly the same - full rebuild in the order of hours, or 30m+ with a distributed build system.
Clang is the fastest from my experience, but we're not talking orders of magnitude faster, it's not like switching compilers solves any of these problems with an existing codebase. The only way I've found to solve the problems are with a new project and ban everything C++11 and later, ban the STL, Boost and all template meta-programming. The only thing I allow templates for is containers (ie. myarray<T>), and only a single axis of specialisation - the type - no allocator/comparator/etc specialisations.
That might be a bit extreme, but this is why I'd like telemetry/profiling data out of the compiler/linker so I can identify what is bogging down the compile times and avoid them. The upshot, however, is full rebuild compile times in seconds not hours, and comparable debug performance to release. It's just too good to give up. | null | 0 | 1546079816 | False | 0 | ecsor3n | t3_aac4hg | null | null | t1_ecsnwr8 | /r/programming/comments/aac4hg/modern_c_lamentations/ecsor3n/ | 1548219821 | 13 | t5_2fwo | r/programming | public | null |
False | bdtddt | t2_x8et0 | You are totally misinformed, this explanation is basically nonsense. | null | 0 | 1546080008 | False | 0 | ecsouv6 | t3_aai5ap | null | null | t1_ecseuoi | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecsouv6/ | 1548219868 | 8 | t5_2fwo | r/programming | public | null |
False | JoeWakeling | t2_8fv2o | Thanks for the detailed answers!
>The short answer is, to do it right, we had to re-work the compiler internals around `const` completely. If you're curious for more, I can explain more, but that's basically it. C++ and D don't need to do what we need to do, so it's a much easier feature for them. See below.
That makes sense, especially given later remarks. It's always nice to have a more in-depth explanation but this sounds like something where I could dive deeper myself (although links, hints where to look etc. always welcome:-)
>I'm not sure, you said slice there, but that's an array, not a slice.
Yup, my bad choice of parameter name. I meant an array.
>Rust checks the type signature itself, rather than checking the instantiations of the signature. This means that Rust needs to know more about the parameters than C++ or D do \[...\] Rust already has this separation with lifetimes, you use the ' to distinguish them from other type parameters. `const` just adds a third.
I think what is not clear to me here is why e.g. `foo<a_len: i32>(a: [f64; a_len])` would not provide sufficient information to the compiler. That *seems* sufficient syntax to know that `a_len` must be a value of `i32` known at compile time -- what else would one need?
What I assume is that the explicit `const` makes the code easier to parse because the compiler does not have to keep track of the context to understand that `a_len: const i32` is declaring a compile time constant. Beyond the trivial implementation benefits I would expect that this kind of context-independence allows for much more robust design and reasoning about compiler behaviour and combination of language features. Is this correct, and the whole basis for the choice, or are there some other factors I'm missing? | null | 0 | 1546080277 | False | 0 | ecsp07f | t3_a9zyp3 | null | null | t1_ecqaaf9 | /r/programming/comments/a9zyp3/thoughts_on_rust_in_2019/ecsp07f/ | 1548219933 | 1 | t5_2fwo | r/programming | public | null |
False | NerdStreetBoys | t2_13n0pzln | I love fish. Unfortunately can’t use at my new job (banking).
I wish it supported the `$()‘ syntax too. | null | 0 | 1546080645 | False | 0 | ecsp7ns | t3_aabai1 | null | null | t1_ecqm6is | /r/programming/comments/aabai1/fish_shell_30/ecsp7ns/ | 1548220026 | 2 | t5_2fwo | r/programming | public | null |
False | davorzdralo | t2_62ihs | Nope. Straight up insulting people and being obtuse fuckwad is still not a tone issue. | null | 0 | 1546080677 | False | 0 | ecsp8aj | t3_aaco1d | null | null | t1_ecsnssu | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecsp8aj/ | 1548220034 | 8 | t5_2fwo | r/programming | public | null |
False | n2_throwaway | t2_g61kz | As a fairly experienced non-graphics dev , do you have pointers to resources for building graphics pipelines and shaders? I'm not afraid of math either | null | 0 | 1546080749 | False | 0 | ecsp9lv | t3_aajb7r | null | null | t1_ecsopcl | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecsp9lv/ | 1548220050 | 14 | t5_2fwo | r/programming | public | null |
False | [deleted] | None | [deleted] | null | 0 | 1546080752 | False | 0 | ecsp9o8 | t3_aaagix | null | null | t1_ecs143u | /r/programming/comments/aaagix/why_review_code/ecsp9o8/ | 1548220051 | 2 | t5_2fwo | r/programming | public | null |
False | masterofmisc | t2_dqd35 | ...Weirdly I just finished watching [RetroAhoy: Doom](https://youtu.be/6A4-SVUHQYI) which is a GREAT video essay on Doom for anyone who is interested. He's got one on [Quake](https://youtu.be/OipJYWhMi3k) too.
I literally just found his channel based off another Reddit thread and he has loads of good content. Yesterday I watched [A Brief History of Graphics](https://youtu.be/QyjyWUrHsFc) which is also one to watch if you haven't before.
&#x200B; | null | 0 | 1546080832 | 1546081232 | 0 | ecspb8b | t3_aajb7r | null | null | t3_aajb7r | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecspb8b/ | 1548220070 | 195 | t5_2fwo | r/programming | public | null |
False | blind3rdeye | t2_5esol | Nice demos and explanations. That's some cool and interesting stuff.
I have one quick question though. In your description for 'Metablobs', you've described how to calculate a number but it isn't clear to me what that number is used for? Is it the brightness of the pixel or something? | null | 0 | 1546080859 | False | 0 | ecspbsl | t3_aajb7r | null | null | t1_ecsk2su | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecspbsl/ | 1548220077 | 14 | t5_2fwo | r/programming | public | null |
False | nh_cham | t2_62wfw | And here's a similar version in Turbo Pascal: https://youtu.be/cdbZ904TJgw
I just learned about the book, it sounds amazing, ordered it straight away! It belongs right next to Michael Abrash's Graphics Programming Black Book. | null | 0 | 1546080981 | False | 0 | ecspe7q | t3_aajb7r | null | null | t3_aajb7r | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecspe7q/ | 1548220107 | 7 | t5_2fwo | r/programming | public | null |
False | __pg_ | t2_rcy9eog | Welcome to [Phase 3](http://aras-p.info/img/blog/2018/cpp_phases.jpg). | null | 0 | 1546081000 | False | 0 | ecspekx | t3_aac4hg | null | null | t1_ecsodrg | /r/programming/comments/aac4hg/modern_c_lamentations/ecspekx/ | 1548220111 | 1 | t5_2fwo | r/programming | public | null |
False | fistsmalloy | t2_h0bgn | My results have been solid career wise I went from junior dev to senior management in 6 years currently working for a telco. Physical time is a challenge but I go to the gym in mornings maybe twice a week and play indoor football (soccer) once a week although I have slipped lately in the run up to Christmas. I try not to worry too much about what I learn as long as it interesting in the evenings and that keeps stress at bay, if you just bring your day job home I think that becomes unhealthy. | null | 0 | 1546081049 | False | 0 | ecspfk7 | t3_aab645 | null | null | t1_ecsmbf8 | /r/programming/comments/aab645/learning_to_learn_develop_skills_to_master/ecspfk7/ | 1548220123 | 3 | t5_2fwo | r/programming | public | null |
False | bdtddt | t2_x8et0 | No, monads are a specific interface for wrapped types which allow you to flatten doubly wrapped types and turn a normal type into a wrapped type. There are other such interfaces, such as functor which allows one to apply a function inside of a wrapped type. All monads are functors. | null | 0 | 1546081230 | False | 0 | ecspj7f | t3_aaco1d | null | null | t1_ecs0svi | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecspj7f/ | 1548220168 | 1 | t5_2fwo | r/programming | public | null |
False | mechanicalgod | t2_6x70u | Not OP, but I'd highly recommend checking out https://learnopengl.com. | null | 0 | 1546081302 | False | 0 | ecspkpb | t3_aajb7r | null | null | t1_ecsp9lv | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecspkpb/ | 1548220217 | 33 | t5_2fwo | r/programming | public | null |
False | xcdesz | t2_79zii | Probably true. CS and software engineering are related, but definitely not the same. A CS person might concern themselves with the inner workings of a data structure, but a software engineer would want a library that wraps the structure to do useful work. The engineer might need to know a little bit about the theory in order to optimize parts of their app, but otherwise doesn't need the theory.
| null | 0 | 1546081318 | False | 0 | ecspkzr | t3_aaco1d | null | null | t1_ecrfqsw | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecspkzr/ | 1548220220 | 3 | t5_2fwo | r/programming | public | null |
False | obsceneoddities | t2_2hgze7ed | +1 for Ahoy, his video essays are great and I've learned a lot from him, and it's not just interesting, its entertaining. | null | 0 | 1546081319 | False | 0 | ecspl14 | t3_aajb7r | null | null | t1_ecspb8b | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecspl14/ | 1548220220 | 51 | t5_2fwo | r/programming | public | null |
False | xcdesz | t2_79zii | You say you don't know the language to keep some smartass from coming along and saying "oh yeah, then how do you do this..." And label you as BS in an interview.
| null | 0 | 1546081572 | False | 0 | ecsppz9 | t3_aaco1d | null | null | t1_ecs50he | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecsppz9/ | 1548220281 | 2 | t5_2fwo | r/programming | public | null |
False | Straight_Derpin | t2_har8d | Totally agree. I just finished my first game design course this semester and am now pursuing a game design minor at my university. We used Unity and it was great but I'm really glad I had prior experience making games and building the engine up from scratch; it made me appreciate the amazing amount of functionality Unity has and all the busy work it saves you (fully fleshed out colliders and collision detection with sorting layers in particular are a godsend). I know Unity has a "code free" version and seems attractive to people making their first game but you should really have a solid understanding of OOP before you jump into Unity to get the most out of it. | null | 0 | 1546081695 | False | 0 | ecspsad | t3_aajb7r | null | null | t1_ecsopcl | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecspsad/ | 1548220310 | 10 | t5_2fwo | r/programming | public | null |
False | GeneticsGuy | t2_74f0b | I think I remember reading John Carmack recommending people learning OpenGL that are experienced devs but no gaming experience, and he said this was one of the best places to start. | null | 0 | 1546081763 | False | 0 | ecsptiq | t3_aajb7r | null | null | t1_ecspkpb | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecsptiq/ | 1548220325 | 15 | t5_2fwo | r/programming | public | null |
False | Othis | t2_1erju0gu | Maybe you are, but I’m not. Where I work, reviews take _priority_ over writing more code. | null | 0 | 1546081797 | False | 0 | ecspu4l | t3_aaagix | null | null | t1_ecqxqtv | /r/programming/comments/aaagix/why_review_code/ecspu4l/ | 1548220333 | 1 | t5_2fwo | r/programming | public | null |
False | FrozenAsss | t2_2u5lrwd3 | How is the SFML .Net binding nowadays? The only problem i have with creating 2d games is the enormous amount of time it takes to create the graphics and UI. There should be some kind of generator for creating shitty 2d sprites. | null | 0 | 1546081877 | False | 0 | ecspvls | t3_aajb7r | null | null | t1_ecsopcl | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecspvls/ | 1548220351 | 1 | t5_2fwo | r/programming | public | null |
False | __pg_ | t2_rcy9eog | None of that is aimed at Eric in particular. All of us have been there. | null | 0 | 1546082147 | False | 0 | ecsq0lr | t3_aac4hg | null | null | t1_ecsckom | /r/programming/comments/aac4hg/modern_c_lamentations/ecsq0lr/ | 1548220413 | 4 | t5_2fwo | r/programming | public | null |
False | okovko | t2_lzdnc | That's pretty rad. | null | 0 | 1546082505 | False | 0 | ecsq7ai | t3_aajb7r | null | null | t3_aajb7r | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecsq7ai/ | 1548220494 | 0 | t5_2fwo | r/programming | public | null |
False | [deleted] | None | [removed] | null | 0 | 1546082561 | False | 0 | ecsq8by | t3_a66102 | null | null | t3_a66102 | /r/programming/comments/a66102/we_cant_include_a_backdoor_in_signal_signal/ecsq8by/ | 1548220508 | 1 | t5_2fwo | r/programming | public | null |
False | AyrA_ch | t2_8mz48 | They still don't say that the makefile has to be fed through the size tool, giving you additional space for code (1048576 bytes for submission total) and possibly allows the c file to be completely empty. | null | 0 | 1546082770 | False | 0 | ecsqcbc | t3_aag673 | null | null | t1_ecs5u0l | /r/programming/comments/aag673/ioccc_2019_begins_official_contest_rules/ecsqcbc/ | 1548220558 | 3 | t5_2fwo | r/programming | public | null |
False | mgostIH | t2_y3ijl | In the Rust code, you can also substitute those `(1..(z+1))` using the inclusive range syntax of `(1..=z)`, you can println! in debug mode the tuple directly and (optionally) convert the filter and map into a filter_map.
Here's the code under my changes:
fn main() {
let triples = (1..).flat_map(|z| {
(1..=z).flat_map(move |x| {
(x..=z).filter_map(move |y| {
if x * x + y * y == z * z {
Some((x, y, z))
} else {
None
}
})
})
});
for x in triples.take(10) {
println!("{:?}", x);
}
}
| null | 0 | 1546082934 | False | 0 | ecsqfc4 | t3_aac4hg | null | null | t1_ecsejdm | /r/programming/comments/aac4hg/modern_c_lamentations/ecsqfc4/ | 1548220595 | 5 | t5_2fwo | r/programming | public | null |
False | xcdesz | t2_79zii | Reading and writing code should be the primary quality. Interviews are tough because a programmer needs time to reflect before they start hammering out a solution to something. Aside from take home assignments, an interview technique that I might recommend is that instead of having them write code on the spot, put some existing code in front of them and ask them to explain what is going on, critique it or debug it. Possibly rewrite it in an IDE.
| null | 0 | 1546082960 | False | 0 | ecsqftq | t3_aaco1d | null | null | t1_ecseab5 | /r/programming/comments/aaco1d/things_i_dont_know_as_of_2018/ecsqftq/ | 1548220601 | 2 | t5_2fwo | r/programming | public | null |
False | kaeblo | t2_iw9bc | Error handling, processing collections, sequencing asynchronous functions.
I find these much nicer compared to the alternatives I've seen.
In Haskell / Scala you also get do notation / for comprehension, which help a lot with producing readable code. Basically you can get rid of nesting (nested loops, nested async calls, etc)
In statically checked languages these constructs also give you a lot of higher level type safety, because you move things like iterating on lists, handling errors and chaining asynchronous functions to types, so they can be checked by the compiler. | null | 0 | 1546083025 | 1546083382 | 0 | ecsqh1d | t3_aai5ap | null | null | t1_ecskivu | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecsqh1d/ | 1548220616 | 19 | t5_2fwo | r/programming | public | null |
False | cosmicr | t2_4apf5 | I remember doing this in C way back in the early 90s. Was a cool trick to impress your friends. | null | 0 | 1546083067 | False | 0 | ecsqht4 | t3_aajb7r | null | null | t3_aajb7r | /r/programming/comments/aajb7r/how_doom_fire_was_done/ecsqht4/ | 1548220626 | 6 | t5_2fwo | r/programming | public | null |
False | pbl64k | t2_hn6wp | > what problem that people have do monads solve, which cannot be solved as easily without monads?
This also the wrong question, but to answer it, you cannot DRY out some parts of your code without some way to speak about monads in general. Every monad, that is, everything that has lawful implementations of:
1. `singleton`/`pure`/`return`
2. `map`
3. `flatten`
...can be provided with tons of useful functions automatically (`andThen`, `sequence`, this margin really is to narrow). If you can talk about monads, you write those functions once, and every `Optional`, `Result`, `List`, `Lazy`, `Continuation`, `Future`, `Stream`, `Logger`, `Configurable`, `State` etc. etc. will have them out of the box.
But the wrongness of the question lies in the fact that the fundamental problem in "understanding monads" isn't in doing all this higher-kinded stuff. It's akin to understanding, um... scoping, let's say. If you have poor understanding of scoping, you're gonna screw up a lot more than if you do (says the person who experienced just that oh so many years ago - starting with BASIC *does* have its disadvantages). Monadic structure of many generic types wasn't something that's been *invented*, it's something that's been noticed, or discovered, if you will. And seeing this common structure gives you the ability to confidently reason about the behavior of these many different types. It just gives you more clarity of vision when thinking about your code. | null | 0 | 1546083140 | False | 0 | ecsqj7a | t3_aai5ap | null | null | t1_ecskivu | /r/programming/comments/aai5ap/what_is_a_monad_computerphile/ecsqj7a/ | 1548220643 | 15 | t5_2fwo | r/programming | public | 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.