159 karma · joined November 1, 2020
A failure in representative polls like this should be avoided with statistical methods.
Does it eliminate the need for a GC pause completely?
They just waste some energy on suboptimal chips and business decisions.
The mast of this ship was slightly higher than that of the Preußen, one of the biggest sail ships ever build.
While it clearly worked for a while, it shows how insane the design actually was
Maybe I'm simple minded though.
Hard disagree here. I write code for people who can read the language. This includes operator precedence.
The interviewer also lost his job, since he didn't spot it nor does he know basic python syntax.
I cannot see it for !=
"a != b != c" is not equal to "not (a == b == c)" which is a bit strange imo
> I don’t know man, why are we writing C++?
Why do you write it in a way that you even blow up the most esoteric footgun in existence?
Using temporary lifetime extension - just because it exists or what?
const int& i_am_a_ref = return_a_value() // why do you need this?????
Compiling C code with a C++ compiler - it is no secret that it only works until C89
Unnecessary template disambiguation - why not remove it when it is not necessary
The website where the article is hosted looks very dubious to put it mildly. Looks like SEO spam.
I did write a very cool tutorial about how to apply machine learning to control problems, but not many people even looked at it I guess^^
It seems like a hot candidate to potentially yield better results in the future
It's based on ranges (similiar to the ones added to C++) and the concept works very well imo. Could be a good exercise to translate it to C++23 (using coroutines with the range "generator").
I was just angry when I wrote my last comment, because I had to read this:
>> as a special case of most people are idiots
which is so low in multiple ways. It's also just wrong, because by definition most people have average intelligence. Even if you think this is true, a smart person would not use it as an argument^^
It's on my todo-list to dive a bit into haskell, when I find time.
There where at least two other replies talking about accumulators. I call that pattern, like it or not.
Have you even heard of programming patterns?
> If we assume most imperative programmers are idiots as a special case of most people are idiots, sure.
The other reply from chongli seems to disagree with you ;)
Also suggesting that I'm stupid is no constructive style of argumentation.
> rather than that it wasn't a good/intuitive example to illustrate recursion
You are still misunderstanding me but a genius like you are should be able to figure that out.
I now understand what my teacher meant when he said:
"Haskell is a genius language but I don't like the community,"
Do you agree that most imperative programmers would not come up with this solution on their own, if you didn't teach them the "accumulator pattern"?
For me personally a tutorial with a lot code like that would be interesting.
Showing me another version of a recursive descent parser doesn't teach me anything, because I know how to write it (with recursion!!!) in an imperative language...
Also the classical (recursive) fibonacci function everyone shows has accidental complexity of O(2^n). If you want a sane version it looks definitely more complicated than the iterative version.
I never saw a recursive version of bresenham's line plotting algorithm so this might be a good candidate as well ;)
Maybe my comment was somehow badly written, because you (and the only other reply from chriswarbo) clearly misunderstood me.
I know that recursion is equivalent to iteration^^
My point was that some problems fit the one or the other better.
Look at fft for example. The algorithm is easy with recursion but hard with iteration. For other problems its the opposite.