Pull to refresh
128K+

C++ *

General-purpose programming language. It has imperative, object-oriented and generic programming features, while also providing facilities for low-level memory manipulation

404,01
Rating
Show first
Period
Level of difficulty

C++: How We Ended Up with a 2 MB Hello World

Level of difficultyMedium
Reading time4 min
Reach and readers696

It would seem that modern C++ offers so many possibilities... Let's try to dissect all this immense power, starting with the first step in any programming language — "Hello World".

How do compiler implementations greet a newcomer who has just written their first lines of code?

Find out how we got here

constexpr Game of Life

Level of difficultyMedium
Reading time20 min
Reach and readers639

For over 10 years, C++ has had constexpr, which allows the programmer to cleverly offload some computations to the compiler. At the time, this blew my mind, because the compiler can calculate some rather complex things before the program is even run!

At some point, I thought: if the compiler can calculate everything for you, then why do you need a runtime at all? What are you going to do there—print the answer or something? That’s just silly. That’s unsportsmanlike.

This is where my challenge was born:

“No hands” or “don’t even think about running the exe file”

Challenge accepted!

Copper Filler: Saving on PCB Manufacturing in KiCad

Level of difficultyMedium
Reading time5 min
Reach and readers4.1K

Hello, fellow developers!

Anyone who designs multilayer printed circuit boards in KiCad has faced the need, during routing, to leave large areas free of copper polygons (whether connected to nets or not) for schematic or other reasons. On outer layers, this isn't a big problem. On inner layers, it's a bit different. While it might be fine from a topology perspective, it's not ideal from a manufacturing point of view.

Today, we want to share a plugin we developed to solve this problem. It's a tool for automatically filling free areas on a PCB with non-current-carrying copper elements, either square or round, of a configurable size.

Why is this needed?

At first glance, an empty area on a board is just bare laminate without copper. But for the manufacturer and the end-user of the device, this has two important consequences.

Read more

Mandelbrot set. 24-bit TrueColor. 80-bit long double. OpenMP. Supersampling 8x8 (64 passes). Colors

Level of difficultyMedium
Reading time3 min
Reach and readers5.5K

The Mandelbrot set. And it's a program! I made it in g++, a freely distributable C++ compiler. Read it! Very interesting. Using OpenMP, you do parallel programming at the multithreading level. And I decided - this would be a completely different level of quality! I implemented honest supersampling (antialiasing) - with 8x8 antialiasing (64 passes per pixel!!!) That is, not 1920 by 1920 pixels, but 8x8 more! 15360 by 15360 pixels! And then these 64 passes reduce by one pixel, but smoothly - and no longer 8-bit, but 24-bit TrueColor!

Read more