I want to learn to use Polygott, but where do I start?
I feel like the title explains the whole question.
@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:
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:
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:
And then you put your "startup script" in
@fuzzyastrocat people have been misusing polygott repls for years. You're supposed to write your code in the entrypoint of any lang on the polygott github repo, then you have the
run-project command run your code. If you open up a new polygott repl, you'll see that it says:
You're supposed to choose a lang from the polygott repo, go to the
.toml file and find the entrypoint file, write your code inside a new file that has that name, and use
run-project to run it. Polygott is NOT a makefile repl.
@Terra361 I hate it when people think Polygott is some sort of magical language that runs repl.it. Anyways the things you do in Makefiles are just bash commands, but there there is more than that. Try looking up a Makefile tutorial (and to run different targets you'll have to configure the .replit file).
@Terra361 I know no one is probably listening, but I'd just like to say again: Polygott isn't a makefile! It's a docker image, like a tiny virtual computer, which can run lots of languages (lots of languages are installed on it). Repl preloads the computer with a makefile, but you can delete it and Polygott will still run fine.