I want to learn to use Polygott, but where do I start?
Profile icon
Terra361

I feel like the title explains the whole question.

You are viewing a single comment. View All
Answered by Coder100 [earned 5 cycles]
View Answer
Profile icon
fuzzyastrocat

@Coder100 Polygott is not a makefile!

Polygott is a framework for running any language. It's basically like a little sandbox computer where you've got all the langs you could want (well maybe not all) installed.

There is a makefile loaded onto this computer by default, but it's by no means necessary and isn't integral to Polygott itself.

So basically, thinking about Polygott like a little computer where you can run any language makes things pretty easy. Try typing gcc your_file.c or python your_file.py into the console to get a feel for it.

The reason there is a makefile installed by default is because the makefile allows you to automate running programs like this. (It's not the only way to do so, but makefiles are commonly used for this kind of thing.) So, if your makefile is this:

.PHONY: run run: python my_python_file.py

When you click the run button on the repl it will run python my_python_file.py, which will then run the python file. You can have multiple lines/commands too:

.PHONY: run run: python my_python_file.py gcc my_c_file.c

That will run your python file and then run your C file.

Makefiles are basically bash scripts (not exactly the same, but close). So, you have a lot of freedom to connect files and have them interact. If you find yourself in a weird situation where the makefile isn't working, but you know how to do it in bash, you can also have the makefile just run a bash script:

.PHONY: run run: bash my_script.sh

And then you put your "startup script" in my_script.sh.