🍌 C++ Feed
306 subscribers
218 photos
12.7K links
Агрегатор всего подряд про C++.

Для связи: @smertig

Powered by https://github.com/Smertig/banana
Download Telegram
C++ (Rss)
C++ Jobs - Q4 2020

Rules For Individuals Don't create top-level comments - those are for employers. Feel free to reply to top-level comments with on-topic questions. I will create top-level comments for meta discussion and individuals looking for work. Rules For Employers You must be hiring directly. No third-party recruiters. One top-level comment per employer. If you have multiple job openings, that's great, but please consolidate their descriptions or mention them in replies to your own top-level comment. Don't use URL shorteners. reddiquette forbids them because they're opaque to the spam filter. Templates are awesome. Please use the following template. As the "formatting help" says, use **two stars** to bold text. Use empty lines to separate sections. Proofread your comment after posting it, and edit any formatting mistakes. **Company:** [Company name; also, use the "formatting help" to make it a link to your company's website, or a specific careers page if you have one.]   **Type:** [Full time, part time, internship, contract, etc.]   **Description:** [What does your company do, and what are you hiring C++ devs for? How much experience are you looking for, and what seniority levels are you hiring for? The more details you provide, the better.]   **Location:** [Where's your office - or if you're hiring at multiple offices, list them. If your workplace language isn't English, please specify it.]   **Remote:** [Do you offer the option of working remotely (permanently, or for the duration of the pandemic)? If so, do you require employees to live in certain areas or time zones?]   **Visa Sponsorship:** [Does your company sponsor visas?]   **Technologies:** [Required: do you mainly use C++98/03, C++11, C++14, C++17, or C++20? Optional: do you use Linux/Mac/Windows, are there languages you use in addition to C++, are there technologies like OpenGL or libraries like Boost that you need/want/like experience with, etc.]   **Contact:** [How do you want to be contacted? Email, reddit PM, telepathy, gravitational waves?] Previous Post C++ Jobs - Q3 2020 submitted by /u/STL
[link] [comments]
C++ – Типизированный язык программирования (Rss)
[Перевод] vulkan-tutorial. Урок 1.1 — Вступление

В связи с тем, что у меня не так много времени для ресерча каких-то новых штук и написания статей о них, я решил перевести серию уроков по Vulkan. Надеюсь, что мои переводы будут кому-то полезны и не очень плохого качества. Для начала обучения — прошу под кат.

Автор оригинала дал свое согласие на перевод. Так же, когда я доперевожу все статьи и у меня будет время отформатировать их для github, он добавит русский перевод на свой сайт. Читать дальше →
C++ (Rss)
Websites for learning cpp

Is there any website for learning cpp similar to this one for javascript: https://javascript.info/. What other websites or free learning resources for cpp will you suggest anyway? submitted by /u/yourdoom69
[link] [comments]
Standard C++ (Twitter)

C++20: Extend std::format for User-Defined Types--Rainer Grimm bit.ly/3lQTlXn #cpp
Standard C++ (Twitter)

A brief introduction to C++ structured binding--Raymond Chen bit.ly/3k48u76 #cpp
Standard C++ (Twitter)

Clang 11.0.0 Release Notes — Clang 11 documentation bit.ly/34XcMHd #cpp
Standard C++ (Twitter)

C++20: Extend std::format for User-Defined Types--Rainer Grimm bit.ly/3lQTlXn #cpp
Standard C++ (Twitter)

A brief introduction to C++ structured binding--Raymond Chen bit.ly/3k48u76 #cpp
Standard C++ (Twitter)

Clang 11.0.0 Release Notes — Clang 11 documentation bit.ly/34XcMHd #cpp
Arthur O’Dwyer (Rss)
A case study in implementation inheritance

The more I deal with classically polymorphic code, the more I appreciate the
“modern” idioms that have grown up around it — the Non-Virtual Interface Idiom;
Liskov substitutability;
Scott Meyers’ dictum that classes should be either abstract or final; the
rule that every hierarchy should have exactly two levels; and the rule that
base classes express commonality of interface,
not reuse of implementation.

Today I’d like to present a chunk of code that shows how “implementation inheritance”
ended up causing trouble, and the particular patterns I applied to disentangle it.
Unfortunately, the offending code is pretty messy, so I’ll use a simplified and
domain-shifted example; and I’ll try to build it up in stages.

Step 1: Transactions

Let our domain be “banking transactions.” We have a classically polymorphic inheritance hierarchy,
because of course we do.

class Txn { ... };
class DepositTxn : public Txn { ... };
class WithdrawalTxn : public Txn { ... };
class TransferTxn : public Txn { ... };


All kinds of transaction have certain APIs in common, and then each type also has its own
idiosyncratic APIs.

class Txn {
public:
AccountNumber account() const;
std::string name_on_account() const;
Money amount() const;
private:
// virtual stuff
};

class DepositTxn : public Txn {
public:
std::string name_of_customer() const;
};

class TransferTxn : public Txn {
public:
AccountNumber source_account() const;
};


Step 2: Transaction filters

What our software is actually doing, though, isn’t executing transactions; it’s monitoring them
so that it can flag suspicious transactions. The software’s human operator can set up filters to
match against certain criteria, like “flag all transactions larger than $10,000” or “flag all
transactions where the person’s name is on watchlist W.” Internally, we represent the various
operator-configured filter types as a classically polymorphic hierarchy, because of course we do.

class Filter { ... };
class AmountGtFilter : public Filter { ... };
class NameWatchlistFilter : public Filter { ... };
class AccountWatchlistFilter : public Filter { ... };
class DifferentCustomerFilter : public Filter { ... };
class AndFilter : public Filter { ... };
class OrFilter : public Filter { ... };


All filters have exactly the same public API.

class Filter {
public:
bool matches(const Txn& txn) const {
return do_matches(txn);
}
private:
virtual bool do_matches(const Txn&) const = 0;
};


Here’s an example of a simple filter:

class AmountGtFilter : public Filter {
public:
explicit AmountGtFilter(Money x) : amount_(x) { }
private:
bool do_matches(const Txn& txn) const override {
return txn.amount() > amount_;
}

Money amount_;
};


Step 3: The first misstep

It turns out that some filters really want to access those idiosyncratic transaction-specific
APIs I mentioned earlier. Let’s say that DifferentCustomerFilter wants to flag
any transaction where the name of the customer who made the transaction was different from the
name on the account. For the sake of this example, our bank strictly enforces that
only the account holder is ever allowed to withdraw money from their account. So
only class DepositTxn even bothers to record the name of the customer who made the
transaction.

class DifferentCustomerFilter : public Filter {
bool do_matches(const Txn& txn) const override {
if (auto *dtxn = dynamic_cast(&txn)) {
return dtxn->name_of_customer() != dtxn->name_on_account();
}
C++ – Типизированный язык программирования (Rss)
Оптимизация C++: совмещаем скорость и высокий уровень. Доклад Яндекса

Что влияет на скорость работы программ на C++ и как её добиться при высоком уровне кода? Ведущий разработчик библиотеки CatBoost Евгений Петров ответил на эти вопросы на примерах и иллюстрациях из опыта работы над CatBoost для x86_64.




Видео доклада



— Всем привет. Я занимаюсь оптимизацией для CPU библиотеки машинного обучения CatBoost. Основная часть нашей библиотеки написана на C++. Сегодня расскажу, какими простыми способами мы добиваемся скорости.




Читать дальше →