Create a program which prints the amount of characters its source has in English words.
If your program is nine letters long it should print "nine".
Capitalization is ignored: in case you're printing "one" (somehow) you can print "one", "oNe", "ONE" or anything else.
Base ten is required.
Proper spacing is also required.
In the (unlikely but just for specification) case your program reaches one billion characters or more, use the American number scale. A billion here is 10^9 and a million is 10^6.
Do not use "one hundred and one": use "one hundred one".
Do not use the hyphen. Print forty four, not forty-four.
Test cases with a fake program:
10.(96 0s later)..01 prints one HuNdreD ONE -- okay: proper spacing, no "and"
10.(96 0s later)..01 prints one HuNdreDONE -- not okay: wrong spacing
10.(96 0s later)..01 prints one thousand two hundred two -- not okay: base 3 rather than base 10
10...(999999996 0s later) prints nine hundred ninety-nine million nine hundred ninety-nine thousand nine hundred ninety-six: not okay, wrong number and includes hyphens
Golfy challenge, as always: shortest code wins. You're free to post after the green tick has been given, though. This serves more for completeness for hard to program languages. Malbolge, anyone?
134 Answers 134
Poetic, 400 bytes
Type fourhundred chars? I say, I think I have an angle.
I say "Gosh, could I just go create some poem? Clearly it comes a long way, writing stuff I say."
I compose the entire written poem, and someone reads a tiny, tiny portion.
"Surely, it all is garbage," cried a big fat crybaby.
Would HE frankly notice how many long, tedious hours I took?
The crybaby whined a lot. I watched, then I ignored him.
Prints Four HunDrED. (I tried to make it print some number in the 300s, but I can't seem to do so in under 400 bytes.)
Poetic is an esolang I made in 2018 for a class project. It's basically brainfuck with word-lengths instead of symbols.
-
7\$\begingroup\$
Clearly it comes a long way, writing stuff I say.Beautiful poem, have a +1. \$\endgroup\$user85052– user850522019年10月20日 01:56:09 +00:00Commented Oct 20, 2019 at 1:56 -
3\$\begingroup\$ @A_ Thanks, it's always fun to create coherent sentences based on pre-determined word lengths. \$\endgroup\$JosiahRyanW– JosiahRyanW2019年10月20日 02:01:40 +00:00Commented Oct 20, 2019 at 2:01
Google Translate (3 bytes)
一
It's the Chinese character for "one" (matching the number of characters in the source code), though the score's due to the character itself being 3 bytes.
Google Translate (3 bytes)
tre
It's Italian for "three".
-
3\$\begingroup\$ You can add a
&tl=enat the end of your URLs to force it to show in English. My Google translate was set to English to Persian from a previous translation and after opening your links, it was showing the resulting numbers in Persian :P Here is also a 2 chars version, converting Persianدوto EnglishTwo. \$\endgroup\$Night2– Night22019年10月20日 13:59:26 +00:00Commented Oct 20, 2019 at 13:59 -
3\$\begingroup\$ ...also (Latin-ised) Hindi "do". \$\endgroup\$Jonathan Allan– Jonathan Allan2019年10月20日 22:11:40 +00:00Commented Oct 20, 2019 at 22:11
-
2\$\begingroup\$ and albanian dy \$\endgroup\$user46167– user461672019年10月20日 22:36:13 +00:00Commented Oct 20, 2019 at 22:36
-
2\$\begingroup\$
tois Norwegian and Danish for two (and we also saytrefor three). Google translate doesn't autodetect that one, though. \$\endgroup\$Arthur– Arthur2019年10月21日 16:17:23 +00:00Commented Oct 21, 2019 at 16:17 -
4\$\begingroup\$ insert obligatory "google translate isnt a programming language" complaint \$\endgroup\$des54321– des543212022年04月16日 18:44:55 +00:00Commented Apr 16, 2022 at 18:44
brainfuck, 40 bytes
+[+++++>++<]>.+++++++++.+++.++.+++++.+++
The last three characters don't actually do anything useful, but it's easier to output forty than thirty seven.
The ascii code for f is 102, which is 2/5 of 255, found by the initial loop. After that, all the characters in the output just happen to be in ascending alphabetical order.
-
\$\begingroup\$ Whoops, I don't know why I was trying to use different cells for each letter... Nice \$\endgroup\$HiddenBabel– HiddenBabel2019年10月19日 18:46:24 +00:00Commented Oct 19, 2019 at 18:46
-
\$\begingroup\$ @HiddenBabel Thanks.
fortyturned out really well. I think forNINETYthe optimum would be one cell for NNTY and one cell for IE \$\endgroup\$Level River St– Level River St2019年10月20日 02:16:33 +00:00Commented Oct 20, 2019 at 2:16 -
\$\begingroup\$ So I guess you already looked for
thirtywith one cell fortrtyand one forhi? I can't find a singular loop that will set both of them close by. \$\endgroup\$HiddenBabel– HiddenBabel2019年10月20日 02:33:54 +00:00Commented Oct 20, 2019 at 2:33 -
6\$\begingroup\$ Indeed, forty is the only number whose letters are in ascending alphabetical order. \$\endgroup\$Neil– Neil2019年10月20日 09:45:38 +00:00Commented Oct 20, 2019 at 9:45
MathGolf, 2 bytes
Well, MathGolf has a string compression library that seems to compress "two" to 1 byte. You need a command to decompress this.
╩_
-
8\$\begingroup\$ Now we're looking for a language where there's a 1-char command that prints
one, or where the empty program printszero. That's going to be interesting. \$\endgroup\$the default.– the default.2019年10月19日 14:03:56 +00:00Commented Oct 19, 2019 at 14:03 -
1\$\begingroup\$ @Nat MathGolf can use Code Page 437, in which
╩is one byte (0xCA) \$\endgroup\$pizzapants184– pizzapants1842019年10月20日 20:39:09 +00:00Commented Oct 20, 2019 at 20:39 -
3\$\begingroup\$ @Nat MathGolf has a built-in dictionary, the first 256 words of which can be accessed using
╩followed by one byte. The word at index 95 (the code point for_) is"two", so"two"is pushed to the stack and implicitly printed when the program exits. (I think, I haven't used MathGolf) \$\endgroup\$pizzapants184– pizzapants1842019年10月20日 21:25:07 +00:00Commented Oct 20, 2019 at 21:25
-
2\$\begingroup\$ I had
print('sixteen'), you win :) \$\endgroup\$Jylo– Jylo2019年10月22日 06:52:47 +00:00Commented Oct 22, 2019 at 6:52 -
1\$\begingroup\$
print'ten', in Python 2? \$\endgroup\$JuanCa– JuanCa2019年10月22日 19:47:17 +00:00Commented Oct 22, 2019 at 19:47 -
1\$\begingroup\$ @JuanCa yes \$\endgroup\$Jonathan Allan– Jonathan Allan2019年10月22日 20:05:44 +00:00Commented Oct 22, 2019 at 20:05
CSS, 30 bytes
body::after{content:'thirty';}
CSS (Google Chrome only), 26 bytes
This should be saved in an empty file between <style> and </style> tag, doesn't work on FireFox or Stack Exchange's code snippets. Tested on Windows Chrome 77.
:after{content:'twenty six
-
1\$\begingroup\$ Never would have thought of this one: +1 \$\endgroup\$2019年10月19日 13:44:33 +00:00Commented Oct 19, 2019 at 13:44
COW, 800 bytes
MoO!!
MoO MoO!!
MoO MoO MoO!!
MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MMM MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO Moo MoO MoO MoO MoO Moo MOo MOo!!
Moo MoO Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO Moo MMM Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MOo MOo!!
MOo MOo MOo MOo MOo Moo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo Moo MMM!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MMM MoO Moo MOo Moo!
Prints EIGHT HUNDRED
-
4\$\begingroup\$ I think
ONE THOUSANDis expected. \$\endgroup\$user85052– user850522019年10月20日 08:08:47 +00:00Commented Oct 20, 2019 at 8:08 -
1\$\begingroup\$ @A_
EIGHT HUNDREDthen! Mooooo! \$\endgroup\$Night2– Night22019年10月20日 08:47:08 +00:00Commented Oct 20, 2019 at 8:47
-
6\$\begingroup\$ Your first example also works with
cat. (The unix command, not the animal.) \$\endgroup\$Florian F– Florian F2020年09月23日 10:54:46 +00:00Commented Sep 23, 2020 at 10:54
Malbolge, 40 bytes
(CB%#9]~}5:3Wyw/4-Qrqq.'&Jkj(h~%|Bd.-==;
-
6\$\begingroup\$ Is it possible to add a code break-down, or if you can't say how it works then how it was produced? \$\endgroup\$Jonathan Allan– Jonathan Allan2019年10月22日 08:55:51 +00:00Commented Oct 22, 2019 at 8:55
-
\$\begingroup\$ There exists a certain Malbolge generator. It is very useful in generating short Malbolge code. :) \$\endgroup\$dingledooper– dingledooper2019年10月22日 22:26:02 +00:00Commented Oct 22, 2019 at 22:26
Labyrinth, 10 bytes
84.69.78.@
How?
- initially the main stack contains infinite zeros [0,0,0,...]
8 - multiply the top of the stack by ten and add eight [8,0,0,...]
4 - multiply the top of the stack by ten and add four [84,0,0,...]
. - pop, mod 256, print character T
6 - multiply the top of the stack by ten and add six [6,0,0,...]
9 - multiply the top of the stack by ten and add nine [69,0,0,...]
. - pop, mod 256, print character E
7 - multiply the top of the stack by ten and add seven [7,0,0,...]
8 - multiply the top of the stack by ten and add eight [78,0,0,...]
. - pop, mod 256, print character N
@ - exit
-
15\$\begingroup\$ As an IP address range this answer geolocates to the United Kingdom with Vodafone wireless broadband. \$\endgroup\$Purple P– Purple P2019年10月19日 16:38:09 +00:00Commented Oct 19, 2019 at 16:38
-
\$\begingroup\$ @PurpleP Ha ha awesome. \$\endgroup\$Jonathan Allan– Jonathan Allan2019年10月19日 16:42:48 +00:00Commented Oct 19, 2019 at 16:42
-
5\$\begingroup\$ @PurpleP First thing I thought of when seeing this answer (IP address, not UK Vodafone) \$\endgroup\$2019年10月19日 19:18:08 +00:00Commented Oct 19, 2019 at 19:18
Piet, 90 codels
In pseudo-code:
The characters are pushed onto stack. To save space, their ASCII values minus 100 are stored. When the string is built, a loop pops, adds 100 to, and prints each character to STDOUT.
; Place sentinel 0 on stack
push 1
not
; Place 21 (y) on stack
push 7
push 3
mul
; Place 16 (t) on stack
push 4
dup
mul
; Place 1, 10, 5, 10 (e, n, i, n) on stack
push 1
push 10
push 5
push 10
; Check if top of stack is non-zero
; Place a 1 if it is, a 0 otherwise
dup
not
not
write_loop:
; Turn DP (Direction Pointer) as many steps
; clock-wise as value on top of stack
; If we had a zero on stack, we continue into
; the yellow area and get trapped, ending execution
pointer
; If not, we continue
; Add 100 to top of stack
push 5
push 4
push 5
mul
mul
add
; Pop and print character
outc
; Turn DP one step to the right
push 1
pointer
dup
not
not
; Check if top of stack is non-zero
; Place a 1 if it is, a 0 otherwise
dup
not
not
; We're now back at beginning of the writing loop, sort of like a jmp write_loop
-
\$\begingroup\$ How many bytes is this? \$\endgroup\$Jo King– Jo King2019年10月22日 22:56:56 +00:00Commented Oct 22, 2019 at 22:56
-
4\$\begingroup\$ @JoKing Depends on the fileformat for the image, which is why Piet is generally counted in codels. \$\endgroup\$gastropner– gastropner2019年10月22日 23:24:27 +00:00Commented Oct 22, 2019 at 23:24
-
\$\begingroup\$ Yes, but this is code-golf, so it is measured in bytes \$\endgroup\$Jo King– Jo King2019年10月22日 23:29:25 +00:00Commented Oct 22, 2019 at 23:29
-
2\$\begingroup\$ @JoKing That is curious. I have not seen that comment on any other Piet answers. \$\endgroup\$gastropner– gastropner2019年10月22日 23:36:41 +00:00Commented Oct 22, 2019 at 23:36
-
10\$\begingroup\$ ⛽🚘➡ ...gasoline makes the car go? \$\endgroup\$Darrel Hoffman– Darrel Hoffman2019年10月21日 17:11:35 +00:00Commented Oct 21, 2019 at 17:11
Piet + ascii-piet, 40 bytes (×ばつ14=42 codels)
ttllldabknmEmqusbeeeeeute_rbacqtuljvff ?
Prints FORTY. A fantastic use case of a white trap :) Also I like the fact that the program is packed so perfectly.
How it works
A classic 3-row layout with a 1 DP+ at the left edge.
Commands Stack
2 3 dup dup * [2 3 9]
dup dup 1 - * [2 3 9 72]
2 - [2 3 9 70] Setup the stack so that repeatedly adding and
printing gives FORT
dup outC + dup outC +
dup 1 DP+ outC + dup outC
[84] Print FORT, turning right at R2C1
> [84] No-op (stack underflow) to take care of the crossing
5 + outC [] Finally print Y
Piet + ascii-piet, 50 bytes (×ばつ13=52 codels)
ttttliametf M tt iillldedMnjlvjcfll i Mkmuuljcbjjj
Prints fifty. Not sure if I can do 40, but I guess pretty much unlikely.
How it works
The execution path: First row -> (turn right) -> 3rd-to-last column -> (turn right) -> last row in reverse -> (turn right twice) -> 3rd row -> transfer to 2nd row at the red 5 block -> end.
...>>>>>>>v X
.. ....>>+>X
>>>>>>>.. v X
^<<<<<<<<..
Commands:
Commands Stack
6 dup 3 * 1 - * [102] Push 102 ('f')
dup outC [102] Print 'f'
dup 3 + outC [102] Print 'i' (= 'f' + 3)
dup outC [102] Print 'f'
2 dup dup + [102 2 4]
dup * - - [116] Add 14 to 'f' (= 't')
dup outC [116] Print 't'
5 inC + outC [] Add 5 and print 'y'
(inC is ignored; it is to reuse the crossing purple cell)
Hexagony, 6 bytes, 17 cycles
s;i>x@
Now the letters six are in more natural order, and the program finishes one cycle faster.
How it works
For more thorough explanation, see the previous answer below.
A B
C > D
E .
Execution path: ABC>CBAD>ADB.>.CE
^^ ^^ ^^ ^
s; i; x; @
Hexagony, 6 bytes, 18 cycles
x>i;s@
Inspired by boboquack's 9-byte solution. The following quote was a big hint:
I'm slightly disappointed that I couldn't get
sixto work (that would be pushing it with three characters, one output, one redirection and one termination).
How it works (or, How I got to this solution)
A 6-byte program is laid out on a hexagon of side length 2, and the 7th instruction is necessarily a no-op:
? ?
? ? ?
? .
Since I needed at least one mirror, I tried out various mirrors placed at various places, until I found this:
A >
B C D
E .
Assuming the current memory is always positive (and there are no branches/mirrors/IP changers among ABCDE), the IP follows the path
A>ADCB>.CAD>DAC.BE
The cell C is run exactly three times, and the cells right before C are D, B, and A respectively. And the cell E is first run after three runs of C. This is exactly what we want: write one of s, i, or x on the memory and print it, and then terminate!
Now back to the actual source code:
x >
i ; s
@ .
And the execution path, linearized, with significant instructions emphasized:
x>xs;i>.;xs>sx;.i@
^^^ ^ ^^ ^
^^ Print 's'
^ ^ Print 'i'
^^ Print 'x'
^ Terminate
SOGL V0.12, 3 bytes
Well, SOGL has a string compression library that seems to compress "three" to 3 bytes.
@0‘
-
\$\begingroup\$ Gratz, unless a language exists which prints zero, nowt, or nought with an empty program this is probably as good as it'll get. \$\endgroup\$Jonathan Allan– Jonathan Allan2019年10月19日 13:56:15 +00:00Commented Oct 19, 2019 at 13:56
-
2\$\begingroup\$ ...I stand corrected! \$\endgroup\$Jonathan Allan– Jonathan Allan2019年10月19日 14:04:03 +00:00Commented Oct 19, 2019 at 14:04
Brainf***, 90 bytes
+[+[>>+<+<-]>]>[>+>+>+>+>+>+<<<<<<-]>.>-----.>.>---------.>++++++.>+++++++++++.<+><><><><>
Lost, 30 bytes
v<<<<<<<>>>>>>>
>%?"thirt/J"+@
(削除) Contains the unprintable character ESC with unicode value 27 after the Thanks to @JoKing getting rid of the unprintable (for the same byte-count).^ on the second line. (削除ここまで)
Try it online or verify that it's deterministic.
Explanation:
Explanation of the language in general:
Lost is a 2D path-walking language. Most 2D path-walking languages start at the top-left position and travel towards the right by default. Lost is unique however, in that both the start position AND starting direction it travels in is completely random. So making the program deterministic, meaning it will have the same output regardless of where it starts or travels, can be quite tricky.
A Lost program of 2 rows and 5 characters per row can have 40 possible program flows. It can start on any one of the 10 characters in the program, and it can start traveling up/north, down/south, left/west, or right/east.
In Lost you therefore want to lead everything to a starting position, so it'll follow the designed path you want it to. In addition, you'll usually have to clean the stack when it starts somewhere in the middle.
Explanation of the program:
All arrows, including the reflect / in the string, will lead the path towards the leading > on the second line. From there the program flow is as follows:
>: travel in an east/right direction%: Put the safety 'off'. In a Lost program, an@will terminate the program, but only when the safety is 'off'. When the program starts, the safety is always 'on' by default, otherwise a program flow starting at the exit character@would immediately terminate without doing anything. The%will turn this safety 'off', so when we now encounter an@the program will terminate (if the safety is still 'on', the@will be a no-op instead).?: Clean the top value on the stack. In some program flows it's highly likely we have a partial string on the stack, so we use this to wipe the stack clean of that potential string.": Start a string, which means it will push the integer code-points of the characters used.thirt/J: Push the code-points for these characters, being116 104 105 114 116 47 74respectively": We're done pushing code-points of this string+: Add the top two values together: (47+74=)121@: Terminate the program if the safety is 'off' (which it is at this point). After which all the values on the stack will be output implicitly. Using the-Aprogram argument flag, these code-points will be output as characters instead.
Two things to note:
The top part could also have been v<<<<<<<<<<<<<< instead. Lost will wrap around to the other side when moving in a direction. So using v<<<<<<<>>>>>>> could be a slightly shorter path, and since it's the same byte-count anyway, why not use it. :)
Also, the first line contains an additional trailing > to make the byte-count from 29 to 30.
-
\$\begingroup\$ This is a nice find! \$\endgroup\$ouflak– ouflak2019年10月21日 13:07:09 +00:00Commented Oct 21, 2019 at 13:07
-
\$\begingroup\$ @ouflak Thanks, although I must admit it's very similar as the Hello World! answer in Lost. It took a while before I realized I could use an unprintable to output thirty, though. Otherwise I would have had to settle with forty with a bunch more no-op trailing
>. \$\endgroup\$Kevin Cruijssen– Kevin Cruijssen2019年10月22日 07:23:45 +00:00Commented Oct 22, 2019 at 7:23 -
-
\$\begingroup\$ @JoKing Ah, I tried some combinations with both addition and subtraction of the arrow, but forgot about the reflects
/and ``. Thanks, that indeed looks better. :) \$\endgroup\$Kevin Cruijssen– Kevin Cruijssen2019年10月23日 06:19:55 +00:00Commented Oct 23, 2019 at 6:19
JavaScript, (削除) 16 (削除ここまで) 10 bytes
-6 each from Night2's suggestion in the comments
Try it online! (alert doesn't work in TIO, so I'm using print)
alert`ten`
Javascript, (削除) 26 (削除ここまで) 20 bytes
console.log`twenty`;
-
\$\begingroup\$ @Night2 The JS
printfunction is used for printers, not console output, I think. \$\endgroup\$2019年10月19日 19:10:09 +00:00Commented Oct 19, 2019 at 19:10 -
1\$\begingroup\$ @Night2 Ah, makes sense. I'll update the TIO, but keep it as
alerton here since it's more recognizable (sort of) \$\endgroup\$2019年10月19日 20:11:14 +00:00Commented Oct 19, 2019 at 20:11 -
\$\begingroup\$ Where can I find some explanation regarding the syntax used here? I've never seen this before (ommiting the brackets), but it indeed works with any function. What's it called? \$\endgroup\$Tomáš Zato– Tomáš Zato2019年10月21日 13:50:07 +00:00Commented Oct 21, 2019 at 13:50
-
1
Keg, 3 bytes
-1 from Jono2906 for reminding me the string compression
2 can play the 3 byte game!
‘0∑
Old answer, 4 bytes
You can't get shorter than 4. (Without using string compression of course.) 4 is the smallest English word that is the same length as the number it represents.
Just some good old-fashioned Ascii/auto-pushing Keg golfing!
four
Explanation
four# Push 4 onto the stack
#Implicit Print
-
\$\begingroup\$ Ah, didn't see your answer when I posted mine. Good job! \$\endgroup\$2019年10月20日 00:31:32 +00:00Commented Oct 20, 2019 at 0:31
Shakespeare Programming Language, 800 bytes
(Whitespace added for readability)
800 Bytes---- filler.Ajax,.Puck,.Act I:.
Scene I:.[Enter Ajax and Puck]Ajax:
You is the sum ofthe sum ofthe cube ofa big big cat a big big cat a cat.Speak thy.
You is the sum ofyou a big big cat.Speak thy.
You is the sum ofyou a big pig.Speak thy.
You is the sum ofyou a cat.Speak thy.
You is the sum ofyou twice twice the sum ofa big cat a cat.Speak thy.
You big big big big big cat.Speak thy.
You is twice the sum ofyou a big big cat.Remember you.Speak thy.
You is the sum oftwice you the cube ofthe sum ofa big pig a pig.Speak thy.
You is the sum ofyou the sum ofa big big big pig a cat.Speak thy.
Recall.You is the sum ofyou a big big pig.Remember you.Remember you.Speak thy.
You is the sum ofyou twice the sum ofa big big big cat a pig.Speak thy.
Recall.You is the sum ofyou a cat.Speak thy.
Recall.Speak thy.
Prints EIGHT HunDRED. The math to get from one letter to another was very complicated and there was little room for error. This is probably improvable in terms of code, but 700 is most likely impossible. Little improvement saving 2 bytes in the actual code because I missed out on optimizing 2*(4+2) to 2*2*(2+1) for some reason.
C# (.NET Core), 64 bytes
class P{static void Main(){System.Console.Write("sixty four");}}
I had to see what a non-competitive language would score.
-
5
-
1
Excel, 4 bytes
four
Uninteresting answer, not using a formula.
Excel, 5 bytes
'five
Using a formula, requires at least 3 extra bytes (=, ", ").
Excel, 6 bytes
="six"
Excel, 12 bytes
="tw"&"elve"
=T("twelve")
Excel, 14 bytes
=T("fourteen")
Excel, 16 bytes
=IF(1,"sixteen")
Excel, 18 bytes and upwards
=TRIM(" % ")
Insert required text, padded with required whitespace.
Taxi, (削除) 164 (削除ここまで) 160 bytes
"One hundred sixty" is waiting at Writer's Depot.
Go to Writer's Depot: w 1 r 3 l 2 l.
Pickup a passenger going to Post Office.
Go to Post Office:n 1 r 2 r 1 l.
This also throws an error because I don't return the taxi to the garage so my boss fires me. It's not a requirement to not throw errors, though, so I guess I'm fired.
-
\$\begingroup\$ Yeah, that's all and well. \$\endgroup\$AndrewTheCodegolfer– AndrewTheCodegolfer2019年10月22日 14:52:00 +00:00Commented Oct 22, 2019 at 14:52
-
1\$\begingroup\$ Welcome to Code Golf! Looks like an interesting language. \$\endgroup\$2023年03月27日 18:39:12 +00:00Commented Mar 27, 2023 at 18:39
-
2\$\begingroup\$ I think you just beat me to this. Same code works in both Python 3 and Lua. \$\endgroup\$ouflak– ouflak2019年10月19日 15:41:35 +00:00Commented Oct 19, 2019 at 15:41
Batch, 10 bytes
@ echo ten
If you think the extra space after the @ is ugly, the next possible answer is:
@echo twelve
-
\$\begingroup\$ Why not just
echo nine? \$\endgroup\$Night2– Night22019年10月19日 15:20:25 +00:00Commented Oct 19, 2019 at 15:20 -
\$\begingroup\$ @Night2 Because that echos the command
echo nineas well as its output. \$\endgroup\$Neil– Neil2019年10月19日 16:36:22 +00:00Commented Oct 19, 2019 at 16:36 -
\$\begingroup\$ But running directly from command prompt, doesn't do that (unless it doesn't count as Batch). \$\endgroup\$Night2– Night22019年10月19日 17:38:10 +00:00Commented Oct 19, 2019 at 17:38
-
1\$\begingroup\$ @Night2 No, that would be a snippet, or a REPL, or something along those lines. \$\endgroup\$Neil– Neil2019年10月19日 18:33:07 +00:00Commented Oct 19, 2019 at 18:33
-
\$\begingroup\$ Works with
'instead of"too. Also why legacy? \$\endgroup\$Makonede– Makonede2021年05月10日 21:29:54 +00:00Commented May 10, 2021 at 21:29 -
1\$\begingroup\$ @Makonede yes it seems to work but honestly Idk osabie I wrote this following the docs, I was sure it has a dictionary. One of the most interesting esoteric languages for sure.. Maybe I 'll try to learn in the future! \$\endgroup\$AZTECCO– AZTECCO2021年05月18日 20:00:29 +00:00Commented May 18, 2021 at 20:00
-
3
-
\$\begingroup\$ @Night2 Thank your for the improvment and the tip :) \$\endgroup\$Paul-B98– Paul-B982019年10月19日 18:05:23 +00:00Commented Oct 19, 2019 at 18:05
Proper spacing is also required.Does this mean no trailing spaces in the output? \$\endgroup\$