Alex Kuleshov

8.4K posts

Alex Kuleshov banner
Alex Kuleshov

Alex Kuleshov

@0xAX

Software developer Elixir/Go/Rust. Open to work. Posting about things that I've met during reading source code of different systems: Author of linux-insides.

Katılım Ekim 2012
186 Takip Edilen11.6K Takipçiler
Sabitlenmiş Tweet
Andreas Kling
Andreas Kling@awesomekling·
you know you worked on MS-DOS programming if you remember stopping the debugger on an “ADD [BX+SI], AL” instruction hundreds of times 🤓
English
6
2
77
6.4K
Alex Kuleshov
Alex Kuleshov@0xAX·
I have absolutely the same feelings/experience. If a use-case does not strictly require fine-grained resource control, no gc and so on, in most of cases I would go with golang. Especially if not only I am working on a project and need to communicate and with people and their code.
English
1
0
13
1.3K
Damian Barabonkov
Damian Barabonkov@damian_b·
I wasn't expecting that Go vs Rust tweet to hit a nerve. Quick elaboration based on what I've actually seen. I build a distributed sandbox system that has both Go and Rust components. I have effectively unlimited access to the strongest models, so I've spent a stupid amount of time reviewing and cleaning up LLM-generated code in both languages. The difference in reviewability is stark. Go was designed for thousands of engineers at Google to collaborate without stepping on each other. It has very few concepts, so the code ends up looking similar no matter who (or what) wrote it. You see the same patterns everywhere. The err returns are verbose, but at least they're predictable. Channels are about as fancy as it gets. GC removes an entire class of mental overhead. Goroutines + mutexes just work for most concurrency needs. As a result, LLM-written Go usually reads like a novel. You can understand what’s going on quickly. Rust is the opposite. More power, more ways to do the same thing, more concepts you have to hold in your head. When an LLM writes it, you often can't tell if something is elegantly minimal or just over-engineered. Arc> vs Go's atomic.Pointer[RoutingTable] is a perfect example. One makes you pause; the other one is obvious. You also have to know the de facto Rust standard library that lives outside the standard library (tokio, serde, anyhow, parking_lot, etc.). Moreover, Rust's concurrency model is excellent, but there’s just more surface area to reason about. So my upshot is that 95% of the time, if something is in Rust today, it probably would be clearer, faster to review, and easier to maintain in Go. What I meant by the "rewrite it in Rust" meme should mostly be "rewrite it in Go." That said, Rust has its place (I’ll do a follow-up post on the 5%). But picking it because it’s trendy is the wrong move.
Damian Barabonkov@damian_b

the "rewrite it in rust" meme should be "rewrite it in go" like 95% of the time the remaining 5% are for projects like: - the linux kernel - sqlite - chromium

English
29
25
417
41.5K
Alex Kuleshov
Alex Kuleshov@0xAX·
@ajohnston97629 You are reading my thoughts... I was just about writing a tweet in context of the most recent one "I love c++"- lets better hate git submodules together :)
English
0
0
0
7
🇨🇦 vexatious litigant
🇨🇦 vexatious litigant@ajohnston97629·
@0xAX we actually do need to make Kbuntu the official Linux desktop and C/C++ package management system. And then demand everyone support it as such. Debian needs the love. Linux drivers need the love. And git modules isn't it.
English
1
0
1
6
Alex Kuleshov
Alex Kuleshov@0xAX·
Didn't expect such reaction on this tweet. Maybe it is worth to elaborate my opinion a bit. I've received lots of advice - use this or use that, what's wrong with X build system, Y is better... Can be. Cargo is not perfect. Maybe your X tool you are using to build you C++ code is way more better, I would not even start to argue with this. For me, the problem with C++ build systems not in a given concrete tool or it does not have good tools. The problem is that it has a zoo of them.
Alex Kuleshov@0xAX

c++ needs cargo

