Dmitrii Kovanikov
@ChShersh
Followers
59K
Following
87K
Media
2K
Statuses
36K
Dysfunctional Programming account #1. Senior SWE at Bloomberg. I write C++ for money. ex-Haskell, ex-OCaml. All opinions are my own.
London, UK
Joined October 2013
Each programming language I used taught me something: 1. C++ taught me how powerful abstractions can still be performant 2. Python taught how people are eager to give up performance to write glue code 3. C taught me that simple but solid foundations can get you really far 4.
My main programming language 2007: Visual Basic 6.0 2008: Python 2009: Turbo Pascal 2010: Pascal ABC 2011: C++ 2012: Java 2013: Java 2014: C++ 2015: Kotlin 2016: Haskell 2017: Haskell 2018: Haskell 2019: Haskell 2020: Haskell 2021: Haskell 2022: CoffeeScript 2023: OCaml 2024:
54
17
407
As always, link to Godbolt, if you want to start implementing your own monadic library in modern C++ https://t.co/heBOo0daPJ
godbolt.org
template std::optional applyA2(std::optional x_opt, std::optional y_opt, F&& f) { for (auto x : x_opt) { for (auto y : y_opt) { return f(x, y); } } return std::nullopt; } int main() { std::optional...
2
0
10
C++ is closer to supporting Pattern Matching and Monads. The following is valid code in C++26
21
3
129
One of my favourite tricks of CS algorithms Theory vs Practice is binary search optimisation for cache-friendliness. The standard algorithm looks at the middle of array and jumps back and forth. This destroys cache. Instead, store a pre-order traversal of a sorted array
12
36
685
Made a C++ version for my software engineering friends https://t.co/QTFNdBuZ34
3
1
13
VECTOR, our Cardano-based L2, is live! Project onboarding has begun. Instant finality. 4x throughput vs Cardano mainnet. Native cross-chain liquidity access. Verified by the original architects of Cardano.
15
27
90
By popular demand, here's a C++ version of this post
If you use Python, you should be writing C++ instead If you use Rust, you should be writing C++ instead If you use JavaScript, you should be writing C++ instead If you use Go, you should be writing C++ instead If you use C, you should be writing C++ instead If you use Zig,
36
6
189
Every person with more than 2 brain cells understands that no language can guarantee complete safety from CVEs. Even Haskell or OCaml. Yet, we see such a huge backlash towards Rust in kernel. And this is because Rust was too aggressive in its marketing. It’s overpromised.
It's been about 5 years of Rust being in the kernel and only 1 CVE 2024 there were ~3,500 CVEs in the C code By this logic we should rewrite the entire kernel in to Rust
54
14
374
If you use Python, you should be writing C++ instead If you use Rust, you should be writing C++ instead If you use JavaScript, you should be writing C++ instead If you use Go, you should be writing C++ instead If you use C, you should be writing C++ instead If you use Zig,
If you use unsafe{} in Rust, you should be writing C++ instead If you use a raw pointer in C++, you should be writing C instead If you use inline asm in C, you should be writing assembler instead
204
18
492
How to spot a low IQ SWE: “I worked only on problems X and never needed solutions Y, so knowing Y is useless.”
23
4
172
If only you knew how many times my knowledge of git helped me to unfuck some state produced by imposed overcomplicated workflows
5
2
127
To elaborate, I don't propose sitting for 2 hours, reading the manual, memorising the commands once, and automatically remembering which one to use when the time comes. I think of them in terms of problems. "How do I make my changes visible to others?" "How do I save changes
I genuinely don’t understand who uses GitHub Desktop. All you need to use git efficiently is just these 28 commands: git clone git log git status git add . git add <path> git diff git commit -m "Short description" git commit -am "Short description" git commit -a --amend git
10
9
127
I genuinely don’t understand who uses GitHub Desktop. All you need to use git efficiently is just these 28 commands: git clone git log git status git add . git add <path> git diff git commit -m "Short description" git commit -am "Short description" git commit -a --amend git
I genuinely believe GitHub desktop is the best Git client for most people The design is simple but it's excellent for day to day work of swapping branches, cherry picking, undoing commits, stashing, previewing PRs - one of their best products
458
340
5K
What’s your favourite C++23 feature? For me, there’s one I expected the most.
24
2
86
Looks like my account is not controversial at all. Plain vanilla boring programming stuff.
The X API is an insanely powerful tool to find the most meaningful conversations on the platform. To show what it can do, I put a sample app together as a small weekend project to highlight top ratios on X. Let the dunking begin 🔥
3
0
11