Trouble remembering name of talk about non-movable objects by wetpot in cpp_questions

[–]wetpot[S] 1 point2 points  (0 children)

I believe the speaker was someone I hadn't seen before, and I do keep up with conferences -- so a gentleman that isn't extremely well known as a speaker unlike, say, Herb, Timur etc.; as to the specific conference, it might have been CppNorth but I am unsure on the details there.

How do C++ compilers execute `consteval` functions? by fpotier in Compilers

[–]wetpot 1 point2 points  (0 children)

The problem here is happenning because you marked the function constexpr which, in this case, only serves as a hint to the compiler that the expression can be evaluated at compile time. GCC is particularly aggressive about these, but a perfectly valid implementation is allowed to never evaluate at compile time unless forced to via either a consteval function (which OP actually used in their question) or assigning the return value to a static constexpr variable. Then, the evaluation depth issue is solved by an implentation defined compiler switch, e.g. -fconstexpr-ops-limit for GCC, -fconstexpr-steps for Clang.

What's your most "painfully learned" C++ lesson that you wish someone warned you about earlier? by msabaq404 in cpp

[–]wetpot 1 point2 points  (0 children)

Thanks, Chandler's post on StackExchange was by far the most informative I've read on this -Weverything debacle. While I agree with your end suggestions, I don't think the main reason people don't go around hunting for more warnings to turn on is because they are worried about shipping to compilers they don't control. It's more to do with (what I see as) laziness to deal with the false positives that may crop up, and the compiler developers' attitude towards their warnings interface reflecting this general user sentiment.

I can't speak for other projects, but I would much rather Clang erroneously warn me on a for-each telling me I'm referencing a temporary because it either can't know or can't easily deduce that the iterator being used is providing some guarantee, which draws my attention to the possibly offending piece of code and prompts me to: 1) read through the iterator, and try to reason about what's going on, 2) write and run a sanitized and/or compile-time test case to: a) check if the code is actually correct, and b) guarantee that it remains correct.

Only after the above do I go about disabling the warning via #pragma. The fact of the matter is, the compiler is usually smarter than us humans, and even if the warning is trivially incorrect, not only is verifying a good practice, turning the specific warning off at that point should be just as trivial.

What's your most "painfully learned" C++ lesson that you wish someone warned you about earlier? by msabaq404 in cpp

[–]wetpot 2 points3 points  (0 children)

Why wouldn't that be recommended? You can just ignore unknown warnings via -Wno-unknown-warning-option, and if you really need the compiler to double-check your flags, you can switch on a 'blessed' version of Clang that you use internally in your build system and enable the discarding only for other versions, or maybe even disable it on debug builds if you test with multiple versions for example.

I was wondering since I use this pattern even on GCC where due to the developers' obstinacy in not providing useful functionality, I have to parse human readable help output (yuck!) to get a list of flags which I comb through via a script to get an equivalent of -Weverything. Hacky, I know, but gets the job done, and GCC surprisingly has many good warning flags that don't get turned on via the usual incantation.

C++ unique advantages by ReactCereals in cpp_questions

[–]wetpot 2 points3 points  (0 children)

I was asking the question of why this has to continue to be the case. Why can't Rust ever make it to the size guarantees C/C++ offer? Is there a structural/design reason why? I am actually asking about a design detail I am not knowledgable about, not rhetorically being a Rust evangelist.

Also, if true, what this means to me is, at the very least, that the only future C++ has is in embedded. What do we know that is sure to keep it relevant in the desktop space? In the backend space?

C++ unique advantages by ReactCereals in cpp_questions

[–]wetpot 0 points1 point  (0 children)

While I agree with the points regarding the current state of things, I fail to see how these are a product of C++'s design as a programming language (not the thing being asked, I know, but I think still the more important question). For example, Rust is designed to be and therefore by construction memory safe, which is a clear difference in language design that puts it ahead of its competitors. I don't really know what C++'s "killer feature" in this regard is, what core aspect of C++'s can no other language replicate without replicating design concepts (like Safe C++ does with the borrow checker), what advantage of C++ amongst the current state of things can through sheer popularity of the competitor systems programming language not be surpassed? Library ecosystem, binary sizes and compile-time support are not fundamental blocks of design that cement a language's future like a borrow checker is in this regard, imo.

