C++ thread

C++ industry expert here

ask me anything

Attached: emmastone_alcohol.gif (500x250, 484K)

Other urls found in this thread:

godbolt.org/g/6J4bnd
godbolt.org/g/yZrrKa
yosefk.com/c fqa/
twitter.com/NSFWRedditImage

Coke or Pepsi?

how do you choose a shoe

How Dig is your bick?

Which subscription meds are you on?

coke

i wear sandals (+1 size to fit comfy socks)

digger than a bick that writes rust

the sandals i like to wear don't have any tread left on them
when it rains and i walk in the garage i wind up slipping on my ass and somehow winding up under a parked car

C++11 or C++14 or C++17
If you want to start a new project right now?

C++11 for portability, that'll make it reasonably easy to work with windows and android should your project ever need them. but if you are looking to toy around with bleeding edge don't limit yourself to a standard at all

How do you ensure cross-platform support? Do you use the Boost libraries?
What build system do you utilise?
Do you ever have to use asm or c?
Have you ever needed to design an algorithm?
What field do you work in?
What are your qualifications? Do you think you would have gotten a job without them?
Also, how long is your benisss xDDD

How much opensource food do you eat a day?

>How do you ensure cross-platform support
earlier standards
>Do you use the Boost libraries
no, I prefer folly if I need some STL extension
>Do you ever have to use asm or c
asm yes, but always split into a separate compilation unit (.S files)
rarely C (except for ABI wrappers because C++ doesn't have a standard ABI)
>Have you ever needed to design an algorithm
yea
>What field do you work in
machine learning
>What are your qualifications? Do you think you would have gotten a job without them
degree from prestigious uni, probably not -- having a well used lib on github would definitely have sufficed as well

What operating system(s) do you use? (at your $DAYJOB as well as at home)

we are looking to port a (almost) million LOC C project to C++. any advice here, ie how to easy modules in?

What industry?

>no, I prefer folly
why

Because he is larping.

How would you go about getting started on working on open source projects on Github op? How do you choose them and how does it usually work? Intermediate programmer here

>intermediate
not op but are you fucking retarded?
>find project you are interested in
>clone the repo
>read the contribution guidelines
>make a pull request

arch linux and mac os at home
generally ssh'd into a linux box at work
start from the bottom up. extern "C" and wrap the smaller perf code or logic wizardry first so that you can get a better sense of the paradigm to use at the more abstract higher level of the codebase
folly has a bunch of random useful shit thats easy to copy into code (e.g. fully commented standalone header files). boost has always been a bit more bloated
just cater it to whatever you want to learn about. find projects you want to contribute to and make a prototype of that same project on your own. this generally lets you get a good sense of the design decisions made and will make it way easier to approach throwing up a PR in one of those other projects.

favorite way to manage project building and dependencies?

what practical uses do pointers have? I get that in C they are used to implement basic functions like arrays and strings, but in C++?

Attached: 1506142763272.png (625x773, 143K)

not OP but pointers are about sharing between scopes (e.g. function call), C++ smart pointers and RAII also for ownership and automated memory management

Why is C and C++ holy grails on Jow Forums?

Are you all web developer retards without degrees?

Not OP, but I used to do web development in C++.

how
it must be tedious

What is the ideal c++ fizzbuzz?

cmake w Ninja + git submodules
pointers are like giving the address to a house -- if you wanted to make a function that took in 3 houses as input you have two options:

1) build exact replicas of every single house and "copy" them over to the function (which might be expensive as fuck). the output would be yet another "copy" of the house
House getSmallestHouse(House a, House b, House c);

2) give the addresses of the 3 houses and tell the function to go look and then return the address
House* getSmallestHouse(House* a, House* b, House* c);


in C (and C++) they abused this notion and said "oh, well if we give the address of the first house on the block, we can uniquely refer to a row of houses" -- which is what an array or a string is.

in C++ the paradigm of passing by reference (i.e. passing around addresses) became automatic
House getSmallestHouse(House& a, House& b, House& c);


so a common trend became using pointers for outputs
void doSomestuff(const Type& input, Type* output);


then C++11 came around and introduced smart pointers. this allows you to do things related to automatically managing the lifetime of the underlying object but is effectively separate from the usefulness of pointers (which is just the idea of taking addresses instead of full copies)

I think it is because they are full of gotchas that require a fair amount of knowledge when used for complex programming projects. the breadth of trivia associated with that lets each and every Jow Forumstard think they are smart for knowing their small part.

godbolt.org/g/6J4bnd

>ask me anything
Хyи cocёшь? Бoчкy дeлaeшь?

Are you going to become a Rust expert when C++ becomes obsolete?

>how
FastCGI

>it must be tedious
Not when a basic framework is in place.

>git submodules
You're joking, right? This has to be a joke.

Gimme tips to learn metaprogramming

>C++11 for portability, that'll make it reasonably easy to work with windows
>C++
>Windows
Microsoft has been shitting profusely over its legacy C++ users for well over a decade. I would know since I work on a few. Anyone who doesn't bow to the .net god gets beaten. Even those people don't have any luck since Microsoft drops support for their frameworks every two years.

