« first day (2349 days earlier)      last day (1044 days later) » 

3:01 AM
6
Q: Argument-dependent lookup for templates in C++20

FedorThe program as follows compiles fine in C++20: #include <memory> struct A{ virtual ~A() = default; }; struct B: A {}; int main() { std::shared_ptr<A> p = std::make_shared<B>(); auto x = dynamic_pointer_cast<A>(p); } But in C++17 it produces an error: <source>: In function 'int main()': <

 
 
1 hour later…
4:31 AM
11
Q: Available frameworks for homotopy type theory

Neil StricklandI am thinking about trying to formalise some parts of classical unstable homotopy theory in homotopy type theory, especially the EHP and Toda fibrations, and some related work of Gray, Anick and Cohen-Moore-Neisendorfer. I am encouraged by the successful formalisation of the Blakers-Massey and F...

 
 
3 hours later…
7:01 AM
6
Q: Maximum number of threads with async-await task groups

RobMy intent is to understand the “cooperative thread pool” used by Swift 5.5’s async-await, and how task groups automatically constrain the degree of concurrency: Consider the following task group code, doing 32 calculations in parallel: func launchTasks() async { await withTaskGroup(of: Void.s...

 
 
2 hours later…
8:58 AM
16
Q: Mr. Binary Counterman

AviFSMr. Binary Counterman Mr. Binary Counterman, son of Mr. Boolean Masker & Mrs. Even Oddify, follows in his parents’ footsteps and has a peculiar way of keeping track of the digits. When given a list of booleans, he counts the 1s and 0s separately, numbering the 1s with the odds & the 0s with the e...

 
9:13 AM
3
Q: Gaussian Integer a+2bi as sum of 3 squares

rafael duarteLet $a, b \in \mathbb{Z}$. Then is it true that the Gaussian integer $a+2bi$ can be expressed as a sum of three squares?

 
 
1 hour later…
10:31 AM
7
Q: In C++, does Initializing a global variable with itself have UB?

Danint i = i; int main() { int a = a; return 0; } int a = a surely has undefined behaviour, more details on it here: Is reading an uninitialized value always an undefined behaviour? or are there exceptions to it? But what about int i = i? in C++ we are allowed to assign non constant values to...

 
 
4 hours later…
2:13 PM
3
Q: In a category with a projective generator, do morphisms from the generator determine the object?

FlusteredI have a cocomplete abelian category $\mathcal C$ and two objects $X$, $Y$ in $\mathcal C$. Further, $\mathcal C$ has a projective generator $P$. I have an isomorphism $$ \mathcal C(P,X) \cong \mathcal C(P,Y)$$ It feels like this should be enough to show that $X\cong Y$ in $\mathcal C$. Because a...

 
 
3 hours later…
4:49 PM
2
Q: Matrix-valued ordinary differential equation with symmetry

Kung YaoI am considering the following equation $$\begin{pmatrix} -\frac{d}{dx} + \lambda \sin(2\pi x) & \lambda - \lambda \cos(2\pi x) \\ -\lambda-\lambda \cos(2\pi x) & -\frac{d}{dx} - \lambda \sin(2\pi x) \end{pmatrix}\varphi(x)=0$$ and I am wondering if there is an explicit characterization of $\lam...

 
 
4 hours later…
9:04 PM
4
Q: Largest number with no repeating digit pairs

Dmitry KamenetskyWhat is the largest whole number that you can form, such that no pair of consecutive digits occurs more than once? For example you can have 34543, but you cannot have 34534 as the pair "34" occurs twice.

 
 
2 hours later…
11:19 PM
9
Q: Why is Python recursion so expensive and what can we do about it?

jtallkSuppose we want to compute some Fibonacci numbers. For n=500 in C++ we can run #include <iostream> using namespace std; pair<int, int> fib(int n){ if(n==1) return pair<int, int>(1, 2); pair<int, int> x=fib(n-1); return pair<int, int>((x.first+x.second) % 997, (x.first+2*x.second) % 9...

 

« first day (2349 days earlier)      last day (1044 days later) »