English
8
1
25
4.2K
Alex Kuleshov
Alex Kuleshov@0xAX·
@ajohnston97629 Whats the point? With DEs/WMs/UI on linux the same mess as with c++ build systems... who won from this... except some jokers in the style of the year of linux on the desktop
English
1
0
0
37
🇨🇦 vexatious litigant
🇨🇦 vexatious litigant@ajohnston97629·
@0xAX the C++ packaging system is Ubuntu. Microsoft even built a whole subsystem for it. Now why don't you go tell all the Linux nerds they have to use only KDE Plasma, you seem to be having fun.
English
1
0
0
47
tapeloop
tapeloop@tapeloop·
@0xAX So we can destroy rust by starting a couple of alternative package managers
English
1
0
0
94
Alex Kuleshov
Alex Kuleshov@0xAX·
@Adev You are right. Under cargo I meant rather unification. Let it be make, cmake, bazel, whatever, but single tool instead of ten > Package managers terribly interacts with each othe exactly this... and having more and more of them does not make anything simpler
English
0
0
1
27
アドリアン
@0xAX Do a bit of integration of in large software ecosystem and you will quickly understand why Cargo (or any package manager) for C++ is a terrible idea. Package managers terribly interacts with each other, and C++ is used under many of them. 1/2
English
2
0
2
36
Alex Kuleshov
Alex Kuleshov@0xAX·
Wanted to dive into formal verification already long time, maybe this one will be good - Tutorial: Introduction to Formal Verification with Lean (Part 1) - hashcloak.com/blog/tutorial-…
English
0
0
17
1.5K
Alex Kuleshov
Alex Kuleshov@0xAX·
@OlexGameDev Also of course understandable. Although I cant agree it is the right/ideal way to go looking at how community spends significant efforts to integrate all of these new systems. Especially considering that we are talking about build systems.
English
0
0
0
17
Olex (Solo gamedev Diablo-like)
@0xAX That is how all new systems begin. There is always a need for a custom solution that solves a particular set of issues. My solo C++ builds have different requirements from the corporate C++ builds.
English
1
0
1
17
Alex Kuleshov
Alex Kuleshov@0xAX·
@OlexGameDev But if seriously... ok, let's imagine there is 'cargo' which is used nearly for 100% C++ projects... would you really start to build you own? I suppose in most cases no, or I am wrong?
English
1
0
0
18
Alex Kuleshov
Alex Kuleshov@0xAX·
@PixelSupreme Yes, yes. Of course, understandable. Whatever good will be built next, there is still so pale of the code written before, that we will live with it anyway, but why not to dream a bit :)
English
0
0
0
108
Pixel
Pixel@PixelSupreme·
@0xAX That ship has probably sailed. Too many projects do things in too many different, bespoke ways. Even if there would be something like an "official" package manager/build system it is bound to be a huge pita for many projects to adopt and thus not going to happen.
English
1
0
2
126
Alex Kuleshov
Alex Kuleshov@0xAX·
@OlexGameDev In some... if not in most cases it is not a concern, but in a case of build systems I would say yes
English
1
0
0
87
Alex Kuleshov
Alex Kuleshov@0xAX·
@tribbloid each of them can be good on its own, but this zoo of tools is the main problem
English
0
0
1
91
mmoselhy
mmoselhy@__becks_·
@0xAX Anything specific about cargo?
English
1
0
1
281
Alex Kuleshov
Alex Kuleshov@0xAX·
@straceX v.size() is unsigned, so v.size() - 1 wraps around and booooom
English
3
0
80
6.4K
Strace
Strace@straceX·
A classic C++ trap that still sneaks through code reviews. If v is empty, what happens when this code runs?
Strace tweet media
English
53
27
500
74.8K
Dave Pedu
Dave Pedu@dpedu·
@0xAX do people even hate on autotools anymore?
English
1
0
0
120
HSVSphere
HSVSphere@HSVSphere·
@0xAX No. It doesn't have many useful features, it is just badly designed and old. And no, C++ doesn't need cargo, that sucks worse
English
5
0
21
1.1K