Compile Latex with PSTricks code
First, you can not use pdflatex to compile PSTricks stuff
    # /Users/aaa/myfile/bitbucket/script/
    latex "file.tex"
    dvips -Ppdf -G0 "file.dvi"
    ps2pdf ""
PSTricks and LuaTex
If you try to compile Latex file contains PSTricks code, then you will not see any images on your PDF file.
There is Trick to get around that but it is a hacking solution. I might ask myself what is motivation to learn PSTricks?
There is TikZ but the syntax of TikZ is little weird.