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

Для связи: @smertig

Powered by https://github.com/Smertig/banana
Download Telegram
Standard C++ (Twitter)

Increased Complexity of C++20 Range Algorithms Declarations - Is It Worth?--Bartlomiej Filipek bit.ly/2GJXOfE #cpp
C++
Taruga is a simple single-header C++11 library for turtle graphics!

Examples (on Streamable): drawing a Koch fractal and drawing a spiral. Differently than other C++ implementations, Taruga offers a very simple API, it's code is easy to understand, needs only one (widely accessible) dependency and is hardware-accelerated. More examples (and obviously, the code) are available at the Taruga repo. Any insights and (constructive) critique are welcome! submitted by /u/VinceMiguel
[link] [comments]
C++
C++ in a web app (series of blog posts)

Want to learn how to run your C++ code on the web? A series of blogs has been published to explain the steps to do this. Great for demonstration or to move the heavy computation from the server to the browser. Using C++ in a web app with WebAssembly Help! My C++ web app is not responding Interact with your C++ web app using React forms Spice up your C++ web app with visualizations C++ web app with WebAssembly, Vega, Web Worker and React submitted by /u/fdiblen
[link] [comments]
Arthur O’Dwyer
Grab bag

“Why does man print gimme gimme gimme at 00:30?”

In 2010, artist Blake Fall-Conroy produced a “Minimum Wage Machine.”

The minimum wage machine allows anybody to work for minimum wage. For as long as they turn the crank,
the user is paid in pennies… For example, if minimum wage is $7.25/hour (the current US Federal rate),
then the worker is paid one penny every 4.97 seconds. If they stop turning the crank, they stop
receiving money.


The machine was originally programmed to dispense one penny every 4.97 seconds, corresponding to the
US federal minimum wage of $7.25 per hour ($14,500 per 2000-hour year) as of 2009.
A decade later, the federal minimum wage remains
$7.25 per hour ($14,500 per year).



If you haven’t seen One Pixel Wealth yet,
take a moment and see it. Serendipitously, the green square at the beginning represents
approximately 69 years’ worth of wages at $14,500 per year.



The California Republican Party has admitted
setting up rogue ballot boxes
and marking them as “official,” despite cease-and-desist letters from the California Secretary of State.
It’s not clear what the Republicans’ plan is, other than to sow confusion.

For an idea of what Republican voter intimidation has looked like in the past, take a look at
the Ballot Security Task Force,
a successful effort by the Republican National Committee to suppress the black vote in the
1981 New Jersey gubernatorial race.


The task force consisted of a group of armed off-duty police officers wearing armbands,
who were hired to patrol polling sites in African-American and Hispanic neighborhoods of Newark and Trenton.
BSTF patrols challenged and questioned voters at the polls and blocked the way of some prospective voters.


Roger Stone served as “chief strategist”
for the Republican gubernatorial candidate Thomas Kean, who ended up winning that race
thanks to the Ballot Security Task Force.
Earlier this year, Roger Stone was convicted of seven felonies stemming from the “Russiagate”
investigation; he was then summarily pardoned by Donald Trump.

Unprecedented, historic corruption:
an American president commutes the sentence of a person convicted by a jury of lying to shield
that very president.— Mitt Romney (@MittRomney) July 11, 2020



Most recently he’s been calling for Trump to declare martial law and
void the election results
,
in a sort of belt-and-suspenders approach.

I’ll leave the last word to Republican Utah Senator and anti-masker Mike Lee:

We’re not a democracy.— Mike Lee (@SenMikeLee) October 8, 2020
C++
Question about packages coming from a Python Perspective

Okay, so I want to learn a little cpp, so I decided to do this facial recognition thing with OpenCV. I've done it before with python. Super easy, quick and simple. With Python you can just pip install the OpenCV module, and use it in seconds. However, when attempting with Cpp, it looks like I'm having to use this cmake command to build the OpenCV ordeal. This process it taking FOREVER. I am wondering if I am missing something or if this is just the process with cpp. I found out there isn't a pip for cpp unfortunetly. ​ I guess what I am trying to figure out is: - Is this a normal application for cpp? (Facial Recognition) - Do you have to build each package you want to use? (ie OpenCV) - Is there some fundamental thing I am missing? submitted by /u/chancedare
[link] [comments]
C++
Does this code snippet lead to undefined behavior?