Attached: 1473731595959.jpg (288x432, 33K)

What's the coolest C++ feature these days everyone should be using in their code?

> compile time computation
> using std::cout
> not printing the output as a compiler error
Watch and learn, kid
godbolt.org/g/yZrrKa

OOP

Yes
They are shit but everyone uses git and github so it’s a necessary evil. I didn’t choose it. Cmake is in the same camp
just try to do outrageous shit
auto lambdas

I'm a complete noob to C++, what's the best tutorial/book if I want to start now?

Just read the language spec

What should I do if I masturbate to C but C++ makes me puke even while being aware that it's cool and such

Does the C++ FQA trigger you?

yosefk.com/c fqa/

This.

Bepis

What's you opinion on using shaed_ptr and make_shared to implement immutable data structures?
Also how important do you think is teaching move semantics when teaching C++

> tfw had a choice between managed C++ and C# to use in a plugin framework
> have literal PTSD from dealing with CLI madness
> had to choose C#

Attached: weaselshave.jpg (300x300, 94K)

Have you read The Elements of Programming? If no, then why not?

>Compilation failed

How do I get a job
should i just kms if im a drop out

>auto lambdas
whats that
and checked

>a bit more bloated
the understatement of the year. i can't count how many times i've seen some faggot try to shill the boost library to some noob on stack exchange that requires 3 lines of code you can write yourself. i've begun to think it's an inside joke.

in-line / in scope functions that run immediately. there's more to them than just that, but essentially that's how they're used predominantly from what I've seen.

how do varable

>no simple way to define interfaces
dropped

Cutelyst?

Doxygen is garbage. It needs more handholding than it needs to be. Hopefully CLdocs improves.
Why haven't you killed yourself yet?

Madness is having to deal with Microsoft shit when it comes to bridging .NET to unmanaged C++.
>shim DLLs everywhere
>hat pointers and other managed C++ nonsense
>seeing std::array and .NET array fight for compiler supremacy
>dealing with Marshal class and the 60 other ways to shuttle a simple string back and forth
In their favor, they've made managed C++ suck a lot less in .NET 4.5

Attached: 1465862531845.jpg (633x758, 71K)

not op, but this.

Attached: 4thEnglish.jpg (591x722, 50K)

When C++ meets functional programming. Also

Do you like C++ as a language or would you like some other language to replace it.

I don't know of any good ones. perhaps just pick the C++ programming guidelines of a random project and use that as a constraint on something you choose to make. for example LLVM doesn't use built in RTTI and exceptions and has a certain inheritance style thats pretty nice
bring asphyxiation into the mix
the static order fiasco bit is pretty good for people to read
nope, no reason to
make good shit, a portfolio gets you hired by big companies
I just mean auto lambda = [](auto input){} // easy templating
C++ is pretty horrible. it has accumulated a lot of cruft and is generally unapproachable to new people.

why is C# superior

Have you ever had experience with OpenMP?

I cloned a github repo recently and tried compiling some benchmarks with gcc but a lot of warnings shot up so I'm guessing I need to install some dependencies. Do you know what dependencies I need to download?

Undergrad student here. Is it easy to find a job if I plan to master C++? What are my selections?

What languages/frameworks should I know to get a job as a software developer? Which are in highest demand?

I’m teaching myself the fundamentals of computer science rn, just a couple weeks in

Because you are deluded.

do you use boost and if so, fuck you?

Attached: navel.jpg (175x464, 17K)

Not OP, but this has already been answered, see >>Do you use the Boost libraries
>no, I prefer folly if I need some STL extension

Starting programming at uni, should I learn java or c++? Whats better for jobs and shieett? I’m a math undergrad, major in statistics.

Where should I start learning C++ if I've already done a good bit of C, a ton of Bash and a good amount of Python?

Usually I think of a project, Google my ass off and when I'm familiar with the language start reading the docs. But I haven't thought of any C++ projects I couldn't already do with a ton of ease in those 3 languages I already know pretty well.

>using facebook's stl fork unironically sounds better than using boost
the absolute state of c++

Attached: 1512548029895.gif (240x228, 858K)

>Where should I start learning C++
don't
>But I haven't thought of any C++ projects
good

Attached: 1520728088331.jpg (534x820, 141K)

Where would you suggest I learn C++? I've done a good amount of C, a ton of Bash, and quite a lot of Python.

Usually I think of a project, Google my ass off, then start readin the docs when I feel familiar with the language. But I can't think of any projects for C++ that I couldn't do easily in those 3 languages.

My PC crashed when I clicked submit and I didn't realize it was posted, fugg my bad

Yeah but why? Not gonna take your advice without reason nigger

wanting to learn c++ for no particular reason is like wanting to learn how to operate a jackhammer without concrete to break.
You'll accumulate various mental illnesses and will have nothing to show for it

I want to learn it because it's difficult and will teach me more about how computers work. It'll also provide me with a lot of employable skills.