# names taken from https://github.com/veetaw/rextester/blob/master/src/util/Rextester.py
LANGUAGES = {
    'c#': 1,
    'vb': 2,
    'f#': 3,
    'java': 4,
    'python': 5,
    'c_gcc': 6,
    'cpp_gcc': 7,
    'php': 8,
    'pascal': 9,
    'obj-c': 10,
    'haskell': 11,
    'ruby': 12,
    'perl': 13,
    'lua': 14,
    'assembly': 15,
    'sql': 16,
    'js': 17,
    'lisp': 18,
    'prolog': 19,
    'go': 20,
    'scala': 21,
    'scheme': 22,
    'node': 23,
    'python3': 24,
    'octave': 25,
    'c_clang': 26,
    'cpp_clang': 27,
    'cpp_microsoft': 28,
    'c_microsoft': 29,
    'd': 30,
    'r': 31,
    'tcl': 32,
    'mysql': 33,
    'postgre': 34,
    'oracle': 35,
    'swift': 37,
    'bash': 38,
    'ada': 39,
    'erlang': 40,
    'elixir': 41,
    'ocaml': 42,
    'kotlin': 43,
    'brainfuck': 44,
    'fortran': 45,
    'rust': 46,
    'clojure': 47
}

COMPILER_ARGS = {
    "cpp_gcc": "-Wall -std=c++14 -O2 -o a.out source_file.cpp",
    "cpp_clang": "-Wall -std=c++14 -stdlib=libc++ -O2 -o a.out source_file.cpp",
    "cpp_microsoft": "source_file.cpp -o a.exe /EHsc /MD /I C:\\boost_1_60_0 /link /LIBPATH:C:\\boost_1_60_0\\stage\\lib",
    "c_gcc": "-Wall -std=gnu99 -O2 -o a.out source_file.c",
    "c_clang": "-Wall -std=gnu99 -O2 -o a.out source_file.c",
    "c_microsoft": "source_file.c -o a.exe",
    "d": "source_file.d -ofa.out",
    "go": "-o a.out source_file.go",
    "haskell": "-o a.out source_file.hs",
    "obj-c": "-MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -pthread -fPIC -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g -O2 -fgnu-runtime -fconstant-string-class=NSConstantString -I. -I /usr/include/GNUstep -I/usr/include/GNUstep -o a.out source_file.m -lobjc -lgnustep-base"
}

# names taken from https://github.com/veetaw/rextester/blob/master/src/util/Rextester.py
LANGUAGES = {
    'c#': 1,
    'vb': 2,
    'f#': 3,
    'java': 4,
    'python': 5,
    'c_gcc': 6,
    'cpp_gcc': 7,
    'php': 8,
    'pascal': 9,
    'obj-c': 10,
    'haskell': 11,
    'ruby': 12,
    'perl': 13,
    'lua': 14,
    'assembly': 15,
    'sql': 16,
    'js': 17,
    'lisp': 18,
    'prolog': 19,
    'go': 20,
    'scala': 21,
    'scheme': 22,
    'node': 23,
    'python3': 24,
    'octave': 25,
    'c_clang': 26,
    'cpp_clang': 27,
    'cpp_microsoft': 28,
    'c_microsoft': 29,
    'd': 30,
    'r': 31,
    'tcl': 32,
    'mysql': 33,
    'postgre': 34,
    'oracle': 35,
    'swift': 37,
    'bash': 38,
    'ada': 39,
    'erlang': 40,
    'elixir': 41,
    'ocaml': 42,
    'kotlin': 43,
    'brainfuck': 44,
    'fortran': 45,
    'rust': 46,
    'clojure': 47
}

COMPILER_ARGS = {
    "cpp_gcc": "-Wall -std=c++14 -O2 -o a.out source_file.cpp",
    "cpp_clang": "-Wall -std=c++14 -stdlib=libc++ -O2 -o a.out source_file.cpp",
    "cpp_microsoft": "source_file.cpp -o a.exe /EHsc /MD /I C:\\boost_1_60_0 /link /LIBPATH:C:\\boost_1_60_0\\stage\\lib",
    "c_gcc": "-Wall -std=gnu99 -O2 -o a.out source_file.c",
    "c_clang": "-Wall -std=gnu99 -O2 -o a.out source_file.c",
    "c_microsoft": "source_file.c -o a.exe",
    "d": "source_file.d -ofa.out",
    "go": "-o a.out source_file.go",
    "haskell": "-o a.out source_file.hs",
    "obj-c": "-MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -pthread -fPIC -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g -O2 -fgnu-runtime -fconstant-string-class=NSConstantString -I. -I /usr/include/GNUstep -I/usr/include/GNUstep -o a.out source_file.m -lobjc -lgnustep-base"
}

# names taken from https://github.com/veetaw/rextester/blob/master/src/util/Rextester.py #': 1, #': 3,