[-] MinekPo1@lemmy.ml 4 points 4 months ago

not exactly a DAW/VST but VCV Rack is a open source (though with a pro version , the pro version can work as a VST though I never used it in that way) eurorack modular synthesizer symulator if you want to experiment a bit

[-] MinekPo1@lemmy.ml 1 points 4 months ago

not entirely sure but this doesn't feel like something the fsf would like . most definetly it violates freedoms 0. because it discriminates against companies with over 5 M$ in income and against people living in Japan (see 2.14 , though I'm not sure its enough to qualify) , and possibly by restricting what you can do with the software , though I'm not sure on that one . it also violates freedoms 2. and 3. by requiring publicly releasing your changes (fsf requires that free software licenses allow for private modifications) and possibly by requiring contacting the licensor or the post-open administration though I'm unsure of if it does (entering into a post-open source zero-cost / paid contract seems to me to imply contacting either the licensor or the post-open administration) .

further reading :

[-] MinekPo1@lemmy.ml 5 points 4 months ago

to my knowledge disabled apps do not run so you must have misunderstood something

[-] MinekPo1@lemmy.ml 1 points 4 months ago

if I understand correctly the rethink app does also work as a firewall , so no . I've also found netguard to be less intuitive and to have a less readable UI .

if you are just using rethink as a DNS provider however then netguard (or the rethink app) can allow you to have more granular control over specific apps .

[-] MinekPo1@lemmy.ml 2 points 4 months ago

just gonna say , rethink combines both a firewall and a DNS blocker .

[-] MinekPo1@lemmy.ml 2 points 5 months ago
[-] MinekPo1@lemmy.ml 2 points 5 months ago

my mistake was using the sum of angles in a triangle which was kinda dum but whatever . I also tried calculating via the circumstance of a circle placed at a pole where π was 20x smaller for the case I was using but its not linear so I looked deeper which was a big mistake .

BTW the ratio of circumstance to radius for a circle which is also an equator of the space is ¼ not 1 (r=½π₀ , C=2π₀) .

[-] MinekPo1@lemmy.ml 2 points 5 months ago* (last edited 5 months ago)

Better question: What curvature of space is necessary for the apparent value of π to be 5?

~~honestly I don't know if there is any way to measure curvature of space , but its slightly more curved than the surface of a ball (where π=~4.712)~~

edit : its more complex than that and topology of non euclidean spaces hurts

[-] MinekPo1@lemmy.ml 9 points 5 months ago* (last edited 5 months ago)

minor nitpick but the value of π is technically a parameter of the space you are operating in . which means it can have any arbitrary value as long as you are willing to operate in non euclidean spaces (and the space we live in is not euclidean though not to a measurable extent unless you are near a black hole)

but yeah in this context saying π is a constant is as correct as saying you cant take a square root out of a negative number .

edit : possibly better example is that a triangle's angles sum to 180°

[-] MinekPo1@lemmy.ml 2 points 5 months ago

And give “the verge” some ad revenue?

Wait you don't have an ad blocker ? (to be fair I use an adblocker which does pretend to watch and click ads thus giving the verge ad revenue)

[-] MinekPo1@lemmy.ml 6 points 5 months ago

I doubt it would affect Newpipe either honesty

106
submitted 7 months ago by MinekPo1@lemmy.ml to c/programmerhumor@lemmy.ml

alt

#include <type_traits>

// from https://stackoverflow.com/a/8625010/12469275
// cmath's sqrt is constexpr from c++26
constexpr std::size_t isqrt_impl
	(std::size_t sq, std::size_t dlt, std::size_t value){
	return sq <= value ?
		isqrt_impl(sq+dlt, dlt+2, value) : (dlt >> 1) - 1;
}

constexpr std::size_t isqrt(std::size_t value){
	return isqrt_impl(1, 3, value);
}

// because pack indexing is only in c++26
template <std::size_t I, typename T = void, std::size_t... V>
struct At;

template <std::size_t I>
struct At<I, void> {};

template <std::size_t V0, std::size_t... V>
struct At<0, void, V0, V...> {
	static const std::size_t value = V0;
};

template <std::size_t I, std::size_t V0, std::size_t... V>
struct At<I, std::enable_if_t<I != 0 && I <= sizeof...(V),void>, V0, V...> {
	static const std::size_t value = At<I-1, void, V...>::value;
};

template <std::size_t A, std::size_t B>
struct Add {
	static const std::size_t value = A + B;
};

template <std::size_t begin, std::size_t end, std::size_t step, template<std::size_t A, std::size_t B> typename R, std::size_t I, typename _, std::size_t... V>
struct _ReduceFor;

