Python (a one line alternative to the OP)
I figured there wasn't really a better Python answer than what the OP suggested, but I didn't like how it was so many lines, so here's how you do exactly as the OP did but in one line:
exec(''.join([ chr(x) for x in [35, 33, 47, 117, 115, 114, 47, 98, 105, 110, 47, 101, 110, 118, 32, 112, 121, 116, 104, 111, 110, 10, 35, 32, 117, 110, 105, 120, 32, 111, 110, 108, 121, 44, 32, 109, 105, 103, 104, 116, 32, 119, 111, 114, 107, 32, 111, 110, 32, 119, 105, 110, 100, 111, 119, 115, 10, 35, 32, 110, 111, 116, 101, 58, 32, 107, 105, 108, 108, 115, 32, 65, 76, 76, 32, 82, 85, 78, 78, 73, 78, 71, 32, 112, 121, 116, 104, 111, 110, 32, 112, 114, 111, 99, 101, 115, 115, 101, 115, 46, 32, 66, 101, 32, 99, 97, 114, 101, 102, 117, 108, 32, 47, 33, 92, 10, 100, 101, 102, 32, 101, 120, 105, 116, 40, 41, 58, 10, 32, 32, 32, 32, 105, 109, 112, 111, 114, 116, 32, 111, 115, 10, 32, 32, 32, 32, 111, 115, 46, 115, 121, 115, 116, 101, 109, 40, 34, 107, 105, 108, 108, 97, 108, 108, 32, 112, 121, 116, 104, 111, 110, 51, 34, 41, 10, 32, 32, 32, 32, 35, 32, 87, 105, 110, 100, 111, 119, 115, 32, 97, 100, 100, 111, 110, 10, 32, 32, 32, 32, 111, 115, 46, 115, 121, 115, 116, 101, 109, 40, 34, 116, 97, 115, 107, 107, 105, 108, 108, 32, 47, 105, 109, 32, 112, 121, 116, 104, 111, 110, 46, 101, 120, 101, 32, 47, 102, 34, 41, 32, 35, 32, 111, 114, 32, 119, 104, 97, 116, 101, 118, 101, 114, 32, 102, 105, 108, 101, 110, 97, 109, 101, 32, 112, 121, 116, 104, 111, 110, 64, 119, 105, 110, 100, 111, 119, 115, 32, 104, 97, 115, 10, 101, 120, 105, 116, 40, 41, 10] ]))
You can make this a function and it will do the job for you.
We have the good ol'
die()
function in PHP. – Eisa Adil – 2013-12-28T21:21:45.1033But thats not unconventional to end execution... Well, it's an alternative to
exit()
, but still it's an implemented feature... – s3lph – 2013-12-28T21:25:15.55713This isn't code-trolling - we know we want weird answers from this one. – Liam Dawson – 2013-12-28T22:36:48.280
I suppose quitting by OOM killer or stackoverflow isn't fun enough? – Tim Seguine – 2013-12-29T00:23:57.197
6Does shutting the system down work? – None – 2013-12-29T00:42:38.870
8I once accidentally caused a network card to DMA over the operating system. When it happened you were instantly back in the BIOS, rebooting. – Ben Jackson – 2013-12-29T00:52:42.773
3
I feel like Shannon has us beat here ;)
– bright-star – 2013-12-29T06:33:09.3902Remember not to write destructive solutions! Those are banned per the meta discussion on code trolling. – Kevin – 2013-12-29T16:10:16.067
Oooh. How about a program that tests to see if another program exits? That should be pretty trivial to solve... – tylerl – 2013-12-29T22:33:56.907
2@BenJackson That is absolutely hilarious. How did that happen? – chbaker0 – 2013-12-30T06:41:04.983
3@mebob I wrote a "negative" number into a byte count register and initiated a ~4G DMA. – Ben Jackson – 2013-12-30T07:30:07.037