Search found 3877 matches

by chili
December 7th, 2019, 11:17 am
Forum: Everything
Topic: Coding Challenge 5 - Meme Graveyard Keeper
Replies: 26
Views: 2661

Re: Coding Challenge 5 - Meme Graveyard Keeper

You should try std::partial_sum for the 1st xform there.
by chili
December 1st, 2019, 2:47 pm
Forum: Everything
Topic: Who Wants to Take a Crack at Some Metaprogramming Bullshit?
Replies: 8
Views: 94

Re: Who Wants to Take a Crack at Some Metaprogramming Bullshit?

Additionally, you can do constexpr auto Crapdaptor = [](auto&& function) { return [function](auto&& left_ptr, auto&& right_ptr) { return function(*left_ptr, *right_ptr); }; }; std::sort(v.begin(),v.end(),Crapdaptor(std::mem_fn(&Foo::operator>))); Pls don't :peppers: I think he's trying to avoid dec...
by chili
November 30th, 2019, 3:51 am
Forum: Everything
Topic: Who Wants to Take a Crack at Some Metaprogramming Bullshit?
Replies: 8
Views: 94

Re: Who Wants to Take a Crack at Some Metaprogramming Bullshit?

Yeah, that is the idea. Although I suppose you could use SFINAE to make the adaptor support both binary and unary. You can just do normal overloading to support operator() for shared_ptr, unique_ptr, T*. If the second template param is a data member ptr, forward reference to that member of the objec...
by chili
November 25th, 2019, 12:24 am
Forum: Everything
Topic: Who Wants to Take a Crack at Some Metaprogramming Bullshit?
Replies: 8
Views: 94

Who Wants to Take a Crack at Some Metaprogramming Bullshit?

So I've been tinkering with a simple idea of a metafunction that can take a normal binary function like std::less that works with references, and adapt it to work with pointers. A simple implementation here that works for std::unique_ptr (the most common use case for me personally), but the return v...
by chili
November 21st, 2019, 10:14 am
Forum: Everything
Topic: Early out if statements
Replies: 3
Views: 75

Re: Early out if statements

yeah early out is going to be good if collisions are rare, the branch predictor will ensure that pipe flushes are rare as well
by chili
November 21st, 2019, 10:10 am
Forum: Everything
Topic: balenciaga sneakers women
Replies: 1
Views: 56

Re: balenciaga sneakers women

Yo, where were you when I needed you for some template metaprogramming bullshit :[
by chili
November 16th, 2019, 2:07 pm
Forum: Everything
Topic: Raytracing
Replies: 25
Views: 305

Re: Raytracing

You have to supply the impl code to actually render the imgui commands. I just used the reference impl provided for D3D11 and invoked it from somewhere in my code, but it is still defs using D3D11 calls. I don't see how it would be hard to get it working with CUDA shits, they would be mostly orthogo...
by chili
November 16th, 2019, 2:03 pm
Forum: Everything
Topic: allocate_shared homework
Replies: 4
Views: 72

Re: allocate_shared homework

This is very fancy :D I never looked much into the use cases/motivations for the pmr stuff. What's it good for?
by chili
November 16th, 2019, 1:56 pm
Forum: Everything
Topic: Single Responsibility Principle
Replies: 2
Views: 59

Re: Single Responsibility Principle

Yo, this is actually similar to something that I emphasize two videos from the current point in HW3D. You ever read Clean Code by Uncle Bob?
by chili
November 11th, 2019, 12:28 pm
Forum: Everything
Topic: coordinates
Replies: 4
Views: 91

Re: coordinates

albinopapa wrote:
November 11th, 2019, 12:46 am
You'll see/hear chili get confused throughout the tutorials so no one is immune.
Slander.