You can use Nim language on Google Colaboratory by using Nim4Colab extension.
Copy and paste following code to a cell on Google Colaboratory and run. This code download, install and load Nim4Colab extension.
!pip install git+https://github.com/demotomohiro/nim4colab.git
%load_ext nim4colab
Then, you can run Nim code by writing your code under %%nimc.
%%nimc
echo NimVersion
Sample codes: