<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.fifthempire.info/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=2600%3A1013%3AB018%3A986F%3A4493%3A7A2A%3A52E2%3A103A</id>
	<title>Fifth Empire Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.fifthempire.info/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=2600%3A1013%3AB018%3A986F%3A4493%3A7A2A%3A52E2%3A103A"/>
	<link rel="alternate" type="text/html" href="https://wiki.fifthempire.info/index.php/Special:Contributions/2600:1013:B018:986F:4493:7A2A:52E2:103A"/>
	<updated>2026-06-22T20:01:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.fifthempire.info/index.php?title=Module_talk:Yesno&amp;diff=28021</id>
		<title>Module talk:Yesno</title>
		<link rel="alternate" type="text/html" href="https://wiki.fifthempire.info/index.php?title=Module_talk:Yesno&amp;diff=28021"/>
		<updated>2014-02-24T04:21:14Z</updated>

		<summary type="html">&lt;p&gt;2600:1013:B018:986F:4493:7A2A:52E2:103A: /* Protected edit request on 24 February 2014 */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Testcases and documentation==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Test Cases (via [[Template:Yesno/doc]])&lt;br /&gt;
|-&lt;br /&gt;
! Module output&lt;br /&gt;
! Template output&lt;br /&gt;
! Expected&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|yes}}&lt;br /&gt;
| {{yesno|yes}}&lt;br /&gt;
| yes&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|YeS}}&lt;br /&gt;
| {{yesno|YeS}}&lt;br /&gt;
| yes&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|Y}}&lt;br /&gt;
| {{yesno|Y}}&lt;br /&gt;
| yes&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|y}}&lt;br /&gt;
| {{yesno|y}}&lt;br /&gt;
| yes&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|no}}&lt;br /&gt;
| {{yesno|no}}&lt;br /&gt;
| &#039;&#039;(blank)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|}}&lt;br /&gt;
| {{yesno|}}&lt;br /&gt;
| &#039;&#039;(blank)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno}}&lt;br /&gt;
| {{yesno}}&lt;br /&gt;
| &#039;&#039;(blank)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|¬}}&lt;br /&gt;
| {{yesno|¬}}&lt;br /&gt;
| &#039;&#039;(blank)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|purplemonkeydishwasher}}&lt;br /&gt;
| {{yesno|purplemonkeydishwasher}}&lt;br /&gt;
| yes&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|yes|yes=bacon}}&lt;br /&gt;
| {{yesno|yes|yes=bacon}}&lt;br /&gt;
| bacon&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|no|no=ham}}&lt;br /&gt;
| {{yesno|no|no=ham}}&lt;br /&gt;
| ham&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|blank= eggs}}&lt;br /&gt;
| {{yesno|blank= eggs}}&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|no=ham}}&lt;br /&gt;
| {{yesno|no=ham}}&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|blank= eggs|no=ham}}&lt;br /&gt;
| {{yesno|blank= eggs|no=ham}}&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|¬|¬=sausage}}&lt;br /&gt;
| {{yesno|¬|¬=sausage}}&lt;br /&gt;
| sausage&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|purplemonkeydishwasher|def=cup-of-tea}}&lt;br /&gt;
| {{yesno|purplemonkeydishwasher|def=cup-of-tea}}&lt;br /&gt;
| cup-of-tea&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|purplemonkeydishwasher|yes=bacon}}&lt;br /&gt;
| {{yesno|purplemonkeydishwasher|yes=bacon}}&lt;br /&gt;
| bacon&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|purplemonkeydishwasher|def=cup-of-tea|yes=bacon}}&lt;br /&gt;
| {{yesno|purplemonkeydishwasher|def=cup-of-tea|yes=bacon}}&lt;br /&gt;
| cup-of-tea&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|yes|yes=no|no=yes}}&lt;br /&gt;
| {{yesno|yes|yes=no|no=yes}}&lt;br /&gt;
| no&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno|no|yes=no|no=yes}}&lt;br /&gt;
| {{yesno|no|yes=no|no=yes}}&lt;br /&gt;
| yes&lt;br /&gt;
|-&lt;br /&gt;
| {{#invoke:Yesno|yesno| no |no=no}}&lt;br /&gt;
| {{yesno| no |no=no}}&lt;br /&gt;
| no&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:&amp;lt;small&amp;gt;Note: Pre tags added to suppress script errors. — &#039;&#039;&#039;&#039;&#039;[[User:Mr. Stradivarius|&amp;lt;span style=&amp;quot;color: #194D00; font-family: Palatino, Times, serif&amp;quot;&amp;gt;Mr. Stradivarius&amp;lt;/span&amp;gt;]]&#039;&#039;&#039;&#039;&#039; &amp;lt;sup&amp;gt;[[User talk:Mr. Stradivarius|♪ talk ♪]]&amp;lt;/sup&amp;gt; 14:25, 20 September 2013 (UTC)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, the template does not behave exactly as its documentation claims it does. I was not sure which to regard as authoritative: the ideal or actual implementation. I ultimately went with the former. Removing &amp;lt;code&amp;gt;and not any&amp;lt;/code&amp;gt; from the Lua code will make the module behave like exactly like the template.&lt;br /&gt;
&lt;br /&gt;
--[[User:Ori.livneh|Ori.livneh]] ([[User talk:Ori.livneh|talk]]) 10:46, 28 February 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Just needs to handle spaces in the params better. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 11:41, 2 March 2013 (UTC)&lt;br /&gt;
::Thanks. Fixed. I moved your test case to the table above. --[[User:Ori.livneh|Ori.livneh]] ([[User talk:Ori.livneh|talk]]) 05:58, 3 March 2013 (UTC)&lt;br /&gt;
:::Yesno has ~8M transclusions. No question it should handle the legacy 1:1. Test it. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 22:31, 11 March 2013 (UTC)&lt;br /&gt;
The documentation is wrong. The &amp;quot;egg&amp;quot; example assumes thet the input value is &#039;&#039;blank&#039;&#039;. But in the code examples the input parameter is &#039;&#039;omitted&#039;&#039;. Compare: &lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{yesno|blank= eggs|no=ham}}&amp;lt;/nowiki&amp;gt; &amp;amp;rarr;  {{yesno|blank= eggs|no=ham}} &lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{yesno||blank= eggs|no=ham}}&amp;lt;/nowiki&amp;gt; &amp;amp;rarr;  {{yesno||blank= eggs|no=ham}} &lt;br /&gt;
This is what is actually documented:&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{yesno|blank= eggs|no=ham|¬=bread}}&amp;lt;/nowiki&amp;gt; &amp;amp;rarr;  {{yesno|blank= eggs|no=ham|¬=bread}}&lt;br /&gt;
:I have changed the documentation. Not the table above. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 13:16, 23 March 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Why? ==&lt;br /&gt;
&lt;br /&gt;
{{tl|yesno}} is quite simple, so I&#039;m not sure if there is a point in replacing it with functionally equivalent Lua.  There are many cases where Lua can be much faster and easier to read, but I&#039;m not sure that is the case here.  In fact, because of the slight overhead with #invoke, simple parser functions can actually be slightly faster than the equivalent Lua.  I haven&#039;t tested that here, but I wouldn&#039;t be surprised if there is no performance advantage in a case like this.  Seems like a strange template to target for Lua conversion.  [[User:Dragons flight|Dragons flight]] ([[User talk:Dragons flight|talk]]) 14:57, 12 March 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* {{ml|module=Yesno}}&lt;br /&gt;
&lt;br /&gt;
== test failed ==&lt;br /&gt;
{{resolved}}&lt;br /&gt;
One fail found in unit test: value &amp;quot;1= ¬ &amp;quot; (with whitespace). Reason:whitespace not removed before this check. Possible solution; treat &#039;¬&#039; as a character, separate from nil. &lt;br /&gt;
(if val == nil or val == &#039;¬&#039; then ...). -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 11:54, 23 March 2013 (UTC)&lt;br /&gt;
* Another fail: input value=&amp;quot;00&amp;quot;. See [[Module talk:Yesno/testcases]]. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 12:56, 23 March 2013 (UTC)&lt;br /&gt;
: also fails when 1=0.0&lt;br /&gt;
: Suggestion: change &amp;lt;code&amp;gt;val = args[1]&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;val = tostring(args[1])&amp;lt;/code&amp;gt;. To prevent treating &amp;quot;000&amp;quot; as number. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 14:09, 23 March 2013 (UTC)&lt;br /&gt;
Solved. Module is changed, although the numeric issue different from my (incorrect) suggestion. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 14:19, 23 March 2013 (UTC)&lt;br /&gt;
:Thanks for putting the test cases up. I learned something new about ParserFunctions. :) Still seems to be slower than the old template version though. — &#039;&#039;&#039;&#039;&#039;[[User:Mr. Stradivarius|&amp;lt;span style=&amp;quot;color: #194D00; font-family: Palatino, Times, serif&amp;quot;&amp;gt;Mr. Stradivarius&amp;lt;/span&amp;gt;]]&#039;&#039;&#039;&#039;&#039; &amp;lt;sup&amp;gt;[[User talk:Mr. Stradivarius|♪ talk ♪]]&amp;lt;/sup&amp;gt; 14:38, 23 March 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Null? ==&lt;br /&gt;
&lt;br /&gt;
The code now says {{code|1=&amp;lt;nowiki&amp;gt;no    = &amp;quot;&amp;lt;!-- null --&amp;gt;&amp;quot;&amp;lt;/nowiki&amp;gt;}}. But a &amp;quot;&amp;quot; (nullstring) is not the same as ASCII NULL (0x0000). Also I see no use for adding wiki comment to code this way. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 17:47, 23 March 2013 (UTC)&lt;br /&gt;
:Yes, I agree that it doesn&#039;t really make sense. It&#039;s just in there to be 100% backwards-compatible with the current template. Those html comments should really have been removed from {{tl|yesno}} when it was made subst-able, which would have prevented us from having to second-guess whether they actually affect the output of any substitutions in any meaningful way. I suppose it&#039;s possible to download a database dump and to run a search on it to find out, but that&#039;s probably a bit much for my poor ailing laptop. Or we could just remove the comments and hope nothing breaks - I&#039;m fairly sure that no-one would have written any template code that purposefully used them. There&#039;s no way to be sure that there is no code that was inadvertently written to be dependent on the error, though, and that worries me. — &#039;&#039;&#039;&#039;&#039;[[User:Mr. Stradivarius|&amp;lt;span style=&amp;quot;color: #194D00; font-family: Palatino, Times, serif&amp;quot;&amp;gt;Mr. Stradivarius&amp;lt;/span&amp;gt;]]&#039;&#039;&#039;&#039;&#039; &amp;lt;sup&amp;gt;[[User talk:Mr. Stradivarius|♪ talk ♪]]&amp;lt;/sup&amp;gt; 18:24, 23 March 2013 (UTC)&lt;br /&gt;
::Drop it. Come what may. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 00:17, 24 March 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Rewrite ==&lt;br /&gt;
&lt;br /&gt;
I&#039;ve rewritten this as a pure Lua function. The new version is a lot simpler, and is also designed to work with Lua data types such as booleans, tables, and functions. Dragons flight&#039;s criticism above is well-founded, and giving up on the idea of replacing {{tl|yesno}} seemed like the best answer. The new version should hopefully retain the basics of {{tl|yesno}} while playing well with Lua, and allow meta-modules that deal with boolean-style wikitext input to be consistent with each other. (In other words, users won&#039;t have to remember whether it was &amp;quot;category=yes&amp;quot; or &amp;quot;category=true&amp;quot; - it should Just Work&amp;lt;sup&amp;gt;TM&amp;lt;/sup&amp;gt;.) — &#039;&#039;&#039;&#039;&#039;[[User:Mr. Stradivarius|&amp;lt;span style=&amp;quot;color: #194D00; font-family: Palatino, Times, serif&amp;quot;&amp;gt;Mr. Stradivarius&amp;lt;/span&amp;gt;]]&#039;&#039;&#039;&#039;&#039; &amp;lt;sup&amp;gt;[[User talk:Mr. Stradivarius|♪ talk ♪]]&amp;lt;/sup&amp;gt; 14:37, 20 September 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
== All testcases failed ==&lt;br /&gt;
&lt;br /&gt;
is there some issue with the module, all tests on the [[Module talk:Yesno/testcases]] has failed. --[[User:Jarekt|Jarekt]] ([[User talk:Jarekt|talk]]) 16:37, 20 December 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Protected edit request on 24 February 2014 ==&lt;br /&gt;
&lt;br /&gt;
{{edit protected|&amp;lt;!-- Page to be edited --&amp;gt;|answered=no}}&lt;br /&gt;
&amp;lt;!-- Begin request --&amp;gt;the information is deceptive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- End request --&amp;gt;please delete&lt;br /&gt;
[[Special:Contributions/2600:1013:B018:986F:4493:7A2A:52E2:103A|2600:1013:B018:986F:4493:7A2A:52E2:103A]] ([[User talk:2600:1013:B018:986F:4493:7A2A:52E2:103A|talk]]) 04:21, 24 February 2014 (UTC)&lt;/div&gt;</summary>
		<author><name>2600:1013:B018:986F:4493:7A2A:52E2:103A</name></author>
	</entry>
</feed>