This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Your random program: | |
block { | |
value «int» | |
do code_null_q | |
value «int» | |
block { | |
value «bool» | |
do float_sqrt} | |
ref x1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( CODE.QUOTE ( INTEGER.POP 1 ) | |
CODE.QUOTE ( CODE.DUP INTEGER.DUP 1 INTEGER.- CODE.DO INTEGER.* ) | |
INTEGER.DUP 2 INTEGER.< CODE.IF ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( 1 2 INT.+ ( 3 4 INT.* ) ( 5 INT.+ ) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( 1 2 INT.+ ( 3 4 INT.* ) ( 5 INT.+ ) ) | |
( ( 1 ) ( 2 ) INT.+ ( 3 ( ) ( 4 ( ) ) INT.* ) ( 5 ( INT.+ ) ) ) | |
( 1 2 INT.+ 3 4 INT.* 5 INT.+ ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( 1 2 INT.+ 3 4 INT.* 5 INT.+ INT.- ) | |
( 1 2 3 4 5 INT.+ INT.* INT.+ ) | |
( 5 3 4 1 2 INT.+ INT.* INT.+ INT.- ) | |
( INT.+ INT.* INT.+ INT.- 5 3 4 1 2 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
block { | |
value «int» | |
value «int» | |
do int_add | |
block { | |
value «int» | |
value «int» | |
do int_multiply} | |
block { | |
value «int» |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
block { | |
value «code» | |
value «int» | |
value «foo»} | |
«code» value «int» | |
«int» -1 | |
«int» 1000 | |
«bar» whatever I want | |
it to be, actually |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
value «code» | |
«code» block { value «code» value «int» value «foo»} | |
«code» value «int» | |
«int» -1 | |
«int» 1000 | |
«bar» whatever I want | |
it to be, actually |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# random sampling (yer basic guesser) | |
class GuesserWorkstation << Workstation | |
# 'def receive!' is missing, so execution | |
# falls back to super | |
def build! | |
consecutive :answers do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# class name MUST match /[AnythingCamelCased]Instruction/ | |
class MyNewNudgeInstruction < Instruction | |
# preconditions? should return true if everything works | |
# | |
# use the #needs method for simple argument requirements checking: | |
# test will pass if there are at least that many items on the named stack(s) | |
def preconditions? | |
needs :foo, 2 |