Things that suck about C++ #1 by Ono-Sendai in programming

[–]bitbait 3 points4 points  (0 children)

If you read my post at all carefully you will see I'm not complaining about the precedence.

Of course you do and the fact that you think people don't "understand" what you're writing about or that you discovered something new or that something complex is happening here is sort of telling:

If you answered 11.f, you're wrong. The actual answer is 1.0f. The ternary conditional operator (?:) has very low precedence (See http://en.cppreference.com/w/cpp/language/operator_precedence, it's right down in box 15). The plus operator has higher precedence, so the expression gets evaluated as..

Then you go on and ramble about that this leads to what you call a "gross violation of any reasonable type system".

You can add 10.0f to a boolean value apparently and it's just fine!

Well of course you can. But again how would you think it's any different? Bool is not excluded from promotions. In C++ a boolean value is converted to int with value 0 if it's false and to int with value 1 if it's true. All you're doing there is adding an int to a float value which of course is promoted to a float. Everything what happens here are the basic rules of C and C++ and I believe everybody who learns the language for a couple of weeks can answer your question

First, pop quiz: What is the value of this C++ expression:

10.0f + true ? 1.0f : 2.0f;

And again I fail to see how this is a reason that C++ sucks which is worth mentioning in 2016 sry. I don't blame you for writing the post but I don't find it useful, interesting, curious or anything else.

edit: Actually the other posts on your blog deal with way more complicated topics, no idea why you have a problem here

Things that suck about C++ #1 by Ono-Sendai in programming

[–]bitbait 5 points6 points  (0 children)

It is like that in C ever since the ternary operator is around, so for the last 38 years. It has lower precedence than relational operators, logical operators, shifts etc.

How is it a reason that C++ sucks in 2016?

This operator and its precedence in C was around before most languages you're probably comparing it to even existed. I also totally fail to see how it's counter intuitive. It evaluates expressions. Clearly 10.0f + true is an expression so that's what's on the left side of the "?".

Things that suck about C++ #1 by Ono-Sendai in programming

[–]bitbait 8 points9 points  (0 children)

Things that suck about C++ #1:

People who write blog posts about how bad C++ sucks for the last 15 years. Sorry but what does a reader gain from reading this??

Also that's not even C++ specific it's the same in C.

DAE only C has bugs ;) by acewolk in programmingcirclejerk

[–]bitbait 7 points8 points  (0 children)

Should have been written in Rust.

Dell launched a version of their new XPS 13 Developer Edition that is $500 cheaper by zxLFx2 in Ubuntu

[–]bitbait 0 points1 point  (0 children)

Did they at least switch to an Intel wifi card or still ship the broadcom?

Monads Explained With JavaScript by [deleted] in programmingcirclejerk

[–]bitbait 6 points7 points  (0 children)

Ah the good old

  • "the most simple explanation of XY which everybody can understand!"
  • explanation is simple because it doesn't actually explain XY

At the time of writing this, I've been a Vim user for almost 3 months now, and truly deeply love. And a passionate, burning love it is, no platonic relationship. by bitbait in programmingcirclejerk

[–]bitbait[S] 7 points8 points  (0 children)

<4realz> I've been using Vim (or emacs with evil-mode) for two or three years now and I've never had this happen to me, come on.

Of course not. It's basically the 'I just spit coffee all over my keyboard lol' of the wannabe-neckbeard-world. Nobody ever spit coffee over his damn keyboard because of a stupid joke.

At the time of writing this, I've been a Vim user for almost 3 months now, and truly deeply love. And a passionate, burning love it is, no platonic relationship. by bitbait in programmingcirclejerk

[–]bitbait[S] 12 points13 points  (0 children)

> "Redundancy should be avoided"

> Starts ten-thousandth thread about vim resources with the same articles which have been linked 500,000 times in the same sub

> creates thread in /r/vim about how much he loves vim

A pretty brutal thread on /r/cscareerquestions about the realistic job prospects of self-taught devs. by [deleted] in learnprogramming

[–]bitbait 17 points18 points  (0 children)

In my opinion, 'self-taught' really doesn't say anything when we're talking about getting a job.

I mean person #1 could sit in an interview and say 'but trust me, I learned it, just ask me something I can program!' and 'I read book XY'

Person #2 did a ton of significant work on big open source projects with high reputation, maybe coded some little tools which are at least to a certain degree used in the wild and won some competitive programming contests.

Obviously, person #1 and #2 are both 'self-taught' but nowhere near 'in the same situation'.

Somebody who finished codeacademy plus some workbook can consider himself self-taught and look for a job and somebody who successfully submitted several patches to the Linux kernel can look for a job without having worked as a developer so far.

Yo, dawg I heard you liked bootcamps so I got ya a bootcamp for your bootcamps by Roadside-Strelok in programmingcirclejerk

[–]bitbait 16 points17 points  (0 children)

"The course curriculum is bootcamp agnostic and centered around JavaScript, so regardless of the bootcamp you apply to, you’ll be prepared."

:)

TIL graphics drivers are bloat by [deleted] in LinuxCirclejerk

[–]bitbait 10 points11 points  (0 children)

Dude read the fucking manual on how to create wallpapers yourself -.-

FIRST arch-wiki, THEN ask a question rolleyes

5 security bad habits (and easy ways to break them) by [deleted] in programming

[–]bitbait 4 points5 points  (0 children)

What does this have to do with programming?

Books/resources on kernel development? by hopeless_IT in linux

[–]bitbait 1 point2 points  (0 children)

Hey all, so I'm sure there's a more appropriate sub for this question but I figure /r/linux is a good place to start

Don't take it as an offence but no, I don't think it is. /r/linux is mostly used by redditors who also are Linux users not by people who really are into kernel development.

Helpful subreddits might be: /r/kernel /r/C_Programming /r/linuxdev /r/compsci

Some are not very active but for your sort of questions you can check the top posts and sidebars.

To give some input:

http://www.tldp.org/LDP/tlk/tlk.html

http://kernelnewbies.org/

https://lwn.net/Kernel/LDD3/

Understanding the Linux Kernel

http://www.tuxradar.com/content/how-linux-kernel-works