I think. I haven't used forth. but commands don't take arguments and they don't need to be parsed, as commands don't interact, like [] do in BF
so it would be simple enough to str.split(), but for strings, if I include them I guess...
but I don't think I want strings anyway
so str.split() actually would contain all the functionality I need
Pretty much, this is simultaneously going to be one of the easiest but also most complex language interpreters I make, because the base is easy, but the language will have so many commands
#initial parts. This will be the least extended part,
#but I imagine stuff will be added for some language features
stack=[]
program=input().split()
pop=lambda:stack.pop() if stack else 0
for command in program: #the part that will be the most extended
if command=="five":
stack.append(5)
elif command=="divide":
stack.append(pop()//pop())
elif command=="add":
stack.append(pop()+pop())
print(' '.join(str(i) for i in stack))
Write a program or a function that outputs the integer number of answers this question has. Your solution should still work as more answers are added.
Languages that run in a browser may be run from the js console while on this page. Otherwise, you'd probably have to download this page. Multi-la...
ANOTHER ANNOUNCEMENT: I have revised everything (hopefully), please reopen the question.
Your task make a bot that plays Atomas, with the highest score.
How the game works:
The gameboard starts with a ring of 6 "atoms", with numbers ranging from 1 to 3. You can "play" an atom between two atoms...
it suggests having branches with different features, but how do you put both features together if the features are in the same file? I mean, how does it know what you've purposefully removed, and what just was added to the main branch?
So, McDonald's is giving this Coca-Cola glass out when you upsize. Seemed a bit fragile but didn't think much of it. Dropped it 10 cm onto the sink and the glass cut me as I tried to catch it
In one of our projects at work, we recently discovered a particularly large method for generating a 6 character string from a 15 character alphabet. A few of us claimed "I bet we can get that in one line" which started a little internal game of code golf.
Your task is to beat us, which I have no...
Show the Key Signature
Here is are the key signatures for the key of C♯ Major in the treble clef, and C♭ major in the bass clef:
♯
─────♯─────────────────────── ─────────────────────────────
♯
──────────────♯────────────── ─────────────────────────────
...
@wizzwizz4 Dunno, that is so unfair... don't think being a golfer is easier though, you need to monitor for new questions and answer as quickly as possible with a maybe over-3000 byte function while someone else has alerady answered with a 19-byte function in the same language before your eyes and then...
@wizzwizz4 Maybe get migration overloads and higher rep requirements? (You know, most users need rep because they are not mods) I think staying Public Beta is the best.
@wizzwizz4 No, I think that graduating without a theme is now allowed, so I'm really sure there is no theme, because otherwise rep requirements would have been too much higher!
@TheveryevilROFLcopter I have it, but I'm not using it at the moment.
@wizzwizz4 It's dangerous, not just rubbish, to be serious. while(1){}? It seems like a finite loop to me... (finite, as in "the world will be destroyed sometime")