<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://gammapedia.kuschelyagi.com/index.php?action=history&amp;feed=atom&amp;title=User%3AAbwayax%2FAbwayax_programming_language%2FOptimum.abwayax</id>
	<title>User:Abwayax/Abwayax programming language/Optimum.abwayax - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://gammapedia.kuschelyagi.com/index.php?action=history&amp;feed=atom&amp;title=User%3AAbwayax%2FAbwayax_programming_language%2FOptimum.abwayax"/>
	<link rel="alternate" type="text/html" href="https://gammapedia.kuschelyagi.com/index.php?title=User:Abwayax/Abwayax_programming_language/Optimum.abwayax&amp;action=history"/>
	<updated>2026-06-19T19:25:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://gammapedia.kuschelyagi.com/index.php?title=User:Abwayax/Abwayax_programming_language/Optimum.abwayax&amp;diff=5786&amp;oldid=prev</id>
		<title>24.243.13.121 at 07:28, 28 October 2007</title>
		<link rel="alternate" type="text/html" href="https://gammapedia.kuschelyagi.com/index.php?title=User:Abwayax/Abwayax_programming_language/Optimum.abwayax&amp;diff=5786&amp;oldid=prev"/>
		<updated>2007-10-28T07:28:55Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/**&lt;br /&gt;
 * Optimum.abwayax&lt;br /&gt;
 * This is the optimal test case. This abwayax script should run flawlessly. &lt;br /&gt;
 * All work put into the abwayax interpreter now should be to get Optimum.abwayax to run flawlessly.&lt;br /&gt;
 * Author: Abwayax&lt;br /&gt;
 * October 28, 2007&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #use com.abwayax.abwayax.WindowFunctions&lt;br /&gt;
 #use com.abwayax.abwayax.Math&lt;br /&gt;
 #define Twenty-Seven:27&lt;br /&gt;
/* Primer on sigil meanings:&lt;br /&gt;
	$ denotes a scalar variable&lt;br /&gt;
	@ denotes an array&lt;br /&gt;
	% denotes a hash&lt;br /&gt;
	* denotes an object&lt;br /&gt;
	&amp;amp; denotes a function&lt;br /&gt;
&lt;br /&gt;
	Everything in abwayax is a first-class value, with the exception of namespaces (note to self: might want to reconsider that decision... but would it do any good?)&lt;br /&gt;
*/&lt;br /&gt;
namespace Shoop {&lt;br /&gt;
	private *singleton;&lt;br /&gt;
&lt;br /&gt;
	&amp;amp;Whoop = { // constructor for a Shoop::Whoop object.&lt;br /&gt;
		   // Although many might find this awkward, I quite like the separation of instance and namespace members.&lt;br /&gt;
		   // Everything that has to do with Shoop::Whoop objects can thenceforth be found in the Shoop::Whoop constructor&lt;br /&gt;
		   // instead of scattered all over the Shoop namespace. It almost simulates true class design.&lt;br /&gt;
&lt;br /&gt;
		*obj = Object(); // this statement creates the plain object&lt;br /&gt;
		private *obj-&amp;gt;lazor = 0; // this adds an private instance field&lt;br /&gt;
		final *obj-&amp;gt;charge = { // methods are added the same way as the fields. This must be marked final to prevent it &lt;br /&gt;
				       // from being redefined later on. Marking the object itself as final only prevents foreign&lt;br /&gt;
				       // code from adding new members, you have to mark each member as final to prevent it from&lt;br /&gt;
				       // being redefined&lt;br /&gt;
			*this-&amp;gt;lazor++; // *this refers to the object the method lives in&lt;br /&gt;
		};&lt;br /&gt;
		final *obj-&amp;gt;fire = {&lt;br /&gt;
			print(&amp;quot;&amp;lt;&amp;quot;);&lt;br /&gt;
			for($i = 0; $i &amp;lt; *this-&amp;gt;lazor; $i++) print(&amp;quot;-&amp;quot;);&lt;br /&gt;
			print(&amp;quot;[SHOOP DA WHOOP]&amp;quot;);&lt;br /&gt;
			for($i = 0; $i &amp;lt; *this-&amp;gt;lazor; $i++) print(&amp;quot;-&amp;quot;);&lt;br /&gt;
			println(&amp;quot;&amp;gt;&amp;quot;);&lt;br /&gt;
			*this-&amp;gt;lazor = 0;&lt;br /&gt;
		};&lt;br /&gt;
		final *obj; // mark the object as final so no more members can be added&lt;br /&gt;
		return *obj;&lt;br /&gt;
&lt;br /&gt;
		// Note: Final is used quite liberally within &amp;amp;Shoop(). There is a reason - objects in abwayax are, upon creation,&lt;br /&gt;
		// mutable - members may be defined and redefined on a whim no matter what namespace or function is doing it.&lt;br /&gt;
		// Final objects cannot be modified in this manner, so if you want to make sure the object&amp;#039;s implementation&lt;br /&gt;
		// cannot be changed then make it final.&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	&amp;amp;Single = { // returns a singleton lazer object&lt;br /&gt;
		if(*singleton == null) *singleton = Whoop();&lt;br /&gt;
		return *singleton;&lt;br /&gt;
	};&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
*lazor = Shoop::Whoop(); // :: is the scope operator. When :: is used, abwayax first checks user-defined namespaces, then&lt;br /&gt;
		  	 // then, imported external namespaces (those included with #use or use()), then any external&lt;br /&gt;
		  	 // namespaces in the com.abwayax.abwayax package, then finally it sees if the namespace name&lt;br /&gt;
		  	 // is a fully qualified class name&lt;br /&gt;
*lazor-&amp;gt;charge(); 	 // -&amp;gt; is the member access operator&lt;br /&gt;
&lt;br /&gt;
*lazor-&amp;gt;charge();&lt;br /&gt;
*lazor-&amp;gt;charge();&lt;br /&gt;
&lt;br /&gt;
*lazor-&amp;gt;fire(); // will print out shoop whoop&lt;br /&gt;
&lt;br /&gt;
namespace MoreStuff {&lt;br /&gt;
	private %digits = [&lt;br /&gt;
		&amp;quot;0&amp;quot; =&amp;gt; &amp;quot;zero&amp;quot;,&lt;br /&gt;
		&amp;quot;1&amp;quot; =&amp;gt; &amp;quot;one&amp;quot;,&lt;br /&gt;
		&amp;quot;2&amp;quot; =&amp;gt; &amp;quot;two&amp;quot;,&lt;br /&gt;
		&amp;quot;3&amp;quot; =&amp;gt; &amp;quot;three&amp;quot;,&lt;br /&gt;
		&amp;quot;4&amp;quot; =&amp;gt; &amp;quot;four&amp;quot;,&lt;br /&gt;
		&amp;quot;5&amp;quot; =&amp;gt; &amp;quot;five&amp;quot;,&lt;br /&gt;
		&amp;quot;6&amp;quot; =&amp;gt; &amp;quot;six&amp;quot;,&lt;br /&gt;
		&amp;quot;7&amp;quot; =&amp;gt; &amp;quot;seven&amp;quot;,&lt;br /&gt;
		&amp;quot;8&amp;quot; =&amp;gt; &amp;quot;eight&amp;quot;,&lt;br /&gt;
		&amp;quot;9&amp;quot; =&amp;gt; &amp;quot;nine&amp;quot;&lt;br /&gt;
	]; // hashes are created using [ ]&lt;br /&gt;
&lt;br /&gt;
	&amp;amp;DigitTranslator($arg) = { // abwayax supports a formal parameter list. If &amp;amp;DigitTranslator is called&lt;br /&gt;
				   // with exactly one argument, the call goes to this function. DigitTranslator(&amp;quot;1&amp;quot;) will work&lt;br /&gt;
				   // while DigitTranslator(&amp;quot;1&amp;quot;,&amp;quot;2&amp;quot;,&amp;quot;fred&amp;quot;) will either &lt;br /&gt;
				   // look for a &amp;amp;DigitTranslator($arg,$arg2,$arg3) or &amp;amp;DigitTranslator with no arg list&lt;br /&gt;
				   // &amp;amp;DigitTranslator() creates a function that will only accept an empty arg list.&lt;br /&gt;
		@digs = String::explode(&amp;quot;&amp;quot;,$arg); // dynamically loads the com.abwayax.abwayax.String external namespace&lt;br /&gt;
		foreach($digit In @digs) // or foreach(@digs As $digit)&lt;br /&gt;
			print(%digits[$digit] + &amp;quot; &amp;quot;); // both arrays and hashes are accessed with []&lt;br /&gt;
	};&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
MoreStuff::DigitTranslator(&amp;quot;53841259&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
@vals = [Twenty-Seven,Twenty-Seven + 1,Twenty-Seven + 2,Twenty-Seven + 3]; // macro Twenty-Seven is expanded to read 27&lt;br /&gt;
									   // so this array contains 27,28,29,30&lt;br /&gt;
&lt;br /&gt;
MsgBox(@vals[0]); // calls the com.abwayax.abwayax.WindowFunctions function MsgBox: Twenty-Seven!&lt;/div&gt;</summary>
		<author><name>24.243.13.121</name></author>
	</entry>
</feed>