Hacker Newsnew | past | comments | ask | show | jobs | submit | Sulf1re's commentslogin

I don't get it. why not just look look at the last binary bit?

Hm, good thought. You could just do

    printf("%d is %s\n", n, last_binary_bit(n) == 0 ? "even" : "odd");
and the rest is trivial:

    int last_binary_bit(int n) {
        if (n == 0) return 0;
        if (n == 1) return 1;
        if (n == 2) return 0;
        ...
    }
Come to think of it, with a little fancy math you could divide and conquer:

    int last_binary_bit(int n) {
        // Handle the easy cases.
        if (n == 0) return 0;
        if (n == 1) return 1;
        // Number may be large. Divide and conquer. It doesn't matter where we split it,
        // so use a randomized algorithm because those are fast.
        for (;;) {
            int r = random();
            if (r < n) {
                // Smaller numbers are easier.
                int smaller1 = r;
                int smaller2 = n - 4;
                int bit1 = last_binary_bit(smaller1);
                int bit2 = last_binary_bit(smaller2);
                // Fancy math: even + even is even, even + odd is odd, etc.
                if (bit1 == 0 && bit2 == 0) return 0;
                if (bit1 == 0 && bit2 == 1) return 1;
                if (bit1 == 1 && bit2 == 0) return 1;
                if (bit1 == 1 && bit2 == 1) return 0;
            }
        }
    }

That is not what is suggested. Llm still fuzzy mess, but supervisor / self editing is rules based


Do you have a transcript?


I split the YouTube transcript into chunks and gave them to ChatGPT:

https://pastebin.com/raw/8HQ3JQgx


I rode in London, a lot. Fast, too. Couple of accidents, once slipped off a pedal it speed, ran over my foot, but stayed on (thanks, physics), once got too close too a rising curb and couldn't steer, hit a fence at speed, got deep cuts and lots off bruises, but bike took most off the damage. Have had accidents since, usually from heavy breaking, with complication leading to launching over the front. I cannot see how these boards could be safer, any dismount at equivalent speed would need considerable skill to not face plant, and any complications would just add energy too the impact. That or you could simply quail too stop in time and hit something (like a car door opening, or a truck pulling out, or that kid/dog that ran in front of you)


At 5usd for 100 operations, that thousand dollar gpu will break even very swiftly. I used 5000 or more runs when I was learning to use stable diffusion. In a commercial context, staff training alone will pay for the cards


My thoughts exactly. I did some guesstimates last month, the experimentation and playing I've done with my 3090 so far would have cost somewhere around $7k on the metered OPC options.


33 credits a day will be nothing, and at 5usd for 100, that's going to be $10 or more an hour for anyone doing any kind of regular workflow. How munch would it cost you?


That's painful


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: