Search found 180 matches

by cyboryxmen
December 1st, 2019, 7:16 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?

Additionally, you can do

Code: Select all

constexpr auto Crapdaptor = [](auto&& function)
{
	return [function](auto&& left_ptr, auto&& right_ptr)
	{
		return function(*left_ptr, *right_ptr);
	};
};

Code: Select all

std::sort(v.begin(),v.end(),Crapdaptor(std::mem_fn(&Foo::operator>)));
by cyboryxmen
December 1st, 2019, 1:20 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?

For a moment there, I thought you were actually going to give me a challenge.

Code: Select all

template<typename Function>
constexpr auto Crapdaptor = [](auto&& pl, auto&& pr)
{
	return Function{}(*pl,*pr);
};

Code: Select all

std::sort(v.begin(),v.end(),Crapdaptor<std::greater<Foo>>);
by cyboryxmen
November 21st, 2019, 7:50 am
Forum: Everything
Topic: balenciaga sneakers women
Replies: 1
Views: 56

Re: balenciaga sneakers women

Ok boomer
by cyboryxmen
November 14th, 2019, 7:03 am
Forum: Everything
Topic: Projection matrix and NDC
Replies: 4
Views: 78

Re: Projection matrix and NDC

The perspective projection matrix is more complicated than that. It shrinks and warps objects based on the angle you're looking at them and how far away they are from you. Resizing your world according to Normalised Device Coordinates isn't enough to avoid doing perspective computation.
by cyboryxmen
November 14th, 2019, 1:36 am
Forum: Everything
Topic: Raytracing
Replies: 25
Views: 305

Re: Raytracing

CUDA + Chili Framework are the only things you need for Raytracing. If you want, you can also try Vulkan and use Nvidia's raytracing extensions but that limits your software to Nvidia's raytracing cards.
by cyboryxmen
November 9th, 2019, 3:29 am
Forum: Everything
Topic: C++ Exceptions
Replies: 5
Views: 101

Re: C++ Exceptions

You only need a counter if it's a shared resource. If the ownership is exclusive like for std::unique_ptr, you just set a flag to mark it for deletion.
by cyboryxmen
November 9th, 2019, 1:54 am
Forum: Everything
Topic: C++ Exceptions
Replies: 5
Views: 101

Re: C++ Exceptions

Having resources leak in constructors because destructors don't run on a failed construction is a common issue that's brought up but it can easily be fixed. You just have to wrap every individual resource in its own ownership object. So instead of class X { X() { arr1 = new int[1000]; arr2 = new int...
by cyboryxmen
November 1st, 2019, 3:11 am
Forum: Everything
Topic: Excited to start the series, best learning practices?
Replies: 4
Views: 108

Re: Excited to start the series, best learning practices?

You don't have to take notes. Just be sure to program along instead of just watching
by cyboryxmen
October 31st, 2019, 6:03 pm
Forum: Everything
Topic: Functional Programming
Replies: 5
Views: 147

Re: Functional Programming

Don't listen to the haters. Functional Programming is the absolute perfect paradigm for high performance asynchronous programming. In a world where a $400 computer will have at least 4 cores, you're a fool if you're not programming asynchronously. I can explain better once I'm done with my async lib...
by cyboryxmen
September 22nd, 2019, 12:14 pm
Forum: Everything
Topic: Best way to write pixels with software renderer
Replies: 2
Views: 163

Re: Best way to write pixels with software renderer

Computers nowadays are built such that the display is attached directly to the GPU. This means that if you want anything displayed, you will need to go through the GPU. Even GDI is merely an abstraction that hides all the GPU management code from you. If you want reasonable performance for your soft...