Output the language name times the number of characters

17

2

Challenge:

Your task is to use any language to output that language's name times the number of character's in its name.

  • Use the common name or acronym of the language.
  • If there are multiple versions of a language, you need not include the version number.
  • The capitalization matters.

Examples:

PHP -> PHPPHPPHP
Java -> JavaJavaJavaJava
C++ -> C++C++C++
Python 3 -> PythonPythonPythonPythonPythonPython
JavaScript -> JavaScriptJavaScriptJavaScriptJavaScriptJavaScriptJavaScriptJavaScriptJavaScriptJavaScriptJavaScript

NK1406

Posted 2017-12-17T14:49:48.520

Reputation: 739

Question was closed 2017-12-26T15:42:21.720

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.270

Oops, 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 remove common name or acronym, because then JavaScript = JS. – MD XF – 2017-12-26T22:21:06.563

1How 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

Answers

21

V, 2 bytes

iV

Try it online!

Citing Arnauld, with Levenshtein distance of 1:

I now have 15 seconds of experience in V programming. So, this may actually be golfable.

user202729

Posted 2017-12-17T14:49:48.520

Reputation: 14 620

2 bytes. :P – totallyhuman – 2017-12-17T15:32:11.340

@totallyhuman It's indeed golfable. – user202729 – 2017-12-17T15:33:30.650

Well, right language for the job! :) – James – 2017-12-18T18:38:18.123

16

Haskell, 16 bytes

h>>h
h="Haskell"

Try it online!

Applied on two lists, (>>) concatenates the second list with itself as often as the first list has elements.


Point-free (19 bytes)

id=<<(>>)$"Haskell"

Try it online!

(id=<<) is the same as join, but without the need for import Control.Monad.

Laikoni

Posted 2017-12-17T14:49:48.520

Reputation: 23 676

I think you will need to count the putStr as well, or at least the s= that creates the nullary function. – Bergi – 2017-12-19T06:10:12.327

@Bergi It is not needed according to the current Meta consensus on this topic, though I'd also be happy to change my answer if you have a good argument in favour of requiring a leading s=.

– Laikoni – 2017-12-19T06:57:35.027

Ah, I already understood the "function" in program or function as a function declaration statement, not a function value expression.

– Bergi – 2017-12-19T07:04:07.780

16

J, 7 bytes

I now have 15 seconds of experience in J programming. So, this may actually be golfable(1).

echo'J'

Try it online!

(1) Edit: And of course it was. Thanks to @ConorO'Brien for saving 2 bytes! Using a verb:

5 bytes

'J'"_

Arnauld

Posted 2017-12-17T14:49:48.520

Reputation: 111 334

Your answer became the one with most citations... – user202729 – 2017-12-17T15:25:56.513

14@user202729 Is there a hat for that? – Arnauld – 2017-12-17T15:30:15.080

2You could also make this a verb (function) (5 bytes): 'J'"_. The rank conjunction ", when it has a left-arg as a noun, it makes that noun into a constant verb returning that noun. – Conor O'Brien – 2017-12-17T19:02:09.370

15

4, 11 bytes

3.600525004

Explanation:

3.            Required prefix for all 4 programs.
  6            Set
   00            The cell at index 0
     52          To 52 (ASCII value for '4').
       5       Print
        00      The cell at index 0.
          4   Required suffix for all 4 programs.

Try it online!

Okx

Posted 2017-12-17T14:49:48.520

Reputation: 15 025

2I was just going to write that... – user202729 – 2017-12-17T15:37:51.647

11

Operation Flashpoint scripting language, 64 bytes

f={s="%1%1%1%1";format[s+"%1",format[s,"Operation Flashpoint"]]}

Since there is no official name for the scripting language, I'm using Operation Flashpoint as the name of the language.

Call with:

hint call f

Output:

Steadybox

Posted 2017-12-17T14:49:48.520

Reputation: 15 798

10

R, 8 bytes

cat("R")

Try it online!

NieDzejkob

Posted 2017-12-17T14:49:48.520

Reputation: 4 630

I think this can be done in 7 bytes, just "R" but called with source(<program name>,ec=T) – Giuseppe – 2017-12-17T16:33:05.333

With the ec=T being like a compiler flag for +4 bytes – Giuseppe – 2017-12-17T16:33:33.840

@Giuseppe I think using RGui, RStudio, or anything else with a REPL, you can just do "R". I don't know if that counts. – KSmarts – 2017-12-17T19:14:09.133

@KSmarts outputs [1] "R" for me... – NieDzejkob – 2017-12-17T19:19:46.237

@KSmarts meta post

– Giuseppe – 2017-12-17T21:33:16.727

8

C, 12 bytes

f(x){x="C";}

Try it online! (GCC)

Saved 3 bytes with help from user202729. C has been chosen strategically, but this is pretty much GCC-specific.

Mr. Xcoder

Posted 2017-12-17T14:49:48.520

Reputation: 39 774

How can this function be used in a program? – anatolyg – 2017-12-17T21:35:42.347

@anatolyg See the tio link. – Mr. Xcoder – 2017-12-17T21:36:08.077

Can't say that's fair considering it requires other code to actually run. – Galen Nare – 2017-12-18T03:05:15.910

9@GalenNare Typically on this site, we allow function submissions. This is just a function. – Conor O'Brien – 2017-12-18T03:48:15.697

Lovely way to generate lots of warnings though :) – user1997744 – 2017-12-19T20:28:12.053

8

Verbosity, 458 454 bytes

Include<Integer>
Include<MetaFunctions>
Include<Output>
Include<String>
Integer:DefineVariable<o; 1>
Output:DefineVariable<P; 0>
String:DefineVariable<s; "VerbosityVerbosityVerbosityVerbosityVerbosityVerbosityVerbosityVerbosityVerbosity">
String:DefineVariable<q; String:RemoveCharactersFromStart<s; o>>
String:DefineVariable<r; String:TakeFirstCharacters<q; o>>
Output:DisplayAsText<P; r>
DefineMain<> [
MetaFunctions:ExecuteScript<MetaFunctions@FILE>
]