template <std::size_t begin, std::size_t end, std::size_t step, template<std::size_t A, std::size_t B> typename R, std::size_t I, std::size_t... V>
struct _ReduceFor<begin, end, step, R, I, std::enable_if_t<(begin < end),void>, V...> {
	typedef R<At<begin,void, V...>::value,_ReduceFor<begin+step, end, step, R, I, void, V...>::type::value> type;
};

template <std::size_t begin, std::size_t end, std::size_t step, template<std::size_t A, std::size_t B> typename R, std::size_t I, std::size_t... V>
struct _ReduceFor<begin, end, step, R, I, std::enable_if_t<(begin >= end), void>, V...> {
	typedef std::integral_constant<std::size_t,I> type;
};

template <std::size_t begin, std::size_t end, std::size_t step, template<std::size_t A, std::size_t B> typename R, std::size_t I, std::size_t... V>
using ReduceFor = _ReduceFor<begin,end,step,R,I,void,V...>;

template <std::size_t begin, std::size_t end, std::size_t step, template<std::size_t I, typename T> typename V, typename T, typename _>
struct AllFor;

template <std::size_t begin, std::size_t end, std::size_t step, template<std::size_t I, typename T> typename V, typename T>
struct AllFor<begin, end, step, V, T, std::enable_if_t<(begin < end), void>> {
	typedef std::enable_if_t<std::is_same<typename V<begin, bool>::type, bool>::value, typename AllFor<begin+step, end, step, V, T, void>::type> type;
};
template <std::size_t begin, std::size_t end, std::size_t step, template<std::size_t I, typename T> typename V, typename T>
struct AllFor<begin, end, step, V, T, std::enable_if_t<(begin >= end), void>> {
	typedef T type;
};

template <std::size_t begin, std::size_t end, std::size_t step, template<std::size_t I, typename T> typename V, typename T>
using AllFor_t = typename AllFor<begin, end, step, V, T, void>::type;

template <std::size_t S, typename T, std::size_t... V>
struct ValidRows {
	template <std::size_t I, typename T2>
	struct Inner {
		typedef std::enable_if_t<ReduceFor<I, I+S, 1, Add, 0, V...>::type::value == S * (S*S + 1)/2, T2> type;
	};
	typedef AllFor_t<0, S*S, S, Inner, T> type;
};
template <std::size_t S, typename T, std::size_t... V>
struct ValidColumns {
	template <std::size_t I, typename T2>
	struct Inner {
		typedef std::enable_if_t<ReduceFor<I, I+S*S, S, Add, 0, V...>::type::value == S * (S*S + 1)/2, T2> type;
	};
	typedef AllFor_t<0, S, 1, Inner, T> type;
};
template <std::size_t S, typename T, std::size_t... V>
struct ValidDiags {
	typedef std::enable_if_t<ReduceFor<0,S*S,S+1,Add, 0, V...>::type::value == S * (S*S + 1)/2 && ReduceFor<S-1,S*S-1,S-1,Add, 0, V...>::type::value == S * (S*S + 1)/2, T> type;
};

template <typename T, std::size_t... V>
struct Unique;

template <typename T, std::size_t N, std::size_t... V>
struct Unique<T,N,V...> {
	template <std::size_t I, typename T2>
	struct Inner {
		typedef std::enable_if_t<N != At<I,void,V...>::value,T2> type;
	};
	typedef AllFor_t<0,sizeof...(V),1,Inner,T> type;
};

template <typename T, std::size_t V>
struct Unique<T, V> {
	typedef T type;
};

template <typename T, std::size_t... V>
struct InRange {
	template <std::size_t I, typename T2>
	struct Inner {
		typedef typename std::enable_if<1 <= At<I,void, V...>::value && At<I,void,V...>::value <= sizeof...(V), T2>::type type;
	};
	typedef AllFor_t<0,sizeof...(V),1,Inner,T> type;
};

template <typename T, std::size_t... V>
struct Grid {
	static const std::size_t S = isqrt(sizeof...(V));
	typedef std::enable_if_t<S*S == sizeof...(V), typename ValidRows<S, typename ValidColumns<S, typename ValidDiags<S, typename Unique<typename InRange<T,V...>::type, V...>::type, V...>::type, V...>::type, V...>::type> type;
};

using ok = Grid<void,
	2, 7, 6,
	9, 5, 1,
	4, 3, 8>::type;

int main() {}

1
test post (lemmy.ml)
submitted 1 year ago by MinekPo1@lemmy.ml to c/test@lemmy.ml
3
submitted 1 year ago by MinekPo1@lemmy.ml to c/memes@lemmy.ml

I mean I know its likely gonna change once the big waves wash over but still.

Alt: Drake meme template but with a anime girl. Top row with the girl gesturing approvingly says: if reddit is gonna kill 3rd party clients then I'm just gonna switch to Lemmy. Bottom row, with the girl showing distress, says: there arent as many funny trans people on Lemmy rn

view more: next ›

MinekPo1

joined 2 years ago