Download
sloc. If you have npm, this can be done vianpm i sloc. We will use the latest version as of the time of posting, which is0.2.1. Or, use the online testing environment linked at the bottom of this post.Select any language that
slocsupports. A full list is available here.Write a full program in that language that prints the exact string
Hello, World!to stdout. The output may optionally have a trailing newline, but no other format is accepted. The program may output anything to stderr. However, to be considered a valid submission,slocmust see the program as zero lines of source code. You can verify this by runningsloc myprogram.ext, which should readSource : 0.
There are a number of ideas that can work across multiple languages.
Online test environment
You need to:
- Type your code into the input box
- Type the extension corresponding to your language into the command args (important!)
Download
sloc. If you have npm, this can be done vianpm i sloc. We will use the latest version as of the time of posting, which is0.2.1.Select any language that
slocsupports. A full list is available here.Write a full program in that language that prints the exact string
Hello, World!to stdout. The output may optionally have a trailing newline, but no other format is accepted. The program may output anything to stderr. However, to be considered a valid submission,slocmust see the program as zero lines of source code. You can verify this by runningsloc myprogram.ext, which should readSource : 0.
There are a number of ideas that can work across multiple languages.
Download
sloc. If you have npm, this can be done vianpm i sloc. We will use the latest version as of the time of posting, which is0.2.1. Or, use the online testing environment linked at the bottom of this post.Select any language that
slocsupports. A full list is available here.Write a full program in that language that prints the exact string
Hello, World!to stdout. The output may optionally have a trailing newline, but no other format is accepted. The program may output anything to stderr. However, to be considered a valid submission,slocmust see the program as zero lines of source code. You can verify this by runningsloc myprogram.ext, which should readSource : 0.
There are a number of ideas that can work across multiple languages.
Online test environment
You need to:
- Type your code into the input box
- Type the extension corresponding to your language into the command args (important!)
Download
sloc. If you have npm, this can be done vianpm i sloc. We will use the latest version as of the time of posting, which is0.2.1.Select any language that
slocsupports. A full list is available here. Languages that do not satisfy PPCG's definition of a programming language are still allowed to compete.Write a full program in that language that prints the exact string
Hello, World!to stdout. The output may optionally have a trailing newline, but no other format is accepted. The program may output anything to stderr. However, to be considered a valid submission,slocmust see the program as zero lines of source code. You can verify this by runningsloc myprogram.ext, which should readSource : 0.
Download
sloc. If you have npm, this can be done vianpm i sloc. We will use the latest version as of the time of posting, which is0.2.1.Select any language that
slocsupports. A full list is available here. Languages that do not satisfy PPCG's definition of a programming language are still allowed to compete.Write a full program in that language that prints the exact string
Hello, World!to stdout. The output may optionally have a trailing newline, but no other format is accepted. The program may output anything to stderr. However, to be considered a valid submission,slocmust see the program as zero lines of source code. You can verify this by runningsloc myprogram.ext, which should readSource : 0.
Download
sloc. If you have npm, this can be done vianpm i sloc. We will use the latest version as of the time of posting, which is0.2.1.Select any language that
slocsupports. A full list is available here.Write a full program in that language that prints the exact string
Hello, World!to stdout. The output may optionally have a trailing newline, but no other format is accepted. The program may output anything to stderr. However, to be considered a valid submission,slocmust see the program as zero lines of source code. You can verify this by runningsloc myprogram.ext, which should readSource : 0.