<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.explainxkcd.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jstout</id>
		<title>explain xkcd - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.explainxkcd.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jstout"/>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php/Special:Contributions/Jstout"/>
		<updated>2026-04-04T04:25:54Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=Talk:1685:_Patch&amp;diff=120882</id>
		<title>Talk:1685: Patch</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=Talk:1685:_Patch&amp;diff=120882"/>
				<updated>2016-05-26T19:57:04Z</updated>
		
		<summary type="html">&lt;p&gt;Jstout: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Please sign your posts with ~~~~--&amp;gt;&lt;br /&gt;
Hey, I'm first! Guessing the Bot only JUST created this, it was mere minutes after midnight EST when I landed on this page. Unfortunately this is a comic I'm less capable of explaining. From the looks of it, his Photoshop Patch turned what looks like C code into gobbledegook by filling in several of the spaces (and I think even changing some of the characters, possible with characters which fill more of the space). - NiceGuy1 [[Special:Contributions/108.162.218.77|108.162.218.77]] 04:24, 25 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
This appears to be Python code. Note the &amp;quot;def&amp;quot; keyword, how &amp;quot;for i in [garbled]:&amp;quot; is used rather than C's for syntax, and how there are no semicolons or braces. --[[User:Sherlock9|Sherlock9]] ([[User talk:Sherlock9|talk]]) 05:03, 25 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Photoshop has a 'patch' tool but it has a very different function from a software patch. {{unsigned ip|108.162.242.123}}&lt;br /&gt;
:An explanation of Photoshop's patch tool might be helpful in identifying patterns in what pixels were changed by it, perhaps facilitating the identification of some likely characters. [[User:Dansiman|Dansiman]] ([[User talk:Dansiman|talk]]) 05:56, 25 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
The first function looks like &amp;quot;isPrime&amp;quot; and seems to check if a number is prime. The last function looks like &amp;quot;quicksort&amp;quot;. Both are common functions you create when learning programming. Not sure about the second one, but it looks like it uses regular expressions. -- [[Special:Contributions/198.41.242.242|198.41.242.242]] 06:44, 25 May 2016 (UTC)&lt;br /&gt;
:I think the second one is &amp;quot;isPrimeRegex&amp;quot;. *cringe* [[Special:Contributions/141.101.104.25|141.101.104.25]] 08:55, 25 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Second function looks like a function to check if number is a prime using Regex (described here http://www.noulakaz.net/2007/03/18/a-regular-expression-to-check-for-prime-numbers/). I don't know if it deserves some special mention, but at least to me (non-programmer) it looks like one of the most arcane things you can do in programming [[Special:Contributions/141.101.80.79|141.101.80.79]] 07:22, 25 May 2016 (UTC)&lt;br /&gt;
:That indeed looks very much like it. I think this is worth mentioning. --[[Special:Contributions/198.41.242.240|198.41.242.240]] 11:22, 25 May 2016 (UTC)&lt;br /&gt;
:Note that mathematically speaking, that regular expression is NOT regular expression - use of backreference in match is one of originally perl extension which makes it much more powerful (and much slower in some cases). It's just that both python and ruby already copied most of perl extensions of regular expressions. -- [[User:Hkmaly|Hkmaly]] ([[User talk:Hkmaly|talk]]) 12:39, 25 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Do you think the use of pi is a reference to one of the other comics(I forgot which one...)?[[User:Transuranium|Transuranium]] ([[User talk:Transuranium|talk]]) 10:35, 25 May 2016 (UTC)Transuranium&lt;br /&gt;
:I rather guess it is short for pivot. See {{w|quicksort}} for what the pivot does. --[[Special:Contributions/198.41.242.240|198.41.242.240]] 11:22, 25 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
You know, it's theoretically possible for Photoshop to create compilable code in [https://esolangs.org/wiki/Piet the esoteric programming language] &amp;quot;[http://www.dangermouse.net/esoteric/piet.html Piet]&amp;quot;. But unless there's a way to turn off the Patch tool's antialiasing, it'll be practically impossible for patches larger than a single pixel. [[Special:Contributions/108.162.237.220|108.162.237.220]] 14:15, 25 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don't really know anything about programming, but it looks like it's checking for factors of n from 2 to sqrt(n)+1. Why would it need to check any number larger than sqrt(n) though? If i&amp;gt;sqrt(n), then ij=n implies that j&amp;lt;sqrt(n), and j should already have been found. So the largest integer you need to check is floor( sqrt(n) ), which is in the range from 2 to sqrt(n). Checking ceiling( sqrt(n) ) for a non-square number seems redundant. [[Special:Contributions/108.162.237.250|108.162.237.250]] 15:25, 25 May 2016 (UTC)&lt;br /&gt;
:It's because &amp;lt;code&amp;gt;range(a, b)&amp;lt;/code&amp;gt; in Python means the interval [a, b) (excluding b). [[Special:Contributions/108.162.222.29|108.162.222.29]] 15:41, 25 May 2016 (UTC)&lt;br /&gt;
::That mismatched bracket in your comment is hurting me. [[Special:Contributions/162.158.68.71|162.158.68.71]] 17:02, 25 May 2016 (UTC)&lt;br /&gt;
:: It's not mismatched; the right paren indicates the value's the upper limit but excluded. I'd include a right bracket in my response but I think that might make a compiler curse. [[User:Elvenivle|Elvenivle]] ([[User talk:Elvenivle|talk]])&lt;br /&gt;
&lt;br /&gt;
The line with re.match in the likely original code should have an &amp;quot;r&amp;quot; for &amp;quot;raw&amp;quot; before the first string thus:&lt;br /&gt;
  if re.match(r'^1?$|^(11+?)\1+$', '1'*n):&lt;br /&gt;
I am not changing it in the main explanation because I don't know what colour it should be and it's my first time contributing. - Charles W. [[Special:Contributions/141.101.98.42|141.101.98.42]] 22:24, 25 May 2016 (UTC)&lt;br /&gt;
:Seems like it has been changed by now. --[[User:Kynde|Kynde]] ([[User talk:Kynde|talk]]) 07:13, 26 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Has someone added this to the Protip category?[[Special:Contributions/162.158.2.139|162.158.2.139]] 23:53, 25 May 2016 (UTC)&lt;br /&gt;
:Uhm yes, it should be clear right below these comment on the main page? All categories are listed at the bottom of each page. --[[User:Kynde|Kynde]] ([[User talk:Kynde|talk]]) 07:01, 26 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
It might be worth explaining the [pivot] * (len(a) - (len(l) + len(r))) since that threw me when I first saw it. Since l has the elements of a &amp;lt; pivot, and r has the elements of a &amp;gt; pivot, len(a) - (len(l) + len(r)) will be the number of elements in a that = pivot (which must be in the range [1, len(a)]), and these are then 'spliced' into the result between the result of quicksorting l and r.&lt;br /&gt;
[[User:Jstout|Jstout]] ([[User talk:Jstout|talk]]) 19:48, 26 May 2016 (UTC)&lt;/div&gt;</summary>
		<author><name>Jstout</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=Talk:1685:_Patch&amp;diff=120881</id>
		<title>Talk:1685: Patch</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=Talk:1685:_Patch&amp;diff=120881"/>
				<updated>2016-05-26T19:48:38Z</updated>
		
		<summary type="html">&lt;p&gt;Jstout: Added comment about the [pivot] * ... line of code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Please sign your posts with ~~~~--&amp;gt;&lt;br /&gt;
Hey, I'm first! Guessing the Bot only JUST created this, it was mere minutes after midnight EST when I landed on this page. Unfortunately this is a comic I'm less capable of explaining. From the looks of it, his Photoshop Patch turned what looks like C code into gobbledegook by filling in several of the spaces (and I think even changing some of the characters, possible with characters which fill more of the space). - NiceGuy1 [[Special:Contributions/108.162.218.77|108.162.218.77]] 04:24, 25 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
This appears to be Python code. Note the &amp;quot;def&amp;quot; keyword, how &amp;quot;for i in [garbled]:&amp;quot; is used rather than C's for syntax, and how there are no semicolons or braces. --[[User:Sherlock9|Sherlock9]] ([[User talk:Sherlock9|talk]]) 05:03, 25 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Photoshop has a 'patch' tool but it has a very different function from a software patch. {{unsigned ip|108.162.242.123}}&lt;br /&gt;
:An explanation of Photoshop's patch tool might be helpful in identifying patterns in what pixels were changed by it, perhaps facilitating the identification of some likely characters. [[User:Dansiman|Dansiman]] ([[User talk:Dansiman|talk]]) 05:56, 25 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
The first function looks like &amp;quot;isPrime&amp;quot; and seems to check if a number is prime. The last function looks like &amp;quot;quicksort&amp;quot;. Both are common functions you create when learning programming. Not sure about the second one, but it looks like it uses regular expressions. -- [[Special:Contributions/198.41.242.242|198.41.242.242]] 06:44, 25 May 2016 (UTC)&lt;br /&gt;
:I think the second one is &amp;quot;isPrimeRegex&amp;quot;. *cringe* [[Special:Contributions/141.101.104.25|141.101.104.25]] 08:55, 25 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Second function looks like a function to check if number is a prime using Regex (described here http://www.noulakaz.net/2007/03/18/a-regular-expression-to-check-for-prime-numbers/). I don't know if it deserves some special mention, but at least to me (non-programmer) it looks like one of the most arcane things you can do in programming [[Special:Contributions/141.101.80.79|141.101.80.79]] 07:22, 25 May 2016 (UTC)&lt;br /&gt;
:That indeed looks very much like it. I think this is worth mentioning. --[[Special:Contributions/198.41.242.240|198.41.242.240]] 11:22, 25 May 2016 (UTC)&lt;br /&gt;
:Note that mathematically speaking, that regular expression is NOT regular expression - use of backreference in match is one of originally perl extension which makes it much more powerful (and much slower in some cases). It's just that both python and ruby already copied most of perl extensions of regular expressions. -- [[User:Hkmaly|Hkmaly]] ([[User talk:Hkmaly|talk]]) 12:39, 25 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Do you think the use of pi is a reference to one of the other comics(I forgot which one...)?[[User:Transuranium|Transuranium]] ([[User talk:Transuranium|talk]]) 10:35, 25 May 2016 (UTC)Transuranium&lt;br /&gt;
:I rather guess it is short for pivot. See {{w|quicksort}} for what the pivot does. --[[Special:Contributions/198.41.242.240|198.41.242.240]] 11:22, 25 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
You know, it's theoretically possible for Photoshop to create compilable code in [https://esolangs.org/wiki/Piet the esoteric programming language] &amp;quot;[http://www.dangermouse.net/esoteric/piet.html Piet]&amp;quot;. But unless there's a way to turn off the Patch tool's antialiasing, it'll be practically impossible for patches larger than a single pixel. [[Special:Contributions/108.162.237.220|108.162.237.220]] 14:15, 25 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don't really know anything about programming, but it looks like it's checking for factors of n from 2 to sqrt(n)+1. Why would it need to check any number larger than sqrt(n) though? If i&amp;gt;sqrt(n), then ij=n implies that j&amp;lt;sqrt(n), and j should already have been found. So the largest integer you need to check is floor( sqrt(n) ), which is in the range from 2 to sqrt(n). Checking ceiling( sqrt(n) ) for a non-square number seems redundant. [[Special:Contributions/108.162.237.250|108.162.237.250]] 15:25, 25 May 2016 (UTC)&lt;br /&gt;
:It's because &amp;lt;code&amp;gt;range(a, b)&amp;lt;/code&amp;gt; in Python means the interval [a, b) (excluding b). [[Special:Contributions/108.162.222.29|108.162.222.29]] 15:41, 25 May 2016 (UTC)&lt;br /&gt;
::That mismatched bracket in your comment is hurting me. [[Special:Contributions/162.158.68.71|162.158.68.71]] 17:02, 25 May 2016 (UTC)&lt;br /&gt;
:: It's not mismatched; the right paren indicates the value's the upper limit but excluded. I'd include a right bracket in my response but I think that might make a compiler curse. [[User:Elvenivle|Elvenivle]] ([[User talk:Elvenivle|talk]])&lt;br /&gt;
&lt;br /&gt;
The line with re.match in the likely original code should have an &amp;quot;r&amp;quot; for &amp;quot;raw&amp;quot; before the first string thus:&lt;br /&gt;
  if re.match(r'^1?$|^(11+?)\1+$', '1'*n):&lt;br /&gt;
I am not changing it in the main explanation because I don't know what colour it should be and it's my first time contributing. - Charles W. [[Special:Contributions/141.101.98.42|141.101.98.42]] 22:24, 25 May 2016 (UTC)&lt;br /&gt;
:Seems like it has been changed by now. --[[User:Kynde|Kynde]] ([[User talk:Kynde|talk]]) 07:13, 26 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Has someone added this to the Protip category?[[Special:Contributions/162.158.2.139|162.158.2.139]] 23:53, 25 May 2016 (UTC)&lt;br /&gt;
:Uhm yes, it should be clear right below these comment on the main page? All categories are listed at the bottom of each page. --[[User:Kynde|Kynde]] ([[User talk:Kynde|talk]]) 07:01, 26 May 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
It might be worth explaining the [pivot] * (len(a) - (len(l) + len(r))) since that threw me when I first saw it. Since l has the elements of a &amp;lt; pivot, and r has the elements of a &amp;gt; pivot, len(a) - (len(l) + len(r)) will be the number of elements in a that = pivot, and these are then 'spliced' into the result between the result of quicksorting l and r.&lt;br /&gt;
[[User:Jstout|Jstout]] ([[User talk:Jstout|talk]]) 19:48, 26 May 2016 (UTC)&lt;/div&gt;</summary>
		<author><name>Jstout</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=Talk:163:_Donald_Knuth&amp;diff=60464</id>
		<title>Talk:163: Donald Knuth</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=Talk:163:_Donald_Knuth&amp;diff=60464"/>
				<updated>2014-02-18T20:41:48Z</updated>
		
		<summary type="html">&lt;p&gt;Jstout: Note on Pascal arrays&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In Pascal you define the lower and upper bounds of an array when you declare it, e.g.,&lt;br /&gt;
&lt;br /&gt;
  anArray[-5 .. 5] OF integer&lt;br /&gt;
&lt;br /&gt;
which has always struck me as a much better idea than having arrays always starting at 0.&lt;br /&gt;
[[User:Jstout|Jstout]] ([[User talk:Jstout|talk]]) 20:41, 18 February 2014 (UTC)&lt;/div&gt;</summary>
		<author><name>Jstout</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=Talk:303:_Compiling&amp;diff=55217</id>
		<title>Talk:303: Compiling</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=Talk:303:_Compiling&amp;diff=55217"/>
				<updated>2013-12-13T21:54:56Z</updated>
		
		<summary type="html">&lt;p&gt;Jstout: Compilers and interpreters&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I was sooo amused when I heard about the most common error report when Delphi was released to the linux platform: &amp;quot;the compile button doesn't do anything&amp;quot;...&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;fix&amp;quot; was to introduce a checkbox that defaulted to not close the compile window once complete :-)&lt;br /&gt;
&lt;br /&gt;
For being so open-sourced they are quite close-minded ;-)&lt;br /&gt;
&lt;br /&gt;
Usually interpreters don't create any code but use the source language as instructions to the interpreter. The situation is complicated by the existence of compilers which compile to an intermediate code (Java byte code for example), then compile the byte code to machine code.&lt;br /&gt;
&lt;br /&gt;
[[User:Jstout|Jstout]] ([[User talk:Jstout|talk]]) 21:54, 13 December 2013 (UTC)&lt;br /&gt;
[[Special:Contributions/141.101.81.4|141.101.81.4]] 07:04, 10 November 2013 (UTC)Nicklas&lt;/div&gt;</summary>
		<author><name>Jstout</name></author>	</entry>

	</feed>