Skip to content

Instantly share code, notes, and snippets.

@jpaugh
Last active October 1, 2015 04:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpaugh/1917182 to your computer and use it in GitHub Desktop.
Save jpaugh/1917182 to your computer and use it in GitHub Desktop.
The night after...
/**
* This is what happens when I try eating breakfast after having spent
* the previous night hacking away on some graphical programming.
* ActionScript 3 was the language of choice---or, urm, Haxe---but the
* code is here prescribed in Java. (ActionScript 3---or actually
* Haxe---supports all of the language constructs I use here; I just
* don't remember the syntax exactly; and, after several years using
* OOP, my brain can OOPs! without any particular language.)
*/
public class Breakfast {
public static void main(args...) {
Egg eggs[3];
int i;
for (i = 0; i < 3; i++) {
eggs[i] = cast BlestFood new Egg();
}
Bacon bacon_strips[10];
for (i = 0; i < 10; i++) {
bacon_strips[i] = cast BlestFood new Egg();
}
i = 0;
foreach(egg : eggs) {
egg.combine(bacon_strips[i++].location());
egg.eat();
}
for(;i < bacon_strips.length(); ++i) {
bacon_strips(i).eat();
}
}
}
interface BlestInterface {
/**
* Very important interface which indicates that I have prayed over my
* food already. Contains one method, the eat() method. Jesus and I
* enjoy that method.
*/
public void eat();
}
@jpaugh
Copy link
Author

jpaugh commented Feb 26, 2012

After reflection, I realize this won't compile. Well, my brain never was very good at Java... Say, have you tried Python?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment