Live data from Hacker News

Show HN: Twitch Installs Arch Linux – A cooperative text-based horror game

twitchinstalls.com

141–150 of 266 posts

Re: Show HN: Twitch Installs Arch Linux – A cooperative text-based horror game

#143
post #140

If you want an easy to understand video on Installing Arch Linux in 15 minutes: https://youtu.be/_fBIeKQSiAc

There's not such thing as a 15 minute Arch install. It takes you 7.5. That's minutes or hours but there's no in between.

Re: Show HN: Twitch Installs Arch Linux – A cooperative text-based horror game

#144

Earlier quoted context omitted.

It looks like there is a system reset command that can be voted for.

What's the worst that could happen?

This is a good point. When I first got dropped to a shell in a broom/IT closet, I thought gees I hope I don't accidentally fuck anything up. 4 days later I had to acknowledge I could barely intentionally fuck anything up.

Re: Show HN: Twitch Installs Arch Linux – A cooperative text-based horror game

#145
post #10

This is brilliant - I imagine they'll have to hope the incessant "rm -rf *" commands don't get spammed, if they are running under root. Looking forward to it.

The Arch installer starts out as a root shell (on a ramdisk used to bootstrap the system.)

...

This will be fun.

Re: Show HN: Twitch Installs Arch Linux – A cooperative text-based horror game

#147
post #139

Earlier quoted context omitted.

Why would it have to be the exact millisecond? "$(date)" will have that value for 1 second, assuming the format is correct. There is some very small timespan in which it could fail, but the chances are very much in favor of successfully exiting the loop.

`sleep` sleeps for seconds.

And `date` returns a timestamp with seconds precision.

`time sh -c 'if [ "$(date)" != "Sat Oct 31 16:00:00 EDT 2015" ]; then sleep 1; fi'` took around 1.010 seconds on my machine, but that includes starting a new shell, so there's probably a much smaller than 1% chance that that particular second will be missed.

EDIT: here's a little program to test this:

    #!/usr/bin/env bash
    while true; do
      target=$(expr $(date +%s) + 2)
      while true; do
        now=$(date +%s)
        if [ "$now" != "$target" ]; then
          if [ "$now" -gt "$target" ]; then
            echo "FAIL :("
            break
          else
            sleep 1
          fi
        else
          echo "OK! :)"
          break
        fi
        sleep 0.1
      done
    done
Adjust the "sleep 0.1" to increase or decrease the perecentage of failures. Remove to see that it (almost) never fails.

Re: Show HN: Twitch Installs Arch Linux – A cooperative text-based horror game

#148

Earlier quoted context omitted.

Twitch creates two state solution agreed to by Israel and Palestine.

Well, technically, replacing everything between the Ganges and Gibralter, and between the Congo and the Alps, with butterscotch pudding would be a solution.

The two-state colloid.

Re: Show HN: Twitch Installs Arch Linux – A cooperative text-based horror game

#149
post #139

Earlier quoted context omitted.

Why would it have to be the exact millisecond? "$(date)" will have that value for 1 second, assuming the format is correct. There is some very small timespan in which it could fail, but the chances are very much in favor of successfully exiting the loop.

`sleep` sleeps for seconds.

Yes, but presumably it rounds that last number, right? So as long as it ticks somewhere between 15:59:59.50 and 16:00:00.49 it should run?

Re: Show HN: Twitch Installs Arch Linux – A cooperative text-based horror game

#150

Earlier quoted context omitted.

What's the worst that could happen?

This is a good point. When I first got dropped to a shell in a broom/IT closet, I thought gees I hope I don't accidentally fuck anything up. 4 days later I had to acknowledge I could barely intentionally fuck anything up.

I imagine people looking to be disruptive will seek out a 'start9' equivalent. I don't know whether or not there is one.
Post reply on HN