[ { "identifier": "plaintext", "name": "Plain text" }, { "identifier": "c", "name": "C", "helloworld": "#include \n\nint main(void) {\n puts(\"Hello, world!\");\n return 0;\n}", "implementations": [ { "label": "Clang", "identifier": "clang", "wrappers": [ { "identifier": "clang", "label": "Run", "code": "mv code code.c; clang %s code.c && ./a.out" } ] }, { "label": "gcc", "identifier": "gcc", "wrappers": [ { "identifier": "gcc", "label": "Run", "code": "mv code code.c; gcc %s code.c && ./a.out" } ] } ] }, { "identifier": "cpp", "name": "C++", "helloworld": "#include \n\nint main() {\n std::cout << \"Hello, world!\\n\";\n}", "implementations": [ { "label": "Clang", "identifier": "clang", "wrappers": [ { "identifier": "clangcpp", "label": "Run", "code": "mv code code.cpp; clang++ %s code.cpp && ./a.out" } ] }, { "label": "g++", "identifier": "gcc", "wrappers": [ { "identifier": "gpp", "label": "Run", "code": "mv code code.cpp; g++ %s code.cpp && ./a.out" } ] } ] }, { "identifier": "csharp", "name": "C#", "helloworld": "using System;\n\nclass Program {\n static void Main(string[] args) {\n Console.WriteLine(\"Hello, world!\");\n }\n}", "implementations": [ { "label": ".NET Core", "identifier": "netcore", "wrappers": [ { "identifier": "netcore", "label": "Run", "code": "echo 'Exenetcoreapp5.0' > project.csproj; mv code code.cs; dotnet run %s" } ] } ] }, { "identifier": "go", "name": "Go", "helloworld": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Println(\"Hello, world!\")\n}", "implementations": [ { "label": "gc", "identifier": "gc", "wrappers": [ { "identifier": "gc", "label": "Run", "code": "mv code code.go; go run code.go" }, { "identifier": "goimports", "label": "Format", "code": "goimports -w code; cat code", "is_formatter": true } ] } ] }, { "identifier": "haskell", "name": "Haskell", "helloworld": "main = putStrLn \"Hello, world!\"", "implementations": [ { "label": "GHC", "identifier": "ghc", "wrappers": [ { "identifier": "ghc", "label": "Run", "code": "mv code code.hs; ghc %s code.hs && ./code" } ] } ] }, { "identifier": "html", "name": "HTML", "implementations": [ { "label": "Prettier", "identifier": "prettier", "wrappers": [ { "identifier": "html-prettier", "label": "Format (prettier)", "code": "mv code{,.html}; prettier code.html || cat code.html", "is_formatter": true } ] } ] }, { "identifier": "java", "name": "Java", "helloworld": "class HelloWorld {\n public static void main(String[] args) {\n System.out.println(\"Hello, world!\");\n }\n}", "implementations": [ { "label": "OpenJDK 8", "identifier": "openjdk8", "wrappers": [ { "identifier": "openjdk8", "label": "Run", "code": "mv code code.java; $JAVA8/bin/javac %s code.java; $JAVA8/bin/java \"$(perl -e 'my @classes = grep { !/\\$/ } glob q[*.class]; if (@classes == 1) { my $class = $classes[0]; $class =~ s/\\.class\\z//; print $class } else { print q[Main] }')\"" } ] }, { "label": "OpenJDK 11", "identifier": "openjdk11", "wrappers": [ { "identifier": "openjdk11", "label": "Run", "code": "mv code code.java; $JAVA11/bin/javac %s code.java; $JAVA11/bin/java \"$(perl -e 'my @classes = grep { !/\\$/ } glob q[*.class]; if (@classes == 1) { my $class = $classes[0]; $class =~ s/\\.class\\z//; print $class } else { print q[Main] }')\"" } ] } ] }, { "identifier": "javascript", "name": "JavaScript", "helloworld": "console.log(\"Hello, world!\");", "implementations": [ { "label": "Node.js", "identifier": "nodejs", "wrappers": [ { "identifier": "nodejs", "label": "Run", "code": "node %s code" }, { "identifier": "nodejs-prettier", "label": "Format (prettier)", "code": "mv code{,.js}; prettier code.js || cat code.js", "is_formatter": true } ] } ] }, { "identifier": "jinja2", "name": "Jinja2" }, { "identifier": "jsx", "name": "JSX", "implementations": [ { "label": "Node.js", "identifier": "nodejs", "wrappers": [ { "identifier": "jsx-prettier", "label": "Format (prettier)", "code": "mv code{,.jsx}; prettier code.jsx || cat code.jsx", "is_formatter": true } ] } ] }, { "identifier": "markdown", "name": "Markdown", "implementations": [ { "label": "Prettier", "identifier": "prettier", "wrappers": [ { "identifier": "markdown-prettier", "label": "Format (prettier)", "code": "mv code{,.md}; prettier code.md || cat code.md", "is_formatter": true } ] } ] }, { "identifier": "nix", "name": "Nix" }, { "identifier": "perl", "name": "Perl", "helloworld": "use v5.12;\nuse warnings;\n\nsay \"Hello, world!\";", "implementations": [ { "label": "Perl", "identifier": "perl", "wrappers": [ { "identifier": "perl", "label": "Run", "code": "perl %s code" } ] } ] }, { "identifier": "php", "name": "PHP", "helloworld": "