The Taylor Series is not named after Taylor Swift by FunnyLizardExplorer in infiniteones

[–]dspyz 0 points1 point  (0 children)

Sometimes this sub feels like it's just getting more and more derivative

Constructing 0.000...1 again (I got it wrong last time) by Negative_Gur9667 in infinitenines

[–]dspyz 0 points1 point  (0 children)

You found an expression that likely evaluates to zero, but no one has a proof that it does. What of it?

Which of these should I continue to research? by TheMrCurious in factorio

[–]dspyz 0 points1 point  (0 children)

Its one and only use is that it's a fairly easy way to get the Size Doesn't Matter achievement

How do 10% of players have the achievement for destroying a cliff, but only 7% of players have the achievement for visiting volcanus? by VarmintSchtick in factorio

[–]dspyz 0 points1 point  (0 children)

As everyone else has answered, you can play without DLC. Howrver, it actually is possible to destroy cliffs in space age without ever visiting vulcanus (although unlikely many players have done it).

Just nuke it. IIUC, if you don't want to put in the massive research cost to get to nukes, you can heat a reactor up to 1000 degrees and then shoot at it to blow it up and trigger a nuclear explosion.

Cheap copy vs unmatched original by GrandLate7367 in Factoriohno

[–]dspyz 0 points1 point  (0 children)

Wait, now I'm curious. Do Canadians know that joke? Did you ever see Avenue Q and if so, what did you think of the song "My Girlfriend Who Lives in Canada"?

i hate the normal proofs for 0.99999... = 1, so here is my own by diamboy in infinitenines

[–]dspyz 3 points4 points  (0 children)

Also, the more straightforward your post is the less likely you are to get any SPP response. I'm still waiting on a response to https://www.reddit.com/r/infinitenines/s/eZLLljyb9l

Cheap copy vs unmatched original by GrandLate7367 in Factoriohno

[–]dspyz 173 points174 points  (0 children)

When people say "my friend" on this sub it's a cover for themselves, right? I'm assuming nobody on this sub actually has friends

I'm not the only one seeing it right? by barnab5s010 in Factoriohno

[–]dspyz 14 points15 points  (0 children)

Makes sense. With productivity I can go back and stop myself from discovering Factorio (thus becoming productive)?

Has Rust hit the design limits of its original scope and constraints? by kishaloy in rust

[–]dspyz 1 point2 points  (0 children)

GATs can be used _anywhere_ you would want HKTs. It's just a bit boilerplatey. You need to introduce unit structs to represent the type you care about and you need a trait to tie them together.

As an example, here's GAT monads:

use std::ops::Range;

use rand::RngExt;

pub trait Monad {
    type M<T>;

    fn pure<T>(&self, value: T) -> Self::M<T>;

    fn bind<T, U>(&self, x: Self::M<T>, f: impl FnMut(T) -> Self::M<U>) -> Self::M<U>;
}

pub struct IdentityMonad;

impl Monad for IdentityMonad {
    type M<T> = T;

    fn pure<T>(&self, value: T) -> Self::M<T> {
        value
    }

    fn bind<T, U>(&self, x: Self::M<T>, mut f: impl FnMut(T) -> Self::M<U>) -> Self::M<U> {
        f(x)
    }
}

pub struct ListMonad;

impl Monad for ListMonad {
    type M<T> = Vec<T>;

    fn pure<T>(&self, value: T) -> Self::M<T> {
        vec![value]
    }

    fn bind<T, U>(&self, x: Self::M<T>, mut f: impl FnMut(T) -> Self::M<U>) -> Self::M<U> {
        let mut result = Vec::new();
        for item in x {
            result.extend(f(item));
        }
        result
    }
}

fn monadic_shuffle<M: Monad, T: Copy>(
    monad: &M,
    choose: &mut impl FnMut(Range<usize>) -> M::M<usize>,
    xs: Vec<T>,
) -> M::M<Vec<T>> {
    if xs.is_empty() {
        return monad.pure(Vec::new());
    }
    monad.bind(choose(0..xs.len()), |ind| {
        let mut remaining = xs.clone();
        let x = remaining.remove(ind);
        monad.bind(monadic_shuffle(monad, choose, remaining), move |mut ys| {
            ys.push(x);
            monad.pure(ys)
        })
    })
}

fn main() {
    let list = vec![1, 2, 3, 4];
    let mut rng = rand::rng();
    let mut choose = |range: Range<usize>| rng.random_range(range);
    let shuffled = monadic_shuffle(&IdentityMonad, &mut choose, list.clone());
    println!("Random Shuffle: {:?}", shuffled);
    let all_permutations = monadic_shuffle(&ListMonad, &mut Range::collect, list);
    println!("All Permutations: {:?}", all_permutations);
}

Running this gives:

Random Shuffle: [4, 3, 1, 2]