Try it online!

Saved 4 bytes thanks to NieDzejkob!

You know your language is verbose when it's shorter to create an 81 character long string that it is to multiply a 9 character long string by 9.

caird coinheringaahing

Posted 2017-12-17T14:49:48.520

Reputation: 13 702

454 bytes – NieDzejkob – 2017-12-17T15:43:06.637

@NieDzejkob Nice! That's quite clever! – caird coinheringaahing – 2017-12-17T15:57:45.410

7

M, 2 bytes

”M

Single-letter languages have a clear advantage.

Try it online!

Dennis

Posted 2017-12-17T14:49:48.520

Reputation: 196 637

7

Retina, 12 bytes


Retina
.
$_

Try it online!

Explanation


Retina

Initialise the string to Retina.

.
$_

Replace each character with the full string.

Martin Ender

Posted 2017-12-17T14:49:48.520

Reputation: 184 808

7

///, 17 bytes

/i/\\\//iiiiiiiii

Try it online!

(this prints /////////)


Naive solution is (only) 1 byte longer.

\/\/\/\/\/\/\/\/\/

Trying to remove the duplicated is actually increases byte count.

/#/iii//i/\\\//###

user202729

Posted 2017-12-17T14:49:48.520

Reputation: 14 620

7

Chef, 268 bytes

C.

Ingredients.
102 l f
101 l e
104 l h
67 l c
4 g i

Method.
Put f into the mixing bowl.
Put e into the mixing bowl.
Put h into the mixing bowl.
Put c into the mixing bowl.
V the i.
Pour contents of the mixing bowl into the baking dish.
V the i until ved.

Serves 1.

Try it online!

More idiomatic (565 bytes):

PPCG Holiday Punch.

Ingredients.
408 ml apple cider
404 ml ginger beer
416 ml champagne
67 ml unsweetened cranberry juice
4 pinches mixed spice

Method.
Put apple cider into the mixing bowl.
Divide mixed spice into the mixing bowl.
Put ginger beer into the mixing bowl.
Divide mixed spice into the mixing bowl.
Put champagne into the mixing bowl.
Divide mixed spice into the mixing bowl.
Put unsweetened cranberry juice into the mixing bowl.
Sift the mixed spice.
Pour contents of the mixing bowl into the baking dish.
Sift the mixed spice until sifted.

Serves 5.

Try it online!

KSmarts

Posted 2017-12-17T14:49:48.520

Reputation: 1 830

1Now that is a neat language. – Adrian Zhang – 2017-12-17T21:40:24.520

6

ArnoldC, 107 bytes

IT'S SHOWTIME
TALK TO THE HAND "ArnoldCArnoldCArnoldCArnoldCArnoldCArnoldCArnoldC"
YOU HAVE BEEN TERMINATED

Try it online!

KSmarts

Posted 2017-12-17T14:49:48.520

Reputation: 1 830

5

Python 3, 17 bytes

print("Python"*6)

Try it online!

Of course, Python 2 is 2 bytes shorter with

print"Python"*6

Try it online!

But I prefer Python 3

caird coinheringaahing

Posted 2017-12-17T14:49:48.520

Reputation: 13 702

1You know you could have used Python 2... – Mr. Xcoder – 2017-12-17T14:53:34.640

@Mr.Xcoder Edited in, but I prefer Python 3 – caird coinheringaahing – 2017-12-17T14:56:22.560

Everybody does, but Python 2 is almost always golfier. :P – totallyhuman – 2017-12-17T15:10:49.827

1@totallyhuman s/almost/almost\{when manipulating sets and lists}/ :P – Mr. Xcoder – 2017-12-17T15:12:38.010

@Mr.Xcoder You missed a terminating /? – user202729 – 2017-12-17T15:17:19.827

Wouldn't 'Python'*6 work too? – Galen Nare – 2017-12-18T02:36:39.257

@GalenNare No. The result has to be printed/returned, which that doesn't. – caird coinheringaahing – 2017-12-18T06:34:41.677

5

><>,  23 19 15 13  12 bytes

"><>" |o<.0l

Try it online!

Emigna saved 4 bytes. Not a tree saved another 3. Teal pelican managed to save 1 more byte. Thanks to all who have helped golfing! Citing Arnauld, with slight modifications: I now have 15 seconds of experience in ><> programming. So, this may actually be golfable.

Mr. Xcoder

Posted 2017-12-17T14:49:48.520

Reputation: 39 774

1"><>><>><>"oa0. – Emigna – 2017-12-17T15:18:06.677

213 bytes: "><>"|o<"><>" – Not a tree – 2017-12-17T18:59:45.590

3After having a play around using both Emigna and Notatree's changes and mixing both you can reduce this a further 1 byte: "><>" |o<.0l – Teal pelican – 2017-12-18T15:23:16.007

2@Tealpelican: That is ingenious! – Emigna – 2017-12-21T14:48:56.010

1@Tealpelican Thank you! – Mr. Xcoder – 2017-12-21T14:50:50.143

Could you provide an explanation? – FlipTack – 2017-12-24T19:31:56.233

@FlipTack Not sure I completely understand my code, but: "><>" enables string parsing and pushes ><> to the stack, | mirrors (the IP will change direction depending on what direction it already has), o outputs as a character (string, in this case), < changes the direction of the instruction to the left, . pops the last two elements off the stack and moves the IP to the point which has the two as coordinates, 0 just pushes a 0 and l pushes the length of the stack onto the stack. If you dunno what I mean by "IP" and "direction", please see this.

– Mr. Xcoder – 2017-12-24T19:39:01.330

@Mr.Xcoder I understand 2D languages, I just wasn't aware of the specific command . – FlipTack – 2017-12-24T20:06:06.460

5

7, 3 bytes

31317403

Try it online!

Format similar to Hello World program, except output mode is 3 (Byte-per-three-commands). The three commands 131 encodes value 131 base 6 = 37 base 16 = character 7. Then 3 prints the character.

user202729

Posted 2017-12-17T14:49:48.520

Reputation: 14 620

4

Whispers, 36 bytes

> "Whispers"
> 8
>> 1×2
>> Output 3

Try it online!

Trivial question, trivial answers.

caird coinheringaahing

Posted 2017-12-17T14:49:48.520

Reputation: 13 702

4

,,,, 6 bytes

',9i×

Try it online!

Hehe...

totallyhuman

Posted 2017-12-17T14:49:48.520

Reputation: 15 378

4

Commentator, 316 bytes

           {-     {-    -}!  {-{- e#-}//{-#-}-}! {-       
;{-
     {-   -}!!  -}////{-#{-#-}    {-     -}!-}//-}//e#   e#-}//     -}//-}//{-e#                   e#-}-}//e#      e#-}//-}//-}//-}//e#         e#{-e# e#{-e# e#{-e#         e#-}-}-}-}-}
;{-/*{-/*{-/*{-/*{-/*{-/*{-/*{-/*{-/*{-/*{-/*-}-}-}-}-}-}-}-}-}-}-}

Try it online!

Not quite as long as my Verbosity answer, but getting there

caird coinheringaahing

Posted 2017-12-17T14:49:48.520

Reputation: 13 702

4

Starry, 146 bytes

        + +*`        + +  * +  *       +* .                + +  * +          + * + .       + * +          + +* +  *        + * . . . .      + * +'

Try it online!

It looks prettier with decoration, though (180 bytes):

        + +*`        
+ + /| * +  *       +
* .| \__             
  + \__/+  * +__     
     + * + . /  \    
+ * +      ========  
  + +* +  *  \__/    
  + * . . . .      + 
* +'

Try it online!

Not a tree

Posted 2017-12-17T14:49:48.520

Reputation: 3 106

3

MSM, 9 bytes

..;;..MSM

Stack trace:

. . ; ; . . M S M             -- concat
  . ; ; . . M MS              -- concat
    ; ; . . MSM               -- dup
      ; . . MSM MSM           -- dup
        . . MSM MSM MSM       -- concat
          . MSM MSMMSM        -- concat
            MSMMSMMSM

nimi

Posted 2017-12-17T14:49:48.520

Reputation: 34 639

3

D, 20 bytes

auto f(){return"D";}

Try it online!

Steadybox

Posted 2017-12-17T14:49:48.520

Reputation: 15 798

One letter language names for the win. – Zacharý – 2017-12-17T16:08:36.983

3

I, 3 bytes

"I"

Try it online!

NieDzejkob

Posted 2017-12-17T14:49:48.520

Reputation: 4 630

Haha I got ninja'd – Giuseppe – 2017-12-17T16:28:52.090

3

Aceto, 16 bytes

o"pp
tkpp
ecp
"A

Try it online!

FantaC

Posted 2017-12-17T14:49:48.520

Reputation: 1 425

3

Funky, 16 bytes

print("Funky"*5)

Try it online!

ATaco

Posted 2017-12-17T14:49:48.520

Reputation: 7 898

2

Japt, 8 7 bytes

4ç"Japt

Try it

Shaggy

Posted 2017-12-17T14:49:48.520

Reputation: 24 623

2

;#*, 420 bytes

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#

Try it online! (uses ;#+ instead)

Mr. Xcoder

Posted 2017-12-17T14:49:48.520

Reputation: 39 774

You can golf this approach. – Conor O'Brien – 2017-12-17T19:03:01.753

@ConorO'Brien Well I intended this to be a ;# answer but since that is not considered a language (it cannot perform a primality test), I used ;#+. Will look at the docs and see what I can do – Mr. Xcoder – 2017-12-17T19:10:38.383

This is a kolgomorov complexity challenge, so primality testing isn't required. This can be a ;# answer if you still want to – caird coinheringaahing – 2017-12-25T01:20:19.003

@cairdcoinheringaahing Changed to ;#* – Mr. Xcoder – 2017-12-25T06:23:31.660

2

K, 9 bytes

\echo "K"

Try it online!

NieDzejkob

Posted 2017-12-17T14:49:48.520

Reputation: 4 630

2

Emoji, 33 bytes

Emoji6➡

Abuses the type system. A lot. May not work on other interpreters than the Python one. It probably won't.

Try it online!

NieDzejkob

Posted 2017-12-17T14:49:48.520

Reputation: 4 630

2

sed, 10 bytes

isedsedsed

I hope two trailing newlines are OK :P

Try it online!

NieDzejkob

Posted 2017-12-17T14:49:48.520

Reputation: 4 630

2

itflabtijtslwi, 31 bytes

/I/itflabtijtslwi//J/IIIIIII/JJ

Try it online!

Erik the Outgolfer

Posted 2017-12-17T14:49:48.520

Reputation: 38 134

2

Bubblegum, 14 13 bytes

Saved 1 byte thanks to @ovs

00000000: 732a 4d4a ca49 4d2f cda5 1603 00         s*MJ.IM/.....

Try it online!

Arnauld

Posted 2017-12-17T14:49:48.520

Reputation: 111 334

13 bytes, generated with zopfli. – ovs – 2017-12-17T19:24:12.783

@ovs Thanks! I was pretty sure I was doing it wrong. – Arnauld – 2017-12-17T19:34:33.337

2

Hexadecimal Stacking Pseudo-Assembly Language, 636 bytes

20002D4077FF00AAAA20006540000020006740000020006140000020007540000020006740000020006e40000020006140000020004c40000020002040000020007940000020006c40000020006240000020006d40000020006540000020007340000020007340000020004140000020002d40000020006f40000020006440000020007540000020006540000020007340000020005040000020002040000020006740000020006e40000020006940000020006b40000020006340000020006140000020007440000020005340000020002040000020006c40000020006140000020006d4000002000694000002000634000002000654000002000644000002000614000002000784000002000654000002000484000001400004277FF4099FF2000014077FF4299FF4077FF2277FF4277FF4077FF0377FF04000101AAAA

Try it online!

Formatted:

20002D4077FF00AAAA200065400000200067400000200061400000200075
40000020006740000020006e40000020006140000020004c400000200020
40000020007940000020006c40000020006240000020006d400000200065
40000020007340000020007340000020004140000020002d40000020006f
400000200064400000200075400000200065400000200073400000200050
40000020002040000020006740000020006e40000020006940000020006b
400000200063400000200061400000200074400000200053400000200020
40000020006c40000020006140000020006d400000200069400000200063
400000200065400000200064400000200061400000200078400000200065
4000002000484000001400004277FF4099FF2000014077FF4299FF4077FF
2277FF4277FF4077FF0377FF04000101AAAA 

Explanation

; initialize 77 with 0x002D (45)
20 002D
40 77 (FF)

; label AAAA
00 AAAA

; print out the text
20006540000020006740000020006140000020007540000020006740000020006e40000020006140000020004c400000200020400000
20007940000020006c40000020006240000020006d40000020006540000020007340000020007340000020004140000020002d400000
20006f40000020006440000020007540000020006540000020007340000020005040000020002040000020006740000020006e400000
20006940000020006b40000020006340000020006140000020007440000020005340000020002040000020006c400000200061400000
20006d400000200069400000200063400000200065400000200064400000200061400000200078400000200065400000200048400000
140000

; decrement
    ; move counter to stack 99
        42 77 (FF)
        40 99 (FF)
    ; push 1 to 77
        20 0001
        40 77 (FF)
    ; move counter to stack 77
        42 99 (FF)
        40 77 (FF)
    ; subtract
        22 77 (FF)

; duplicate
42 77 (FF)
40 77 (FF)

; terminate if counter is 0
03 77 (FF)
04 (0001)

; redo
01 AAAA

Conor O'Brien

Posted 2017-12-17T14:49:48.520

Reputation: 36 228

2

Standard ML (MLton), 55 54 46 bytes

val s="Standard ML";s^s^s;print(it^it^it^s^s);

Try it online!

Output:

Standard MLStandard MLStandard MLStandard MLStandard MLStandard MLStandard MLStandard MLStandard MLStandard MLStandard ML

Previous version: (55 bytes)

"Standard ML";print(concat(map(fn _=>it)(explode it)));

Try it online! (No worries, the code is harmless, eventhough it contains explode it.)

Explanation:

"Standard ML"; binds the string to the implicit value identifier it. We then explode it to convert the string into a list of characters and map a function fn _=>it over the list which replaces each character with the string. concat combines the list of strings to a single string and print outputs the resulting string.

Laikoni

Posted 2017-12-17T14:49:48.520

Reputation: 23 676

2

Hodor, 38 bytes

hodor.hod("HodorHodorHodorHodorHodor")

It's actually shorter than the pure Javascript equivalent!

Try it online!

KSmarts

Posted 2017-12-17T14:49:48.520

Reputation: 1 830

2

Java 8, 21 bytes

v->"JavaJavaJavaJava"

Well...

Try it here.

Kevin Cruijssen

Posted 2017-12-17T14:49:48.520

Reputation: 67 575

2JAVA! JAVA! JAVA! JAVA! – Engineer Toast – 2017-12-19T19:22:14.030

2

brainfuck, 125 119 bytes

+++++++++[>+++++++++++[>+++++++++[>+>+<<-]>>+<<<-]>>-.>++++.<-.++++++++.>----.<---.>+++++++.<---.++++++++.>[-]<[-]<<<-]

First BF, I think it's still golfable but it may be a bit BF to golf BF ;)

Explanation:

+++++++++                        (_009  000  000  000  000)
[
 >+++++++++++                    ( 009 _011  000  000  000)
 [
  >+++++++++                     ( 009  011 _009  000  000)
  [
   >+>+<<-                       ( 009  011 _008  001  001)
  ]                              ( 009  011 _000  009  009)
  >>+<<<-                        ( 009 _010  000  009  010)
 ]                               ( 009 _000  000  099  110)
 >>-.                            ( 009  000  000 _098  110) Output: b
 >++++.                          ( 009  000  000  098  114) Output: r
 <-.                             ( 009  000  000 _097  114) Output: a
 ++++++++.                       ( 009  000  000 _105  114) Output: i
 >----.                          ( 009  000  000  105 _110) Output: n
 <---.                           ( 009  000  000 _102  110) Output: f
 >+++++++.                       ( 009  000  000  102 _117) Output: u
 <---.                           ( 009  000  000 _099  117) Output: c
 ++++++++.                       ( 009  000  000 _107  117) Output: k
 >[-]<[-]<<<-                    (_008  000  000  000  000)
]                                (_000  000  000  000  000)

-6 for removing redundant clear commands

Try it online!

Shieru Asakoto

Posted 2017-12-17T14:49:48.520

Reputation: 4 445

2

TI-BASIC, 16 bytes

"TI-BASIC
Disp Ans,Ans
Ans

Alternatively (19 bytes):

For(I,1,3
Disp "TI-BASIC
End

Timtech

Posted 2017-12-17T14:49:48.520

Reputation: 12 038

2

Befunge-93, 27 Bytes

Edit: Much cleaner solution of the same length suggested by James Holderness

0"39-egnufeB">:#,_$1+:9`#@_

Try It Online

Old 30 byte version:

?
_g7-00p"39-egnufeB">:#,_g`#@

Try It Online

It feels weird to use the ? command for something that isn’t random, but that’s the only direction changing instruction that had an ASCII value low enough

Jo King

Posted 2017-12-17T14:49:48.520

Reputation: 38 234

1

Surely it's easier to just keep the counter on the stack: Try it online!

– James Holderness – 2017-12-20T15:25:24.240

@JamesHolderness Not if you're printing the "-93" as well. Then it's the same length (but still a much cleaner solution) – Jo King – 2017-12-24T15:34:50.730

2

Bash, 14 bytes

echo bash{,,,}

Try it online!

ksh, 12 bytes

echo ksh{,,}

Try it online!

sh, 10 bytes

echo sh{,}

Try it online!

Although, for 9 bytes, I can just do echo shsh.

MD XF

Posted 2017-12-17T14:49:48.520

Reputation: 11 605

2

05AB1E, 9 bytes

•äƵí•h6×R

Try it online!


0xE1BA50, encoded in base 255, decoded into hexadecimal, repeated 6 times, reversed.

Magic Octopus Urn

Posted 2017-12-17T14:49:48.520

Reputation: 19 422

1

Jelly, 7 bytes

“¢³ƒ»ẋ5

Try it online!

caird coinheringaahing

Posted 2017-12-17T14:49:48.520

Reputation: 13 702

1

Add++, 11 bytes

L,"Add++"5*

Try it online!

caird coinheringaahing

Posted 2017-12-17T14:49:48.520

Reputation: 13 702

1

Pyth, 7 bytes

*4"Pyth

My first Pyth answer!

Thanks to Mr. Xcoder for a neat trick.

Try it online!

Daniel

Posted 2017-12-17T14:49:48.520

Reputation: 6 425

*4"Pyth for 7 bytes – Mr. Xcoder – 2017-12-17T14:57:25.010

@Mr.Xcoder, neat! – Daniel – 2017-12-17T14:58:37.453

1

PHP, 27 21 20 bytes

First PHP solution; thanks to everyone who helped out with this. Obviously, I'm not quite ready to start golfing in PHP yet!

<?=str_pad(P,9,HPP);

Try it online

(Yes, <?="PHPPHPPHP"; or just PHPPHPPHP are shorter but they felt far too trivial.)

  • Thanks to Dennis for some tips on PHP, which also saved a byte.
  • Thanks to NieDzejkob for saving a further 5 bytes.
  • Thanks to Titus for saving me a byte and teaching me something new abut PHP.

Shaggy

Posted 2017-12-17T14:49:48.520

Reputation: 24 623

2This looks longer than just using "PHPPHPPHP" to me. – Martin Ender – 2017-12-17T15:09:05.637

@MartinEnder: yeah, but that just felt far too trivial! – Shaggy – 2017-12-17T15:09:56.477

1

A trailing semicolon is mandatory in PHP. As a full program <?=str_pad($s="PHP",9,$s); would do. Of course, PHPPHPPHP is a neat 9 byte solution.

– Dennis – 2017-12-17T15:16:50.943

@Dennis, to the best of my knowledge, a trailing semi-colon isn't required on the last line of a file. Thanks for the tips on the full programme; I'll update shortly. – Shaggy – 2017-12-17T15:20:13.257

1It can be omitted in certain situations, but the closing ?> is already longer. – Dennis – 2017-12-17T15:22:42.110

@Dennis, ah, yes, I see that now. – Shaggy – 2017-12-17T15:23:28.010

1<?=str_pad("",9,PHP); for 21 bytes. – NieDzejkob – 2017-12-17T15:46:28.417

Or getting closer to the trivial solution for 18 bytes: <?=($a=PHP).$a.$a;

– Arnauld – 2017-12-17T18:42:21.573

Oops, fell asleep on the couch yesterday and forgot about this! Thanks for the help, everyone; clearly I'm not ready for golfing in PHP yet! :D – Shaggy – 2017-12-18T13:08:35.570

20 bytes: <?=str_pad(P,9,HPP); – Titus – 2017-12-19T11:00:17.073

Can you explain, @Titus? How come the P & HPP don't need to be quoted? – Shaggy – 2017-12-19T11:07:58.340

@Shaggy you don't need to quote strings in PHP as long as you ignore the errors (if there isn't any space or special chars such as - or $ in your string). It's actually one of the top PHP golfing tips

– roberto06 – 2017-12-19T11:58:07.593

@Shaggy and with -n (which we get for free: no config file), notices such as undefined constant, assuming string are ignored. – Titus – 2017-12-19T15:41:34.657

1

APL,  10 7 bytes

∊(⍴c)⍴⊂c←⎕

APL => APLAPLAPL

previous answer above prompted for screen input but if no input is required then we have the trivial for 7 bytes

9⍴'APL'

Graham

Posted 2017-12-17T14:49:48.520

Reputation: 3 184

1

C++,  24  22 bytes

Thanks to @Quentin for saving two bytes!

[]{return"C++C++C++";}

Try it online!

Steadybox

Posted 2017-12-17T14:49:48.520

Reputation: 15 798

You can drop the parentheses :) – Quentin – 2017-12-20T12:20:18.447

1

Husk, 8 6 bytes

‼D¨Ż%k

-2 bytes thanks to @Zgarb!

Try it online or alternatively DD¨Ż%k would work too..

Explanation

‼D¨Ż%k
  ¨Ż%k  -- compressed string: "Husk"
‼D      -- duplicate twice: "HuskHuskHuskHusk"

ბიმო

Posted 2017-12-17T14:49:48.520

Reputation: 15 345

2‼D works too. – Zgarb – 2017-12-17T20:08:37.980

1

SNOBOL4 (CSNOBOL4), 30 bytes

 OUTPUT =DUPL('SNOBOL4',7)
END

Try it online!

Giuseppe

Posted 2017-12-17T14:49:48.520

Reputation: 21 077

1

Deorst, 11 bytes

'Deorst'l6*

Try it online!

caird coinheringaahing

Posted 2017-12-17T14:49:48.520

Reputation: 13 702

1

PHP, 59 bytes

Not the best way to do it (and there's a better php solution), but here's my go at it:

<?php $s="php";$l=strlen($s);for($i=0;$i<$l;$i++){echo $s;}

Try it online!

RAZERZ

Posted 2017-12-17T14:49:48.520

Reputation: 111

1

uBASIC, 27 bytes

1FORI=1TO6:?"uBASIC";:NEXTI

This answer is pretty small, thanks to uBASIC's tokenizer being powered with a solution of magic in unicorn blood.

Try it online!

NieDzejkob

Posted 2017-12-17T14:49:48.520

Reputation: 4 630

1

rk, 22 bytes

rk:start
print: "rkrk"

Try it online!

NieDzejkob

Posted 2017-12-17T14:49:48.520

Reputation: 4 630

Wait someone else knows about this language :o – MD XF – 2017-12-17T23:51:04.673

1

Octave, 26 bytes

disp(repmat('Octave',1,6))

Try it online!

Luis Mendo

Posted 2017-12-17T14:49:48.520

Reputation: 87 464

1

MY-BASIC, 33 bytes

for x=1 to 8
print"MY-BASIC"
next

Try it online!

NieDzejkob

Posted 2017-12-17T14:49:48.520

Reputation: 4 630

1

05AB1E, 10 bytes

"05AB1E"6×

Try it online!

Erik the Outgolfer

Posted 2017-12-17T14:49:48.520

Reputation: 38 134

1

Befunge-98 (FBBI), 22 bytes

7v
"<_@#:-1,k6"Befunge

Try it online!

with -98 included:

av
"<_@#:-1,k9"Befunge-98

Try it online!

ovs

Posted 2017-12-17T14:49:48.520

Reputation: 21 408

-2 bytes if you increment instead of decrementing (idea from james holderness' comment on my Befunge-93 answer)

– Jo King – 2017-12-24T15:44:44.453

1

pl, 4 bytes

plpl

Try it online!

ovs

Posted 2017-12-17T14:49:48.520

Reputation: 21 408

1

Cy, 12 bytes

"CyCy" print

Try it online!

ovs

Posted 2017-12-17T14:49:48.520

Reputation: 21 408

1

Clojure, 49 37 bytes

12 bytes saved thanks to @cliffroot

(print(apply str(repeat 7"Clojure")))

Try it online!

Uriel

Posted 2017-12-17T14:49:48.520

Reputation: 11 708

you can use apply str instead of clojure.string/join ? – cliffroot – 2017-12-18T09:36:13.673

@cliffroot nice trick. thanks! – Uriel – 2017-12-18T10:40:14.867

1

Perl 6,  14  12 bytes

say 'Perl6'x 5

Try it

{'Perl6'x 5}

Try it (bare block lambda that returns a string)

Note that I have it output Perl6 as Perl 5 and Perl 6 are at least as different as C++ and Java are.

Brad Gilbert b2gills

Posted 2017-12-17T14:49:48.520

Reputation: 12 713

try this {'Perl'x 5} to shave off 3 bytes :) Lambda returns are generally accepted as output. Also the question specifically says that different versions of a language, dosent matter. And since it is code golf, i wouldve used that in my favor ;) – Håvard Nygård – 2017-12-23T21:53:25.610

@HåvardNygård As I stated Perl 5 and Perl 6 are different languages; they are significantly more different than C and C++, and the C++ answer outputs C++C++C++. At least Perl 5 attempts to maintain backwards compatibility with the original Perl from 1987. I have written an example file that combines both Perl 5 and Perl 6, and the code that I have written to make them compatible is larger than the common code. The language is Perl 6, the family of languages is Perl. – Brad Gilbert b2gills – 2017-12-24T14:44:11.773

Well, could still return it from the lambda though – Håvard Nygård – 2017-12-24T15:08:18.720

1

Tcl, 14 bytes

puts TclTclTcl

Try it online!

sergiol

Posted 2017-12-17T14:49:48.520

Reputation: 3 055

1

Charcoal, 10 bytes

×Charcoal⁸

Try it online! Alternatively, also 10 bytes:

×⁸Charcoal
F⁸Charcoal

More idiomatic for 13 bytes would be to say:

≔Charcoalθ⭆θθ
≔CharcoalθFθθ

Neil

Posted 2017-12-17T14:49:48.520

Reputation: 95 035

1

Clean, 29 bytes

c="CleanCleanCleanCleanClean"

Because actually doing anything requires import StdEnv, it's shorter to just hardcode.

Try it online!

Οurous

Posted 2017-12-17T14:49:48.520

Reputation: 7 916

1

JavaScript ES7, 30/41/43/33 bytes

Thanks @Shaggy for reducing the size of the second and 4th versions

Boring repeat 10 times: 30 bytes

alert("JavaScript".repeat(10))

Array mapping of a string: 41 bytes

alert([...x="JavaScript"].fill(x).join``)

For loop: 43 bytes

for(i=j='';10>j++;i+="JavaScript");alert(i)

Joining empty 11 element array: 33 bytes

alert(Array(11).join`JavaScript`)

fəˈnɛtɪk

Posted 2017-12-17T14:49:48.520

Reputation: 4 166

From the spec "Use the common name or acronym of the language." - JS is a common acronym for JavaScript ;) – Shaggy – 2017-12-18T18:10:39.817

Also, your last solution can be 33 bytes: alert(Array(11).join'JavaScript'), replacing single quotes with backticks. – Shaggy – 2017-12-18T18:12:14.557

And your second can be 41 bytes: alert([...x="JavaScript"].fill(x).join''). – Shaggy – 2017-12-18T18:14:22.943

1

ReRegex, 17 bytes

a/ReRegex/aaaaaaa

Potentially one of the most simple ReRegex answers I've ever written.

Try it online!

ATaco

Posted 2017-12-17T14:49:48.520

Reputation: 7 898

1

This=That, 57 bytes

a=This=That
i=0
while loop j=<9
a=print
while loop j=end

This does exactly what you think it does. The string stored to a is printed nine times, accomplished by the loop.

The idea I get from the Esolangs page is that that equals sign in the first line is part of the string literal, not an assignment operator.

Thanks to @FrownyFrog for pointing out an error.

Khuldraeseth na'Barya

Posted 2017-12-17T14:49:48.520

Reputation: 2 608

1

Bean, 15 bytes

xxd-style hexdump:

00000000: 53d0 80a3 8100 2080 b525 3dc2 e5e1 6e    SÐ.£.. .µ%=Âåán

JavaScript equivalent:

'Bean'.repeat(4)

Try it online!

Patrick Roberts

Posted 2017-12-17T14:49:48.520

Reputation: 2 475

1

Sinclair ZX81/Timex TS1000/1500 BASIC, ~33 tokenized BASIC bytes for the listing

 LET A$="BASIC"
 1 FOR I=SGN PI TO LEN A$
 2 PRINT A$;
 3 NEXT I

Enter the language name into the var stack using direct mode to save one BASIC line, and save bytes in the listing itself. I assume the A$ variable is five bytes for the string and two bytes for the pointer, but I'm not 100% sure how the this works on the ZX81 - I will find out and update the byte count.

Sinclair ZX81/Timex TS1000/1500 BASIC (non-dynamic solution) ~21 tokenized BASIC bytes (symbolic listing)

 LET A$="BASIC"
 1 PRINT A$;A$;A$;A$;A$

Using the same technique as above, entering the A$ variable in direct mode and then simply printing the string five times. To run either solution, don't use the command RUN or the var stack is initialised. Use:

 GOTO 1

Shaun Bebbers

Posted 2017-12-17T14:49:48.520

Reputation: 1 814

1Save 5 bytes by using SGN PI instead of 1. And by my count the second one is only 36 bytes. – Neil – 2017-12-18T11:23:59.550

Yes, I will optimise futher; also one could use INPUT A$ in line one, and will therefore work with any language inputted into the A$ string – Shaun Bebbers – 2017-12-18T11:25:17.053

@Neil - how are you counting 36 bytes in the second listing? – Shaun Bebbers – 2017-12-19T14:24:39.593

The first line is 4 bytes for the line number and length, 1 for the token, 10 normal bytes, 1 for the newline. The second is similar, except it has 14 normal bytes. I make that 36 bytes in total. – Neil – 2017-12-19T16:43:02.533

It's a good job I put a ~ in front of my byte count isn't it. Somehow I mis-counted. Twice. But I'd rather work out proper byte counts on 8 bit machines, i.e., how much actual memories do my listings take? – Shaun Bebbers – 2017-12-19T17:21:20.127

Hi MD XF - the Sinclair ZX81 is just that - I've never seen it referred to as a ZX-81. – Shaun Bebbers – 2017-12-19T17:25:16.250

1

PHP (9 bytes)

PHPPHPPHP

Try it online

Shaun Bebbers

Posted 2017-12-17T14:49:48.520

Reputation: 1 814

2Hah. can't believe str_repeat(3,'PHP') is the long alternative. – Magic Octopus Urn – 2017-12-19T14:55:46.443

1Excuse my brevity with this answer; it's hardly a difficult challenge and by the questions posed above, it's apparently a perfectly legal one as well. – Shaun Bebbers – 2017-12-19T17:19:13.527

1

Ruby, 12 bytes

$><<"Ruby"*4

Because Kaiser Chiefs.

Try it online!

G B

Posted 2017-12-17T14:49:48.520

Reputation: 11 099

1

T-SQL, 76 67 bytes

declare @i char(5)='T-SQL',@ int=1 a:print @i set @+=1if(@<6)goto a

Nelz

Posted 2017-12-17T14:49:48.520

Reputation: 321

1You can save up to 11 bytes by using @i+=1 instead of @i=@i+1, change the condition to @i<6, swapping the variable names and replacing the WHILE with a GOTOand IF. – WORNG ALL – 2017-12-18T19:37:56.823

1

Decimal, 52 bytes

13068101099105109097108D117D91D00D30101D111D42D591D5

Try it online!

Ungolfed / explanation:

13068101099105109097108D 117D   ; push "Decimal", push 17
91D                             ; create jump point 1
  00D 301 01D                   ; set DSI to 0 ("Bitwise"), print, set back to 1 (initially 7)
  111D 42D                      ; push 1, subtract from previous SI
5 91D 5                         ; if DSI truthy, jump to point 1

Fun fact that I just remembered: Decimal doesn't care about the "top of stack" like most stack-based esolangs; it instead operates on a "default stack index" that can be modified at will, allowing for rather easy stack manipulation.

MD XF

Posted 2017-12-17T14:49:48.520

Reputation: 11 605

1

Brain-Flak, 229 bytes

((()()()()()){}){({}<(((((((((((((()()()){}){}()){}){}()){}()))<({}[(()()()()()){}])>())[(()()()){}])<(((((()()()()())){}{})){}{})>(()()()()){})[()()()()()])[(()()()()){}])((()()()()){}){}())(((((()()()()){}){}){}()){})>[()])}{}

Try it online!

This is 228 bytes of code, and +1 for the -A flag.

James

Posted 2017-12-17T14:49:48.520

Reputation: 54 537

1

Scala 27 16 bytes

print("Scala"*5)

AmazingDreams

Posted 2017-12-17T14:49:48.520

Reputation: 281

I don't know Scala, but would assigning it to a variable be shorter than writing it twice? – Connor Bell – 2017-12-19T14:37:45.387

or just using 5 instead of "Scala".size – Giuseppe – 2017-12-19T14:40:28.730

Assigning to a variable takes 29 bytes unfortunately. And yes @Giuseppe I'm dumb.... – AmazingDreams – 2017-12-19T14:42:14.310

1

Ruby, 10 bytes

p "ruby"*4

Try it online!

Gregory

Posted 2017-12-17T14:49:48.520

Reputation: 61

1p"ruby"*4 - you don't need the space. – Magic Octopus Urn – 2017-12-19T17:57:24.190

1

JavaScript 58 54 bytes

a='',f=i=>i<9?(f(i+1),a+="JavaScript"):0;f(0);alert(a)

Solution using document.write (57 53 bytes)

(f=i=>{i<9?f(i+1):0;document.write("JavaScript")})(0)

jsCoder

Posted 2017-12-17T14:49:48.520

Reputation: 11

4Welcome to Programming Puzzles & Code Golf! Please edit your existing answers instead of posting new ones. – Dennis – 2017-12-19T18:42:47.633

1

Underload, 28 bytes

(Underload)::::::::********S

Try it online!

MD XF

Posted 2017-12-17T14:49:48.520

Reputation: 11 605

(Underload)::**::**S for 20 bytes. – Esolanging Fruit – 2019-10-22T15:44:47.780

1

Swift, 30 bytes

for _ in 1...5{print("Swift")}

Try it online!

Zeke Snider

Posted 2017-12-17T14:49:48.520

Reputation: 121

0

Bitwise, 188 bytes

.SUB:
LABEL &1
NOT $1 *1
AND *1 $2 *2
XOR $1 $2 $1
SL *2 &1 $2
JMP @1 $2
RET $1
MOV 1 &7 &1
OUT &66 1
OUT &105 1
OUT &116 1
OUT &119 1
OUT &105 1
OUT &115 1
OUT &101 1
SUB 1 &1 1
JMP &-9 1

Try it online!

I can't golf the .SUB help D:

MD XF

Posted 2017-12-17T14:49:48.520

Reputation: 11 605

0

C, 20 bytes

main(){printf("C");}

Try it online!

Galen Nare

Posted 2017-12-17T14:49:48.520

Reputation: 109

3You can save a few bytes by using puts instead – Conor O'Brien – 2017-12-18T03:53:16.547

And even more by making it a function, f(){puts("C");} – MD XF – 2017-12-26T22:15:00.453

0

C# Interactive, 44 bytes

for(int i=15;--i>0;)Write("C# Interactive");

Haven't found an online compiler, I did it with the C# Interactive REPL in VS 2017.

Lennart

Posted 2017-12-17T14:49:48.520

Reputation: 101

0

Implicit, 16 14 12 bytes

Implicit":+7

Try it online!

Implicit       push character codes for I, m, p, l, i, c, i, t
        "      stringify stack
         :     duplicate top of stack
          +7   concatenate top of stack to previous 7 times
               implicit string output

MD XF

Posted 2017-12-17T14:49:48.520

Reputation: 11 605

0

Excel Formula, 24

=REPT("ExcelFormula",12)

SeanC

Posted 2017-12-17T14:49:48.520

Reputation: 1 117

0

shortC, 24 bytes

Da"shortC"
AJa a a a a a

Try it online!

Da"shortC"     // define variable a as string "shortC"
A              // main function
 J             // print string
  a a a a a a  // a, 6 times, auto-concatenated

MD XF

Posted 2017-12-17T14:49:48.520

Reputation: 11 605

0

Julia, 24 bytes

print(repeat("Julia",5))

Try it online!

Lescurel

Posted 2017-12-17T14:49:48.520

Reputation: 171

0

Eukleides, 37 bytes

e="Eukleides"
print e,e,e,e,e,e,e,e,e

Don't think it can be golfed down any further. While a list of strings can be printed, they can't be assigned to a variable without a cat operation. So, building a string of three "Eukleides"es and printing three of those blows up to 38 bytes:

e="Eukleides"
f=cat(e,e,e)
print f,f,f

Eukleides prints a newline after every print command. If the challenge allowed for newlines between instances of the language name then we could do this in 33 bytes:

for i=1to 9
print "Eukleides"
end

brhfl

Posted 2017-12-17T14:49:48.520

Reputation: 1 291

0

VBA, 11 Bytes

Anonymous VBE immediate window function that takes no input and outputs to the VBE immediate window

?"VBAVBAVBA

Taylor Scott

Posted 2017-12-17T14:49:48.520

Reputation: 6 709

0

LOLCODE, 75 bytes

HAI 1.3
VISIBLE "LOLCODELOLCODELOLCODELOLCODELOLCODELOLCODELOLCODE"
KTHXBYE

Try it online!

FantaC

Posted 2017-12-17T14:49:48.520

Reputation: 1 425

0

Pushy, 11 bytes

`Pushy\x5`:N"

Where \x5 represents the literal byte 0x05.

Try it online!

`Pushy\x5`      \ Push the character codes for 'Pushy', and a 5
          :     \ Pop the 5 and loop 5 times:
           N"   \ Output the rest of the stack, with no newline.

FlipTack

Posted 2017-12-17T14:49:48.520

Reputation: 13 242

0

Ruby, 12 bytes

$><<"Ruby"*4

dkudriavtsev

Posted 2017-12-17T14:49:48.520

Reputation: 5 781

https://codegolf.stackexchange.com/a/151022/66104 ? – Not a tree – 2017-12-20T16:07:50.267

0

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)

leo

Posted 2017-12-17T14:49:48.520

Reputation: 161

Use the common name or acronym of the language. and If there are multiple versions of a language, you need not include the version number. and for just plain bash I don't think it can get any shorter (although I may be wrong.) – MD XF – 2017-12-20T19:19:26.750

@MDXF You're right, I didn't read the challenge properly. – leo – 2017-12-21T08:55:50.403

0

Excel VBA, 22 Byte

Anonymous VBE immediate window function that takes no input and outputs to the VBE immediate window

?[Rept("Excel VBA",9)]

Taylor Scott

Posted 2017-12-17T14:49:48.520

Reputation: 6 709

0

Excel, 15 Bytes

Anonymous worksheet function that takes no input and outputs to the calling cell

=REPT("Excel",5

This may be ported to Google Sheets for 24 Bytes

=REPT("Google Sheets",13

Taylor Scott

Posted 2017-12-17T14:49:48.520

Reputation: 6 709

0

Tomato, 14 bytes

"Tomato"YYYYYY

dkudriavtsev

Posted 2017-12-17T14:49:48.520

Reputation: 5 781

0

Ruby: 10 chars

p 'ruby'*4

Result

rubyrubyrubyruby

Previous Implementation: 25 chars

def x(y);p y*y.length;end

Simple invocation:

x('javascript')
 => "javascriptjavascriptjavascriptjavascriptjavascriptjavascriptjavascriptjavascriptjavascriptjavascript" 

AJFaraday

Posted 2017-12-17T14:49:48.520

Reputation: 10 466

0

Powershell, 15 bytes

"Powershell"*10

Very boring. But I can't think of any way to shorten it.

whatever

Posted 2017-12-17T14:49:48.520

Reputation: 161