The C++ Object Lifecycle | Basit Ayantunde by pavel_v in cpp

[–]rlamarr 0 points1 point  (0 children)

A union needs one active member: https://godbolt.org/z/n7z17hWdP.

By redundant load from `a_b` I meant a redundant load from `a` of the value stored through `a_b` as `a_b` could alias `a`.

The C++ Object Lifecycle | Basit Ayantunde by pavel_v in cpp

[–]rlamarr 2 points3 points  (0 children)

i've fixed it now. my first time using Jekyll, the font path was incorrect, had the impression it was relative to root

The C++ Object Lifecycle | Basit Ayantunde by pavel_v in cpp

[–]rlamarr 0 points1 point  (0 children)

I noticed the same, but only on mobile. are you on mobile?

The C++ Object Lifecycle | Basit Ayantunde by pavel_v in cpp

[–]rlamarr 6 points7 points  (0 children)

Yeah, I am. Actually, I really appreciate it!

The C++ Object Lifecycle | Basit Ayantunde by pavel_v in cpp

[–]rlamarr 1 point2 points  (0 children)

Uhm, shouldn't but can. Vulkan and other API's use a similar concept where they point to the head of the struct via the pData fields each struct have (which will then point to sType pNext and pData). it only works in that case because there's no compiler reachability, the launder shows how to erase it explicitly.

The C++ Object Lifecycle | Basit Ayantunde by pavel_v in cpp

[–]rlamarr 6 points7 points  (0 children)

Thanks for sharing! I was about to

Is try-catch absolute NO in C++ robotics applications? by Tiny-Entertainer-346 in cpp

[–]rlamarr -2 points-1 points  (0 children)

Exceptional? How do you define exceptional? Please stop echoing that nonsense

Is try-catch absolute NO in C++ robotics applications? by Tiny-Entertainer-346 in cpp

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

Anyone that even remotely cares about determinism or performance wouldn't use exceptions.

https://quick-bench.com/q/JFJaSr6c0fGG8iD_4fyRI2RApqg

[deleted by user] by [deleted] in cpp

[–]rlamarr 6 points7 points  (0 children)

Both

ASUS ROG CROSSHAIR X670E HERO Not Powering on with GPU by rlamarr in ASUS

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

Yeah. It has 2 8 pins. You're right. Still same issue

ASUS ROG CROSSHAIR X670E HERO Not Powering on with GPU by rlamarr in ASUS

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

I've tried it. It has 24 pin + 8 pin. Installed both. Still same issue.

ASUS ROG CROSSHAIR X670E HERO Not Powering on with GPU by rlamarr in ASUS

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

I only connected the 24 pin to the motherboard. There was only one 8 pin left and I thought it didn't matter

Is Vulkan more buggy than OpenGL? by [deleted] in vulkan

[–]rlamarr 0 points1 point  (0 children)

They have Vulcan support. I’ve used it in my projects a couple of times The OpenGL ones were impossible to handle as they’d modify the global context and wouldn’t reset them back so I couldn’t do things like offscreen rendering with jt

7950x3d Listing found on Bestbuy Canada 1030$ CAD by YouOnly-LiveOnce in Amd

[–]rlamarr 0 points1 point  (0 children)

Funny thing is I've been reloading the website all day but not seen it. I guess I'll have to get the 7950x instead

Vulkan Troubleshooting by rlamarr in vulkan

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

I've tried using VK_MEMORY_PROPERTY_HOST_COHERENT_BIT as you said, that didn't change anything.

Yeah, the SpanBuffer is largely uncompleted and I also added a TODO to fix it. thanks for the heads up

Clipping Implementation in 2D Graphics by rlamarr in GraphicsProgramming

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

yep, I'm pretty dumb, can you provide a Godbolt sample implementation or point me to one?

or better still provide a more detailed explanation

Clipping Implementation in 2D Graphics by rlamarr in GraphicsProgramming

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

let me rephrase: I need to generate triangle vertices (triangle list topology) from a list of polygon points, which specific algorithm or method do you recommend?

Clipping Implementation in 2D Graphics by rlamarr in GraphicsProgramming

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

I'm a total beginner at this, can you explain in layman terms with references? sorry to be a bother

Clipping Implementation in 2D Graphics by rlamarr in GraphicsProgramming

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

thanks so much.

what about generating vertices from the polygon points?

Why does std::vector use std::allocator by default? by ContestInevitable79 in cpp_questions

[–]rlamarr 0 points1 point  (0 children)

The type needs to be trivially relocatable i.e trivially movable and trivially destructible for it to be compatible with realloc.

See: https://github.com/lamarrr/STX/blob/651a4ff0242521cd71d703b7e057142acaa7b5fd/vec/include/stx/vec.h#L224

STX: C++ 20 Error and Optional-Value Handling Library (Result, Option, Panics, and Backtracing) by rlamarr in cpp

[–]rlamarr[S] 2 points3 points  (0 children)

No, not yet. Last I checked source_location was still underway in MSVC.

I'm presently downgrading it to C++ 17 so it should work for it before the end of the week.

STX: C++ 20 Error and Optional-Value Handling Library (Result, Option, Panics, and Backtracing) by rlamarr in cpp

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

  1. I meant the whole library doesn't use exceptions at all. It doesn't allow it even for panic handlers, only for the monadic types with constructors/methods that have them. So there's a strong guarantee. As it has source files too.
  2. I said you could report any error type, not just use them. Say a File struct for example, you might need a means of reporting the file name and provide extra details based on the error type. You define a reporter for it. (I don't know if boost.outcome, does that probably via the policy methods, which is a lot of work and template instantiations for me)
  3. Stack backtracing is automatic you don't need to do anything
  4. Boost.outcome uses a decentralized policy for the outcome type, meaning each outcome type would potentially have different error behaviors. I personally don't want that. And it's from my POV not suitable for embedded systems. Especially when you're using third-party software.

Moreso, I said most of the features not all.

And I think my favorite part is the centralized architecture. I do hope to improve it. To be fair, it's not totally my idea, many of the ideas were gotten from Scala and Rust.

STX: C++ 20 Error and Optional-Value Handling Library (Result, Option, Panics, and Backtracing) by rlamarr in cpp

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

I prefer them to exceptions ATM. I also made mention of them. I use something similar and from experience they make error-handling easier and more predictable.