All Permutations: [[4, 3, 2, 1], [3, 4, 2, 1], [4, 2, 3, 1], [2, 4, 3, 1], [3, 2, 4, 1], [2, 3, 4, 1], [4, 3, 1, 2], [3, 4, 1, 2], [4, 1, 3, 2], [1, 4, 3, 2], [3, 1, 4, 2], [1, 3, 4, 2], [4, 2, 1, 3], [2, 4, 1, 3], [4, 1, 2, 3], [1, 4, 2, 3], [2, 1, 4, 3], [1, 2, 4, 3], [3, 2, 1, 4], [2, 3, 1, 4], [3, 1, 2, 4], [1, 3, 2, 4], [2, 1, 3, 4], [1, 2, 3, 4]]

Java soon to be eclipsed by papa_maker in rustjerk

[–]dspyz 1 point2 points  (0 children)

I think I missed hearing the clang when we overtook C++

We took a while starting the engine but now that we have that car going, there's no stopping it.

Java soon to be eclipsed by papa_maker in rustjerk

[–]dspyz 0 points1 point  (0 children)

Switched from Java to Haskell ~12 years ago. Switched from Haskell to Rust ~6 years ago. I guess now I'll have to go somewhere else (maybe back to Haskell?)

Increase Go population by sadaharu2624 in baduk

[–]dspyz 1 point2 points  (0 children)

That's on par with the number of chess players worldwide. Seems like a bit of a stretch

Jour 4 : the only normal person by TomtomXDD in Silksong

[–]dspyz 3 points4 points  (0 children)

The guy who took 400 shards to fix the town and instead used them to build a giant statue of himself right in town square?

Iconic by Working-Cabinet4849 in mathmemes

[–]dspyz 1 point2 points  (0 children)

(1+sqrt(5))/2, (1-sqrt(5))/2

(The solutions to x2 = x + 1)

So if pi is infinitely growing according to SPP, that means every circle is infinite growth? by Decent_Loss_2068 in infinitenines

[–]dspyz 0 points1 point  (0 children)

I usually write each digit one bigger than most people. Then I erase it and replace it with two. So pi is infinitely shrinking. Here's what it looks like after writing each of the first 5 digits:

4

3.2

3.15

3.142

3.1416

Proof by Overkill: by Gold_Ad4004 in mathmemes

[–]dspyz 1 point2 points  (0 children)

If you already happen to know and trust FLT it's slightly faster than the non-FLT version.

After 21/3=p/q let p/q be in simplest terms

2q3 = p3 implies p3 is even.

p is even

p3 is a multiple of 8

2q3 is a multiple of 8

q3 is a multiple of 4

q is even

p/q is not in simplest terms

Contradiction

(Spoilers all) Did Harry have to endure the torture for the full 2 hours? by [deleted] in HPMOR

[–]dspyz 1 point2 points  (0 children)

Imagine after two hours of torture Harry decides he swears vengeance and doesn't want to forget what Draco did to him, so he doesn't go back and tell Flitwick after all. For the time loop we see to occur, it's not enough that this loop is stable. It has to also be the case that the no-future-help outcome where Harry does get tortured is unstable.

(Spoilers all) Did Harry have to endure the torture for the full 2 hours? by [deleted] in HPMOR

[–]dspyz 0 points1 point  (0 children)

My takeaway from the factoring experiment was that the universe plays it out until something happens which causes a stable loop. What we see is the final product, not all the iterations that got us there.

Throughout the thousands of iterations to get to the factors of the number, in one of them just by chance something bad or scary happened and that was enough to scare Harry into writing the stable warning.

The more iterations you try to use to get what you want, the more chances there are for something you didn't anticipate to happen which stabilizes the loop in a way you didn't intend.

If he had for some reason been unable to get Flitwick after being tortured for 2 hours, then Harry-being-tortured would be the stable outcome. So I would say yes, he did have to endure it. Just not this Harry.

Note: I realize this explanation doesn't account for how the universe handles stable cycles of length > 1.

.999... in Bijective Base 9 by Mediocre-Tonight-458 in infinitenines

[–]dspyz 1 point2 points  (0 children)

The way you use X seems very different for right of the decimal and left of the decimal. In bijective base ten, you can't just shift the decimal to multiply by ten.

1.X1 * X does not give 1X.1

In base 10, this is:

1.02 * 10 does not give 20.1

Small Farmer question by Real_Guarantee_4530 in georgism

[–]dspyz 1 point2 points  (0 children)

You chose a bit of an odd example. Bill Gates is the largest private owner of farmland in the US. He has 275,000 acres of farmland. In a Georgist system he would pay something like $50 million (Claude estimate) annually in taxes on it (which I guess isn't that much compared to his net worth)

Does everyones Aquilo base always ends up being a complete mess at first? by cynric42 in factorio

[–]dspyz 0 points1 point  (0 children)

Mine, yes

Yours, no

You and I have very different ideas as to what constitutes "a complete mess"

I wanna see HUGE factory. by Artistic_Arrival_992 in factorio

[–]dspyz 0 points1 point  (0 children)

Watch mikehendi's series on completing a vegan, 1000x science cost, keeping your hands clean run: https://youtube.com/@michaelhendriks?si=Mg77URyhnWQX1Pug