I came across some code in android project https://cs.android.com/android/platform/superproject/+/master:system/netd/include/Fwmark.h;l=24?q=fwmark.h union Fwmark { uint32_t intValue; struct { unsigned netId : 16; bool explicitlySelected : 1; bool protectedFromVpn : 1; Permission permission : 2; bool uidBillingDone : 1; }; constexpr Fwmark() : intValue(0) {} static inline uint32_t getUidBillingMask() { Fwmark m; m.uidBillingDone = true; return m.intValue; } }; The intention here is to use union to do cast between bitfield and uint32_t. I suspect this is still undefined behavior. submitted by /u/haohaolee
[link] [comments]
C++
Networking in C++ Part #1: MMO Client/Server, ASIO & Framework Basics

https://www.youtube.com/watch?v=2hNdkYInj4g ​ I found that video very intersting and how i hardly find any good content about networking programming with an use case in C++, i decided to share it here. submitted by /u/Dominus543
[link] [comments]
C++ (Rss)
Are there any good guides that directly compare MATLAB to C++ and vice versa?

I've been very happily working almost exclusively in MATLAB for a bit over ten years now. Initially, I used did controls, but then switched over to computational mechanics and geometry. I've only very sparsely used Python when collaborating with others, and have used C++ in a very minimal capacity (just quick edits of inputs and parameters). Due to the nature of what I'm working on these days, I've accepted that I just need to bite the bullet and learn C++ to a reasonable level of proficiency, and move my ongoing projects there. While tutorials are good and fine, I feel I would really benefit from a succinct comparison of MATLAB and C++ syntax, data structures, and general best practices; a translation between one and the other, if you will. Does anyone know of such a thing? All I've been able to find are mostly hollow blog posts with too much SEO. If anyone has any suggestions, thank you in advance! submitted by /u/send_me_ur_dog
[link] [comments]
C++ – Типизированный язык программирования (Rss)
Металингвистический совратитель Си. Опус I: Предварительные ласки

>> Осторожно, модерн! 2 — 0.1. Спор на баксы и девчонок

Предисловие

Система макросов добавлена в язык программирования Си с целью абстрагирования часто повторяющихся синтаксических конструкций, и как следствие — снижения ментальной нагрузки при чтении и написании исходного кода.

Но не всё так радужно… после моих экспериментов в написании нетривиальных метапрограмм на связке Boost/Preprocessor + Boost/VMD я осознал, что с текущими огр...

Read full post
C++ – Типизированный язык программирования (Rss)
Бесплатный IT-фестивальчик TechTrain: вторая волна

В этом году, когда из-за пандемии все мероприятия перешли в онлайн, мы уже проводили «фестивальчик на удалёночке» TechTrain. Теперь число заражений снова бьёт рекорды, вопрос «как интересно провести выходной дома» снова актуален, и мы устраиваем TechTrain 2020 Autumn: он состоится 24 октября.

Что можно будет увидеть? И доклады, и различные разговорные формы: круглые столы, интервью, набросы в прямом эфире. И, как водится на TechTrain, топовых спикеров, которые в своей сфере пользуются большим уважением. Например, на вопросы о производительности будут отвечать трое экспертов сразу: двое из Java-мира (Алексей Шипил...

Read full post
C++ – Типизированный язык программирования (Rss)
[Из песочницы] Нахождение точки пересечения двух прямых (и отрезков)

Введение

Довольно часто при разработке игр возникает необходимость находить точку пересечения прямых, отрезков, лучей и т.д. О том, как реализовать это максимально простым способом, в этой статье.







Популярные способы и их критика

Возможно, многие вспомнят способ из школьной алгебры — составить уравнения двух прямых, приравнять их правые части, найти x, и подставить его в уравнение прямой, чтобы найти y (Подробнее здесь).



Однако данный способ становится достаточно громоздким при написании кода (возможно поэтому вы сейчас читаете эту статью), к тому же, он не является универсальным: если одна из прямых парал...

Read full post