Given a random number generator that generates points uniformly in the unit interval [0,1] can you generate uniformly distributed points in the unit circle using only algebraic functions? In a finite number of steps - so no rejection sampling, loops, recursion. No "almost always" finite either.
Just wondering about sitiations where it seems you can't avoid trig functions.
@dpiponihttps://stats.stackexchange.com/a/406914 is old enough that it's probably not cursed by generative "AI". I think it gives a solution "just" using squares, roots, and arithmetic. But, I don't really understand it -- I've forgotten too much maths, if I ever understood uniform sampling -- so it might be sneaking in something non-algebraic.
@Mrfunkedude@_ I don't believe the toots/replies were directed at me, but they certainly discouraged telling people to use free software in general and Linux in particular.
Don't recommend Linux when people are complaining about MS Recall. Don't talk about Krita when people bemoan the cost of Adobe software. Etc.
I'm honestly never sure when people want a reply at all. I've certainly been accused of being a "reply guy" and I don't want to upset people with that behavior.
@hungryjoe I think there's value in separate steps for several reasons. The primary one being semantic difference: unit testing checks semantics of the compiler output, format checking addresses the syntax of the compiler input.
The secondary is related: I want to be able to format check code that doesn't currently compile.
As a practical matter, IME format checking is faster than unit testing, so I do the former much more often. Unit testing is rarely triggered by an editor save (IME) e.g.
@hungryjoe I think you need to be careful with that because of the LACK of semantic distance. Ideally, there would never be any diagnostic emitted by the local format check that wasn't emitted by the CI format check and vice-versa. Using the unit test framework for one and not for the other just makes it more likely that the processes diverge.
Best tip I have is to pay more attention to the 'forall's. Compose / . / <<< "fixes" the 'forall', which can cause type checking to fail elsewhere or, if "a" is higher-rank, there (it forces "b" to be monomorphic; higher-rank "a" might require a polymorphic "b'). Application / '$' (in GHC) doesn't "fix" the forall.
I think the difference might be "deeper", but for me it's able where the "choice" for the forall is made.
@typeswitch Reject the type usage binary! As a proud user and implementor of bidirectional typing, I embrace both your descriptions; my pronouns are check/infer.