Bash, 83 bytes
For the whole version string:
while read -n1;do echo -n `bash --version|head -1`;done< <(bash --version|head -1)
Returns (on my machine):
GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)
30
Tasks that depend on a language's name are a form of disadvantaging some languages by arbitrary criteria.
– Martin Ender – 2017-12-17T15:08:19.270Oops, sorry, I wasn't aware of that. I will keep this in mind in the future. – NK1406 – 2017-12-17T15:11:48.020
2As this is essentially outputting a fixed string, albeit different per language, I have tagged this with kolmogorov-complexity. – caird coinheringaahing – 2017-12-17T15:13:47.467
16I think this challenge would have been a lot more interesting if the repetition count was supposed to be our bytecount... – NieDzejkob – 2017-12-17T16:53:53.773
1This may be not a great challenge, but IMHO a question that has got 50+ answers deserves more upvotes... – Charlie – 2017-12-17T20:45:24.547
14And because it hasn't been said yet: Welcome to PPCG! I hope you stick around despite your probably confusing first impression of people telling you that this is not a good challenge while one answer after the other arrives. – Laikoni – 2017-12-17T21:06:05.607
I think you should get bonus score for having the same code run in multiple languages. – corsiKa – 2017-12-17T23:04:15.580
@corsiKa that would be interesting but we usually frown upon bonus scores in [tag:code-golf] challenges. – MD XF – 2017-12-17T23:52:06.087
Let’s say I am writing this in Java. What’s stopping me from coding
System.out.print(“JavaJavaJavaJava”);
? – DonielF – 2017-12-18T00:13:06.470@DonielF nothing is stopping you from doing that. :) – NK1406 – 2017-12-18T00:40:04.640
Then I think this was a fairly poorly thought-out challenge. :/ – DonielF – 2017-12-18T00:51:32.103
3@DonielF is that shortest though? – Quintec – 2017-12-18T20:09:54.837
2@DonielF Hardcoding the output of kolmogorov complexity challenges is always allowed. When that ends up being the shortest method it is not a super interesting challenge but for most of the non-single-byte-name languages it is not the shortest – dylnan – 2017-12-18T22:15:17.877
Would it help to adjust the score as the length divided by the length of the program name? That wouldn't change the score for all the 1-byte language names but would bring others closer to lower scores. – Engineer Toast – 2017-12-19T19:16:49.223
195 answers is a lot to change for scoring – NK1406 – 2017-12-20T21:56:39.833
3IMO this is unclear. Use the common name suggests that, for example, JS could be used for JavaScript. But what's to stop me saying that my language "Language" is more commonly known as "L"? – FlipTack – 2017-12-24T19:25:52.260
@FlipTack There's a difference between "common name" and "made up name". It's easy to verify if a language name is "common". For example, "J" is not a common name for "Java". Additionally, in order for a name to be common, surely it must be used in place of the language name at least in writing or colloquially. IMO, just because it isn't machine verifiable, doesn't make this criterion unclear. – Conor O'Brien – 2017-12-24T20:17:53.023
2@ConorO'Brien Its not machine verifiable but its also not really human verifiable. The challenge author doesn't really specify what they mean by common name. If "used in place of the language name at least in writing or colloquially" is the criterion then that ought to be said in the challenge. And even then I still would feel that there are going to be cases on the edge, is it swipl, SWI-Prolog or just Prolog? Is clisp acceptable instead of common-lisp what about just lisp? Internet searches seem to reveal that these terms are used but they tend not to be used as much as other longer terms. – Post Rock Garf Hunter – 2017-12-24T21:10:14.013
1This is touched on in WheatWizard's comment but how should we deal with language's with different implementations? Should we use the language name or the implementations name? What if our code uses implementation specific features that don't exist in the language? – 0 ' – 2017-12-26T16:01:52.133
I think that a good clarification (that could get this reopened) would be something along the lines of
The "common name" is defined as the name that is on the language's main webpage/repository.
And you should removecommon name or acronym
, because thenJavaScript
=JS
. – MD XF – 2017-12-26T22:21:06.5631How is this unclear? I don't like the idea of this challenge, but I don't see why it should be put on hold as unclear. – 0WJYxW9FMN – 2017-12-26T22:24:39.380
@J843136028 Due to the fact that there's no way to define what the "common name" of a language is. – MD XF – 2018-02-05T03:28:48.000
@MDXF Isn't it obvious what the name of a language is? – 0WJYxW9FMN – 2018-02-05T18:35:17.867
@J843136028 Issue is, it's hard to define objectively. – MD XF – 2018-02-05T18:37:58.107