Rendered at 17:05:54 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
assumed_throwaw 19 hours ago [-]
I discovered Clice a few months ago, but it wasn't stable enough for my needs at the time. It looked very promising, though. I'm glad to hear it's moving to v1.0.
I didn't expect this technical article to end on such a melancholy note. I'm sad that the author feels this way about his work of last years. But it was an interesting read, and I think many of us share these concerns and doubts. Hopefully, even in a world of AI agents, there will still be people that write and read code, and who will enjoy using Clice.
tancop 8 hours ago [-]
> in an era like this it means the effort I poured into clice over the past two and a half years is unlikely to have the lasting meaning I first imagined
Reading C++ without a good language server is hard. And if you don't read your agents code that makes you a stupid vibe coder. Everyone else will benefit from your project.
And it's good training data (also for humans) to learn modern C++ from a real codebase.
pjmlp 1 hours ago [-]
The irony is that current ones are catching up with what Lucid's Energize C++ and IBM's Visual Age for C++ v4 offered, but the hardware requirements and their enterprise prices meant we have lost a few decades.
Re the melancholy conclusion:
I spent the last year of my school working on a big personal project, but when I started a full time job, this personal project was eclipsed, it no longer made sense in the context of the industry. But I recently returned for my 5yr reunion, and I found a bunch of current students who were still using my system! Upon reflection, it’s still one of the most fun projects I’ve ever done.
rhodo 2 hours ago [-]
This is sick man, I think you should be really proud of what you built!
rixed 20 hours ago [-]
Going on a tangent, but I'm always owndering if "modern C++" sounds rather appealing or off-putting to most people?
moltopoco 19 hours ago [-]
Just one data point, because I have to get it off my heart. I loved Modern C++ when it meant C++11, but I've become more negative with each new language standard reaching my workplace.
Using string_view over string by default is probably the #1 cause of memory errors that landed on my desk. I also keep hearing that "int x{0}" is preferable to "int x = 0" which allows for super dangerous implicit conversions, but then the same people rewrite push_back into emplace_back, which is much more lenient w.r.t. type conversions. It is also much easier to litter every function with [[nodiscard]] constexpr nothrow than it is to argue for readability.
My best explanation is that "Modern C++" is making developers biased towards whatever language feature is newer, instead of making good decisions. I wish the community gave up on the moniker.
spacechild1 18 hours ago [-]
`string_view` (and `std::span`) is great! Finally I don't have to use concrete types like `const std::string&` or `const std::vector<float>&` as function parameters when all I really want is just something that behaves like a string or array/vector type.
In fact, `std::string_view` can lead to very elegant and efficient (zero-allocation) string parsing code.
IME, taking a string_view as an argument is pretty unproblematic. Two areas where I have seen problems:
1. returning a string_view from a function. Think twice before doing that.
2. calling data() and passing the result to a function that expects a null-terminated C strings. (std::string_view is not guaranteed to be null-terminated.)
---
Apart from that, there are so many great features and libraries in C++17 and C++20 that I use on a regular basis and that I would really miss:
- structured bindings
- if-statement initializers
- fold expressions
- inline variables (very useful for handling global state in header-only stuff)
- if constexpr (replaces many uses of SFINAE)
- concepts (replaces all of the remaining uses of SFINAE)
- coroutines (really nice to use with ASIO)
- std::optional
- std::variant
- std::filesystem
- std::format (although I personally stick to fmt::format)
- from_chars() and to_chars() (fast, local-independent string-number conversion routines)
- std::bit
- std::apply, std::invoke, std::bind_front
- etc.
pwiecz 10 hours ago [-]
> IME, taking a string_view as an argument is pretty unproblematic. Two areas where I have seen problems
I've seen a few problema with automatic conversion of const std::string& arguments to std::string_view.
They arised when the argument was later captured by value in a lambda and passed as an argument to e.g. std::thread.
Instead of safely passing copy of the string now you pass refwrence to a memory owned by a different thread, which may be deallocated at any moment.
Conscat 9 hours ago [-]
This can be prevented by `[[clang::lifetimebound]]` and I've been doing that lately.
Joker_vD 14 hours ago [-]
> all I really want is just something that behaves like a string or array/vector type.
What does behave like a std::string/std::vector but is not std::string/std::vector, respectively? In my experience, if you want a flat array behind a T* (or std::dequeue<T> at the worst) — so that the autovectorization can kick in — then that's precisely what you want, and no generalization to e.g. a linked list, or a heap, or a red-black tree is really possible.
spacechild1 13 hours ago [-]
> What does behave like a std::string/std::vector but is not std::string/std::vector, respectively?
`std::span` works with all vector/array-like types: `std::vector`, `std::array`, C-arrays and third-party vector/array types.
Similarly, `std::string_view` works with `std::string`, C-strings and third-party string types.
> so that the autovectorization can kick in
It's not even about vectorization. Often you just have a function that takes a string-like or array-like thing, but you don't care about the exact container. Yes, you could make the argument a template (and constrain it with concepts), but then you have to put everything in headers.
William_BB 18 hours ago [-]
To be fair, string_view has one very attractive feature over const ref string. String's char constructor is not explicit. With string view, you are guaranteed to not allocate by accident.
spacechild1 13 hours ago [-]
Exactly! When you have a `const std::string&` argument, passing a C-string implicitly allocates a new temporary `std::string`.
`std::string_view` accepts both `const std::string&` and `const char*` without hidden allocations.
jandrewrogers 16 hours ago [-]
In the case of C++, "modern" conventionally denotes "C++11 or later". Idiomatic code between "legacy" and "modern" dialects of C++ that they almost look like different languages. C++11 was a breaking change to the idioms of older C++.
This is helpful context to the reader. Many C++ programmers are unfamiliar with either idiomatic legacy or modern dialects and would have difficulty following the code.
There are arguably three different idiomatic dialects of C++ now: legacy, C++11, and C++20. We don't really have a common term for distinguishing between C++11 and C++20 even though the idiomatic code looks quite different.
It has been an interesting evolutionary strategy. C++ standards meticulously avoid breaking changes but will happily do a major redesign of how idiomatic code is written.
htfy96 18 hours ago [-]
Yes. Using C++23 in work with house-built coroutine abstraction is very fun and robust. Have to admit that it just requires certain level of skills of your colleague, and unfortunately general hires don't have.
omoikane 20 hours ago [-]
Maybe they are referring to Effective Modern C++ book by Scott Meyers.
I think "modern" is used to contrast newer C++ standards from C++98.
ibobev 20 hours ago [-]
Or an older book.
"Modern C++ Design: Generic Programming and Design Patterns Applied" by Andrei Alexandrescu
Actually, he coined the term. Then Scott Meyers reused it, and now it is a common adjective used before C++ books, libraries, tooling, and so on.
jibalt 17 hours ago [-]
They are quite explicitly referring to C++23
eluru 15 hours ago [-]
Sounds tiring, CPP has been modernised, killed, solved, so many so so many times now, not even one was for real, this wont be the one either
Neywiny 20 hours ago [-]
Interesting they show clangd crashing in vscode. That's been my biggest gripe with it. But they also show clice crashing in the same spot? Seems odd to not just fix it
quacker 16 hours ago [-]
They explain exactly why in article:
Because C++ is simply too complex, and on certain corner cases the compiler can easily crash or leak memory. That is especially true for incomplete code in the middle of editing: a huge downstream user base tests compilers on complete code, while very few people test them on half-written code, where the compiler mostly falls back on best-effort heuristics
It's the compiler that crashes. Both clangd and clice are built on top of the same compiler (clang) which is why both experience a crash on the same code.
qalmakka 7 hours ago [-]
The problem is that the language is simply too complex with way too many corner cases.
For instance, C++ the only programming language that comes to my mind where the grammar is type 0 in the Chomsky classification - it means it has to be parsed with a Turing machine and thus every C++ compiler suffers from the halting problem.
This means that having a C++ compiler that will never crash or hang is literally mathematically impossible unless you stick to only parsing a subset of the grammar. Modern compilers bypass this by doing things like capping how many times templates can recurse, etc but this means that the frontend it will inevitably end up in unsavoury corners where it relies on its authors explicitly handling them - which sometimes they did not
account42 56 minutes ago [-]
> The problem is that the language is simply too complex with way too many corner cases.
Bullshit. These are compiler bugs that can be fixed. It's just not a priority because it doesn't affect normal use with valid code.
> This means that having a C++ compiler that will never crash or hang is literally mathematically impossible unless you stick to only parsing a subset of the grammar.
This is only a theoretical concern since every compiler will accept arbitrarily large programs anyway due to being built on fixed-width integer architectures which can only address finite amounts of memory. Real compiler can set reasonable limits where they can avoid both hangs and crashes.
dwattttt 19 hours ago [-]
I'm not a C++ expert, but I don't see anything in the shown snippet that would cause a language server crash, so I imagine the server is crashing on something off screen.
I could understand them showing off crash recovery by using code deliberately written to crash the language server, and so not being something you can "fix".
Neywiny 17 hours ago [-]
IME it's nothing about the code. It'll be weird setup issues that aren't traceable. In one IDE I end up having to just have a new workspace and copy the code over and somehow that fixes it. It's truly beyond me. At best I'll see an ENOENT error but that doesn't help me much.
ykiko 12 minutes ago [-]
[flagged]
AshamedCaptain 21 hours ago [-]
The biggest issue with clangd (and a derivate like this) is that it is at least three orders of magnitude slower than non-clang based indexers like the old ones in Eclipse and Qt Creator. It used to be that I could index a huge codebase in a couple minutes; clangd takes days and therefore we have to trouble with stuff such as remote indices. Frankly, I'd trade anything in the world for a fast indexer that is NOT based on clang, even if it were not perfect (which is kind of the point).
vintagedave 19 hours ago [-]
Are you sure? This is explicitly not a ‘derivative’ and has a fascinating coroutine with multiprocess architecture. I would not automatically expect it to be too slow.
I agree re the old ones though. But they did far less. This design is heavy on completing templates. That’s tricky!
kamrann_ 8 hours ago [-]
I would assume they're referring to it being built on top of clang. While it does claim to have improved on some architectural decisions in clangd, and my testing of it today was indeed much better than clangd when it comes to handling modules in particular, at the end of the day the bottleneck for responsiveness remains by a distance the time it takes clang to recompiled a translation unit.
whizzter 16 hours ago [-]
I think you should reconcile with Clang and hope that they can work on performance for LSP tasks, because while C++ 26 reflections does a lot of "conservative" things right, it also enabled consteval to create structures with novel shapes, so you need consteval in an indexer.
ie.
auto val = make_named<"x","y">(1, 2.3);
// val is now a struct with an integer field named x and a double field named y
account42 51 minutes ago [-]
For the IDE use case its not clear support for that is worth giving up realtime parsing speeds. Of cource you can try to have your cake and eat it too by compiling a fast but limit parser with clangd but then you are doubling your bug surface.
qalmakka 12 hours ago [-]
Clangd is slower precisely because it's very precise. The old indexers you mention, like the one in Eclipse CDT, never truly worked for me. They weren't that useful and were always lacking compared to IntelliSense. clangd was the first time the FOSS alternative truly matched and often trounced IntelliSense
kamrann_ 8 hours ago [-]
Yeah I think this is exacerbated by the ever increasing complexity of the language. Anything using workarounds to avoid implementing a full frontend is just going to fall apart on modern code depending on the standard library.
qalmakka 7 hours ago [-]
Precisely. Clangd can successfully index the entirety of Unreal Engine for instance (after fixing how you generate compile_commands.json, and taking like 32 GB of RAM in the process), which is not a small feat. Let's see if this new kid can do the same, it has been indexing 43k files for 10 hours now so for one it is indeed slower than clangd, which took like only 5
ykiko 16 minutes ago [-]
[dead]
mwkaufma 15 hours ago [-]
Derivative?
It is still built on LLVM/Clang, but unlike clangd and ccls, which are also Clang-based, clice was redesigned from the ground up to fix architectural problems that have gone unsolved in those servers for years.
ykiko 15 minutes ago [-]
[flagged]
qyron 21 hours ago [-]
Interesting project and great writeup! Looking forward to try this.
nnevatie 11 hours ago [-]
> A completely hermetic, reproducible build powered by Bazel
Why not CMake, the de-facto (like it or not) build tool for C++?
rienbdj 10 hours ago [-]
Speed and correctness, choose 2
BoingBoomTschak 18 hours ago [-]
The vibe smell is one of the strongest I've ever encountered. Who thought commit messages each dwarfing a Dumas novel was a good idea?
I'm not against agentic coding, but insanely verbose commit messages in place of actual decision making records are definitely an anti-pattern.
Requirements, specs, and ADRs shouldn't be thrown out with agentic development. I've found that using rust-style `r[rule.id]` for requirements and specs with ADRs works a lot better than verbose commits.
There is this saying that automation doesn’t reduce work, but it’s hard in the beginning to guess what the new work will be. I suspect that the hard human thing to do in the future is wading through the mountains of sloppy words.
I’m baffled that AI companies still train their LLM to produce that many words, it’s wasting everybody’s time and destroy the environment.
anonymous908213 7 hours ago [-]
> Over on X, you can see plenty of people asking Claude in a single sentence to rewrite the TypeScript compiler in another programming language and getting better performance out of it.
And yet nobody is using these rewritten Typescript compilers to compile real programs, because LLM-generated compilers fall apart the moment you move beyond whatever test programs the LLM was special-casing to work for impressive benchmarks. Drawing the conclusion that software dev has been 100x'd because people can post stupid attention-grabbing shit on HN and Twitter, when none of that software is actually used by anybody, is an extremely unfortunate conclusion to draw. And so, facing peer pressure and FOMO, the author abandoned their own project to the bots and allowed it to be slopped out to the point nobody will ever seriously use it. 100x, but at what cost? The damage being done to our community will take decades to recover from at this rate. We have turned the concept of software development into "who can make the most impressive landing page and headline" with no concern for making anything that is useful to anyone - not even to the author, for they are no longer learning.
thetrendtimes 16 hours ago [-]
[flagged]
grougnax 10 hours ago [-]
[dead]
Tadpole9181 21 hours ago [-]
[dead]
drnick1 17 hours ago [-]
Meh, I will stick with the kind of C++ that is useful and readable, basically C++98 or C with classes. There are now ten ways of doing the same thing, the language is a complete mess.
glebd 17 hours ago [-]
It's slop, unfortunately.
dwb 21 hours ago [-]
[flagged]
jayd16 16 hours ago [-]
Personal blogs share personal aesthetics. No more different than the flying toasters or dancing babies or the classic "guy sorta hiking with his dog looking off into the distance" header pics of yore.
lmnlvoid 19 hours ago [-]
I think you might be reading a bit much into it. People have blog posts with their pets, children, a random vacation spot, or just a random picture they wanted to share; I'm not sure why the anime girl is that different. Or is there some extra context I am missing?
jibalt 17 hours ago [-]
Way way too much. The blogger's name is ykiko -- a Japanese girl's name.
19 hours ago [-]
makemefundyou20 21 hours ago [-]
It's just art that the author puts in all their blog post. I think it's perfectly normal.
jibalt 17 hours ago [-]
Especially since the blogger's name is ykiko -- a Japanese girl's name.
unleaded 17 hours ago [-]
To annoy people on HN. I'd do the same thing
dingaling911 21 hours ago [-]
You'll find the most cracked C++ programmers are either transgender, gay or anime fanatics. It is what it is.
dwb 20 hours ago [-]
What does being transgender or gay have to do with depictions of young girls?
jibalt 17 hours ago [-]
"transgender, gay or anime"
In this case, anime. It's an anime image of a Japanese girl. The blogger (ykiko) is a Japanese girl.
perpetualpear 19 hours ago [-]
Both are correlated with autism. And we all know that autism is one of the programming Paths.
Tadpole9181 20 hours ago [-]
It was a list. Either trangender, gay, or anime fanatics.
edukite 20 hours ago [-]
You did my day sir, cheers to you
hollerith 21 hours ago [-]
What, no furries?
dingaling911 20 hours ago [-]
Them too, forgot.
dadoum 19 hours ago [-]
In my view, furries tend more to prefer Rust over C++, but that's no scientific study
Tadpole9181 21 hours ago [-]
First time here?
Just teasing - but there's a pretty large overlap of skilled FOSS developers and anime afficionatos (and also LGBT). It's a pretty common joke that if an exploit drops with an anime girl on the video / account - you know it's about to get bad.
Looking at the blog, this is a common theme with them: every article starts with a shot from some anime. Their GH PFP matches: https://github.com/16bit-ykiko
Hard to say why - maybe that's what they're watching when they made the article or did the work or something? Maybe they just like it. Maybe they're degens. People can be enigmatic sometimes. Well... okay, they're a C++ developer, they're definitely a degen.
Anyway, the first few times may catch you off guard, and sometimes it goes too far, but you learn to tune it out pretty fast. It's harmless and I'm glad they're enjoying themselves.
dwb 20 hours ago [-]
It doesn't strike me as definitely harmless.
Joker_vD 20 hours ago [-]
Let's put it this way, politely: it's in the eye of beholder.
Most people don't find a random picture of an anime teenager to be harmful or have sinister implications.
dwb 20 hours ago [-]
I wouldn’t put money on it being outright sinister or harmful, and it’s definitely fine to be into anime with characters like this. But I do find it odd to be into pictures like this enough that you add them to unrelated blog posts.
Joker_vD 19 hours ago [-]
It's literally just an arbitrary Attention-Grabbing Picture in the header; because there is really no good attention-grabbing header picture for a C++ language server. A (likely AI-generated nowadays) screenshot of VS Code just doesn't quite cut it — so non-corporate people just put some moderately interest-piquing picture, generally of things they themselves find "nice" to look at. Sometimes it's some silly meme/image macro, sometimes it's a random screenshot from an anime.
Like, here's a random example: [0]. An article is about "a Go-native shell sandbox with coreutils, Python via WebAssembly" — and it opens with a photo of "a sea lion sleeping peacefully on a rocky beach while other sea lions lounge in the background near the water". Why? Because the author thought it would be nice to put there, that's why! No deeper meaning, unless you want to do psychoanalysis over the Internet.
Half the reason you put an attention grabbing picture there is that you get algorithmically deboosted for not having one. Don't blame the players, blame the game.
Joker_vD 18 hours ago [-]
That too, I guess. I just personally don't really mind it either way — a screencap from the 80s' Transformers cartoon with Optimus Prime in its truck form before an article about different implementation strategies of a "switch" construct? Sure, why not. And I bet that picture wouldn't trigger the same response in the original commenter.
Some blogs end up having interesting (not the right word, but I can't think of a proper one) sequences of leading pictures for their series of related posts, so that's an additional bonus for a reader, as a kind of second narrative/story, perhaps completely unrelated to the first one.
jibalt 17 hours ago [-]
It's not arbitrary -- the blogger is ykiko, which is a Japanese female name. The picture is an anime style self image.
omoikane 20 hours ago [-]
I remember a template for technical design documents that had a placeholder to insert a header image. Any image, could be totally unrelated to the document content. The template explains that it's a sort of mnemonic to identify the document, since everyone is expected to use the same template, and all walls of text roughly look similar to each other from a distance.
So with some header image, reader might be able to recall "it's that Clice post with Yami on top" or "it's that other Clice post with Kessoku Band".
hollerith 19 hours ago [-]
That doesn't explain why anime aficionados (and furries) have such images in their posts vastly more often than for example people into marijuana or craft beers or motorcycle racing.
jibalt 17 hours ago [-]
How is it unrelated when it is a stylized picture of the blogger?
What, you couldn't imagine that the author is a Japanese female?
ulimn 20 hours ago [-]
Wait until you see magazine ads or such showing girls. The atrocity...!
dwb 20 hours ago [-]
As I said, it’s about the context. There’s plenty of contexts where I wouldn’t bat an eyelid.
F3nd0 12 hours ago [-]
How does it not strike you as definitely harmless? I’m trying really hard to imagine a way in which a cartoon picture with no kind of sensitive content could possibly be harmful, but I’ve come up with nothing of substance. Do you feel an unrelated header image distracts from the main subject too much, or..?
jibalt 17 hours ago [-]
Then something is severely wrong on your side of the screen. The blogger is ykiko ... a Japanese girl's name.
P.S. I mute hyperbolic trolls.
hanthebot 12 hours ago [-]
Ykiko (likely Yukiko) sounds like a typical Japanese female name, but it's more likely that the author speaks Mandarin (simplified) as mother tongue. And considering anime culture prevalent in this field, a more logical thing would be that the author just like Japanese anime, rather than a Japanese girl him/herself (which, indeed, could be true).
TylerE 15 hours ago [-]
You don't need to post the same comment 60 times in different subthreads.
Tadpole9181 20 hours ago [-]
Okay then, so don't read it? Do you have evidence this person did... whatever it is you think they did purely on the basis of theming their profile with girls from massively popular anime [0]?
From your profile description and that other comment, I would have assumed you were an ally. If so, I wouldn't have expected quite as much morality policing / thought crime tone. My perspective is that it's a little odd, but as long as they aren't hurting someone I really don't care what sparks joy in their lives. Life is hard enough.
And if they are hurting someone, that's what the law is for.
[0]: Their PFP comes from a manga / show that's sold over 10 million copies, apparently.
dwb 20 hours ago [-]
You’re making my comment out to be rather more than it was. I don’t think there’s anything wrong with enjoying manga/anime with characters like this, but that’s not what the context of the post is. But sure, ultimately they can do what they want with imagery like this.
Tadpole9181 17 hours ago [-]
> It doesn't strike me as definitely harmless.
Is this not you implying the author of this article is a potential sexual predator?
dwb 9 hours ago [-]
No. I don’t think that’s a reasonable inference from the use of the image, and I’m a little surprised to have to spell that out. But I do think this kind of usage (the framing, the context) perpetuates unhealthy attention and attitudes.
jibalt 17 hours ago [-]
The blogger's name is ykiko -- a Japanese female. The image is presumably a stylized image of the blogger. dweeb's comments strike me as rather misogynistic ... he can't imagine a female blogger.
Tadpole9181 16 hours ago [-]
> The image is presumably a stylized image of the blogger.
Nah, they start all their articles with a shot from a random anime. The last two have been this show, but going back they have Boki, Konosuba, Ms. Kobayashi's dragon maid, etc.
But still, who cares?
jibalt 15 hours ago [-]
They are all anime females. The blogger is a Japanese female. It's reasonable to think that the blogger identifies with the images.
Who cares? Some sort of chauvinist, apparently.
hollerith 20 hours ago [-]
>they're a C++ developer, they're definitely a degen.
Can you explain this? Is "degen" being used here in the sense of being so avid about C++ that it borders on degeneracy?
jayd16 16 hours ago [-]
Yeah I think that's the joke. Only sickos partake in C++.
avadodin 8 hours ago [-]
we're all out of free training tokens, sorry.
jibalt 17 hours ago [-]
The blogger's name is ykiko -- a Japanese girl's name.
hmokiguess 21 hours ago [-]
I mean this with no offense, but I find surprising reading a comment such as yours when in your profile about says "they/them"
dwb 20 hours ago [-]
Why?
hmokiguess 20 hours ago [-]
It's not uncommon for folks who identify themselves this way to overlap with the circle of those who do these things you called out.
dwb 20 hours ago [-]
I think it is very uncommon actually, especially if you consider the global population of non-binary-gender people, from the many cultures we exist in. Don’t let a couple of online bubbles skew your perception.
hmokiguess 18 hours ago [-]
Sure, that could be true too.
ktosobcy 20 hours ago [-]
Also it's kinda fascinating that person with "pronouns" (implying "let there be inclusive acceptance") is so against… anime girls…
I didn't expect this technical article to end on such a melancholy note. I'm sad that the author feels this way about his work of last years. But it was an interesting read, and I think many of us share these concerns and doubts. Hopefully, even in a world of AI agents, there will still be people that write and read code, and who will enjoy using Clice.
Reading C++ without a good language server is hard. And if you don't read your agents code that makes you a stupid vibe coder. Everyone else will benefit from your project.
And it's good training data (also for humans) to learn modern C++ from a real codebase.
https://dreamsongs.com/Cadillac.html
https://www.youtube.com/watch?v=pQQTScuApWk (related demo)
https://www.edm2.com/index.php/VisualAge_C%2B%2B_4.0_Review
Using string_view over string by default is probably the #1 cause of memory errors that landed on my desk. I also keep hearing that "int x{0}" is preferable to "int x = 0" which allows for super dangerous implicit conversions, but then the same people rewrite push_back into emplace_back, which is much more lenient w.r.t. type conversions. It is also much easier to litter every function with [[nodiscard]] constexpr nothrow than it is to argue for readability.
My best explanation is that "Modern C++" is making developers biased towards whatever language feature is newer, instead of making good decisions. I wish the community gave up on the moniker.
In fact, `std::string_view` can lead to very elegant and efficient (zero-allocation) string parsing code.
IME, taking a string_view as an argument is pretty unproblematic. Two areas where I have seen problems:
1. returning a string_view from a function. Think twice before doing that.
2. calling data() and passing the result to a function that expects a null-terminated C strings. (std::string_view is not guaranteed to be null-terminated.)
---
Apart from that, there are so many great features and libraries in C++17 and C++20 that I use on a regular basis and that I would really miss:
- structured bindings
- if-statement initializers
- fold expressions
- inline variables (very useful for handling global state in header-only stuff)
- if constexpr (replaces many uses of SFINAE)
- concepts (replaces all of the remaining uses of SFINAE)
- coroutines (really nice to use with ASIO)
- std::optional
- std::variant
- std::filesystem
- std::format (although I personally stick to fmt::format)
- from_chars() and to_chars() (fast, local-independent string-number conversion routines)
- std::bit
- std::apply, std::invoke, std::bind_front
- etc.
I've seen a few problema with automatic conversion of const std::string& arguments to std::string_view. They arised when the argument was later captured by value in a lambda and passed as an argument to e.g. std::thread. Instead of safely passing copy of the string now you pass refwrence to a memory owned by a different thread, which may be deallocated at any moment.
What does behave like a std::string/std::vector but is not std::string/std::vector, respectively? In my experience, if you want a flat array behind a T* (or std::dequeue<T> at the worst) — so that the autovectorization can kick in — then that's precisely what you want, and no generalization to e.g. a linked list, or a heap, or a red-black tree is really possible.
`std::span` works with all vector/array-like types: `std::vector`, `std::array`, C-arrays and third-party vector/array types.
Similarly, `std::string_view` works with `std::string`, C-strings and third-party string types.
> so that the autovectorization can kick in
It's not even about vectorization. Often you just have a function that takes a string-like or array-like thing, but you don't care about the exact container. Yes, you could make the argument a template (and constrain it with concepts), but then you have to put everything in headers.
`std::string_view` accepts both `const std::string&` and `const char*` without hidden allocations.
This is helpful context to the reader. Many C++ programmers are unfamiliar with either idiomatic legacy or modern dialects and would have difficulty following the code.
There are arguably three different idiomatic dialects of C++ now: legacy, C++11, and C++20. We don't really have a common term for distinguishing between C++11 and C++20 even though the idiomatic code looks quite different.
It has been an interesting evolutionary strategy. C++ standards meticulously avoid breaking changes but will happily do a major redesign of how idiomatic code is written.
I think "modern" is used to contrast newer C++ standards from C++98.
"Modern C++ Design: Generic Programming and Design Patterns Applied" by Andrei Alexandrescu
Actually, he coined the term. Then Scott Meyers reused it, and now it is a common adjective used before C++ books, libraries, tooling, and so on.
Because C++ is simply too complex, and on certain corner cases the compiler can easily crash or leak memory. That is especially true for incomplete code in the middle of editing: a huge downstream user base tests compilers on complete code, while very few people test them on half-written code, where the compiler mostly falls back on best-effort heuristics
It's the compiler that crashes. Both clangd and clice are built on top of the same compiler (clang) which is why both experience a crash on the same code.
For instance, C++ the only programming language that comes to my mind where the grammar is type 0 in the Chomsky classification - it means it has to be parsed with a Turing machine and thus every C++ compiler suffers from the halting problem.
This means that having a C++ compiler that will never crash or hang is literally mathematically impossible unless you stick to only parsing a subset of the grammar. Modern compilers bypass this by doing things like capping how many times templates can recurse, etc but this means that the frontend it will inevitably end up in unsavoury corners where it relies on its authors explicitly handling them - which sometimes they did not
Bullshit. These are compiler bugs that can be fixed. It's just not a priority because it doesn't affect normal use with valid code.
> This means that having a C++ compiler that will never crash or hang is literally mathematically impossible unless you stick to only parsing a subset of the grammar.
This is only a theoretical concern since every compiler will accept arbitrarily large programs anyway due to being built on fixed-width integer architectures which can only address finite amounts of memory. Real compiler can set reasonable limits where they can avoid both hangs and crashes.
I could understand them showing off crash recovery by using code deliberately written to crash the language server, and so not being something you can "fix".
I agree re the old ones though. But they did far less. This design is heavy on completing templates. That’s tricky!
ie.
auto val = make_named<"x","y">(1, 2.3);
// val is now a struct with an integer field named x and a double field named y
Why not CMake, the de-facto (like it or not) build tool for C++?
https://github.com/clice-io/clice/commits/main/
Requirements, specs, and ADRs shouldn't be thrown out with agentic development. I've found that using rust-style `r[rule.id]` for requirements and specs with ADRs works a lot better than verbose commits.
Requirements cover what, specs cover how, ADRs cover why, and git commits cover when.
I’m baffled that AI companies still train their LLM to produce that many words, it’s wasting everybody’s time and destroy the environment.
And yet nobody is using these rewritten Typescript compilers to compile real programs, because LLM-generated compilers fall apart the moment you move beyond whatever test programs the LLM was special-casing to work for impressive benchmarks. Drawing the conclusion that software dev has been 100x'd because people can post stupid attention-grabbing shit on HN and Twitter, when none of that software is actually used by anybody, is an extremely unfortunate conclusion to draw. And so, facing peer pressure and FOMO, the author abandoned their own project to the bots and allowed it to be slopped out to the point nobody will ever seriously use it. 100x, but at what cost? The damage being done to our community will take decades to recover from at this rate. We have turned the concept of software development into "who can make the most impressive landing page and headline" with no concern for making anything that is useful to anyone - not even to the author, for they are no longer learning.
In this case, anime. It's an anime image of a Japanese girl. The blogger (ykiko) is a Japanese girl.
Just teasing - but there's a pretty large overlap of skilled FOSS developers and anime afficionatos (and also LGBT). It's a pretty common joke that if an exploit drops with an anime girl on the video / account - you know it's about to get bad.
Looking at the blog, this is a common theme with them: every article starts with a shot from some anime. Their GH PFP matches: https://github.com/16bit-ykiko
Hard to say why - maybe that's what they're watching when they made the article or did the work or something? Maybe they just like it. Maybe they're degens. People can be enigmatic sometimes. Well... okay, they're a C++ developer, they're definitely a degen.
Anyway, the first few times may catch you off guard, and sometimes it goes too far, but you learn to tune it out pretty fast. It's harmless and I'm glad they're enjoying themselves.
Most people don't find a random picture of an anime teenager to be harmful or have sinister implications.
Like, here's a random example: [0]. An article is about "a Go-native shell sandbox with coreutils, Python via WebAssembly" — and it opens with a photo of "a sea lion sleeping peacefully on a rocky beach while other sea lions lounge in the background near the water". Why? Because the author thought it would be nice to put there, that's why! No deeper meaning, unless you want to do psychoanalysis over the Internet.
[0] https://xeiaso.net/blog/2026/dancing-mad-sandboxing/
Some blogs end up having interesting (not the right word, but I can't think of a proper one) sequences of leading pictures for their series of related posts, so that's an additional bonus for a reader, as a kind of second narrative/story, perhaps completely unrelated to the first one.
So with some header image, reader might be able to recall "it's that Clice post with Yami on top" or "it's that other Clice post with Kessoku Band".
What, you couldn't imagine that the author is a Japanese female?
P.S. I mute hyperbolic trolls.
From your profile description and that other comment, I would have assumed you were an ally. If so, I wouldn't have expected quite as much morality policing / thought crime tone. My perspective is that it's a little odd, but as long as they aren't hurting someone I really don't care what sparks joy in their lives. Life is hard enough.
And if they are hurting someone, that's what the law is for.
[0]: Their PFP comes from a manga / show that's sold over 10 million copies, apparently.
Is this not you implying the author of this article is a potential sexual predator?
Nah, they start all their articles with a shot from a random anime. The last two have been this show, but going back they have Boki, Konosuba, Ms. Kobayashi's dragon maid, etc.
But still, who cares?
Who cares? Some sort of chauvinist, apparently.
Can you explain this? Is "degen" being used here in the sense of being so avid about C++ that it borders on degeneracy?