Talk:Stax

From Esolang
Jump to navigation Jump to search

Programs I've made with it

99 bottles of beer
assign bottles to Number
assign lyrics to String
push 99 to bottles
push Take one down, pass it around to lyrics
push Bottles of beer! to lyrics
push Bottles of beer on the wall. to lyrics
until bottles is 1 do
	print bottles lyrics
	bury lyrics
	print bottles lyrics
	bury lyrics
	print lyrics
	bury lyrics
	sub 1 from bottles
	if bottles is 1 do
		push Bottle of beer on the wall! to lyrics
	end
	print bottles lyrics
end
Multiplying Two Numbers
assign mults storage answer to Number
assign multText equText to String
push times to multText
push equals to equText
push 0 to mults mults answer
input mults
bury mults
input mults
push mults to storage
bury mults
push mults to storage
bury storage
if mults is above storage do
	bury mults
end
until mults is 0 do
	bury mults
	add mults to answer
	bury mults
	sub 1 from mults
end
push storage to mults
bury storage
print mults multText storage equText answer
Squaring a Number
assign orig num sqr to Number
assign text1 text2 to String
push Type a number you want to square. to text1
push Square a Number! to text1
print text1
bury text1
print text1
push 0 to sqr num orig
input num
add num to sqr orig
until num is 0 do
	push sqr to sqr
	bury sqr
	sub 1 from num
end
pop sqr
until sqr is 0 do
	add sqr to num
	sub sqr from sqr
	bury sqr
end
push squared to text1
push is to text2
print orig text1 text2 num
Updated Multiplying Two Numbers
pass In this update I fix my mental disability and actually write it without being an idiot.
assign num1 num2 answer to Number
push 0 to num1 num2 answer
input num1 num2
until num1 is 0 do
	add num2 to answer
	sub 1 from num1
end
print answer

Consider replacing words with symbols

Not only this would make your language more "esoteric" which is secondary, but it also significantly speeds up programming (that's why some people prefer to use CJam in daily life). TwilightSparkle (talk) 04:31, 21 August 2020 (UTC)

Yeah sorry I was so tired when I put this up, and I didn't do a good job of explaining it. It is esoteric in nature because I designed it to be fun to be used. I also designed it to be educational and simple to learn and experiment. It is 100% english based and has no special characters what so ever. Cameron (talk) 00:06, 22 August 2020 (UTC)Cameron