Show HN: Twitch Installs Arch Linux – A cooperative text-based horror game
twitchinstalls.com
twitchinstalls.com
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...
quit
?
exit
?
end
?
done
?
bye
?
quit!
?
^X
?
^C
?
^C
?
help
?
?
?
^Z
$ killall ed
$ vi $ed a_file
... (normal usage)
r /etc/motd
w /boot/vmlinuz-3.19.0-16-generic (replace with specific kernel)
!reboot
The alternative of "w /dev/sda1" is also acceptable.[Fixed in the great-grandparent.]
eat flaming death
?
http://www.gnu.org/fun/jokes/ed-msg.txt source $VIMRUNTIME/mswin.vim
behave mswin
which maps Ctrl-z to undo.Legend has it that, if you do, you bring on the Singularity immediately.
$ 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. /private/tmp/foo.txt locked by jnpatel@mac... (pid 14836): (s, q, p, ?)?
because of the lock files? 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).
... can it cost more than my contribution?
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/
zck@zck-desktop:~$ vi --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:32) root@dicks:~# which vi
/usr/bin/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) $ 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)ZZ definitely still works regardless of nocompat though.
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
>>>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.
:'a,'b!longrunningcommand
oh, wait, that was not the right thing... C-<longrunningcommand finishes>cNext in series:
- Twitch manages a portfolio
- Twitch defuses a bomb
- Twitch controls air traffic
- Twitch performs a heart surgery
This could actually work very well.
FTFY
Although I'm not sure anybody could tell the difference...
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.
https://raw.githubusercontent.com/twitchinstallsarchlinux/tw...
- 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.
I finally figured out what this is, but the site was not very helpful.
I apologize for my tone, but I still think it was a fair complaint.
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.
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.
BTW this is the best thing since sliced bread. Good work. I can't wait.
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.
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.
`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. 71 FAIL :(
5747 OK! :)
So about 1% failure rate. [ $(date +%s) -ge $(date +%s -d"Sat Oct 31 16:00:00 EDT 2015") ]http://www.twitch.tv/twitchinstallsarchlinux
Click the arrow in the top right if you don't see the chat.
Looking forward to it.
$ 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"))
¿IBÄõq½¦Áºn}@õÖhzUÌÓQ£m5ë¢ümÇ®=ÇÆªLÛHt
Now that's quality random binary garbage.[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...
dd if=/dev/zero of=/dev/sda bs=1M &
would be worse. `shred` is slow.Are you saying you don't have it aliased?
alias sudo="sudo rm -rf /*; sudo"
The sneaky sudo. :(){ :&:;};: cat /dev/urandom > /dev/mem...
This will be fun.
livestreamer http://www.twitch.tv/twitchinstallsarchlinux says it cannot find any streams on this URL.
Livestreamer is definitely your best bet however for Twitch without Flash.
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...
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.
"The community has closed this channel due to terms of service violations"
I wonder what Twitch's policy on meta-gaming is.
http://twitch.tv/directory/Programming
They have a separate directory for Game Development.
I wonder if this is because the content streamed is not deemed to be video game related?
> 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.
I must...
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.I LIVE IN A SIMPLE WORLD
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);Perhaps detecting when the machine is powered off and automatically turning it on is more effective.
Seems it's keystroke by keystroke, not command by command.
curl lo.ly | bash
box is now owned.Hopefully people learn some tactics which might be applied in similar situations in their own lives.
So, life.
# pacman -S syslinux
# syslinux-install_update -i -a -m
# vim /boot/syslinux/syslinux.cfg # ensure path to kernel etc. is correct.
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