Posted 04 July 2017 - 03:13 PM
What is it?
Shortcake is a program that uses a system of single character commands to control mining turtles. The shorthand code is run through an interpreter that turns it into normal turtle code, allowing you to quickly write mining programs.
For example, you can write a fully adjustable branch mining program in just 22 characters:
It looks complicated, is it worth my time?
I'm a bit biased but I would say yes, but I can explain most of it in a paragraph or two, so stick around and judge for yourself.
Here's a ~10min tutorial that covers the basics
https://www.youtube....h?v=TQzlr76Bvvg
Usage
Create a new shortcake program like this
You'll see it already has some code in it. This is for running it through the interpreter, your code goes in the comment on the first line.
The Basics
Commands
x = break and move forward
^ = break and move up
v = break and move down
< = turn left
> = turn right
f = break Forward
u = break Up
d = break Down
c = place Center
a = place Above
b = place Below
s = Suck up items
r = Refuel from current slot
y = cYcle current slot
p = droP from current slot
Repeat
You can repeat commands by following them with a number
You can repeat groups of commands by grouping them with parenthesis and following the group with a number
You can combine and nest these as deep as you want
Parameter References
You can reference program parameters by using upper case letters where A is the first and Z is the 26th. So if I called my program like this:
Expressions
Expressions are just bits of code delimited by square brackets [] that get evaluated during interpretation. So if we had this program called:
Flags
Flags are commands that toggle the way other commands are interpreted
The ' flag changes the x command to dig up as well as forward. Similarly the , command changes x to dig down as well as forward.
And that's it!
Now this branch mine should be understandable
—————————-
Sources:
Pastebin
installer: AyRdWn84
shortcake: xerNNRAH (main program)
config: DSreWan8
t: FFwyiJrH (just a basic api)
Github
https://github.com/j...ake/tree/master
—————————–
Learn More
You can find more details about this program on my site:
http://www.metamilo.com/Shortcake
This is version is basically complete, but If you want to help, I need people to test for bugs and usability. Also, I have a newer version in the works and I am taking suggestions.
Shortcake is a program that uses a system of single character commands to control mining turtles. The shorthand code is run through an interpreter that turns it into normal turtle code, allowing you to quickly write mining programs.
For example, you can write a fully adjustable branch mining program in just 22 characters:
',(x[C+1]<(xB<<xB)2>)A
It looks complicated, is it worth my time?
I'm a bit biased but I would say yes, but I can explain most of it in a paragraph or two, so stick around and judge for yourself.
Here's a ~10min tutorial that covers the basics
https://www.youtube....h?v=TQzlr76Bvvg
Usage
Create a new shortcake program like this
shortcake new <program_name>
Then edit it like you would a normal program
edit <program_name>
You'll see it already has some code in it. This is for running it through the interpreter, your code goes in the comment on the first line.
The Basics
Commands
x = break and move forward
^ = break and move up
v = break and move down
< = turn left
> = turn right
f = break Forward
u = break Up
d = break Down
c = place Center
a = place Above
b = place Below
s = Suck up items
r = Refuel from current slot
y = cYcle current slot
p = droP from current slot
Repeat
You can repeat commands by following them with a number
x3
becomes
xxx
You can repeat groups of commands by grouping them with parenthesis and following the group with a number
(x^)3
becomesx^x^x^
You can combine and nest these as deep as you want
((x4^)3>)2
becomesxxxx^xxxx^xxxx^>xxxx^xxxx^xxxx^>
Parameter References
You can reference program parameters by using upper case letters where A is the first and Z is the 26th. So if I called my program like this:
myProgram 3 5 2
All the A's would be replaced with 3's, B's with 5's, and C's with 2'sExpressions
Expressions are just bits of code delimited by square brackets [] that get evaluated during interpretation. So if we had this program called:
myProgram 3 5 2
Then [B-1] would be 4Flags
Flags are commands that toggle the way other commands are interpreted
The ' flag changes the x command to dig up as well as forward. Similarly the , command changes x to dig down as well as forward.
',x3
becomesxudxudxud
And that's it!
Now this branch mine should be understandable
',(x[C+1]<(xB<<xB)2>)A
—————————-
Sources:
Pastebin
installer: AyRdWn84
shortcake: xerNNRAH (main program)
config: DSreWan8
t: FFwyiJrH (just a basic api)
Github
https://github.com/j...ake/tree/master
—————————–
Learn More
You can find more details about this program on my site:
http://www.metamilo.com/Shortcake
This is version is basically complete, but If you want to help, I need people to test for bugs and usability. Also, I have a newer version in the works and I am taking suggestions.
Edited on 05 July 2017 - 02:25 AM