https://www.explainxkcd.com/wiki/api.php?action=feedcontributions&user=67.183.134.13&feedformat=atomexplain xkcd - User contributions [en]2024-03-28T18:31:45ZUser contributionsMediaWiki 1.30.0https://www.explainxkcd.com/wiki/index.php?title=234:_Escape_Artist&diff=51258234: Escape Artist2013-10-27T03:27:57Z<p>67.183.134.13: /* Explanation */</p>
<hr />
<div>{{comic<br />
| number = 234<br />
| date = March 12, 2007<br />
| title = Escape Artist<br />
| image = escape_artist.png<br />
| titletext = Easier to escape: n-layered nested quotes or an iron maiden?<br />
}}<br />
<br />
==Explanation==<br />
{{w|Harry Houdini}} was a famous escape artist, whose more famous routines included escaping straitjackets and switching places with an assistant while locked inside a box.<br />
<br />
The word "escape" also has a meaning {{w|Escape character|in computer science}}. To "escape" something in programming means to input some "escape character" to force to the computer to use a different interpretation of the following character (i.e. letter, number, or symbol). The escape character in most interpreters or languages is the backslash (\), and it's usually used to suppress the special meaning of the following symbol. For example, in most programming languages, strings are specified in quotation marks (e.g. "this is a string"). In this case, if the programmer tried to put a quotation mark inside the string, the compiler would interpret it as the end of the string, and probably end up having an error when it sees the rest of the string. Because of this, most languages also specify that \" can be used to literally just be a quotation mark, which allows programmers to put actual quotation mark characters into strings.<br />
<br />
The problem [[Cueball]] is having is related to the fact that {{w|Bash (Unix shell)|the Bash shell}} interprets spaces as a special syntactic marker, when he actually just wants the spaces to be literal space characters. In this case, escaping the spaces with \ would force Bash to interpret his script in this way.<br />
<br />
(There is one other way the escape character is sometimes used, but we'll ignore it for the sake of explaining the comic.)<br />
<br />
The person talking to Cueball is having a separate conversation about Houdini as Cueball thinks aloud about his script issue, which results in diverging conversations. This eventually leads Cueball to suggest that Houdini might have "escaped" (freed himself from) handcuffs by "escaping" (removing the special meaning from) them with backslashes.<br />
<br />
Sometimes, escape characters need to be "nested" - the backslash character itself can be escaped as \\ to produce a literal backslash, so if, for example, one needs to produce a literal quotation mark to output to a script file, and that script file ''also'' needs to have the quotation mark escaped, one would need to type it out as \\\", which would be output as \". If I needed to actually output that \\\", one would need to type it as \\\\\\\". The number of backslashes needed grows, and can be very hard to keep track of. This behavior is a type of n-level nested quotation mentioned in the title text.<br />
<br />
An {{w|iron maiden (torture device)|iron maiden}} is supposedly a medieval torture device, currently believed to have been invented for tourism purposes much later than the time period when it was said to have been used.<br />
<br />
==Transcript==<br />
:[Cueball sits before a computer on a desk while another man stands behind him.]<br />
:Man: I was fascinated by locks as a kid. I loved how they turned information and patterns into physical strength.<br />
:Cueball: Why does my script keep dying?<br />
<br />
:[Closeup on Cueball sitting at the computer.]<br />
:Man: And a lock invites you to try and open it. It's the hacker instinct. Only your ignorance stands in the way.<br />
:Cueball: Wait it's passing bad strings.<br />
<br />
:[Returns to the two shot of both men.]<br />
:Man: I admired Harry Houdini, how he could open any lock and free himself from any restraint.<br />
:Cueball: Ah - Bash is parsing the spaces.<br />
<br />
:Man: Sure some of it was fakery and showmanship. But I still wonder how he so consistently escaped handcuffs.<br />
:Cueball: Backslashes?<br />
:Man: Huh?<br />
:Cueball: Never mind.<br />
<br />
{{comic discussion}}<br />
[[Category:Comics featuring Cueball]]<br />
[[Category:Programming]]</div>67.183.134.13https://www.explainxkcd.com/wiki/index.php?title=234:_Escape_Artist&diff=51257234: Escape Artist2013-10-27T03:27:36Z<p>67.183.134.13: /* Explanation */</p>
<hr />
<div>{{comic<br />
| number = 234<br />
| date = March 12, 2007<br />
| title = Escape Artist<br />
| image = escape_artist.png<br />
| titletext = Easier to escape: n-layered nested quotes or an iron maiden?<br />
}}<br />
<br />
==Explanation==<br />
{{w|Harry Houdini}} was a famous escape artist, whose more famous routines included escaping straitjackets and switching places with an assistant while locked inside a box.<br />
<br />
The word "escape" also has a meaning {{w|Escape character|in computer science}}. To "escape" something in programming means to input some "escape character" to force to the computer to use a different interpretation of the following character (i.e. letter, number, or symbol). The escape character in most interpreters or languages is the backslash (\), and it's usually used to suppress the special meaning of the following symbol. For example, in most programming languages, strings are specified in quotation marks (e.g. "this is a string"). In this case, if the programmer tried to put a quotation mark inside the string, the compiler would interpret it as the end of the string, and probably end up having an error when it sees the rest of the string. Because of this, most languages also specify that \" can be used to literally just be a quotation mark, which allows programmers to put actual quotation mark characters into strings.<br />
<br />
The problem [[Cueball]] is having is related to the fact that {{w|Bash (Unix shell)|the Bash shell}} interprets spaces as a special syntactic marker, when he actually just wants the spaces to be literal space characters. In this case, escaping the spaces with \ would force Bash to interpret his script in this way.<br />
<br />
(There is one other way the escape character is sometimes used, but we'll ignore it for the sake of explaining the comic.)<br />
<br />
The person talking to Cueball is having a separate conversation about Houdini as Cueball thinks aloud about his script issue, which results in diverging conversations. This eventually leads Cueball to suggest that Houdini might have "escaped" (freed himself from) handcuffs by "escaping" (removing the special meaning from) them with backslashes.<br />
<br />
Sometimes, escape characters need to be "nested" - the backslash character itself can be escaped as \\ to produce a literal backslash, so if, for example, one needs to produce a literal quotation mark to output to a script file, and that script file ''also'' needs to have the quotation mark escaped, one would need to type it out as \\\", which would be output as \". If I needed to actually output that \\\", one would need to type it as \\\\\\\". The number of backslashes needed grows, and can be very hard to keep track of. This behavior is a type of n-level nested quotation mentioned in the title text.<br />
<br />
An {{w|iron maiden (torture device)|iron maiden}} is supposedly a medieval torture device, currently believed to have been invented for tourism purposes much later than the time period when it was said in use.<br />
<br />
==Transcript==<br />
:[Cueball sits before a computer on a desk while another man stands behind him.]<br />
:Man: I was fascinated by locks as a kid. I loved how they turned information and patterns into physical strength.<br />
:Cueball: Why does my script keep dying?<br />
<br />
:[Closeup on Cueball sitting at the computer.]<br />
:Man: And a lock invites you to try and open it. It's the hacker instinct. Only your ignorance stands in the way.<br />
:Cueball: Wait it's passing bad strings.<br />
<br />
:[Returns to the two shot of both men.]<br />
:Man: I admired Harry Houdini, how he could open any lock and free himself from any restraint.<br />
:Cueball: Ah - Bash is parsing the spaces.<br />
<br />
:Man: Sure some of it was fakery and showmanship. But I still wonder how he so consistently escaped handcuffs.<br />
:Cueball: Backslashes?<br />
:Man: Huh?<br />
:Cueball: Never mind.<br />
<br />
{{comic discussion}}<br />
[[Category:Comics featuring Cueball]]<br />
[[Category:Programming]]</div>67.183.134.13https://www.explainxkcd.com/wiki/index.php?title=Talk:1273:_Tall_Infographics&diff=49977Talk:1273: Tall Infographics2013-10-04T07:38:58Z<p>67.183.134.13: </p>
<hr />
<div>I'm not really sure how to transcribe an infographic... Sorry. <span style="color:green;">Saibot84</span> 04:17, 4 October 2013 (UTC)<br />
:I tried to expand on it a bit, sorry if it's not the best. <span style="color:green;">ollien</span> 04:20, 4 October 2013 (UTC)<br />
For anyone wondering if the "FORMAT" frequency graph is self-referential to the entire comic... no, or at least not on actual explicit instances of the letters (certainly nowhere near 26 Ts, and even proportionally the As are vastly the most frequent and Fs the ''actual'' least, the rest almost identical), but I wouldn't put it past Randall having taken into account cummulative font-size, or something like that. [[Special:Contributions/178.98.253.80|178.98.253.80]] 07:23, 4 October 2013 (UTC)<br />
:It's by position in the alphabet (F=6, O=15, R=18, M=13, A=1, T=20). [[Special:Contributions/67.183.134.13|67.183.134.13]] 07:38, 4 October 2013 (UTC)</div>67.183.134.13