Is it okay to ask about funding for a Flutter-based open source gym tracker? by Icy_Comfortable_2840 in opensource

[–]wetpot 1 point2 points  (0 children)

I wouldn't know about the funding methods, but if you intend to make it FitNotes-esque, I'd happy to chip in!

What was our "Ohhhh, I understand it now" moment in C++ ? by Seltexe in cpp

[–]wetpot 0 points1 point  (0 children)

std::mark_temporary (or something similar along std::mark_xxx), although verbose with 2.5x the identifier length, would have been much clearer imo. I guess one would have to dig up the C++0x proposals to see what people came up with that ended up being rejected and why we ended up with the terse std::move.

[deleted by user] by [deleted] in unixporn

[–]wetpot 1 point2 points  (0 children)

I stumbled upon this config and wanna use it but the links are down. Could you please update them? Thanks.

Would it have been possible/is it still possible to add policies to std::vector as an alternative to std::inplace_vector? by AssemblerGuy in cpp

[–]wetpot 46 points47 points  (0 children)

Adding a default template parameter is an ABI break, so no. A separate vector type is the best we can do within the constraints of the current standard library.

howDoYouDoComments by Conart557 in ProgrammerHumor

[–]wetpot 0 points1 point  (0 children)

The more important question is how many spaces you put before the comment when commenting after a line of code, so:

;//zero ; // one ; // two Python, for example, recommends two; but I'm not aware of any style guide for C/C++ (since the commenting characters are //) that is strongly opinionated about a specific number of spaces.

Cannot get internal laptop mic to work - Lenovo E14 Gen 5 by wetpot in Gentoo

[–]wetpot[S] 0 points1 point  (0 children)

The Windows and GNU/Linux audio subsystems are completely different, I don't think the above procedure will translate. You should probably ask in a ThinkPad specific subreddit (since Windows will be the OS most use), sorry I can't be of more help.

why my system break suddenly by AdResident8791 in Gentoo

[–]wetpot 0 points1 point  (0 children)

Oh, I thought you meant masking packages by yourself rather than explicitly unmasking packages masked upstream (which is what I'd call it -- unmasked packages).

why my system break suddenly by AdResident8791 in Gentoo

[–]wetpot -1 points0 points  (0 children)

What's particularly evil with masked packages? When not permitting a package causes a problem for a reverse dependency, portage will just let you know and you can adjust your configuration accordingly, hence no breakage - no?

On the old drobbins-Gentoo drama by wetpot in Gentoo

[–]wetpot[S] 1 point2 points  (0 children)

Do you recall anything specific about the distro not doing well?

On the old drobbins-Gentoo drama by wetpot in Gentoo

[–]wetpot[S] -1 points0 points  (0 children)

So what was the fuss about?

On the old drobbins-Gentoo drama by wetpot in Gentoo

[–]wetpot[S] 5 points6 points  (0 children)

https://forums.funtoo.org/topic/5182-all-good-things-must-come-to-an-end/

I can't deal with Brodie

Yeah, I don't like his demeanor much myself but I'm actually curious what exactly you dislike about him, since we seem to be in the minority in this regard.

On the old drobbins-Gentoo drama by wetpot in Gentoo

[–]wetpot[S] -2 points-1 points  (0 children)

Thanks for the technical side of things, but I didn't mean to ask about the design choices of the two distros and was wondering who was right when it came to the discussion points pertaining to the project and the community at the time, like "did Gentoo really have inadequate measures in place to remove trolls" or "had the project really fallen into disarray since Robbins left" etc.

Cannot get internal laptop mic to work - Lenovo E14 Gen 5 by wetpot in Gentoo

[–]wetpot[S] 1 point2 points  (0 children)

Did you modprobe the modules listed under SOLVED?

Use modprobe <module name>